Bug 1412471 - Fix intermittent failure in browser_panelUINotifications_fullscreen_noAutoHideToolbar.js by ensuring we wait for update popup. r?Gijs draft
authorMike Conley <mconley@mozilla.com>
Fri, 24 Nov 2017 10:55:41 -0500
changeset 703261 5b79e3f5da30df6d5b627087cf8b3ed67fc70838
parent 700746 60540711465d7a6825321b33bf5721800c71f408
child 741728 45957c0632cd3275c604ee3e9b3be6a34faf7da5
push id90771
push usermconley@mozilla.com
push dateFri, 24 Nov 2017 18:54:53 +0000
reviewersGijs
bugs1412471
milestone59.0a1
Bug 1412471 - Fix intermittent failure in browser_panelUINotifications_fullscreen_noAutoHideToolbar.js by ensuring we wait for update popup. r?Gijs MozReview-Commit-ID: Yypy0ls4Ap
browser/components/customizableui/test/browser_panelUINotifications_fullscreen_noAutoHideToolbar.js
--- a/browser/components/customizableui/test/browser_panelUINotifications_fullscreen_noAutoHideToolbar.js
+++ b/browser/components/customizableui/test/browser_panelUINotifications_fullscreen_noAutoHideToolbar.js
@@ -36,16 +36,17 @@ add_task(async function testFullscreen()
   }
 
   is(PanelUI.notificationPanel.state, "closed", "update-manual doorhanger is closed.");
   let mainActionCalled = false;
   let mainAction = {
     callback: () => { mainActionCalled = true; }
   };
   AppMenuNotifications.showNotification("update-manual", mainAction);
+  await BrowserTestUtils.waitForEvent(PanelUI.notificationPanel, "popupshown");
 
   isnot(PanelUI.notificationPanel.state, "closed", "update-manual doorhanger is showing.");
   let notifications = [...PanelUI.notificationPanel.children].filter(n => !n.hidden);
   is(notifications.length, 1, "PanelUI doorhanger is only displaying one notification.");
   let doorhanger = notifications[0];
   is(doorhanger.id, "appMenu-update-manual-notification", "PanelUI is displaying the update-manual notification.");
 
   let fullscreenPromise = waitForFullscreen();