diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /browser/components/places/tests | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip |
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/places/tests')
9 files changed, 54 insertions, 36 deletions
diff --git a/browser/components/places/tests/browser/browser_bookmark_context_menu_contents.js b/browser/components/places/tests/browser/browser_bookmark_context_menu_contents.js index 228fea654e..f2f47ff4b4 100644 --- a/browser/components/places/tests/browser/browser_bookmark_context_menu_contents.js +++ b/browser/components/places/tests/browser/browser_bookmark_context_menu_contents.js @@ -386,7 +386,9 @@ add_task(async function test_sidebar_folder_contextmenu_contents() { tree.selectItems([folder.guid]); let contextMenu = - SidebarUI.browser.contentDocument.getElementById("placesContext"); + SidebarController.browser.contentDocument.getElementById( + "placesContext" + ); let popupShownPromise = BrowserTestUtils.waitForEvent( contextMenu, "popupshown" @@ -396,7 +398,7 @@ add_task(async function test_sidebar_folder_contextmenu_contents() { return contextMenu; }, optionItems, - SidebarUI.browser.contentDocument + SidebarController.browser.contentDocument ); }); }); @@ -430,7 +432,9 @@ add_task(async function test_sidebar_multiple_folders_contextmenu_contents() { tree.selectItems([folder1.guid, folder2.guid]); let contextMenu = - SidebarUI.browser.contentDocument.getElementById("placesContext"); + SidebarController.browser.contentDocument.getElementById( + "placesContext" + ); let popupShownPromise = BrowserTestUtils.waitForEvent( contextMenu, "popupshown" @@ -440,7 +444,7 @@ add_task(async function test_sidebar_multiple_folders_contextmenu_contents() { return contextMenu; }, optionItems, - SidebarUI.browser.contentDocument + SidebarController.browser.contentDocument ); }); }); @@ -473,7 +477,9 @@ add_task(async function test_sidebar_bookmark_contextmenu_contents() { tree.selectItems([bookmark.guid]); let contextMenu = - SidebarUI.browser.contentDocument.getElementById("placesContext"); + SidebarController.browser.contentDocument.getElementById( + "placesContext" + ); let popupShownPromise = BrowserTestUtils.waitForEvent( contextMenu, "popupshown" @@ -483,7 +489,7 @@ add_task(async function test_sidebar_bookmark_contextmenu_contents() { return contextMenu; }, optionItems, - SidebarUI.browser.contentDocument + SidebarController.browser.contentDocument ); }); }); @@ -513,13 +519,17 @@ add_task(async function test_sidebar_bookmark_search_contextmenu_contents() { info("Checking bookmark sidebar menu contents in search context"); // Perform a search first let searchBox = - SidebarUI.browser.contentDocument.getElementById("search-box"); + SidebarController.browser.contentDocument.getElementById( + "search-box" + ); searchBox.value = SECOND_BOOKMARK_TITLE; searchBox.doCommand(); tree.selectItems([bookmark.guid]); let contextMenu = - SidebarUI.browser.contentDocument.getElementById("placesContext"); + SidebarController.browser.contentDocument.getElementById( + "placesContext" + ); let popupShownPromise = BrowserTestUtils.waitForEvent( contextMenu, "popupshown" @@ -529,7 +539,7 @@ add_task(async function test_sidebar_bookmark_search_contextmenu_contents() { return contextMenu; }, optionItems, - SidebarUI.browser.contentDocument + SidebarController.browser.contentDocument ); }); }); @@ -641,7 +651,9 @@ add_task(async function test_sidebar_mixedselection_contextmenu_contents() { tree.selectItems([bookmark.guid, folder.guid]); let contextMenu = - SidebarUI.browser.contentDocument.getElementById("placesContext"); + SidebarController.browser.contentDocument.getElementById( + "placesContext" + ); let popupShownPromise = BrowserTestUtils.waitForEvent( contextMenu, "popupshown" @@ -651,7 +663,7 @@ add_task(async function test_sidebar_mixedselection_contextmenu_contents() { return contextMenu; }, optionItems, - SidebarUI.browser.contentDocument + SidebarController.browser.contentDocument ); }); }); @@ -679,7 +691,9 @@ add_task(async function test_sidebar_multiple_bookmarks_contextmenu_contents() { tree.selectItems([bookmark.guid, bookmark2.guid]); let contextMenu = - SidebarUI.browser.contentDocument.getElementById("placesContext"); + SidebarController.browser.contentDocument.getElementById( + "placesContext" + ); let popupShownPromise = BrowserTestUtils.waitForEvent( contextMenu, "popupshown" @@ -689,7 +703,7 @@ add_task(async function test_sidebar_multiple_bookmarks_contextmenu_contents() { return contextMenu; }, optionItems, - SidebarUI.browser.contentDocument + SidebarController.browser.contentDocument ); }); }); @@ -714,7 +728,9 @@ add_task(async function test_sidebar_multiple_links_contextmenu_contents() { tree.selectAll(); let contextMenu = - SidebarUI.browser.contentDocument.getElementById("placesContext"); + SidebarController.browser.contentDocument.getElementById( + "placesContext" + ); let popupShownPromise = BrowserTestUtils.waitForEvent( contextMenu, "popupshown" @@ -724,7 +740,7 @@ add_task(async function test_sidebar_multiple_links_contextmenu_contents() { return contextMenu; }, optionItems, - SidebarUI.browser.contentDocument + SidebarController.browser.contentDocument ); }); }); @@ -750,7 +766,9 @@ add_task(async function test_sidebar_mixed_bookmarks_contextmenu_contents() { tree.selectItems([bookmark.guid, folder.guid]); let contextMenu = - SidebarUI.browser.contentDocument.getElementById("placesContext"); + SidebarController.browser.contentDocument.getElementById( + "placesContext" + ); let popupShownPromise = BrowserTestUtils.waitForEvent( contextMenu, "popupshown" @@ -760,7 +778,7 @@ add_task(async function test_sidebar_mixed_bookmarks_contextmenu_contents() { return contextMenu; }, optionItems, - SidebarUI.browser.contentDocument + SidebarController.browser.contentDocument ); }); }); diff --git a/browser/components/places/tests/browser/browser_bookmarksProperties.js b/browser/components/places/tests/browser/browser_bookmarksProperties.js index cfa9e6c581..b1147c3541 100644 --- a/browser/components/places/tests/browser/browser_bookmarksProperties.js +++ b/browser/components/places/tests/browser/browser_bookmarksProperties.js @@ -156,7 +156,7 @@ gTests.push({ }, finish() { - SidebarUI.hide(); + SidebarController.hide(); }, async cleanup() { @@ -282,7 +282,7 @@ gTests.push({ }, finish() { - SidebarUI.hide(); + SidebarController.hide(); }, async cleanup() { @@ -399,7 +399,7 @@ gTests.push({ }, finish() { - SidebarUI.hide(); + SidebarController.hide(); }, async cleanup() { @@ -450,7 +450,7 @@ function execute_test_in_sidebar(test) { }, { capture: true, once: true } ); - SidebarUI.show(test.sidebar); + SidebarController.show(test.sidebar); }); } diff --git a/browser/components/places/tests/browser/browser_check_correct_controllers.js b/browser/components/places/tests/browser/browser_check_correct_controllers.js index 80095823e1..d19939b98b 100644 --- a/browser/components/places/tests/browser/browser_check_correct_controllers.js +++ b/browser/components/places/tests/browser/browser_check_correct_controllers.js @@ -32,7 +32,7 @@ add_task(async function test() { let sidebar = await promiseLoadedSidebar("viewBookmarksSidebar"); registerCleanupFunction(() => { - SidebarUI.hide(); + SidebarController.hide(); }); // Focus the tree and check if its controller is returned. @@ -109,6 +109,6 @@ function promiseLoadedSidebar(cmd) { { capture: true, once: true } ); - SidebarUI.show(cmd); + SidebarController.show(cmd); }); } diff --git a/browser/components/places/tests/browser/browser_enable_toolbar_sidebar.js b/browser/components/places/tests/browser/browser_enable_toolbar_sidebar.js index 8d4d650984..47c53e6027 100644 --- a/browser/components/places/tests/browser/browser_enable_toolbar_sidebar.js +++ b/browser/components/places/tests/browser/browser_enable_toolbar_sidebar.js @@ -11,7 +11,7 @@ registerCleanupFunction(async () => { CustomizableUI.setToolbarVisibility("PersonalToolbar", false); CustomizableUI.removeWidgetFromArea("library-button"); - SidebarUI.hide(); + SidebarController.hide(); }); async function selectAppMenuView(buttonId, viewId) { diff --git a/browser/components/places/tests/browser/browser_sidebar_on_customization.js b/browser/components/places/tests/browser/browser_sidebar_on_customization.js index 6e97f81dd3..e5704e9d04 100644 --- a/browser/components/places/tests/browser/browser_sidebar_on_customization.js +++ b/browser/components/places/tests/browser/browser_sidebar_on_customization.js @@ -30,9 +30,9 @@ add_setup(async function () { add_task(async function test_open_sidebar_and_customize() { await withSidebarTree("bookmarks", async tree => { async function checkTreeIsFunctional() { - Assert.ok(SidebarUI.isOpen, "Sidebar is open"); + Assert.ok(SidebarController.isOpen, "Sidebar is open"); Assert.ok( - BrowserTestUtils.isVisible(SidebarUI.browser), + BrowserTestUtils.isVisible(SidebarController.browser), "sidebar browser is visible" ); Assert.ok(tree.view.result, "View result is defined"); @@ -49,7 +49,7 @@ add_task(async function test_open_sidebar_and_customize() { await promiseCustomizeStart(); Assert.ok( - !BrowserTestUtils.isVisible(SidebarUI.browser), + !BrowserTestUtils.isVisible(SidebarController.browser), "sidebar browser is hidden" ); Assert.ok(tree.view.result, "View result is defined"); diff --git a/browser/components/places/tests/browser/browser_sidebarpanels_click.js b/browser/components/places/tests/browser/browser_sidebarpanels_click.js index 9a1b039e78..f107eb76d5 100644 --- a/browser/components/places/tests/browser/browser_sidebarpanels_click.js +++ b/browser/components/places/tests/browser/browser_sidebarpanels_click.js @@ -31,7 +31,7 @@ add_task(async function test_sidebarpanels_click() { false, "Unexpected sidebar found - a previous test failed to cleanup correctly" ); - SidebarUI.hide(); + SidebarController.hide(); } // Ensure history is clean before starting the test. @@ -137,7 +137,7 @@ async function testPlacesPanel(testInfo) { await promiseAlert; executeSoon(async function () { - SidebarUI.hide(); + SidebarController.hide(); await testInfo.cleanup(); resolve(); }); @@ -147,7 +147,7 @@ async function testPlacesPanel(testInfo) { ); }); - SidebarUI.show(testInfo.sidebarName); + SidebarController.show(testInfo.sidebarName); return promise; } diff --git a/browser/components/places/tests/browser/browser_toolbarbutton_menu_show_in_folder.js b/browser/components/places/tests/browser/browser_toolbarbutton_menu_show_in_folder.js index 02720cfa2e..c4f6912044 100644 --- a/browser/components/places/tests/browser/browser_toolbarbutton_menu_show_in_folder.js +++ b/browser/components/places/tests/browser/browser_toolbarbutton_menu_show_in_folder.js @@ -11,7 +11,7 @@ const TEST_TITLE = "Test Bookmark"; let appMenuButton = document.getElementById("PanelUI-menu-button"); let bookmarksAppMenu = document.getElementById("PanelUI-bookmarks"); -let sidebarWasAlreadyOpen = SidebarUI.isOpen; +let sidebarWasAlreadyOpen = SidebarController.isOpen; const { CustomizableUITestUtils } = ChromeUtils.importESModule( "resource://testing-common/CustomizableUITestUtils.sys.mjs" @@ -86,7 +86,7 @@ add_task(async function toolbarBookmarkShowInFolder() { // Cleanup await PlacesUtils.bookmarks.eraseEverything(); if (!sidebarWasAlreadyOpen) { - SidebarUI.hide(); + SidebarController.hide(); } await gCUITestUtils.hideMainMenu(); }); diff --git a/browser/components/places/tests/browser/browser_views_iconsupdate.js b/browser/components/places/tests/browser/browser_views_iconsupdate.js index 1799a9665b..d1e5ea83ea 100644 --- a/browser/components/places/tests/browser/browser_views_iconsupdate.js +++ b/browser/components/places/tests/browser/browser_views_iconsupdate.js @@ -28,9 +28,9 @@ add_task(async function () { let promiseSidebarLoaded = new Promise(resolve => { sidebar.addEventListener("load", resolve, { capture: true, once: true }); }); - SidebarUI.show("viewBookmarksSidebar"); + SidebarController.show("viewBookmarksSidebar"); registerCleanupFunction(() => { - SidebarUI.hide(); + SidebarController.hide(); }); await promiseSidebarLoaded; diff --git a/browser/components/places/tests/browser/head.js b/browser/components/places/tests/browser/head.js index 5459e6f924..2decd11da9 100644 --- a/browser/components/places/tests/browser/head.js +++ b/browser/components/places/tests/browser/head.js @@ -395,7 +395,7 @@ var withSidebarTree = async function (type, taskFn) { }); let sidebarId = type == "bookmarks" ? "viewBookmarksSidebar" : "viewHistorySidebar"; - SidebarUI.show(sidebarId); + SidebarController.show(sidebarId); await sidebarLoadedPromise; let treeId = type == "bookmarks" ? "bookmarks-view" : "historyTree"; @@ -406,7 +406,7 @@ var withSidebarTree = async function (type, taskFn) { try { await taskFn(tree); } finally { - SidebarUI.hide(); + SidebarController.hide(); } }; |