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

Unified Diff: third_party/WebKit/LayoutTests/fast/preloader/document-write-noscript.html

Issue 2144493002: deflake document-write-noscript.html (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | third_party/WebKit/LayoutTests/fast/preloader/document-write-noscript-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/preloader/document-write-noscript.html
diff --git a/third_party/WebKit/LayoutTests/fast/preloader/document-write-noscript.html b/third_party/WebKit/LayoutTests/fast/preloader/document-write-noscript.html
index d50bce1050d3bfcf98d774b6183a5f9cfaf0cc11..f34cf34dbcc6165ec4e6857280b635be4e6bf786 100644
--- a/third_party/WebKit/LayoutTests/fast/preloader/document-write-noscript.html
+++ b/third_party/WebKit/LayoutTests/fast/preloader/document-write-noscript.html
@@ -1,21 +1,11 @@
-<body>
-<script>
-if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.dumpResourceResponseMIMETypes();
-}
-</script>
-This test requires DumpRenderTree to see the log of what resources are loaded.
-It verifies that noscript-image1.png is not loaded because it is in a noscript block and
-noscript-image2.png is loaded because it is not in a noscript block.
-
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
<script>
document.write('<script src="resources/non-existant.js"></scr'+'ipt>');
document.write('<noscript>');
document.write('<img src="resources/noscript-image1.png">');
document.write('</noscript>');
</script>
-
<script>
document.write('<noscript>');
</script>
@@ -24,3 +14,13 @@ noscript-image2.png is loaded because it is not in a noscript block.
document.write('<script src="resources/non-existant.js"></scr'+'ipt>');
document.write('<img src="resources/noscript-image2.png">');
</script>
+<script>
+test(function() {
+ if (window.internals === undefined) {
+ throw new Error("The test requires internals.isPreloaded function.");
+ }
+
+ assert_false(internals.isPreloaded("resources/noscript-image1.png"));
+ assert_true(internals.isPreloaded("resources/noscript-image2.png"));
+}, "Don't preload resources inside noscript block");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/preloader/document-write-noscript-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698