Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
ChromeUtils.defineESModuleGetters(this, {
SessionStore: "resource:///modules/sessionstore/SessionStore.sys.mjs",
});
add_task(async function () {
await BrowserTestUtils.withNewTab(
async function (aBrowser) {
await BrowserTestUtils.browserLoaded(aBrowser);
let windowOpened = BrowserTestUtils.waitForNewWindow(
);
let newWindow = gBrowser.replaceTabWithWindow(
gBrowser.getTabForBrowser(aBrowser)
);
await windowOpened;
let newTab = SessionStore.duplicateTab(
newWindow,
newWindow.gBrowser.selectedTab
);
await BrowserTestUtils.browserLoaded(newTab.linkedBrowser);
await SpecialPowers.spawn(
newTab.linkedBrowser,
async ORIGIN => {
is(content.window.origin, ORIGIN);
}
);
BrowserTestUtils.closeWindow(newWindow);
}
);
});