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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/navigation/targeted-navigation-in-unload-handler.html

Issue 2487403002: Allow navigations to frames that aren't being unloaded in the unload handler. (Closed)
Patch Set: fix test 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/http/tests/navigation/targeted-navigation-in-unload-handler.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/navigation/targeted-navigation-in-unload-handler.html b/third_party/WebKit/LayoutTests/http/tests/navigation/targeted-navigation-in-unload-handler.html
new file mode 100644
index 0000000000000000000000000000000000000000..69a4336c4c7ba96d367ec867fcecb5337788c5e3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/navigation/targeted-navigation-in-unload-handler.html
@@ -0,0 +1,30 @@
+<html>
+<head>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+var test = async_test("Tests that a navigation in the unload handler succeeds if it's targeting a frame that's not being unloaded.");
+function complete() {
+ test.done();
+}
+
+window.onload = function() {
+ var frame = document.createElement('iframe');
+ document.body.appendChild(frame);
+
+ var sibling = document.createElement('iframe');
+ document.body.appendChild(sibling);
+
+ frame.contentWindow.onunload = function () {
+ sibling.contentWindow.location.href = 'resources/targeted-navigation-in-unload-handler-subframe.html';
+ }
+
+ setTimeout(function() {
+ frame.contentWindow.location.assign('about:blank');
+ }, 100);
+}
+</script>
+</head>
+<body>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698