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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/elements/elements-panel-limited-children.html

Issue 1877223003: DevTools: deprecate InspectorTest.runAfterPendingDispatches (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 insertNode() 7 function insertNode()
8 { 8 {
9 var dataElement = document.getElementById("data"); 9 var dataElement = document.getElementById("data");
10 dataElement.appendChild(document.createElement("a")); 10 dataElement.appendChild(document.createElement("a"));
11 dataElement.removeChild(document.getElementById("id2")); 11 dataElement.removeChild(document.getElementById("id2"));
12 var aElement = document.createElement("a"); 12 var aElement = document.createElement("a");
13 dataElement.insertBefore(aElement, document.getElementById("id1")); 13 dataElement.insertBefore(aElement, document.getElementById("id1"));
14 dataElement.appendChild(aElement); 14 dataElement.appendChild(aElement);
15 dataElement.insertBefore(aElement, document.getElementById("id1")); 15 dataElement.insertBefore(aElement, document.getElementById("id1"));
16 } 16 }
17 17
18 function test() 18 function test()
19 { 19 {
20 var dataTreeElement; 20 var dataTreeElement;
21 InspectorTest.nodeWithId("data", step1); 21 InspectorTest.nodeWithId("data", step1);
22 22
23 function step1(node) 23 function step1(node)
24 { 24 {
25 dataTreeElement = InspectorTest.firstElementsTreeOutline().findTreeEleme nt(node); 25 dataTreeElement = InspectorTest.firstElementsTreeOutline().findTreeEleme nt(node);
26 dataTreeElement._expandedChildrenLimit = 5; 26 dataTreeElement._expandedChildrenLimit = 5;
27 dataTreeElement.reveal(); 27 dataTreeElement.reveal();
28 dataTreeElement.expand(); 28 dataTreeElement.expand();
29 InspectorTest.runAfterPendingDispatches(step2); 29 InspectorTest.deprecatedRunAfterPendingDispatches(step2);
30 } 30 }
31 31
32 function step2() 32 function step2()
33 { 33 {
34 InspectorTest.addResult("=========== Loaded 5 children ==========="); 34 InspectorTest.addResult("=========== Loaded 5 children ===========");
35 dumpElementsTree(); 35 dumpElementsTree();
36 InspectorTest.addSniffer(WebInspector.ElementsTreeOutline.prototype, "_u pdateModifiedNodes", step3); 36 InspectorTest.addSniffer(WebInspector.ElementsTreeOutline.prototype, "_u pdateModifiedNodes", step3);
37 InspectorTest.evaluateInPage("insertNode()"); 37 InspectorTest.evaluateInPage("insertNode()");
38 } 38 }
39 39
40 function step3() 40 function step3()
41 { 41 {
42 InspectorTest.addResult("=========== Modified children ==========="); 42 InspectorTest.addResult("=========== Modified children ===========");
43 dumpElementsTree(); 43 dumpElementsTree();
44 dataTreeElement.expandAllButtonElement.button.click(); 44 dataTreeElement.expandAllButtonElement.button.click();
45 InspectorTest.runAfterPendingDispatches(step4); 45 InspectorTest.deprecatedRunAfterPendingDispatches(step4);
46 } 46 }
47 47
48 function step4() 48 function step4()
49 { 49 {
50 InspectorTest.addResult("=========== Loaded all children ==========="); 50 InspectorTest.addResult("=========== Loaded all children ===========");
51 dumpElementsTree(); 51 dumpElementsTree();
52 InspectorTest.completeTest(); 52 InspectorTest.completeTest();
53 } 53 }
54 54
55 function dumpElementsTree() 55 function dumpElementsTree()
(...skipping 15 matching lines...) Expand all
71 <div id="id7">7</div> 71 <div id="id7">7</div>
72 <div id="id8">8</div> 72 <div id="id8">8</div>
73 <div id="id9">9</div> 73 <div id="id9">9</div>
74 <div id="id10">10</div> 74 <div id="id10">10</div>
75 </div> 75 </div>
76 <p> 76 <p>
77 Tests that src and href element targets are rewritten properly. 77 Tests that src and href element targets are rewritten properly.
78 </p> 78 </p>
79 </body> 79 </body>
80 </html> 80 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698