Bug 1397426 - Stop disabling tab warming in browser_bug343515.js. r=billm
authorMike Conley <mconley@mozilla.com>
Mon, 23 Oct 2017 17:01:48 -0400
changeset 449804 f6e07e9760454bdb813ab63b1c5b15d4d6ff259f
parent 449803 d39683d8f79f01c24b34625988e0ba39535bf587
child 449805 3fa35817d29d5fe75e59f92cb794dcd6adb4f9b4
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)
reviewersbillm
bugs1397426, 343515
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 1397426 - Stop disabling tab warming in browser_bug343515.js. r=billm Tab warming was originally disabled in this test because it was accidentally setting the DocShell to be active at an unexpected time. Because tab warming no longer activates DocShells, we can revert this change, though we also have to make it deal with the fact that switching tabs no longer makes docShells become activate immediately. MozReview-Commit-ID: K0fiA5AVfEm
docshell/test/navigation/browser_bug343515.js
--- a/docshell/test/navigation/browser_bug343515.js
+++ b/docshell/test/navigation/browser_bug343515.js
@@ -34,33 +34,27 @@ function waitForPageshow(aBrowser, callb
 }
 
 // Entry point from Mochikit
 function test() {
 
   // Lots of callbacks going on here
   waitForExplicitFinish();
 
-  // Begin the test. First, we disable tab warming because it's
-  // possible for the mouse to be over one of the tabs during
-  // this test, warm it up, and cause this test to fail intermittently
-  // in automation.
-  SpecialPowers.pushPrefEnv({
-    set: [["browser.tabs.remote.warmup.enabled", false]],
-  }).then(step1);
+  // Begin the test
+  step1();
 }
 
-function step1() {
-
+async function step1() {
   // Get a handle on the initial tab
   ctx.tab0 = gBrowser.selectedTab;
   ctx.tab0Browser = gBrowser.getBrowserForTab(ctx.tab0);
 
-  // Our current tab should be active
-  ok(ctx.tab0Browser.docShellIsActive, "Tab 0 should be active at test start");
+  await BrowserTestUtils.waitForCondition(() => ctx.tab0Browser.docShellIsActive,
+    "Timed out waiting for initial tab to be active.");
 
   // Open a New Tab
   ctx.tab1 = BrowserTestUtils.addTab(gBrowser, testPath + "bug343515_pg1.html");
   ctx.tab1Browser = gBrowser.getBrowserForTab(ctx.tab1);
   oneShotListener(ctx.tab1Browser, "load", step2);
 }
 
 function step2() {