Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: LayoutTests/inspector/extensions/extensions-panel.html

Issue 720223002: DevTools: only allow status bar items in status bars. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/console-test.js"></script> 4 <script src="../../http/tests/inspector/console-test.js"></script>
5 <script src="../../http/tests/inspector/network-test.js"></script> 5 <script src="../../http/tests/inspector/network-test.js"></script>
6 <script src="../../http/tests/inspector/sources-test.js"></script> 6 <script src="../../http/tests/inspector/sources-test.js"></script>
7 <script src="../../http/tests/inspector/resources-test.js"></script> 7 <script src="../../http/tests/inspector/resources-test.js"></script>
8 <script src="../../http/tests/inspector/extensions-test.js"></script> 8 <script src="../../http/tests/inspector/extensions-test.js"></script>
9 <script type="text/javascript"> 9 <script type="text/javascript">
10 function logMessage() 10 function logMessage()
11 { 11 {
12 console.log("hello"); 12 console.log("hello");
13 } 13 }
14 14
15 function initialize_extensionsPanelTest() 15 function initialize_extensionsPanelTest()
16 { 16 {
17 InspectorTest.getPanelSize = function() 17 InspectorTest.getPanelSize = function()
18 { 18 {
19 var boundingRect = WebInspector.inspectorView._tabbedPane._contentElemen t.getBoundingClientRect(); 19 var boundingRect = WebInspector.inspectorView._tabbedPane._contentElemen t.getBoundingClientRect();
20 return { 20 return {
21 width: boundingRect.width, 21 width: boundingRect.width,
22 height: boundingRect.height 22 height: boundingRect.height
23 }; 23 };
24 } 24 }
25 25
26 InspectorTest.dumpStatusBarButtons = function() 26 InspectorTest.dumpStatusBarButtons = function()
27 { 27 {
28 var panel = WebInspector.inspectorView.currentPanel(); 28 var panel = WebInspector.inspectorView.currentPanel();
29 var items = panel._panelStatusBarElement.children; 29 var items = panel._panelStatusBar.element.children;
30 InspectorTest.addResult("Status bar buttons state:"); 30 InspectorTest.addResult("Status bar buttons state:");
31 for (var i = 0; i < items.length; ++i) { 31 for (var i = 0; i < items.length; ++i) {
32 var item = items[i]; 32 var item = items[i];
33 if (!(item instanceof HTMLButtonElement)) { 33 if (!(item instanceof HTMLButtonElement)) {
34 InspectorTest.addResult("status bar item " + i + " is not a butt on."); 34 InspectorTest.addResult("status bar item " + i + " is not a butt on.");
35 continue; 35 continue;
36 } 36 }
37 // Strip url(...) and prefix of the URL within, leave just last 3 co mponents. 37 // Strip url(...) and prefix of the URL within, leave just last 3 co mponents.
38 var url = item.style.backgroundImage.replace(/^url\(.*(([/][^/]*){3} [^/)]*)\)$/, "...$1"); 38 var url = item.style.backgroundImage.replace(/^url\(.*(([/][^/]*){3} [^/)]*)\)$/, "...$1");
39 InspectorTest.addResult("status bar item " + i + ", icon: " + url + ", tooltip: '" + item.title + "', disabled: " + item.disabled); 39 InspectorTest.addResult("status bar item " + i + ", icon: " + url + ", tooltip: '" + item.title + "', disabled: " + item.disabled);
40 } 40 }
41 } 41 }
42 42
43 InspectorTest.clickButton = function(index) 43 InspectorTest.clickButton = function(index)
44 { 44 {
45 var panel = WebInspector.inspectorView.currentPanel(); 45 var panel = WebInspector.inspectorView.currentPanel();
46 panel._panelStatusBarElement.children[index].click(); 46 panel._panelStatusBar.element.children[index].click();
47 } 47 }
48 48
49 InspectorTest.clickOnURL = function() 49 InspectorTest.clickOnURL = function()
50 { 50 {
51 InspectorTest.disableConsoleViewport(); 51 InspectorTest.disableConsoleViewport();
52 var xpathResult = document.evaluate("//a[starts-with(., 'extensions-pane l.html')]", WebInspector.ConsolePanel._view()._viewport.element, null, XPathResu lt.ANY_UNORDERED_NODE_TYPE, null); 52 var xpathResult = document.evaluate("//a[starts-with(., 'extensions-pane l.html')]", WebInspector.ConsolePanel._view()._viewport.element, null, XPathResu lt.ANY_UNORDERED_NODE_TYPE, null);
53 var click = document.createEvent("MouseEvent"); 53 var click = document.createEvent("MouseEvent");
54 click.initMouseEvent("click", true, true); 54 click.initMouseEvent("click", true, true);
55 xpathResult.singleNodeValue.dispatchEvent(click); 55 xpathResult.singleNodeValue.dispatchEvent(click);
56 } 56 }
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 var img = document.createElement("img"); 314 var img = document.createElement("img");
315 img.src = "resources/abe.png"; 315 img.src = "resources/abe.png";
316 document.body.appendChild(img); 316 document.body.appendChild(img);
317 } 317 }
318 </script> 318 </script>
319 </head> 319 </head>
320 <body onload="runTest()"> 320 <body onload="runTest()">
321 <p>Tests WebInspector extension API</p> 321 <p>Tests WebInspector extension API</p>
322 </body> 322 </body>
323 </html> 323 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698