Bug 1093594: Fix browser_alltabslistener.js to work in e10s. r=gijs
authorDave Townsend <dtownsend@oxymoronical.com>
Tue, 18 Nov 2014 09:53:43 -0800
changeset 216376 240df159e2386b9374b3c38a47ba7ce07a866ccc
parent 216375 db10aad51ebcc96f4b70c2d4a82cbeb5611cb14f
child 216377 e7a7c9c5dfe770af5b89828b63db9e011eef32ff
push id52026
push userkwierso@gmail.com
push dateWed, 19 Nov 2014 02:37:17 +0000
treeherdermozilla-inbound@d197d16c0caa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgijs
bugs1093594
milestone36.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 1093594: Fix browser_alltabslistener.js to work in e10s. r=gijs
browser/base/content/test/general/browser.ini
browser/base/content/test/general/browser_alltabslistener.js
--- a/browser/base/content/test/general/browser.ini
+++ b/browser/base/content/test/general/browser.ini
@@ -115,17 +115,16 @@ skip-if = os == "linux" || e10s # Bug 10
 [browser_action_searchengine.js]
 skip-if = os == "linux" || e10s # Bug 1073339 - Investigate autocomplete test unreliability on Linux/e10s
 [browser_action_searchengine_alias.js]
 skip-if = os == "linux" || e10s # Bug 1073339 - Investigate autocomplete test unreliability on Linux/e10s
 [browser_addKeywordSearch.js]
 [browser_search_favicon.js]
 skip-if = os == "linux" || e10s # Bug 1073339 - Investigate autocomplete test unreliability on Linux/e10s
 [browser_alltabslistener.js]
-skip-if = os == "linux" || e10s # Linux: Intermittent failures, bug 951680; e10s: Bug 1093594 - notifications for tabs come in in the wrong order / unexpectedly
 [browser_autocomplete_a11y_label.js]
 skip-if = e10s # Bug ????? - no e10s switch-to-tab support yet
 [browser_backButtonFitts.js]
 skip-if = os != "win" || e10s # The Fitts Law back button is only supported on Windows (bug 571454) / e10s - Bug 1099154: test touches content (attempts to add an event listener directly to the contentWindow)
 [browser_blob-channelname.js]
 [browser_bookmark_titles.js]
 skip-if = buildapp == 'mulet' || toolkit == "windows" || e10s # Disabled on Windows due to frequent failures (bugs 825739, 841341) / e10s - Bug 1094205 - places doesn't return the right thing in e10s mode, for some reason
 [browser_bug304198.js]
--- a/browser/base/content/test/general/browser_alltabslistener.js
+++ b/browser/base/content/test/general/browser_alltabslistener.js
@@ -89,32 +89,31 @@ function test() {
   gBackgroundTab = gBrowser.addTab("about:blank");
   gForegroundTab = gBrowser.addTab("about:blank");
   gBackgroundBrowser = gBrowser.getBrowserForTab(gBackgroundTab);
   gForegroundBrowser = gBrowser.getBrowserForTab(gForegroundTab);
   gBrowser.selectedTab = gForegroundTab;
 
   // We must wait until the about:blank page has completed loading before
   // starting tests or we get notifications from that
-  gForegroundBrowser.addEventListener("load", startTests, true);
+  let promises = [
+    waitForDocLoadComplete(gBackgroundBrowser),
+    waitForDocLoadComplete(gForegroundBrowser)
+  ];
+  Promise.all(promises).then(startTest1);
 }
 
 function runTest(browser, url, next) {
   gFrontNotificationsPos = 0;
   gAllNotificationsPos = 0;
   gNextTest = next;
   gTestBrowser = browser;
   browser.loadURI(url);
 }
 
-function startTests() {
-  gForegroundBrowser.removeEventListener("load", startTests, true);
-  executeSoon(startTest1);
-}
-
 function startTest1() {
   info("\nTest 1");
   gBrowser.addProgressListener(gFrontProgressListener);
   gBrowser.addTabsProgressListener(gAllProgressListener);
 
   gAllNotifications = [
     "onStateChange",
     "onLocationChange",