Add partial load tests for PNG images
[WebKit-https.git] / LayoutTests / http / tests / images / png-partial-load.html
1 <img style="background-color: blue" >
2 <script>
3 if (window.testRunner) {
4     testRunner.dumpAsText(true);
5     testRunner.waitUntilDone();
6 }
7
8 function loadAndStall()
9 {
10     return "http://127.0.0.1:8000/resources/load-and-stall.php";
11 }
12
13 function pngImage()
14 {
15     return "?name=../../../fast/images/resources/dice.png&mimeType=image%2Fpng";
16 }
17
18 function testDone()
19 {
20     if (window.testRunner)
21         testRunner.notifyDone();
22 }
23
24 function runTest()
25 {
26     document.querySelector("img").src = loadAndStall() + pngImage() + "&stallAt=45057&stallFor=60";
27     setTimeout(testDone, 500);
28 }
29
30 setTimeout(runTest, 0);
31 </script>