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

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

Issue 667623002: DevTools: make extension server a part of core, panels' code should depend on it. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: for review Created 6 years, 2 months 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/extensions-test.js"></script> 4 <script src="../../http/tests/inspector/extensions-test.js"></script>
5 <script type="text/javascript"> 5 <script type="text/javascript">
6 6
7 function initialize_extensionsSidebarTest() 7 function initialize_extensionsSidebarTest()
8 { 8 {
9 InspectorTest.dumpSidebarContent = function(panelName, callback) 9 InspectorTest.dumpSidebarContent = function(panelName, callback)
10 { 10 {
11 var sidebar = InspectorTest._extensionSidebar(panelName); 11 var sidebar = InspectorTest._extensionSidebar(panelName);
12 InspectorTest.runAfterPendingDispatches(function() { 12 InspectorTest.runAfterPendingDispatches(function() {
13 InspectorTest.addResult(panelName + " sidebar content: " + sidebar.b odyElement.textContent); 13 InspectorTest.addResult(panelName + " sidebar content: " + sidebar.b odyElement.textContent);
14 callback(); 14 callback();
15 }); 15 });
16 } 16 }
17 17
18 InspectorTest.expandSidebar = function(panelName, callback) 18 InspectorTest.expandSidebar = function(panelName, callback)
19 { 19 {
20 var sidebar = InspectorTest._extensionSidebar(panelName); 20 var sidebar = InspectorTest._extensionSidebar(panelName);
21 InspectorTest.runAfterPendingDispatches(function() { 21 InspectorTest.runAfterPendingDispatches(function() {
22 sidebar.expand(); 22 sidebar.expand();
23 callback(); 23 callback();
24 }); 24 });
25 } 25 }
26 26
27 InspectorTest._extensionSidebar = function(panelName) 27 InspectorTest._extensionSidebar = function(panelName)
28 { 28 {
29 var sidebarPanes = WebInspector.panels[panelName]._extensionSidebarPanes ; 29 var sidebarPanes = WebInspector.extensionServer.sidebarPanes();
30 return sidebarPanes[sidebarPanes.length - 1]; 30 var result;
31 for (var i = 0; i < sidebarPanes.length; ++i) {
32 if (sidebarPanes[i].panelName() === panelName)
33 result = sidebarPanes[i];
34 }
35 return result;
31 } 36 }
32 } 37 }
33 38
34 function extension_sidebarSetPage(panelName, nextTest) 39 function extension_sidebarSetPage(panelName, nextTest)
35 { 40 {
36 function onSidebarCreated(sidebar) 41 function onSidebarCreated(sidebar)
37 { 42 {
38 output("Sidebar created"); 43 output("Sidebar created");
39 dumpObject(sidebar); 44 dumpObject(sidebar);
40 function onShown(win) 45 function onShown(win)
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 } 230 }
226 webInspector.panels[panelName].createSidebarPane("Sidebar Test: replace pag e with object", onSidebarCreated); 231 webInspector.panels[panelName].createSidebarPane("Sidebar Test: replace pag e with object", onSidebarCreated);
227 } 232 }
228 233
229 </script> 234 </script>
230 </head> 235 </head>
231 <body onload="runTest()"> 236 <body onload="runTest()">
232 <p>Tests sidebars in WebInspector extensions API</p> 237 <p>Tests sidebars in WebInspector extensions API</p>
233 </body> 238 </body>
234 </html> 239 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698