WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-90799-20120709214637.patch (text/plain), 8.53 KB, created by
Andrey Kosyakov
on 2012-07-09 10:46:39 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Andrey Kosyakov
Created:
2012-07-09 10:46:39 PDT
Size:
8.53 KB
patch
obsolete
>Subversion Revision: 122106 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 8a3f33093b84dc89b422ef236e1bffc4674f610d..852767fbf0b0b68d2506b4fd6e69745b3dd14377 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,19 @@ >+2012-07-09 Andrey Kosyakov <caseq@chromium.org> >+ >+ Web Inspector: [Extensions API] simplify panel size check in extensions-panel.html >+ https://bugs.webkit.org/show_bug.cgi?id=90799 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ - use window argument in Panel.onShown() to check panel window size; >+ >+ * http/tests/inspector/resources/extension-panel.html: >+ * inspector/extensions/extensions-panel-expected.txt: >+ * inspector/extensions/extensions-panel.html: >+ * platform/mac/Skipped: >+ * platform/qt/Skipped: >+ * platform/wincairo/Skipped: >+ > 2012-07-09 Pavel Feldman <pfeldman@chromium.org> > > Web Inspector: inspector does not reflect newly created text nodes from contenteditable >diff --git a/LayoutTests/http/tests/inspector/resources/extension-panel.html b/LayoutTests/http/tests/inspector/resources/extension-panel.html >index b277f4f8061b88cf99413ceacb02c7cc78ea8191..d194ea167743e3860d39de67c2160717f55b6640 100644 >--- a/LayoutTests/http/tests/inspector/resources/extension-panel.html >+++ b/LayoutTests/http/tests/inspector/resources/extension-panel.html >@@ -1,15 +1,7 @@ > <html> > <head> > <script src="extension-main.js"></script> >-<script type="text/javascript"> >-function onLoad() >-{ >- var width = window.innerWidth; >- var height = window.innerHeight; >- evaluateOnFrontend("if (InspectorTest.panelCallback) InspectorTest.panelCallback(" + width + "," + height +");"); >-} >-</script> > </head> >-<body onload="onLoad()"> >+<body> > </body> > </html> >diff --git a/LayoutTests/inspector/extensions/extensions-panel-expected.txt b/LayoutTests/inspector/extensions/extensions-panel-expected.txt >index 867dab889fe7ad09d4b19ceef0808ac72ebc0b8b..f22929427ebd5ff41847cada96927d7a0f9edd4b 100644 >--- a/LayoutTests/inspector/extensions/extensions-panel-expected.txt >+++ b/LayoutTests/inspector/extensions/extensions-panel-expected.txt >@@ -21,8 +21,8 @@ Panel created > createStatusBarButton : <function> > show : <function> > } >-Extension panel size correct > Panel shown >+Extension panel size correct > RUNNING TEST: extension_testSearch > Panel hidden > Panel searched: >diff --git a/LayoutTests/inspector/extensions/extensions-panel.html b/LayoutTests/inspector/extensions/extensions-panel.html >index 262dc5c53844416e6571bc1e28e2f88a9add5079..f06a8e9dd1bab4cd1861a9fbfb36c8fb8ffbd3cb 100644 >--- a/LayoutTests/inspector/extensions/extensions-panel.html >+++ b/LayoutTests/inspector/extensions/extensions-panel.html >@@ -10,28 +10,14 @@ function logMessage() > > function initialize_extensionsPanelTest() > { >- InspectorTest.panelCallback = function(width, height) >- { >- InspectorTest.checkPanelSize(width, height); >- var callback = InspectorTest._pendingPanelSizeTestCallback; >- if (callback) { >- delete InspectorTest._pendingPanelSizeTestCallback; >- callback(); >- } >- } >- >- InspectorTest.waitForPanel = function(callback) >- { >- InspectorTest._pendingPanelSizeTestCallback = callback; >- } >- >- InspectorTest.checkPanelSize = function(width, height) >+ InspectorTest.getPanelSize = function() > { > var extensionPanel = WebInspector.inspectorView._panelOrder[WebInspector.inspectorView._panelOrder.length - 1]; > var boundingRect = document.getElementById("main-panels").getBoundingClientRect(); >- InspectorTest.assertEquals(boundingRect.width, width, "panel width mismatch"); >- InspectorTest.assertEquals(boundingRect.height, height, "panel height mismatch"); >- InspectorTest.addResult("Extension panel size correct"); >+ return { >+ width: boundingRect.width, >+ height: boundingRect.height >+ }; > } > > InspectorTest.dumpStatusBarButtons = function() >@@ -70,6 +56,28 @@ function initialize_extensionsPanelTest() > > function extension_testCreatePanel(nextTest) > { >+ var expectOnShown = false; >+ >+ function onPanelShown(panel, window) >+ { >+ if (!expectOnShown) { >+ output("FAIL: unexpected onShown event"); >+ nextTest(); >+ return; >+ } >+ output("Panel shown"); >+ panel.onShown.removeListener(onPanelShown); >+ evaluateOnFrontend("reply(InspectorTest.getPanelSize())", function(result) { >+ if (result.width !== window.innerWidth) >+ output("panel width mismatch, outer: " + result.width + "inner:" + window.innerWidth); >+ else if (result.height !== window.innerHeight) >+ output("panel height mismatch, outer: " + result.height + "inner:" + window.innerHeight); >+ else >+ output("Extension panel size correct"); >+ nextTest(); >+ }); >+ } >+ > function onPanelCreated(panel) > { > output("Panel created"); >@@ -77,9 +85,7 @@ function extension_testCreatePanel(nextTest) > panel.onHidden.addListener(function() { > output("Panel hidden"); > }); >- panel.onShown.addListener(function(window) { >- output("Panel shown"); >- }); >+ panel.onShown.addListener(onPanelShown.bind(this, panel)); > > // This is not authorized and therefore should not produce any output > panel.show(); >@@ -87,17 +93,16 @@ function extension_testCreatePanel(nextTest) > > function handleOpenResource(resource, lineNumber) > { >- // This will force extension iframe to be really loaded and will cause waitForPanel() callback below. >+ // This will force extension iframe to be really loaded. > panel.show(); > } > webInspector.panels.setOpenResourceHandler(handleOpenResource); > evaluateOnFrontend("WebInspector.openAnchorLocationRegistry._activeHandler = 'test extension'"); > webInspector.inspectedWindow.eval("logMessage()", function() { >+ expectOnShown = true; > evaluateOnFrontend("InspectorTest.clickOnURL();"); > }); > } >- // The panel code is expected to report its size via InspectorTest.panelCallback() >- evaluateOnFrontend("InspectorTest.waitForPanel(reply);", nextTest); > var basePath = location.pathname.replace(/\/[^/]*$/, "/"); > webInspector.panels.create("Test Panel", basePath + "extension-panel.png", basePath + "extension-panel.html", onPanelCreated); > } >diff --git a/LayoutTests/platform/mac/Skipped b/LayoutTests/platform/mac/Skipped >index 0cd0e3e5d0b90f952d26ac78ff3cfd4fba01afdd..144c6571a8b021368b99f3eb276c350b4cae23ef 100644 >--- a/LayoutTests/platform/mac/Skipped >+++ b/LayoutTests/platform/mac/Skipped >@@ -851,9 +851,6 @@ http/tests/security/referrer-policy-redirect-link.html > inspector/extensions/extensions-eval-content-script.html > inspector/extensions/extensions-audits-content-script.html > >-# https://bugs.webkit.org/show_bug.cgi?id=89790 >-inspector/extensions/extensions-panel.html >- > # https://bugs.webkit.org/show_bug.cgi?id=86480 > plugins/npruntime/delete-plugin-within-setProperty.html > plugins/npruntime/delete-plugin-within-hasProperty-return-true.html >diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped >index b4c05eca9a75f5fcb584bafce872cf7d27286fb0..42e7e96b7ab0cf15f7eb5c724c809683456efcd4 100644 >--- a/LayoutTests/platform/qt/Skipped >+++ b/LayoutTests/platform/qt/Skipped >@@ -973,10 +973,6 @@ http/tests/misc/link-rel-icon-beforeload.html > # https://bugs.webkit.org/show_bug.cgi?id=64002 > fast/selectors/unqualified-hover-strict.html > >-# [Qt] inspector/extensions/extensions-panel.html is flakey >-# https://bugs.webkit.org/show_bug.cgi?id=89333 >-inspector/extensions/extensions-panel.html >- > # =========================================================================== # > # failing media tests > # =========================================================================== # >diff --git a/LayoutTests/platform/wincairo/Skipped b/LayoutTests/platform/wincairo/Skipped >index e8fa77de123e951cdb459bec753b1bb62891b9f9..d0f91afb7db62b26dc1b72eebf4d8c861d1e9b9d 100644 >--- a/LayoutTests/platform/wincairo/Skipped >+++ b/LayoutTests/platform/wincairo/Skipped >@@ -438,7 +438,6 @@ inspector/debugger/breakpoint-manager.html > inspector/debugger/raw-source-code.html > inspector/extensions/extensions-console.html > inspector/extensions/extensions-events.html >-inspector/extensions/extensions-panel.html > inspector/styles/styles-invalid-color-values.html > inspector/timeline/timeline-animation-frame.html > inspector/timeline/timeline-load-event.html
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
vsevik
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 90799
: 151274