Bug 1363829 P14 Make browser_bug462289.js test use setTimeout(f, 0) like it did before bug 1102017. r=dao
authorBen Kelly <ben@wanderview.com>
Wed, 31 May 2017 17:13:20 -0700
changeset 409867 9b5fb2901eac7ccd48c7c0bb58ea229f817e963b
parent 409866 1c99a1222200ff65e731534083b57f83ddc8d041
child 409868 d27d106fc45d32435d4468ed8282f4233af5aa22
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs1363829, 462289, 1102017
milestone55.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 1363829 P14 Make browser_bug462289.js test use setTimeout(f, 0) like it did before bug 1102017. r=dao
browser/base/content/test/general/browser_bug462289.js
--- a/browser/base/content/test/general/browser_bug462289.js
+++ b/browser/base/content/test/general/browser_bug462289.js
@@ -10,39 +10,39 @@ function focus_in_navbar() {
 
 function test() {
   waitForExplicitFinish();
 
   tab1 = BrowserTestUtils.addTab(gBrowser, "about:blank", {skipAnimation: true});
   tab2 = BrowserTestUtils.addTab(gBrowser, "about:blank", {skipAnimation: true});
 
   EventUtils.synthesizeMouseAtCenter(tab1, {});
-  executeSoon(step2);
+  setTimeout(step2, 0);
 }
 
 function step2() {
   is(gBrowser.selectedTab, tab1, "1st click on tab1 selects tab");
   isnot(document.activeElement, tab1, "1st click on tab1 does not activate tab");
 
   EventUtils.synthesizeMouseAtCenter(tab1, {});
-  executeSoon(step3);
+  setTimeout(step3, 0);
 }
 
 function step3() {
   is(gBrowser.selectedTab, tab1, "2nd click on selected tab1 keeps tab selected");
   isnot(document.activeElement, tab1, "2nd click on selected tab1 does not activate tab");
 
   ok(true, "focusing URLBar then sending 1 Shift+Tab.");
   gURLBar.focus();
   EventUtils.synthesizeKey("VK_TAB", {shiftKey: true});
   is(gBrowser.selectedTab, tab1, "tab key to selected tab1 keeps tab selected");
   is(document.activeElement, tab1, "tab key to selected tab1 activates tab");
 
   EventUtils.synthesizeMouseAtCenter(tab1, {});
-  executeSoon(step4);
+  setTimeout(step4, 0);
 }
 
 function step4() {
   is(gBrowser.selectedTab, tab1, "3rd click on activated tab1 keeps tab selected");
   is(document.activeElement, tab1, "3rd click on activated tab1 keeps tab activated");
 
   gBrowser.addEventListener("TabSwitchDone", step5);
   EventUtils.synthesizeMouseAtCenter(tab2, {});
@@ -55,17 +55,17 @@ function step5() {
   // listener, and focuses the current tab if another tab previously had focus.
   is(gBrowser.selectedTab, tab2, "click on tab2 while tab1 is activated selects tab");
   is(document.activeElement, tab2, "click on tab2 while tab1 is activated activates tab");
 
   info("focusing content then sending middle-button mousedown to tab2.");
   gBrowser.selectedBrowser.focus();
 
   EventUtils.synthesizeMouseAtCenter(tab2, {button: 1, type: "mousedown"});
-  executeSoon(step6);
+  setTimeout(step6, 0);
 }
 
 function step6() {
   is(gBrowser.selectedTab, tab2, "middle-button mousedown on selected tab2 keeps tab selected");
   isnot(document.activeElement, tab2, "middle-button mousedown on selected tab2 does not activate tab");
 
   gBrowser.removeTab(tab2);
   gBrowser.removeTab(tab1);