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

Unified Diff: LayoutTests/fast/loader/unload-mutation-crash.html

Issue 495743003: Add an extra guard to replaceDocument() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Landing Created 6 years, 4 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/loader/unload-mutation-crash-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/loader/unload-mutation-crash.html
diff --git a/LayoutTests/fast/loader/unload-mutation-crash.html b/LayoutTests/fast/loader/unload-mutation-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..3a8f3232c5fa8455ecb53c4f95cddc43f3eac491
--- /dev/null
+++ b/LayoutTests/fast/loader/unload-mutation-crash.html
@@ -0,0 +1,23 @@
+<script>
+if (window.testRunner)
+ window.testRunner.dumpAsText();
+
+function start() {
+ window.firstFrame = document.createElement('iframe');
+ document.body.appendChild(window.firstFrame);
+ window.secondFrame = document.createElement('iframe');
+ window.secondFrame.src = 'javascript:window.top.maybeStart();';
+ window.firstFrame.contentDocument.documentElement.appendChild(window.secondFrame);
+}
+
+function maybeStart() {
+ window.secondFrame.contentWindow.onunload = function() {
+ document.documentElement.removeChild(window.bodyEl);
+ };
+
+ window.firstFrame.src = 'javascript:"";';
+ console.log("PASS unless crash.");
+}
+</script>
+<body id=bodyEl onload=start()></body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/loader/unload-mutation-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698