Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <script src = "../../resources/testharness.js"></script> | |
|
esprehn
2016/12/17 01:47:56
<!DOCTYPE html> unless you need quirks mode, then
dcheng
2016/12/17 09:08:13
Done.
| |
| 2 <script src = "../../resources/testharnessreport.js"></script> | |
| 3 <script> | |
| 4 function bodyLoaded() { | |
|
esprehn
2016/12/17 01:47:56
onload = function() is the same as body onload
dcheng
2016/12/17 09:08:13
Done.
| |
| 5 var element = document.createElement("object"); | |
| 6 // Trying to access a named proprety on <object> will run post layout tasks | |
| 7 // synchronously from HTMLPluginElement::layoutPartForJSBindings(). Make | |
| 8 // sure it doesn't try to re-load a persisted FrameView for a detached | |
| 9 // frame. | |
| 10 element.whatever = 'anything'; | |
| 11 | |
| 12 // Use testharness.js to prevent an -expected file. Getting here without | |
| 13 // crashing implies the test passed. | |
| 14 test(function () {}, "Make sure we didn't crash"); | |
| 15 } | |
| 16 function embedLoaded() { | |
| 17 var video = document.createElement("video"); | |
| 18 video.poster = "foo"; | |
| 19 iframe.srcdoc = "data:text/html,bar"; | |
| 20 setTimeout(clearBody, 0); | |
| 21 } | |
| 22 function clearBody() { | |
| 23 embed.align = "right"; | |
|
esprehn
2016/12/17 01:47:56
var embed = document.getElementById("embed");
dcheng
2016/12/17 09:08:13
Done, though I just used querySelector and removed
| |
| 24 embed.height = "28"; | |
| 25 embed.type = "foo"; | |
| 26 | |
| 27 // This will cause the iframe and embeds to detach and in doing so, | |
| 28 // reevaluate whether the parent document has finished loading, and since | |
| 29 // it has, call its load handler. | |
| 30 body.innerText = ""; | |
|
esprehn
2016/12/17 01:47:56
document.body.textContent = ""
dcheng
2016/12/17 09:08:13
Done.
| |
| 31 } | |
| 32 </script> | |
| 33 <body onload="bodyLoaded()" id="body"> | |
|
esprehn
2016/12/17 01:47:56
leave this out, the embed and iframe are enough
dcheng
2016/12/17 09:08:13
Done.
| |
| 34 <embed id="embed" onload="embedLoaded()" src="foo"></embed> | |
| 35 <iframe id="iframe"></iframe> | |
| 36 </body> | |
| OLD | NEW |