| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <title>Test that when images are moved to a new document, a new load fires.</tit
le> | |
| 3 <script src="../../resources/testharness.js"></script> | |
| 4 <script src="../../resources/testharnessreport.js"></script> | |
| 5 <body> | |
| 6 <script type="text/javascript"> | |
| 7 if (window.testRunner) | |
| 8 testRunner.setPluginsEnabled(false); | |
| 9 for (var elementType of [ "img", "input", "object", "embed" ]) { | |
| 10 async_test(function(t) { | |
| 11 var subframe = document.createElement("iframe"); | |
| 12 document.body.appendChild(subframe); | |
| 13 var subdocument = subframe.contentDocument; | |
| 14 var element = document.createElement(elementType); | |
| 15 if (elementType == "input") | |
| 16 element.type = "image"; | |
| 17 element.data = "resources/test-load.jpg"; | |
| 18 element.src = "resources/test-load.jpg"; | |
| 19 document.body.appendChild(element); | |
| 20 element.onload = t.step_func(function() { | |
| 21 document.body.removeChild(element); | |
| 22 subdocument.body.appendChild(element); | |
| 23 element.onload = t.step_func_done(function() { | |
| 24 subdocument.body.removeChild(element); | |
| 25 }); | |
| 26 }); | |
| 27 }, document.title + ', ' + elementType); | |
| 28 } | |
| 29 </script> | |
| OLD | NEW |