OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <script src="../resources/testharness.js"></script> | |
3 <script src="../resources/testharnessreport.js"></script> | |
4 <script> | |
5 // This tests ImageLoader/ImageDocument implementation in Blink. | |
6 var t = async_test("ForceReload should not crash for an image document"); | |
7 | |
8 function triggerReload() { | |
9 // This depends on how image documents are implemented by Blink. | |
10 var iframe = document.getElementById('iframe'); | |
11 var img = iframe.contentDocument.body.getElementsByTagName('img')[0]; | |
12 | |
13 img.onload = t.step_func_done(function() { | |
14 // TODO(hiroshige): Check that the image is actually reloaded. | |
15 // We need an URL that returns different non-SVG images for each reload. | |
kouhei (in TOK)
2017/05/11 16:50:52
fix todo?
hiroshige
2017/05/11 17:11:44
Hmm. One way to do this is to have .cgi page (or .
kouhei (in TOK)
2017/05/11 17:30:14
I see. I don't see a super clean way to do this. M
hiroshige
2017/05/11 18:12:15
This test is necessary to confirm there's no crash
| |
16 }); | |
17 | |
18 if (window.internals) { | |
19 internals.forceImageReload(img); | |
20 } | |
21 } | |
22 </script> | |
23 | |
24 <!-- We call triggerReload() strictly after document load event, | |
25 because reloading is not enforced until document load event is finished. --> | |
26 <body onload="setTimeout(t.step_func(triggerReload), 0)"> | |
27 <iframe id="iframe" src="../resources/square100.png"></iframe> | |
28 </body> | |
OLD | NEW |