Repository navigation
HTML: window.open("", "", "noreferrer") - #15352
Conversation
| `\u000C${feature}` | ||
| ].forEach(variant => { | ||
| const win = window.open(windowURL, "", variant); | ||
| assert_equals(win, null, `"${variant}" should activate feature "${feature}"`); |
There was a problem hiding this comment.
This assertion (and the assert_not_equals later) is specific to the noopener feature. Although noreferrer means the same thing, the file name/function name suggests this is more generic than it is.
There was a problem hiding this comment.
That's a good point, I'll rename.
| assert_equals(e.data.referrer, ""); | ||
| assert_equals(e.data.haveOpener, false); | ||
|
|
||
| channel.postMessage(null); |
There was a problem hiding this comment.
This will not be reached if an assertion fails, so the popup will not be closed. Having this first, or using add_cleanup, would do the trick I believe.
|
BroadcastChannel :( I had to rewrite the test using localStorage instead so it would run in WebKit. |
|
@cdumez what is an alternative strategy? Also, any chance WebKit will add BroadcastChannel? |
|
As I said, I used localStorage as an alternative. I guess cookies could work too. I am not aware of any plan to adopt BroadcastChannel. |
|
@cdumez ah right, sorry. Wouldn't you rather folks use |
|
I do not think people should do this in shipping code, and localStorage is good enough for testing purposes. |
For whatwg/html#4331.