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

Side by Side Diff: LayoutTests/inspector/elements/resources/iframe-load-event-iframe.js

Issue 881263002: DevTools: use target-based model accessors only. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 function loadSecondIFrame() 1 function loadSecondIFrame()
2 { 2 {
3 document.getElementById("myframe").onload = null; 3 document.getElementById("myframe").onload = null;
4 document.getElementById("myframe").src = "resources/iframe-load-event-iframe -2.html"; 4 document.getElementById("myframe").src = "resources/iframe-load-event-iframe -2.html";
5 } 5 }
6 6
7 function test() 7 function test()
8 { 8 {
9 InspectorTest.expandElementsTree(step1); 9 InspectorTest.expandElementsTree(step1);
10 10
11 function step1() 11 function step1()
12 { 12 {
13 WebInspector.domModel.addEventListener(WebInspector.DOMModel.Events.Node Inserted, nodeInserted); 13 InspectorTest.domModel.addEventListener(WebInspector.DOMModel.Events.Nod eInserted, nodeInserted);
14 InspectorTest.evaluateInPage("loadSecondIFrame()"); 14 InspectorTest.evaluateInPage("loadSecondIFrame()");
15 15
16 function nodeInserted(event) 16 function nodeInserted(event)
17 { 17 {
18 var node = event.data; 18 var node = event.data;
19 if (node.getAttribute("id") === "myframe") { 19 if (node.getAttribute("id") === "myframe") {
20 InspectorTest.expandElementsTree(step2); 20 InspectorTest.expandElementsTree(step2);
21 WebInspector.domModel.removeEventListener(WebInspector.DOMModel. Events.NodeInserted, nodeInserted); 21 InspectorTest.domModel.removeEventListener(WebInspector.DOMModel .Events.NodeInserted, nodeInserted);
22 } 22 }
23 } 23 }
24 } 24 }
25 25
26 function step2() 26 function step2()
27 { 27 {
28 InspectorTest.addResult("\n\nAfter frame navigate"); 28 InspectorTest.addResult("\n\nAfter frame navigate");
29 InspectorTest.dumpElementsTree(); 29 InspectorTest.dumpElementsTree();
30 InspectorTest.completeTest(); 30 InspectorTest.completeTest();
31 } 31 }
32 } 32 }
OLDNEW
« no previous file with comments | « LayoutTests/inspector/elements/resolve-alien-node.html ('k') | LayoutTests/inspector/elements/set-attribute.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698