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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/node-reselect-on-append-child.html

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots 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 5
6 <script> 6 <script>
7 7
8 function appendNewNode() 8 function appendNewNode()
9 { 9 {
10 var element = document.querySelector("#first"); 10 var element = document.querySelector("#first");
11 var second = document.createElement("div"); 11 var second = document.createElement("div");
12 element.parentElement.appendChild(second); 12 element.parentElement.appendChild(second);
13 } 13 }
14 14
15 function test() 15 function test()
16 { 16 {
17 InspectorTest.selectNodeWithId("first", onNodeSelected); 17 InspectorTest.selectNodeWithId("first", onNodeSelected);
18 18
19 function onNodeSelected() 19 function onNodeSelected()
20 { 20 {
21 InspectorTest.firstElementsTreeOutline().addEventListener(WebInspector.E lementsTreeOutline.Events.SelectedNodeChanged, onSelectionChangedEvent); 21 InspectorTest.firstElementsTreeOutline().addEventListener(Elements.Eleme ntsTreeOutline.Events.SelectedNodeChanged, onSelectionChangedEvent);
22 InspectorTest.addSniffer(WebInspector.ElementsTreeOutline.prototype, "_u pdateChildren", onNodeAppended); 22 InspectorTest.addSniffer(Elements.ElementsTreeOutline.prototype, "_updat eChildren", onNodeAppended);
23 InspectorTest.evaluateInPage("appendNewNode()"); 23 InspectorTest.evaluateInPage("appendNewNode()");
24 } 24 }
25 25
26 function onSelectionChangedEvent() 26 function onSelectionChangedEvent()
27 { 27 {
28 InspectorTest.addResult("ERROR: erroneous selection changed event receiv ed."); 28 InspectorTest.addResult("ERROR: erroneous selection changed event receiv ed.");
29 InspectorTest.completeTest(); 29 InspectorTest.completeTest();
30 } 30 }
31 31
32 function onNodeAppended() 32 function onNodeAppended()
33 { 33 {
34 InspectorTest.completeTest(); 34 InspectorTest.completeTest();
35 } 35 }
36 } 36 }
37 37
38 </script> 38 </script>
39 </head> 39 </head>
40 40
41 <body onload="runTest()"> 41 <body onload="runTest()">
42 <p>The test verifies that SelectedNodeChanged event is not fired whenever a chil d gets added to the node.</p> 42 <p>The test verifies that SelectedNodeChanged event is not fired whenever a chil d gets added to the node.</p>
43 <div> 43 <div>
44 <div id="first">First Child</div> 44 <div id="first">First Child</div>
45 </div> 45 </div>
46 46
47 </body> 47 </body>
48 </html> 48 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698