Bug 1437811 - Part 1 - Fix test that didn't wait for PanelMultiView events. r=Gijs

MozReview-Commit-ID: CxWMEkzGMyZ

--HG--
extra : rebase_source : c1862d866caf1808300b174c5bc75f7f3cbddbb3
This commit is contained in:
Paolo Amadini 2018-02-14 14:12:57 +00:00
Родитель 872d855cee
Коммит f5f1c89ced
1 изменённых файлов: 5 добавлений и 0 удалений

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

@ -69,14 +69,19 @@ add_task(async function test_menu() {
// check the button's functionality
CustomizableUI.addWidgetToArea("sync-button", "nav-bar");
let remoteTabsView = document.getElementById("PanelUI-remotetabs");
let viewShown = BrowserTestUtils.waitForEvent(remoteTabsView, "ViewShown");
let syncButton = document.getElementById("sync-button");
syncButton.click();
await viewShown;
await tabsUpdated;
// Get our 1 tab and click on it.
let viewHidden = BrowserTestUtils.waitForEvent(remoteTabsView, "ViewHiding");
let tabList = document.getElementById("PanelUI-remotetabs-tabslist");
let tabEntry = tabList.firstChild.nextSibling;
tabEntry.click();
await viewHidden;
let counts = BUIT._countableEvents[BUIT.currentBucket];
Assert.deepEqual(counts, {