Bug 1342299 - browser_tab_close_dependent_window.js should wait for the tab to have gone away, rs=firebot,test-only
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Wed, 11 Oct 2017 17:17:17 +0100
changeset 385596 d2c726518f677cd31de6d989fa9184ff034d7609
parent 385595 1eca387652fe3fe189c62c8679ef24bed67d2f1d
child 385597 ebcf1bc3e264fa838fbd980db9c8f9a4506b9af8
push id32662
push userryanvm@gmail.com
push dateWed, 11 Oct 2017 21:53:47 +0000
treeherdermozilla-central@3d918ff5d634 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfirebot, test-only
bugs1342299
milestone58.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 1342299 - browser_tab_close_dependent_window.js should wait for the tab to have gone away, rs=firebot,test-only Speculative fix to see if this helps deal with the intermittent orange. Seems to at least not cause other issues locally. MozReview-Commit-ID: E1T37mgAAqy
browser/base/content/test/general/browser_tab_close_dependent_window.js
--- a/browser/base/content/test/general/browser_tab_close_dependent_window.js
+++ b/browser/base/content/test/general/browser_tab_close_dependent_window.js
@@ -10,15 +10,18 @@ add_task(async function closing_tab_with
   await BrowserTestUtils.removeTab(win.gBrowser.tabs[0]);
   info("Clicking into the window");
   let depTabOpened = BrowserTestUtils.waitForEvent(win.gBrowser.tabContainer, "TabOpen");
   await BrowserTestUtils.synthesizeMouse("html", 0, 0, {}, tab.linkedBrowser);
 
   let openedTab = (await depTabOpened).target;
   info("Got opened tab");
 
+  let otherTabClosePromise = BrowserTestUtils.tabRemoved(openedTab);
   let windowClosedPromise = BrowserTestUtils.windowClosed(win);
   await BrowserTestUtils.removeTab(tab);
+  info("Wait for other tab to close, this shouldn't time out");
+  await otherTabClosePromise;
   is(Cu.isDeadWrapper(openedTab) || openedTab.linkedBrowser == null, true, "Opened tab should also have closed");
   info("If we timeout now, the window failed to close - that shouldn't happen!");
   await windowClosedPromise;
 });