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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/resource-tree/resource-tree-frame-navigate.html

Issue 2893073002: DevTools: introduce ResourceMapping (Closed)
Patch Set: cleanup test Created 3 years, 7 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
Index: third_party/WebKit/LayoutTests/http/tests/inspector/resource-tree/resource-tree-frame-navigate.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/resource-tree/resource-tree-frame-navigate.html b/third_party/WebKit/LayoutTests/http/tests/inspector/resource-tree/resource-tree-frame-navigate.html
index d3f8bac5ce49179ceeafdae3ef088274168ce577..408cb7d7bf54017925a3ab67ad055f5072da2d3e 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/resource-tree/resource-tree-frame-navigate.html
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/resource-tree/resource-tree-frame-navigate.html
@@ -7,40 +7,38 @@
<link rel="stylesheet" href="resources/styles-initial.css">
<script>
-function navigateIframe()
+function navigateIframe(url)
{
var iframe = document.getElementById("iframe");
- iframe.setAttribute("src", "resources/resource-tree-frame-navigate-iframe-after.html");
+ iframe.setAttribute("src", url);
+ return new Promise(x => iframe.onload = x);
}
-function test()
+async function test()
{
InspectorTest.addResult("Before navigation");
InspectorTest.addResult("====================================");
+ await InspectorTest.evaluateInPageAsync('navigateIframe("resources/resource-tree-frame-navigate-iframe-before.html")');
InspectorTest.dumpResourceTreeEverything();
- InspectorTest.addConsoleSniffer(step2);
- InspectorTest.evaluateInPage("navigateIframe()");
-
- function step2()
- {
- InspectorTest.addResult("");
- InspectorTest.addResult("After navigation");
- InspectorTest.addResult("====================================");
- InspectorTest.dumpResourceTreeEverything();
- InspectorTest.completeTest();
- }
+
+ InspectorTest.addResult("");
+ InspectorTest.addResult("After navigation");
+ InspectorTest.addResult("====================================");
+ await InspectorTest.evaluateInPageAsync('navigateIframe("resources/resource-tree-frame-navigate-iframe-after.html")');
+ InspectorTest.dumpResourceTreeEverything();
+ InspectorTest.completeTest();
}
</script>
</head>
-<body>
+<body onload='runTest()'>
<p>
Tests resource tree model on iframe navigation, compares resource tree against golden. Every line is important.
</p>
-<iframe id="iframe" src="resources/resource-tree-frame-navigate-iframe-before.html" onload="runTest()">
+<iframe id="iframe">
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698