Bug 1529643 - Don't do MitM priming in tests. r=whimboo,gbrown
authorJohann Hofmann <jhofmann@mozilla.com>
Wed, 13 Mar 2019 23:37:01 +0000
changeset 463929 b4a06ea3abad4bcd041492481150150fddcd1309
parent 463928 08d0bcbb20e34612704e465d8ee87b7fc6b16fc6
child 463930 35a77a4804208a7eb187e674c68e85c90ecbd3c8
push id80453
push userjhofmann@mozilla.com
push dateThu, 14 Mar 2019 00:05:57 +0000
treeherderautoland@b4a06ea3abad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswhimboo, gbrown
bugs1529643
milestone67.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 1529643 - Don't do MitM priming in tests. r=whimboo,gbrown Differential Revision: https://phabricator.services.mozilla.com/D22407
testing/geckodriver/src/prefs.rs
testing/marionette/client/marionette_driver/geckoinstance.py
testing/marionette/components/marionette.js
testing/profiles/common/user.js
--- a/testing/geckodriver/src/prefs.rs
+++ b/testing/geckodriver/src/prefs.rs
@@ -136,16 +136,19 @@ lazy_static! {
         // Make sure SNTP requests do not hit the network
         ("network.sntp.pools", Pref::new("%(server)s")),
 
         // Disable Flash.  The plugin container it is run in is
         // causing problems when quitting Firefox from geckodriver,
         // c.f. https://github.com/mozilla/geckodriver/issues/225.
         ("plugin.state.flash", Pref::new(0)),
 
+        // Don't do network connections for mitm priming
+        ("security.certerrors.mitm.priming.enabled", Pref::new(false)),
+
         // Ensure blocklist updates don't hit the network
         ("services.settings.server", Pref::new("http://%(server)s/dummy/blocklist/")),
 
         // Disable first run pages
         ("startup.homepage_welcome_url", Pref::new("about:blank")),
         ("startup.homepage_welcome_url.additional", Pref::new("")),
 
         // Prevent starting into safe mode after application crashes
--- a/testing/marionette/client/marionette_driver/geckoinstance.py
+++ b/testing/marionette/client/marionette_driver/geckoinstance.py
@@ -111,16 +111,19 @@ class GeckoInstance(object):
         # Disable speculative connections so they aren"t reported as leaking when they"re
         # hanging around
         "network.http.speculative-parallel-limit": 0,
         # Do not automatically switch between offline and online
         "network.manage-offline-status": False,
         # Make sure SNTP requests don't hit the network
         "network.sntp.pools": "%(server)s",
 
+        # Don't do network connections for mitm priming
+        "security.certerrors.mitm.priming.enabled": False,
+
         # Tests don't wait for the notification button security delay
         "security.notification_enable_delay": 0,
 
         # Ensure blocklist updates don't hit the network
         "services.settings.server": "http://%(server)s/dummy/blocklist/",
 
         # Disable password capture, so that tests that include forms aren"t
         # influenced by the presence of the persistent doorhanger notification
--- a/testing/marionette/components/marionette.js
+++ b/testing/marionette/components/marionette.js
@@ -236,16 +236,19 @@ const RECOMMENDED_PREFS = new Map([
   ["network.http.speculative-parallel-limit", 0],
 
   // Do not automatically switch between offline and online
   ["network.manage-offline-status", false],
 
   // Make sure SNTP requests do not hit the network
   ["network.sntp.pools", "%(server)s"],
 
+  // Don't do network connections for mitm priming
+  ["security.certerrors.mitm.priming.enabled", false],
+
   // Local documents have access to all other local documents,
   // including directory listings
   ["security.fileuri.strict_origin_policy", false],
 
   // Tests do not wait for the notification button security delay
   ["security.notification_enable_delay", 0],
 
   // Ensure blocklist updates do not hit the network
--- a/testing/profiles/common/user.js
+++ b/testing/profiles/common/user.js
@@ -38,16 +38,18 @@ user_pref("extensions.legacy.enabled", t
 // Turn off extension updates so they don't bother tests
 user_pref("extensions.update.enabled", false);
 // Disable useragent updates.
 user_pref("general.useragent.updates.enabled", false);
 // Ensure WR doesn't get enabled in tests unless we do it explicitly with the MOZ_WEBRENDER envvar.
 user_pref("gfx.webrender.all.qualified", false);
 user_pref("hangmonitor.timeout", 0); // no hang monitor
 user_pref("media.gmp-manager.updateEnabled", false);
+// Don't do network connections for mitm priming
+user_pref("security.certerrors.mitm.priming.enabled", false);
 // Make enablePrivilege continue to work for test code. :-(
 user_pref("security.turn_off_all_security_so_that_viruses_can_take_over_this_computer", true);
 user_pref("xpinstall.signatures.required", false);
 // Prevent Remote Settings to issue non local connections.
 user_pref("services.settings.server", "http://localhost/remote-settings-dummy/v1");
 // Ensure autoplay is enabled for all platforms.
 user_pref("media.autoplay.default", 0); // 0=Allowed, 1=Blocked, 2=Prompt
 user_pref("media.autoplay.enabled.user-gestures-needed", true);