зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
872d855cee
Коммит
f5f1c89ced
|
@ -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, {
|
||||
|
|
Загрузка…
Ссылка в новой задаче