1
0
Fork 0
firefox/dom/tests/browser/browser_noopener_null_uri.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

15 lines
613 B
JavaScript

add_task(async function browserNoopenerNullUri() {
await BrowserTestUtils.withNewTab({ gBrowser }, async function (aBrowser) {
let numTabs = gBrowser.tabs.length;
await SpecialPowers.spawn(aBrowser, [], async () => {
ok(
!content.window.open(undefined, undefined, "noopener"),
"window.open should return null"
);
});
await TestUtils.waitForCondition(() => gBrowser.tabs.length == numTabs + 1);
// We successfully opened a tab in content process!
});
// We only have to close the tab we opened earlier
await BrowserTestUtils.removeTab(gBrowser.tabs[1]);
});