Add partial load test for JPEG image
[WebKit-https.git] / LayoutTests / http / tests / images / jpeg-partial-load.html
1 <img style="background: green" >
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 jpegImage()
14 {
15     return "?name=../../../fast/images/resources/lenna.jpg&mimeType=image%2Fjpeg";
16 }
17
18 function testDone()
19 {
20     window.testRunner && testRunner.notifyDone();
21 }
22
23 function runTest()
24 {
25     document.querySelector("img").src = loadAndStall() + jpegImage() + "&stallAt=14337&stallFor=60";
26     setTimeout(testDone, 500);
27 }
28
29 setTimeout(runTest, 0);
30 </script>