Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: third_party/WebKit/LayoutTests/fast/plugins/update-plugin-after-detachment-crash.html

Issue 2586633002: Dispose a persisted plugin widget if the content frame is detached. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698