gecko-dev/dom/tests/browser/browser_navigate_replace_browsingcontext.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
833 B
JavaScript
Raw Normal View History

add_task(async function parent_to_remote() {
await BrowserTestUtils.withNewTab("about:mozilla", async browser => {
let originalBC = browser.browsingContext;
BrowserTestUtils.loadURIString(browser, "https://example.com/");
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() {
await BrowserTestUtils.withNewTab("https://example.com/", async browser => {
let originalBC = browser.browsingContext;
BrowserTestUtils.loadURIString(browser, "about:mozilla");
await BrowserTestUtils.browserLoaded(browser);
let newBC = browser.browsingContext;
isnot(originalBC.id, newBC.id, "Should have replaced the BrowsingContext");
});
});