Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/images/png-partial-load-as-document.html

Issue 2371643002: HTMLImageElement: do not use fallback content for ImageDocument (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2840
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/images/png-partial-load-as-document-expected.png » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/images/png-partial-load-as-document-expected.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698