7 if (window
.testRunner
) {
8 testRunner
.dumpAsText();
9 testRunner
.waitUntilDone();
14 document
.getElementById("log").innerText
+= message
+ "\n";
17 function firstScript()
19 log("Running first script.");
20 time1
= new Date().getTime();
23 function secondScript()
25 log("Running second script.");
26 time2
= new Date().getTime();
31 // Second script is sent after a 1 second delay. If time delta
32 // between both scripts running is really small, that means they
33 // ran back-to-back instead of the first script running before
34 // the second script was loaded.
35 if (time2
- time1
< 50)
36 log("FAIL: Gap between script runs unexpectedly small.");
38 log("PASS: First script ran before second script was loaded.");
40 if (window
.testRunner
)
41 testRunner
.notifyDone();
44 <body onload=
"test()">
46 <iframe id=
"frame" src=
"resources/charset-sniffer-end-sniffing.php"></iframe>
47 <p>This test is for a bug where the charset sniffer would not stop looking
48 for charset if the body contains no tags. Charset sniffer is supposed to stop
49 looking for charset after
1024 bytes.
</p>