2020-03-26 17:37:21 +00:00
|
|
|
add_task(async function parent_to_remote() {
|
|
|
|
await BrowserTestUtils.withNewTab("about:mozilla", async browser => {
|
|
|
|
let originalBC = browser.browsingContext;
|
|
|
|
|
2023-01-19 20:16:41 +00:00
|
|
|
BrowserTestUtils.loadURIString(browser, "https://example.com/");
|
2020-03-26 17:37:21 +00:00
|
|
|
await BrowserTestUtils.browserLoaded(browser);
|
|
|
|
let newBC = browser.browsingContext;
|
|
|
|
|
2020-03-26 18:29:47 +00:00
|
|
|
isnot(originalBC.id, newBC.id, "Should have replaced the BrowsingContext");
|
2020-03-26 17:37:21 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
add_task(async function remote_to_parent() {
|
|
|
|
await BrowserTestUtils.withNewTab("https://example.com/", async browser => {
|
|
|
|
let originalBC = browser.browsingContext;
|
|
|
|
|
2023-01-19 20:16:41 +00:00
|
|
|
BrowserTestUtils.loadURIString(browser, "about:mozilla");
|
2020-03-26 17:37:21 +00:00
|
|
|
await BrowserTestUtils.browserLoaded(browser);
|
|
|
|
let newBC = browser.browsingContext;
|
|
|
|
|
2020-03-26 18:29:47 +00:00
|
|
|
isnot(originalBC.id, newBC.id, "Should have replaced the BrowsingContext");
|
2020-03-26 17:37:21 +00:00
|
|
|
});
|
|
|
|
});
|