summaryrefslogtreecommitdiffstats
path: root/browser/components/customizableui/test/browser_sidebar_toggle.js
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/customizableui/test/browser_sidebar_toggle.js')
-rw-r--r--browser/components/customizableui/test/browser_sidebar_toggle.js22
1 files changed, 15 insertions, 7 deletions
diff --git a/browser/components/customizableui/test/browser_sidebar_toggle.js b/browser/components/customizableui/test/browser_sidebar_toggle.js
index 5742f368ee..a063cc26cf 100644
--- a/browser/components/customizableui/test/browser_sidebar_toggle.js
+++ b/browser/components/customizableui/test/browser_sidebar_toggle.js
@@ -9,7 +9,7 @@ registerCleanupFunction(async function () {
// Ensure sidebar is hidden after each test:
if (!document.getElementById("sidebar-box").hidden) {
- SidebarUI.hide();
+ SidebarController.hide();
}
});
@@ -21,14 +21,14 @@ var showSidebar = async function (win = window) {
);
EventUtils.synthesizeMouseAtCenter(button, {}, win);
await sidebarFocusedPromise;
- ok(win.SidebarUI.isOpen, "Sidebar is opened");
+ ok(win.SidebarController.isOpen, "Sidebar is opened");
ok(button.hasAttribute("checked"), "Toolbar button is checked");
};
var hideSidebar = async function (win = window) {
let button = win.document.getElementById("sidebar-button");
EventUtils.synthesizeMouseAtCenter(button, {}, win);
- ok(!win.SidebarUI.isOpen, "Sidebar is closed");
+ ok(!win.SidebarController.isOpen, "Sidebar is closed");
ok(!button.hasAttribute("checked"), "Toolbar button isn't checked");
};
@@ -37,18 +37,26 @@ add_task(async function () {
CustomizableUI.addWidgetToArea("sidebar-button", "nav-bar");
await showSidebar();
- is(SidebarUI.currentID, "viewBookmarksSidebar", "Default sidebar selected");
- await SidebarUI.show("viewHistorySidebar");
+ is(
+ SidebarController.currentID,
+ "viewBookmarksSidebar",
+ "Default sidebar selected"
+ );
+ await SidebarController.show("viewHistorySidebar");
await hideSidebar();
await showSidebar();
- is(SidebarUI.currentID, "viewHistorySidebar", "Selected sidebar remembered");
+ is(
+ SidebarController.currentID,
+ "viewHistorySidebar",
+ "Selected sidebar remembered"
+ );
await hideSidebar();
let otherWin = await BrowserTestUtils.openNewBrowserWindow();
await showSidebar(otherWin);
is(
- otherWin.SidebarUI.currentID,
+ otherWin.SidebarController.currentID,
"viewHistorySidebar",
"Selected sidebar remembered across windows"
);