Changeset 122216 in webkit
- Timestamp:
- Jul 10, 2012 5:23:46 AM (12 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r122214 r122216 1 2012-07-09 Andrey Kosyakov <caseq@chromium.org> 2 3 Web Inspector: [Extensions API] simplify panel size check in extensions-panel.html 4 https://bugs.webkit.org/show_bug.cgi?id=90799 5 6 Reviewed by Vsevolod Vlasov. 7 8 - use window argument in Panel.onShown() to check panel window size; 9 10 * http/tests/inspector/resources/extension-panel.html: 11 * inspector/extensions/extensions-panel-expected.txt: 12 * inspector/extensions/extensions-panel.html: 13 * platform/mac/Skipped: 14 * platform/qt/Skipped: 15 * platform/wincairo/Skipped: 16 1 17 2012-07-10 Ádám Kallai <kadam@inf.u-szeged.hu> 2 18 -
trunk/LayoutTests/http/tests/inspector/resources/extension-panel.html
r89659 r122216 2 2 <head> 3 3 <script src="extension-main.js"></script> 4 <script type="text/javascript">5 function onLoad()6 {7 var width = window.innerWidth;8 var height = window.innerHeight;9 evaluateOnFrontend("if (InspectorTest.panelCallback) InspectorTest.panelCallback(" + width + "," + height +");");10 }11 </script>12 4 </head> 13 <body onload="onLoad()">5 <body> 14 6 </body> 15 7 </html> -
trunk/LayoutTests/inspector/extensions/extensions-panel-expected.txt
r121046 r122216 22 22 show : <function> 23 23 } 24 Panel shown 24 25 Extension panel size correct 25 Panel shown26 26 RUNNING TEST: extension_testSearch 27 27 Panel hidden -
trunk/LayoutTests/inspector/extensions/extensions-panel.html
r121046 r122216 11 11 function initialize_extensionsPanelTest() 12 12 { 13 InspectorTest.panelCallback = function(width, height) 14 { 15 InspectorTest.checkPanelSize(width, height); 16 var callback = InspectorTest._pendingPanelSizeTestCallback; 17 if (callback) { 18 delete InspectorTest._pendingPanelSizeTestCallback; 19 callback(); 20 } 21 } 22 23 InspectorTest.waitForPanel = function(callback) 24 { 25 InspectorTest._pendingPanelSizeTestCallback = callback; 26 } 27 28 InspectorTest.checkPanelSize = function(width, height) 13 InspectorTest.getPanelSize = function() 29 14 { 30 15 var extensionPanel = WebInspector.inspectorView._panelOrder[WebInspector.inspectorView._panelOrder.length - 1]; 31 16 var boundingRect = document.getElementById("main-panels").getBoundingClientRect(); 32 InspectorTest.assertEquals(boundingRect.width, width, "panel width mismatch"); 33 InspectorTest.assertEquals(boundingRect.height, height, "panel height mismatch"); 34 InspectorTest.addResult("Extension panel size correct"); 17 return { 18 width: boundingRect.width, 19 height: boundingRect.height 20 }; 35 21 } 36 22 … … 71 57 function extension_testCreatePanel(nextTest) 72 58 { 59 var expectOnShown = false; 60 61 function onPanelShown(panel, window) 62 { 63 if (!expectOnShown) { 64 output("FAIL: unexpected onShown event"); 65 nextTest(); 66 return; 67 } 68 output("Panel shown"); 69 panel.onShown.removeListener(onPanelShown); 70 evaluateOnFrontend("reply(InspectorTest.getPanelSize())", function(result) { 71 if (result.width !== window.innerWidth) 72 output("panel width mismatch, outer: " + result.width + ", inner:" + window.innerWidth); 73 else if (result.height !== window.innerHeight) 74 output("panel height mismatch, outer: " + result.height + ", inner:" + window.innerHeight); 75 else 76 output("Extension panel size correct"); 77 nextTest(); 78 }); 79 } 80 73 81 function onPanelCreated(panel) 74 82 { … … 78 86 output("Panel hidden"); 79 87 }); 80 panel.onShown.addListener(function(window) { 81 output("Panel shown"); 82 }); 88 panel.onShown.addListener(onPanelShown.bind(this, panel)); 83 89 84 90 // This is not authorized and therefore should not produce any output … … 88 94 function handleOpenResource(resource, lineNumber) 89 95 { 90 // This will force extension iframe to be really loaded and will cause waitForPanel() callback below.96 // This will force extension iframe to be really loaded. 91 97 panel.show(); 92 98 } … … 94 100 evaluateOnFrontend("WebInspector.openAnchorLocationRegistry._activeHandler = 'test extension'"); 95 101 webInspector.inspectedWindow.eval("logMessage()", function() { 102 expectOnShown = true; 96 103 evaluateOnFrontend("InspectorTest.clickOnURL();"); 97 104 }); 98 105 } 99 // The panel code is expected to report its size via InspectorTest.panelCallback()100 evaluateOnFrontend("InspectorTest.waitForPanel(reply);", nextTest);101 106 var basePath = location.pathname.replace(/\/[^/]*$/, "/"); 102 107 webInspector.panels.create("Test Panel", basePath + "extension-panel.png", basePath + "extension-panel.html", onPanelCreated); -
trunk/LayoutTests/platform/mac/Skipped
r122165 r122216 852 852 inspector/extensions/extensions-audits-content-script.html 853 853 854 # https://bugs.webkit.org/show_bug.cgi?id=89790855 inspector/extensions/extensions-panel.html856 857 854 # https://bugs.webkit.org/show_bug.cgi?id=86480 858 855 plugins/npruntime/delete-plugin-within-setProperty.html -
trunk/LayoutTests/platform/qt/Skipped
r122214 r122216 973 973 # https://bugs.webkit.org/show_bug.cgi?id=64002 974 974 fast/selectors/unqualified-hover-strict.html 975 976 # [Qt] inspector/extensions/extensions-panel.html is flakey977 # https://bugs.webkit.org/show_bug.cgi?id=89333978 inspector/extensions/extensions-panel.html979 975 980 976 # [Qt] http/tests/misc/script-defer.html is flakey -
trunk/LayoutTests/platform/wincairo/Skipped
r121907 r122216 439 439 inspector/extensions/extensions-console.html 440 440 inspector/extensions/extensions-events.html 441 inspector/extensions/extensions-panel.html442 441 inspector/styles/styles-invalid-color-values.html 443 442 inspector/timeline/timeline-animation-frame.html
Note: See TracChangeset
for help on using the changeset viewer.