| 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>
|
|
|