Bug 1252869 - Fix browser_experiments.js to work with e10s. r=gfritzsche a=lizzard
authorAlessio Placitelli <alessio.placitelli@gmail.com>
Mon, 07 Mar 2016 17:21:58 +0100
changeset 323425 60b56259a4301ad174e4f9d1bd77a1a1feed386e
parent 323424 a061a45cf778cf9c8a6dc598dc0d18952ac641dc
child 323426 c3bcee5d608ccc8c95e01b7eeef49e869f928966
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgfritzsche, lizzard
bugs1252869
milestone47.0a2
Bug 1252869 - Fix browser_experiments.js to work with e10s. r=gfritzsche a=lizzard MozReview-Commit-ID: 2ljJQ1Hfi9k
toolkit/mozapps/extensions/test/browser/browser-common.ini
toolkit/mozapps/extensions/test/browser/browser_experiments.js
--- a/toolkit/mozapps/extensions/test/browser/browser-common.ini
+++ b/toolkit/mozapps/extensions/test/browser/browser-common.ini
@@ -35,17 +35,16 @@ skip-if = true # Bug 1093190 - Disabled 
 [browser_bug714593.js]
 [browser_bug590347.js]
 [browser_details.js]
 [browser_discovery.js]
 skip-if = e10s # Bug ?????? - test times out on try on all platforms, but works locally for markh!
 [browser_dragdrop.js]
 skip-if = buildapp == 'mulet'
 [browser_experiments.js]
-skip-if = e10s
 [browser_list.js]
 [browser_metadataTimeout.js]
 [browser_searching.js]
 [browser_sorting.js]
 [browser_sorting_plugins.js]
 [browser_plugin_enabled_state_locked.js]
 [browser_uninstalling.js]
 [browser_install.js]
--- a/toolkit/mozapps/extensions/test/browser/browser_experiments.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_experiments.js
@@ -220,17 +220,22 @@ add_task(function* testOpenPreferences()
       prefWin.close();
       info("Closed preferences pane.");
 
       deferred.resolve();
     });
   }, "advanced-pane-loaded", false);
 
   info("Loading preferences pane.");
-  EventUtils.synthesizeMouseAtCenter(btn, {}, gManagerWindow);
+  // We need to focus before synthesizing the mouse event (bug 1240052) as
+  // synthesizeMouseAtCenter currently only synthesizes the mouse in the child process.
+  // This can cause some subtle differences if the child isn't focused.
+  yield SimpleTest.promiseFocus();
+  yield BrowserTestUtils.synthesizeMouseAtCenter("#experiments-change-telemetry", {},
+                                                 gBrowser.selectedBrowser);
 
   yield deferred.promise;
 });
 
 add_task(function* testButtonPresence() {
   yield gCategoryUtilities.openType("experiment");
   let item = get_addon_element(gManagerWindow, "test-experiment1@experiments.mozilla.org");
   Assert.ok(item, "Got add-on element.");