Bug 1415793 - Check the removal of a tab until next tick. r=rpl
authorBevis Tseng <btseng@mozilla.com>
Wed, 20 Dec 2017 16:46:24 +0800
changeset 448756 23b8e3ed86a8e83b5f912781788b89990e65ae40
parent 448755 26927d4b8975345b805f942d5a569fe256264265
child 448757 9928b5dffb3ffa5e715a5dd4cfd22f9f97c6bfa8
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrpl
bugs1415793
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1415793 - Check the removal of a tab until next tick. r=rpl
mobile/android/components/extensions/test/mochitest/test_ext_activeTab_permission.html
--- a/mobile/android/components/extensions/test/mochitest/test_ext_activeTab_permission.html
+++ b/mobile/android/components/extensions/test/mochitest/test_ext_activeTab_permission.html
@@ -310,17 +310,17 @@ add_task(async function test_activeTab_p
 
   const chromeWin = Services.wm.getMostRecentWindow("navigator:browser");
   const BrowserApp = chromeWin.BrowserApp;
 
   const popupTab = BrowserApp.selectedTab;
   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.
   // (which should make the extension popup tab to be closed automatically)
   BrowserApp.selectTab(BrowserApp.getTabForId(popupTab.parentId));
 
   info("Wait for the extension popup tab to be closed once the parent tab has been selected");
 
@@ -439,17 +439,17 @@ add_task(async function test_activeTab_b
 
   const chromeWin = Services.wm.getMostRecentWindow("navigator:browser");
   const BrowserApp = chromeWin.BrowserApp;
 
   const popupTab = BrowserApp.selectedTab;
   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.
   // (which should make the extension popup tab to be closed automatically)
   BrowserApp.selectTab(BrowserApp.getTabForId(popupTab.parentId));
 
   info("Wait for the extension popup tab to be closed once the parent tab has been selected");