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

Unified Diff: LayoutTests/fast/events/before-unload-crash.html

Issue 1171363002: Fix null pointer dereference in ChromeClientImpl::openBeforeUnloadConfirmPanelDelegate. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months 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 | LayoutTests/fast/events/before-unload-crash-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/events/before-unload-crash.html
diff --git a/LayoutTests/fast/events/before-unload-crash.html b/LayoutTests/fast/events/before-unload-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..d9a47930b3189dd2b2125aeb9e0351176e5b945b
--- /dev/null
+++ b/LayoutTests/fast/events/before-unload-crash.html
@@ -0,0 +1,16 @@
+<script src="../../resources/js-test.js"></script>
+<script>
+function test(iframe) {
+ iframe.contentWindow.location.href = "resources/does-not-exist.html";
+ testPassed('if no crash');
+}
+</script>
+<iframe id=testIframe onload="test(this)"></iframe>
+<script>
+description('Detaching a frame in beforeunload event handler should not crash.');
+var testIframe = document.getElementById('testIframe');
+testIframe.contentWindow.onbeforeunload = function(event) {
+ testIframe.parentNode.removeChild(testIframe);
+ event.returnValue = 'beforeunload';
+}
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/events/before-unload-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698