Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 2 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /html/browsers/the-window-object/noopener-noreferrer-sizing.window.html - WPT Dashboard Interop Dashboard
const windowProps = ["innerWidth", "innerHeight"];
["noopener", "noreferrer"].forEach(openerStyle => {
async_test(t => {
const channelName = "34342" + openerStyle + "8907";
const channel = new BroadcastChannel(channelName);
window.open("support/sizing-target.html?" + channelName, "", openerStyle);
channel.onmessage = t.step_func_done(e => {
// Send message first so if asserts throw the popup is still closed
channel.postMessage(null);
for(const prop of windowProps) {
assert_equals(window[prop], e.data[prop]);
}
});
}, `window.open() with ${openerStyle} should have equal viewport width and height`);
});