OLD | NEW |
1 <img style="background-color: blue" > | 1 <iframe style="background-color: blue; width: 320px; height: 240px;"></iframe> |
| 2 <!-- |
| 3 Tests that when a progressive png is loaded as document, the image is shown |
| 4 progressively during loading. |
| 5 The result image should show the dice image partially. |
| 6 --> |
2 <script> | 7 <script> |
3 if (window.testRunner) { | 8 if (window.testRunner) { |
4 testRunner.dumpAsTextWithPixelResults(); | 9 testRunner.dumpAsTextWithPixelResults(); |
5 testRunner.waitUntilDone(); | 10 testRunner.waitUntilDone(); |
6 } | 11 } |
7 | 12 |
8 function loadAndStall() | 13 function loadAndStall() |
9 { | 14 { |
10 return "http://127.0.0.1:8000/resources/load-and-stall.php"; | 15 return "http://127.0.0.1:8000/resources/load-and-stall.php"; |
11 } | 16 } |
12 | 17 |
13 function pngImage() | 18 function pngImage() |
14 { | 19 { |
15 return "?name=../../../fast/images/resources/dice.png&mimeType=image%2Fpng"; | 20 return "?name=../../../fast/images/resources/dice.png&mimeType=image%2Fpng"; |
16 } | 21 } |
17 | 22 |
18 function testDone() | 23 function testDone() |
19 { | 24 { |
20 if (window.testRunner) | 25 if (window.testRunner) { |
| 26 window.stop(); |
21 testRunner.notifyDone(); | 27 testRunner.notifyDone(); |
| 28 } |
22 } | 29 } |
23 | 30 |
24 function runTest() | 31 function runTest() |
25 { | 32 { |
26 document.querySelector("img").src = loadAndStall() + pngImage() + "&stallAt=
45057&stallFor=60"; | 33 document.querySelector("iframe").src = loadAndStall() + pngImage() + "&stall
At=45057&stallFor=60"; |
27 setTimeout(testDone, 500); | 34 setTimeout(testDone, 500); |
28 } | 35 } |
29 | 36 |
30 window.onload = function() { | 37 window.onload = function() { |
31 setTimeout(runTest, 0); | 38 setTimeout(runTest, 0); |
32 } | 39 } |
33 </script> | 40 </script> |
OLD | NEW |