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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/network/network-disable-cache-preloads.php

Issue 2608163002: Deflake network-disable-cache-preloads (Closed)
Patch Set: Fixed test Created 3 years, 12 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/network/network-disable-cache-preloads.php
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/network/network-disable-cache-preloads.php b/third_party/WebKit/LayoutTests/http/tests/inspector/network/network-disable-cache-preloads.php
index ce9334986f2fe9a15b6113e75f4854b51d7981b3..7911b4da5907992a1016d8534433fb67c104905f 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/network/network-disable-cache-preloads.php
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/network/network-disable-cache-preloads.php
@@ -5,6 +5,9 @@
<head>
<script src="../inspector-test.js"></script>
<script src="../network-test.js"></script>
+<style>
+ body { overflow: hidden; }
+</style>
<script>
function scheduleScriptLoad() {
window.setTimeout(loadScript, 0);
@@ -28,10 +31,15 @@ function scriptLoaded() {
++dummies;
}
+ var text;
if (dummies == 1)
- console.log("PASS - 1 resource loaded");
+ text = document.createTextNode("PASS - 1 resource loaded");
else
- console.log("FAIL - " + dummies + " resources loaded");
+ text = document.createTextNode("FAIL - " + dummies + " resources loaded");
+ var result = document.createElement("p");
+ result.appendChild(text);
+ document.body.appendChild(result);
+ console.log("done");
}
function test()
@@ -47,7 +55,6 @@ function test()
{
InspectorTest.addConsoleSniffer(done);
InspectorTest.evaluateInPage("scheduleScriptLoad()");
-
}
function done(msg)
@@ -57,7 +64,7 @@ function test()
}
</script>
</head>
-<body onload="runTest()">
+<body onload="runTest(true)">
Charlie Harrison 2017/01/03 14:47:45 Does "true" force this to be a pixel test? Why is
Yoav Weiss 2017/01/03 14:54:45 A textdump test would show the console warning in
<p>Tests disabling cache from inspector and seeing that preloads are not evicted from memory cache.</p>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698