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

Side by Side Diff: LayoutTests/inspector/elements/elements-panel-selection-on-refresh.html

Issue 218703002: DevTools: [wip] move Elements panel off WebInspector.domModel and single tree outline. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review comment addressed (and much more) Created 6 years, 8 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/elements-test.js"></script> 4 <script src="../../http/tests/inspector/elements-test.js"></script>
5 <script> 5 <script>
6 6
7 function test() 7 function test()
8 { 8 {
9 InspectorTest.selectNodeWithId("test-topic", step1); 9 InspectorTest.selectNodeWithId("test-topic", step1);
10 10
11 function step1() 11 function step1()
12 { 12 {
13 InspectorTest.reloadPage(step2); 13 InspectorTest.reloadPage(step2);
14 } 14 }
15 15
16 function step2() 16 function step2()
17 { 17 {
18 InspectorTest.runAfterPendingDispatches(step3); 18 InspectorTest.runAfterPendingDispatches(step3);
19 } 19 }
20 20
21 function step3() 21 function step3()
22 { 22 {
23 // We should have "test-topic" element selected after refresh. 23 // We should have "test-topic" element selected after refresh.
24 var selectedElement = WebInspector.panels.elements.treeOutline.selectedT reeElement; 24 var selectedElement = InspectorTest.firstElementsTreeOutline().selectedT reeElement;
25 var nodeName = selectedElement ? selectedElement.representedObject.nodeN ame() : "null"; 25 var nodeName = selectedElement ? selectedElement.representedObject.nodeN ame() : "null";
26 InspectorTest.addResult("Selected element should be 'P', was: '" + nodeN ame + "'"); 26 InspectorTest.addResult("Selected element should be 'P', was: '" + nodeN ame + "'");
27 InspectorTest.completeTest(); 27 InspectorTest.completeTest();
28 } 28 }
29 } 29 }
30 30
31 </script> 31 </script>
32 </head> 32 </head>
33 33
34 <body onload="runTest()"> 34 <body onload="runTest()">
35 <p id="test-topic"> 35 <p id="test-topic">
36 Tests that elements panel preserves selected node on page refresh. 36 Tests that elements panel preserves selected node on page refresh.
37 </p> 37 </p>
38 38
39 </body> 39 </body>
40 </html> 40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698