summaryrefslogtreecommitdiffstats
path: root/browser/components/customizableui/test/browser_940307_panel_click_closure_handling.js
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/customizableui/test/browser_940307_panel_click_closure_handling.js')
-rw-r--r--browser/components/customizableui/test/browser_940307_panel_click_closure_handling.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/browser/components/customizableui/test/browser_940307_panel_click_closure_handling.js b/browser/components/customizableui/test/browser_940307_panel_click_closure_handling.js
index 0cf9a93341..8f2dc87e19 100644
--- a/browser/components/customizableui/test/browser_940307_panel_click_closure_handling.js
+++ b/browser/components/customizableui/test/browser_940307_panel_click_closure_handling.js
@@ -124,18 +124,17 @@ add_task(async function disabled_button_in_panel() {
button.remove();
});
-registerCleanupFunction(function () {
+registerCleanupFunction(async function () {
if (button && button.parentNode) {
button.remove();
}
if (menuButton && menuButton.parentNode) {
menuButton.remove();
}
- // Sadly this isn't task.jsm-enabled, so we can't wait for this to happen. But we should
- // definitely close it here and hope it won't interfere with other tests.
- // Of course, all the tests are meant to do this themselves, but if they fail...
if (isOverflowOpen()) {
+ let panelHiddenPromise = promiseOverflowHidden(window);
PanelUI.overflowPanel.hidePopup();
+ await panelHiddenPromise;
}
CustomizableUI.reset();
});