diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
commit | a90a5cba08fdf6c0ceb95101c275108a152a3aed (patch) | |
tree | 532507288f3defd7f4dcf1af49698bcb76034855 /browser/components/privatebrowsing/test | |
parent | Adding debian version 126.0.1-1. (diff) | |
download | firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/privatebrowsing/test')
3 files changed, 6 insertions, 60 deletions
diff --git a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about_default_pin_promo.js b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about_default_pin_promo.js index bc62556b12..d34b93f4de 100644 --- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about_default_pin_promo.js +++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about_default_pin_promo.js @@ -54,57 +54,3 @@ add_task(async function test_pin_promo() { await BrowserTestUtils.closeWindow(win3); await BrowserTestUtils.closeWindow(win4); }); - -add_task(async function test_pin_promo_mr2022_holdback() { - ASRouter.resetMessageState(); - // Set majorRelease2022 feature onboarding variable fallback pref - // for inMr2022Holdback targeting to evaluate true - await SpecialPowers.pushPrefEnv({ - set: [["browser.majorrelease.onboarding", false]], - }); - await ASRouter.onPrefChange(); - let { win: win1, tab: tab1 } = await openTabAndWaitForRender(); - - await SpecialPowers.spawn(tab1, [], async function () { - const promoContainer = content.document.querySelector(".promo"); - const promoButton = content.document.querySelector( - "#private-browsing-promo-link" - ); - - ok(promoContainer, "Promo is shown"); - - Assert.equal( - promoButton.getAttribute("data-l10n-id"), - "about-private-browsing-focus-promo-cta", - "Pin Promo not shown for holdback user" - ); - }); - - await BrowserTestUtils.closeWindow(win1); -}); - -add_task(async function test_pin_promo_mr2022_not_holdback() { - ASRouter.resetMessageState(); - // Set majorRelease2022 feature onboarding variable fallback pref - // for inMr2022Holdback targeting to evaluate false - await SpecialPowers.pushPrefEnv({ - set: [["browser.majorrelease.onboarding", true]], - }); - await ASRouter.onPrefChange(); - let { win: win1, tab: tab1 } = await openTabAndWaitForRender(); - - await SpecialPowers.spawn(tab1, [], async function () { - const promoContainer = content.document.querySelector(".promo"); - const promoHeader = content.document.getElementById("promo-header"); - - ok(promoContainer, "Promo is shown"); - - is( - promoHeader.getAttribute("data-l10n-id"), - "about-private-browsing-pin-promo-header", - "Pin Promo is shown" - ); - }); - - await BrowserTestUtils.closeWindow(win1); -}); diff --git a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_resetPBM.js b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_resetPBM.js index a80d818c87..f443b9bcd9 100644 --- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_resetPBM.js +++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_resetPBM.js @@ -682,23 +682,23 @@ add_task(async function test_reset_action_closes_sidebar() { info( "Open the sidebar of both the private browsing window and the normal browsing window." ); - await SidebarUI.show("viewBookmarksSidebar"); - await win.SidebarUI.show("viewBookmarksSidebar"); + await SidebarController.show("viewBookmarksSidebar"); + await win.SidebarController.show("viewBookmarksSidebar"); info("Trigger the restart PBM action"); await ResetPBMPanel._restartPBM(win); Assert.ok( - SidebarUI.isOpen, + SidebarController.isOpen, "Normal browsing window sidebar should still be open." ); Assert.ok( - !win.SidebarUI.isOpen, + !win.SidebarController.isOpen, "Private browsing sidebar should be closed." ); // Cleanup: Close the sidebar of the normal browsing window. - SidebarUI.hide(); + SidebarController.hide(); // Cleanup: Close the private window that remained open. await BrowserTestUtils.closeWindow(win); diff --git a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_sidebar.js b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_sidebar.js index 58a333bfdb..9988f35969 100644 --- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_sidebar.js +++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_sidebar.js @@ -12,7 +12,7 @@ function test() { // opens a sidebar function openSidebar(win) { - return win.SidebarUI.show("viewBookmarksSidebar").then(() => win); + return win.SidebarController.show("viewBookmarksSidebar").then(() => win); } let windowCache = []; |