Bug 1488953 - Wait for a scrollend event to make sure the scrolling has finished before proceeding the test. r=bgrins

Differential Revision: https://phabricator.services.mozilla.com/D33614

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Hiroyuki Ikezoe 2019-06-10 03:06:25 +00:00
Родитель 0da35261b6
Коммит d427e7411c
1 изменённых файлов: 5 добавлений и 1 удалений

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

@ -48,7 +48,11 @@ async function overflowTabs() {
while (gBrowser.tabs.length < tabCountForOverflow) {
BrowserTestUtils.addTab(gBrowser, "about:blank", { skipAnimation: true, index: 0 });
}
await window.promiseDocumentFlushed(() => {});
// Make sure scrolling finished.
await new Promise(resolve => {
arrowScrollbox.addEventListener("scrollend", resolve, { once: true });
});
}
function getLastCloseButton() {