Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- Manifest: dom/tests/browser/browser.toml
add_task(async function parent_to_remote() {
await BrowserTestUtils.withNewTab("about:mozilla", async browser => {
let originalBC = browser.browsingContext;
await BrowserTestUtils.browserLoaded(browser);
let newBC = browser.browsingContext;
isnot(originalBC.id, newBC.id, "Should have replaced the BrowsingContext");
});
});
add_task(async function remote_to_parent() {
let originalBC = browser.browsingContext;
BrowserTestUtils.startLoadingURIString(browser, "about:mozilla");
await BrowserTestUtils.browserLoaded(browser);
let newBC = browser.browsingContext;
isnot(originalBC.id, newBC.id, "Should have replaced the BrowsingContext");
});
});