Bug 1409658 - Increase timer for waiting menubutton's binding. r=steveck
MozReview-Commit-ID: 9B2uGb1jt5t
--- a/browser/extensions/formautofill/test/browser/head.js
+++ b/browser/extensions/formautofill/test/browser/head.js
@@ -229,17 +229,17 @@ function getNotification(index = 0) {
async function clickDoorhangerButton(button, index) {
let popuphidden = BrowserTestUtils.waitForEvent(PopupNotifications.panel, "popuphidden");
if (button == MAIN_BUTTON || button == SECONDARY_BUTTON) {
EventUtils.synthesizeMouseAtCenter(getNotification()[button], {});
} else if (button == MENU_BUTTON) {
// Click the dropmarker arrow and wait for the menu to show up.
await BrowserTestUtils.waitForCondition(() => getNotification().menubutton);
- await sleep(); // menubutton needs extra time for binding
+ await sleep(2000); // menubutton needs extra time for binding
let notification = getNotification();
ok(notification.menubutton, "notification menupopup displayed");
let dropdownPromise =
BrowserTestUtils.waitForEvent(notification.menupopup, "popupshown");
await EventUtils.synthesizeMouseAtCenter(notification.menubutton, {});
await dropdownPromise;
let actionMenuItem = notification.querySelectorAll("menuitem")[index];