| OLD | NEW |
| (Empty) | |
| 1 <script src = "../../resources/testharness.js"></script> |
| 2 <script src = "../../resources/testharnessreport.js"></script> |
| 3 <script> |
| 4 function bodyLoaded() { |
| 5 // This will run post layout tasks synchronously from |
| 6 // HTMLPluginElement::layoutPartForJSBindings() which will cause us to load |
| 7 // the detached <embed> element. This test passes if it doesn't crash. |
| 8 var element = document.createElement("object"); |
| 9 element.setCustomValidity(""); |
| 10 |
| 11 // Use testharness.js to prevent an -expected file. |
| 12 test(function () {}, "Make sure we didn't crash"); |
| 13 } |
| 14 function embedLoaded() { |
| 15 var video = document.createElement("video"); |
| 16 video.poster = "foo"; |
| 17 iframe.srcdoc = "data:text/html,bar"; |
| 18 setTimeout(clearBody, 0); |
| 19 } |
| 20 function clearBody() { |
| 21 embed.align = "right"; |
| 22 embed.height = "28"; |
| 23 embed.type = "foo"; |
| 24 |
| 25 // This will cause the iframe and embeds to detach and in doing so, |
| 26 // reevaluate whether the parent document has finished loading, and since |
| 27 // it has, call its load handler. |
| 28 body.innerText = ""; |
| 29 } |
| 30 </script> |
| 31 <body onload="bodyLoaded()" id="body"> |
| 32 <embed id="embed" onload="embedLoaded()" src="foo"></embed> |
| 33 <iframe id="iframe"></iframe> |
| 34 </body> |
| OLD | NEW |