Bug 1438763 - fix intermittent orange in undo_notification_multiple_dismissal.js, r=ursula

When bug 1433324 made these tests run against activity stream, it made the notification
fire from the test's head.js file itself. Unfortunately, that races with the new tab / home
page actually loading, triggering an `onLocationChange` event in the tabbrowser, which
removes the notification again, meaning it is then no longer there when the test expects
it to be.

This wasn't an issue before, because the notification bar was opened via a message from
within the new tab page, which always arrived after the `onLocationChange` event.

Because the current state is temporary anyway, I'm just changing the test to open 2 tabs
first, and then opening the notification bars, which in practice guarantees this happens
after the `onLocationChange` event.

MozReview-Commit-ID: LOzgjrZBp0H

--HG--
extra : rebase_source : 10568c1ad97b03143d79b2d967ccac42550000a6
This commit is contained in:
Gijs Kruitbosch 2018-03-07 16:07:41 +00:00
Родитель 87f3b3ae3b
Коммит 56c730ca53
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -32,8 +32,8 @@ add_task(async function checkNotificationsDismissed() {
});
let firstTab = await BrowserTestUtils.openNewForegroundTab(gBrowser, "about:home", false);
let firstNotification = await getOrWaitForNotification(firstTab.linkedBrowser, "first tab");
let secondTab = await BrowserTestUtils.openNewForegroundTab(gBrowser, "about:home", false);
let firstNotification = await getOrWaitForNotification(firstTab.linkedBrowser, "first tab");
let secondNotification = await getOrWaitForNotification(secondTab.linkedBrowser, "second tab");
// Create a listener for the removal in the first tab, and a listener for bookmarks removal,