| 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..16c2b7541ddda676920440255d4b3a82dbbf460c
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/fast/plugins/update-plugin-after-detachment-crash.html
|
| @@ -0,0 +1,34 @@
|
| +<script src = "../../resources/testharness.js"></script>
|
| +<script src = "../../resources/testharnessreport.js"></script>
|
| +<script>
|
| + function bodyLoaded() {
|
| + // This will run post layout tasks synchronously from
|
| + // HTMLPluginElement::layoutPartForJSBindings() which will cause us to load
|
| + // the detached <embed> element. This test passes if it doesn't crash.
|
| + var element = document.createElement("object");
|
| + element.setCustomValidity("");
|
| +
|
| + // Use testharness.js to prevent an -expected file.
|
| + 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";
|
| + 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 = "";
|
| + }
|
| +</script>
|
| +<body onload="bodyLoaded()" id="body">
|
| + <embed id="embed" onload="embedLoaded()" src="foo"></embed>
|
| + <iframe id="iframe"></iframe>
|
| +</body>
|
|
|