Bug 1415793 - Check the removal of a tab until next tick. r=rpl

--HG--
extra : rebase_source : 2a4937ec1816cdd943c6d15de2b34a73e8890693
This commit is contained in:
Bevis Tseng 2017-12-20 16:46:24 +08:00
Родитель 24618e772a
Коммит f0a31f1b23
1 изменённых файлов: 2 добавлений и 2 удалений

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

@ -315,7 +315,7 @@ add_task(async function test_activeTab_pageAction_popup() {
const popupTabId = popupTab.id;
let onceTabClosed = new Promise(resolve => {
BrowserApp.deck.addEventListener("TabClose", resolve, {once: true});
BrowserApp.deck.addEventListener("TabClose", () => setTimeout(resolve, 0), {once: true});
});
// Switch to the parent tab of the popup tab.
@ -444,7 +444,7 @@ add_task(async function test_activeTab_browserAction_popup() {
const popupTabId = popupTab.id;
let onceTabClosed = new Promise(resolve => {
BrowserApp.deck.addEventListener("TabClose", resolve, {once: true});
BrowserApp.deck.addEventListener("TabClose", () => setTimeout(resolve, 0), {once: true});
});
// Switch to the parent tab of the popup tab.