| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script> | 3 <script> |
| 4 // This tests window.stop() can stop loading of multipart images after |
| 5 // <img>'s onload and one more part loaded after onload. |
| 4 if (window.testRunner) { | 6 if (window.testRunner) { |
| 5 testRunner.dumpAsText(); | 7 testRunner.dumpAsText(); |
| 6 testRunner.waitUntilDone(); | 8 testRunner.waitUntilDone(); |
| 7 } | 9 } |
| 8 | 10 |
| 9 function firstPartLoaded() | 11 function callStop() |
| 10 { | 12 { |
| 11 window.stop(); | 13 window.stop(); |
| 12 window.setTimeout(function() { | 14 window.setTimeout(function() { |
| 13 var broken = (testingImage.width != 2 && testingImage.width != 76); | 15 var broken = (testingImage.width != 2 && testingImage.width != 76); |
| 14 document.getElementById("results").innerHTML = broken ? "PASS" : "FAIL"; | 16 document.getElementById("results").innerHTML = broken ? "PASS" : "FAIL"; |
| 15 if (window.testRunner) | 17 if (window.testRunner) |
| 16 testRunner.notifyDone(); | 18 testRunner.notifyDone(); |
| 17 }, 100); | 19 }, 100); |
| 18 } | 20 } |
| 21 |
| 22 function firstPartLoaded() |
| 23 { |
| 24 setTimeout(callStop, 1500); |
| 25 } |
| 19 </script> | 26 </script> |
| 20 </head> | 27 </head> |
| 21 <body> | 28 <body> |
| 22 <img id=testingImage src="resources/multipart.php?interval=1&loop=1&img1=2x2-gre
en.png&img2=abe.png" onload="firstPartLoaded()"> | 29 <!-- |label| is added to avoid interaction between stop-loading* tests --> |
| 30 <img id=testingImage src="resources/multipart.php?interval=1&loop=1&img1=2x2-gre
en.png&img2=abe.png&label=2" onload="firstPartLoaded()"> |
| 23 <p id="results"></p> | 31 <p id="results"></p> |
| 24 </body> | 32 </body> |
| 25 </html> | 33 </html> |
| OLD | NEW |