1
0
Fork 0
firefox/dom/tests/browser/browser_navigate_replace_browsingcontext.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

23 lines
849 B
JavaScript

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