Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/plugins/update-plugin-after-detachment-crash.html |
| diff --git a/third_party/WebKit/LayoutTests/fast/plugins/update-plugin-after-detachment-crash.html b/third_party/WebKit/LayoutTests/fast/plugins/update-plugin-after-detachment-crash.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2b722dc7edad49adfe7822c648dedb4ad1531fd9 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fast/plugins/update-plugin-after-detachment-crash.html |
| @@ -0,0 +1,36 @@ |
| +<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.
|
| +<script src = "../../resources/testharnessreport.js"></script> |
| +<script> |
| + 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.
|
| + var element = document.createElement("object"); |
| + // Trying to access a named proprety on <object> will run post layout tasks |
| + // synchronously from HTMLPluginElement::layoutPartForJSBindings(). Make |
| + // sure it doesn't try to re-load a persisted FrameView for a detached |
| + // frame. |
| + element.whatever = 'anything'; |
| + |
| + // Use testharness.js to prevent an -expected file. Getting here without |
| + // crashing implies the test passed. |
| + test(function () {}, "Make sure we didn't crash"); |
| + } |
| + function embedLoaded() { |
| + var video = document.createElement("video"); |
| + video.poster = "foo"; |
| + iframe.srcdoc = "data:text/html,bar"; |
| + setTimeout(clearBody, 0); |
| + } |
| + function clearBody() { |
| + 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
|
| + embed.height = "28"; |
| + embed.type = "foo"; |
| + |
| + // This will cause the iframe and embeds to detach and in doing so, |
| + // reevaluate whether the parent document has finished loading, and since |
| + // it has, call its load handler. |
| + body.innerText = ""; |
|
esprehn
2016/12/17 01:47:56
document.body.textContent = ""
dcheng
2016/12/17 09:08:13
Done.
|
| + } |
| +</script> |
| +<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.
|
| + <embed id="embed" onload="embedLoaded()" src="foo"></embed> |
| + <iframe id="iframe"></iframe> |
| +</body> |