| OLD | NEW |
| 1 <body> | 1 <script src="../../resources/testharness.js"></script> |
| 2 <script> | 2 <script src="../../resources/testharnessreport.js"></script> |
| 3 if (window.testRunner) { | |
| 4 testRunner.dumpAsText(); | |
| 5 testRunner.dumpResourceResponseMIMETypes(); | |
| 6 } | |
| 7 </script> | |
| 8 This test requires DumpRenderTree to see the log of what resources are loaded. | |
| 9 It verifies that noscript-image1.png is not loaded because it is in a noscript b
lock and | |
| 10 noscript-image2.png is loaded because it is not in a noscript block. | |
| 11 | |
| 12 <script> | 3 <script> |
| 13 document.write('<script src="resources/non-existant.js"></scr'+'ipt>'); | 4 document.write('<script src="resources/non-existant.js"></scr'+'ipt>'); |
| 14 document.write('<noscript>'); | 5 document.write('<noscript>'); |
| 15 document.write('<img src="resources/noscript-image1.png">'); | 6 document.write('<img src="resources/noscript-image1.png">'); |
| 16 document.write('</noscript>'); | 7 document.write('</noscript>'); |
| 17 </script> | 8 </script> |
| 18 | |
| 19 <script> | 9 <script> |
| 20 document.write('<noscript>'); | 10 document.write('<noscript>'); |
| 21 </script> | 11 </script> |
| 22 </noscript> | 12 </noscript> |
| 23 <script> | 13 <script> |
| 24 document.write('<script src="resources/non-existant.js"></scr'+'ipt>'); | 14 document.write('<script src="resources/non-existant.js"></scr'+'ipt>'); |
| 25 document.write('<img src="resources/noscript-image2.png">'); | 15 document.write('<img src="resources/noscript-image2.png">'); |
| 26 </script> | 16 </script> |
| 17 <script> |
| 18 test(function() { |
| 19 if (window.internals === undefined) { |
| 20 throw new Error("The test requires internals.isPreloaded function."); |
| 21 } |
| 22 |
| 23 assert_false(internals.isPreloaded("resources/noscript-image1.png")); |
| 24 assert_true(internals.isPreloaded("resources/noscript-image2.png")); |
| 25 }, "Don't preload resources inside noscript block"); |
| 26 </script> |
| OLD | NEW |