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

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

Issue 2560803002: Don't assume a FrameHost from FrameView. (Closed)
Patch Set: Patch 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
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>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | third_party/WebKit/Source/core/frame/FrameView.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698