Remove document as a parameter from a few internals methods
[WebKit-https.git] / LayoutTests / http / tests / loading / preload-append-scan.php
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();
12
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));
20 }
21
22 window.addEventListener("DOMContentLoaded", checkForPreload, false);
23
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);
30 ?>
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">