Bug 1412471 - Fix intermittent failure in browser_panelUINotifications_fullscreen_noAutoHideToolbar.js by ensuring we wait for update popup. r=Gijs, a=test-only
authorMike Conley <mconley@mozilla.com>
Fri, 24 Nov 2017 10:55:41 -0500
changeset 445078 70848823799a9ef8788e0be7dbd612d2abf80172
parent 445077 c323f2b265dba7bc3886a4f54839535ef814d4fa
child 445079 f75ad2573f47bd015deace0080fe31fca27ab173
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs, test-only
bugs1412471
milestone58.0
Bug 1412471 - Fix intermittent failure in browser_panelUINotifications_fullscreen_noAutoHideToolbar.js by ensuring we wait for update popup. r=Gijs, a=test-only 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();