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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/reveal-whitespace-text-node.html

Issue 2449963004: Reland of DevTools: properly restore selected DOMNode in Elements panel. (Closed)
Patch Set: Created 4 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
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 whitespaceChild() 7 function whitespaceChild()
8 { 8 {
9 return document.getElementById("test").firstChild; 9 return document.getElementById("test").firstChild;
10 } 10 }
11 11
12 function test() 12 function test()
13 { 13 {
14 InspectorTest.evaluateInPage("whitespaceChild()", childCallback); 14 InspectorTest.evaluateInPage("whitespaceChild()", childCallback);
15 15
16 function childCallback(childObject) 16 function childCallback(childObject)
17 { 17 {
18 InspectorTest.firstElementsTreeOutline().addEventListener(WebInspector.E lementsTreeOutline.Events.SelectedNodeChanged, selectedNodeChanged); 18 InspectorTest.firstElementsTreeOutline().addEventListener(WebInspector.E lementsTreeOutline.Events.SelectedNodeChanged, selectedNodeChanged);
19 WebInspector.Revealer.reveal(childObject); 19 WebInspector.Revealer.reveal(childObject);
20 } 20 }
21 21
22 function selectedNodeChanged(event) { 22 function selectedNodeChanged(event) {
23 var node = event.data; 23 var node = event.data.node;
24 InspectorTest.addResult("SelectedNodeChanged: " + node.localName()); 24 InspectorTest.addResult("SelectedNodeChanged: " + node.localName());
25 InspectorTest.completeTest(); 25 InspectorTest.completeTest();
26 } 26 }
27 } 27 }
28 </script> 28 </script>
29 </head> 29 </head>
30 30
31 <body onload="runTest()"> 31 <body onload="runTest()">
32 32
33 <p id="description">This test verifies that revealing a whitespace text node Rem oteObject reveals its parentElement DIV.</p> 33 <p id="description">This test verifies that revealing a whitespace text node Rem oteObject reveals its parentElement DIV.</p>
34 34
35 <div id="test"> 35 <div id="test">
36 </div> 36 </div>
37 37
38 </body> 38 </body>
39 </html> 39 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698