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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/html/browsers/the-window-object/support/noopener-target.html

Issue 2711183003: Import wpt@a7e9c2abcf65b78fcf1c246fec6681c74e1bc352 (Closed)
Patch Set: Update test expectations and baselines. Created 3 years, 10 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
Index: third_party/WebKit/LayoutTests/external/wpt/html/browsers/the-window-object/support/noopener-target.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/browsers/the-window-object/support/noopener-target.html b/third_party/WebKit/LayoutTests/external/wpt/html/browsers/the-window-object/support/noopener-target.html
index d0d0360260cc455f6fcb2025956eeaaab931afd7..41e197a74630ac70cb34ab2bf164b188767f7218 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/html/browsers/the-window-object/support/noopener-target.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/html/browsers/the-window-object/support/noopener-target.html
@@ -4,5 +4,12 @@
var channel = new BroadcastChannel(channelName);
channel.postMessage({ name: window.name,
haveOpener: window.opener !== null });
- window.close();
+
+ // Because messages are not delivered synchronously and because closing a
+ // browsing context prompts the eventual clearing of all task sources, this
+ // document should not be closed until the opener document has confirmed
+ // receipt.
+ channel.onmessage = function() {
+ window.close();
+ };
</script>

Powered by Google App Engine
This is Rietveld 408576698