Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / loading / preload-append-scan.php
blob81c4aab6e5ab534cead8da356fdee2a203123f95
1 <?
2 header("Content-Type: text/html; charset=utf-8");
3 ?>
4 <!-- <?php
5 # Spam a bunch of As to make sure we blow past any buffers.
6 print str_repeat("A", 2048);
7 ?> -->
8 <body>
9 <script>
10 if (window.testRunner)
11 testRunner.dumpAsText();
13 function checkForPreload() {
14 var result;
15 if (internals.isPreloaded("resources/preload-test.jpg"))
16 result = "PASS";
17 else
18 result = "FAIL";
19 document.getElementsByTagName("body")[0].appendChild(document.createTextNode(result));
22 window.addEventListener("DOMContentLoaded", checkForPreload, false);
24 function debug(x) {}
25 </script>
26 <script src="http://127.0.0.1:8000/resources/slow-script.pl?delay=1000"></script>
27 <?php
28 flush();
29 usleep(200000);
31 <script>
32 document.write("<plaintext>");
33 </script>
34 This test needs to be run in DRT. Preload scanner should see the image resource.
35 <img src="resources/preload-test.jpg">