Bug 1399628 - Disable Shield extension in Marionette and geckodriver.
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
--- 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
[