зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1432037 - Wait for tab animation end when closing test tabs. r=bgrins
MozReview-Commit-ID: 2XxcOFOqJo --HG-- extra : rebase_source : ae7482dc3ebc67285f6ca666804edb2819280ca8
This commit is contained in:
Родитель
b9bc9a2583
Коммит
58e12beee8
|
@ -278,8 +278,13 @@ Damp.prototype = {
|
|||
});
|
||||
},
|
||||
|
||||
closeCurrentTab() {
|
||||
async closeCurrentTab() {
|
||||
let onTransition = new Promise(done => {
|
||||
this._win.gBrowser.tabContainer.addEventListener("transitionend", done,
|
||||
{ once: true });
|
||||
});
|
||||
this._win.BrowserCloseTabOrWindow();
|
||||
await onTransition;
|
||||
return this._win.gBrowser.selectedTab;
|
||||
},
|
||||
|
||||
|
@ -907,7 +912,7 @@ async _consoleOpenWithCachedMessagesTest() {
|
|||
},
|
||||
|
||||
async testTeardown(url) {
|
||||
this.closeCurrentTab();
|
||||
await this.closeCurrentTab();
|
||||
|
||||
// Force freeing memory now so that it doesn't happen during the next test
|
||||
await garbageCollect();
|
||||
|
|
Загрузка…
Ссылка в новой задаче