diff --git a/browser/components/customizableui/test/browser_988072_sidebar_events.js b/browser/components/customizableui/test/browser_988072_sidebar_events.js index f69b1e492e8..e4fe5510e84 100644 --- a/browser/components/customizableui/test/browser_988072_sidebar_events.js +++ b/browser/components/customizableui/test/browser_988072_sidebar_events.js @@ -19,6 +19,11 @@ window.sawEvent = function(event, isattr) { registerCleanupFunction(() => { delete window.sawEvent; + + // Ensure sidebar is hidden after each test: + if (!document.getElementById("sidebar-box").hidden) { + toggleSidebar("", false); + } }); function checkExpectedEvents(expected) { @@ -84,7 +89,7 @@ add_task(function*() { document.getElementById("customizationui-widget-panel").hidePopup(); yield subviewHiddenPromise; - yield resetCustomization(); + return resetCustomization(); }); function add_sidebar_task(description, setup, teardown) {