Skip to content

Commit 1389ca3

Browse files
authored
cross-origin-opener-policy/resource-popup.https.html makes incorrect assumption about win.location.href (#29769)
The test expects that win.location.href starts returning something else than "about:blank" after closing. While this is true in Firefox and Blink, none of the browser engines actually agree on this (Firefox returns the empty string, Chrome returns undefined and Safari returns "about:blank"). Per the specification, it seems returning "about:blank" after a window is closed is the expected behavior, see whatwg/html#6899. I am fixing thus fixing the test so that it can run in all browsers by checking if "the window is closed" OR "href is no longer about:blank because it was navigated".
1 parent a85b7d6 commit 1389ca3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

html/cross-origin-opener-policy/resources/resource-popup.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
close();
1414
};
1515
const id = setInterval(() => {
16-
if (win.location.href !== 'about:blank') {
16+
if (win.closed || win.location.href !== 'about:blank') {
1717
clearInterval(id);
1818
bc.postMessage({name: win.name || null, closed: win.closed});
1919
}

0 commit comments

Comments
 (0)