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

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

Issue 2293833003: [DevTools] Fix inspector/elements/iframe-load-event.html (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 function loadSecondIFrame() 1 function loadSecondIFrame()
2 { 2 {
3 document.getElementById("myframe").onload = null;
4 document.getElementById("myframe").src = "resources/iframe-load-event-iframe -2.html"; 3 document.getElementById("myframe").src = "resources/iframe-load-event-iframe -2.html";
4 return new Promise((resolve) => document.getElementById("myframe").onload = resolve);
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 InspectorTest.domModel.addEventListener(WebInspector.DOMModel.Events.Nod eInserted, nodeInserted); 13 InspectorTest.evaluateInPageAsync("loadSecondIFrame()").then(() => Inspe ctorTest.expandElementsTree(step2));
14 InspectorTest.evaluateInPage("loadSecondIFrame()");
15
16 function nodeInserted(event)
17 {
18 var node = event.data;
19 if (node.getAttribute("id") === "myframe") {
20 InspectorTest.expandElementsTree(step2);
21 InspectorTest.domModel.removeEventListener(WebInspector.DOMModel .Events.NodeInserted, nodeInserted);
22 }
23 }
24 } 14 }
25 15
26 function step2() 16 function step2()
27 { 17 {
28 InspectorTest.addResult("\n\nAfter frame navigate"); 18 InspectorTest.addResult("\n\nAfter frame navigate");
29 InspectorTest.dumpElementsTree(); 19 InspectorTest.dumpElementsTree();
30 InspectorTest.completeTest(); 20 InspectorTest.completeTest();
31 } 21 }
32 } 22 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698