OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <html> | |
3 <body> | |
4 Test for crbug.com/224317: data:uri images should load asynchronously and reload
synchronously.<br/> | |
5 <script> | |
6 if (window.testRunner) { | |
7 testRunner.waitUntilDone(); | |
8 testRunner.dumpAsText(); | |
9 } | |
10 | |
11 var image = new Image(); | |
12 image.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAIAAAD/g
AIDAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAnklEQVR42u3QMQEAAAgDoGlyo1vBzwciUJlw1ApkyZIlS
5YsBbJkyZIlS5YCWbJkyZIlS4EsWbJkyZKlQJYsWbJkyVIgS5YsWbJkKZAlS5YsWbIUyJIlS5YsWQpky
ZIlS5YsBbJkyZIlS5YCWbJkyZIlS4EsWbJkyZKlQJYsWbJkyVIgS5YsWbJkKZAlS5YsWbIUyJIlS5YsW
Qpkyfq2MosBSIeKONMAAAAASUVORK5CYII="; | |
13 | |
14 if (location.hash != "#reloaded") { | |
15 if (image.width == 100 || image.height == 100) { | |
16 document.write("FAIL"); | |
17 if (window.testRunner) | |
18 testRunner.notifyDone(); | |
19 } else { | |
20 location.hash = "#reloaded"; | |
21 location.reload(); | |
22 } | |
23 } else { | |
24 if (image.width == 100 || image.height == 100) { | |
25 document.write("PASS"); | |
26 } else { | |
27 document.write("FAIL"); | |
28 } | |
29 if (window.testRunner) | |
30 testRunner.notifyDone(); | |
31 } | |
32 </script> | |
33 </body> | |
34 </html> | |
OLD | NEW |