OLD | NEW |
(Empty) | |
| 1 <? |
| 2 header("Content-Type: text/html; charset=utf-8"); |
| 3 ?> |
| 4 <!-- If the scheduler has been disabled as it should, the image will load immedi
ately rather than waiting for this frame to finish. --> |
| 5 <html> |
| 6 <head> |
| 7 <script src="/resources/js-test-pre.js"></script> |
| 8 <script> |
| 9 window.jsTestIsAsync = true; |
| 10 if (self.testRunner) |
| 11 testRunner.waitUntilDone(); |
| 12 |
| 13 var is_image_done = false; |
| 14 var is_dom_content_loaded = false; |
| 15 |
| 16 function imageDone() { |
| 17 is_image_done = true; |
| 18 shouldBeFalse("is_dom_content_loaded"); |
| 19 checkDone(); |
| 20 } |
| 21 |
| 22 function bodyDone() { |
| 23 is_dom_content_loaded = true; |
| 24 shouldBeTrue("is_image_done"); |
| 25 checkDone(); |
| 26 } |
| 27 |
| 28 function checkDone() { |
| 29 if (is_image_done && is_dom_content_loaded) { |
| 30 finishJSTest(); |
| 31 } |
| 32 } |
| 33 |
| 34 document.addEventListener("DOMContentLoaded", bodyDone); |
| 35 |
| 36 var successfullyParsed = true; |
| 37 </script> |
| 38 </head> |
| 39 <body> |
| 40 <div id="console"></div> |
| 41 <img src="compass.jpg" onload="imageDone()"> |
| 42 <?php |
| 43 ob_flush(); |
| 44 flush(); |
| 45 sleep(2); |
| 46 ?> |
| 47 <script src="/resources/js-test-post.js"></script> |
| 48 </body> |
| 49 </html> |
OLD | NEW |