From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- .../browser_navigate_replace_browsingcontext.js | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 dom/tests/browser/browser_navigate_replace_browsingcontext.js (limited to 'dom/tests/browser/browser_navigate_replace_browsingcontext.js') diff --git a/dom/tests/browser/browser_navigate_replace_browsingcontext.js b/dom/tests/browser/browser_navigate_replace_browsingcontext.js new file mode 100644 index 0000000000..e8e0f98658 --- /dev/null +++ b/dom/tests/browser/browser_navigate_replace_browsingcontext.js @@ -0,0 +1,23 @@ +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"); + }); +}); -- cgit v1.2.3