Bug 1399628 - Disable Shield extension in Marionette and geckodriver. r=ato
authorHenrik Skupin <mail@hskupin.info>
Thu, 14 Sep 2017 21:03:40 +0200
changeset 665582 e5660fb96ca6a97dfd255d2df8e0aa2f8f076fbe
parent 665581 2e6f093af5981da3ca2802f4dd6f7de1ee0b25ce
child 665583 f400f13824d9dc81ef22f80d8ba553e1dbe69f60
push id80115
push userbmo:eoger@fastmail.com
push dateFri, 15 Sep 2017 18:29:01 +0000
reviewersato
bugs1399628
milestone57.0a1
Bug 1399628 - Disable Shield extension in Marionette and geckodriver. r=ato Shield experiments interfer with core features of Firefox which can cause tests run via Marionette or geckodriver to fail. Resetting the API URL will make sure that no experiments can be downloaded. MozReview-Commit-ID: HnE49jfnen7
testing/geckodriver/src/prefs.rs
testing/marionette/client/marionette_driver/geckoinstance.py
testing/marionette/server.js
--- a/testing/geckodriver/src/prefs.rs
+++ b/testing/geckodriver/src/prefs.rs
@@ -1,12 +1,12 @@
 use mozprofile::preferences::Pref;
 
 lazy_static! {
-    pub static ref DEFAULT: [(&'static str, Pref); 79] = [
+    pub static ref DEFAULT: [(&'static str, Pref); 80] = [
         // Disable automatic downloading of new releases
         ("app.update.auto", Pref::new(false)),
 
         // Disable automatically upgrading Firefox
         ("app.update.enabled", Pref::new(false)),
 
         // Increase the APZ content response timeout in tests to 1
         // minute.  This is to accommodate the fact that test environments
@@ -141,16 +141,20 @@ lazy_static! {
         // don't block add-ons for e10s
         ("extensions.e10sBlocksEnabling", Pref::new(false)),
 
         // Disable metadata caching for installed add-ons by default
         ("extensions.getAddons.cache.enabled", Pref::new(false)),
 
         // Disable intalling any distribution extensions or add-ons
         ("extensions.installDistroAddons", Pref::new(false)),
+
+        // Make sure Shield doesn't hit the network.
+        ("extensions.shield-recipe-client.api_url", Pref::new("")),
+
         ("extensions.showMismatchUI", Pref::new(false)),
 
         // Turn off extension updates so they do not bother tests
         ("extensions.update.enabled", Pref::new(false)),
         ("extensions.update.notifyUser", Pref::new(false)),
 
         // Make sure opening about:addons will not hit the network
         ("extensions.webservice.discoverURL", Pref::new("http://%(server)s/dummy/discoveryURL")),
--- a/testing/marionette/client/marionette_driver/geckoinstance.py
+++ b/testing/marionette/client/marionette_driver/geckoinstance.py
@@ -43,16 +43,18 @@ class GeckoInstance(object):
         "extensions.autoDisableScopes": 0,
         "extensions.enabledScopes": 5,
         # don't block add-ons for e10s
         "extensions.e10sBlocksEnabling": False,
         # Disable metadata caching for installed add-ons by default
         "extensions.getAddons.cache.enabled": False,
         # Disable intalling any distribution add-ons
         "extensions.installDistroAddons": False,
+        # Make sure Shield doesn't hit the network.
+        "extensions.shield-recipe-client.api_url": "",
         "extensions.showMismatchUI": False,
         # Turn off extension updates so they don't bother tests
         "extensions.update.enabled": False,
         "extensions.update.notifyUser": False,
         # Make sure opening about:addons won"t hit the network
         "extensions.webservice.discoverURL": "http://%(server)s/dummy/discoveryURL",
 
         # Allow the application to have focus even it runs in the background
--- a/testing/marionette/server.js
+++ b/testing/marionette/server.js
@@ -201,19 +201,23 @@ const RECOMMENDED_PREFS = new Map([
   ["extensions.enabledScopes", 5],
 
   // Do not block add-ons for e10s
   ["extensions.e10sBlocksEnabling", false],
 
   // Disable metadata caching for installed add-ons by default
   ["extensions.getAddons.cache.enabled", false],
 
-  // Disable intalling any distribution extensions or add-ons.
+  // Disable installing any distribution extensions or add-ons.
   // Should be set in profile.
   ["extensions.installDistroAddons", false],
+
+  // Make sure Shield doesn't hit the network.
+  ["extensions.shield-recipe-client.api_url", ""],
+
   ["extensions.showMismatchUI", false],
 
   // Turn off extension updates so they do not bother tests
   ["extensions.update.enabled", false],
   ["extensions.update.notifyUser", false],
 
   // Make sure opening about:addons will not hit the network
   [