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