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

Unified 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, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/inspector/elements/resources/iframe-load-event-iframe.js
diff --git a/third_party/WebKit/LayoutTests/inspector/elements/resources/iframe-load-event-iframe.js b/third_party/WebKit/LayoutTests/inspector/elements/resources/iframe-load-event-iframe.js
index 6f7673cefd08cdf8d435f4934d8438ef13860af1..4951c76e26f69c5503229a53986f532fcb6def48 100644
--- a/third_party/WebKit/LayoutTests/inspector/elements/resources/iframe-load-event-iframe.js
+++ b/third_party/WebKit/LayoutTests/inspector/elements/resources/iframe-load-event-iframe.js
@@ -1,7 +1,7 @@
function loadSecondIFrame()
{
- document.getElementById("myframe").onload = null;
document.getElementById("myframe").src = "resources/iframe-load-event-iframe-2.html";
+ return new Promise((resolve) => document.getElementById("myframe").onload = resolve);
}
function test()
@@ -10,17 +10,7 @@ function test()
function step1()
{
- InspectorTest.domModel.addEventListener(WebInspector.DOMModel.Events.NodeInserted, nodeInserted);
- InspectorTest.evaluateInPage("loadSecondIFrame()");
-
- function nodeInserted(event)
- {
- var node = event.data;
- if (node.getAttribute("id") === "myframe") {
- InspectorTest.expandElementsTree(step2);
- InspectorTest.domModel.removeEventListener(WebInspector.DOMModel.Events.NodeInserted, nodeInserted);
- }
- }
+ InspectorTest.evaluateInPageAsync("loadSecondIFrame()").then(() => InspectorTest.expandElementsTree(step2));
}
function step2()
« 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