Bug 1508726 - [geckodriver] Use "app.update.disabledForTesting" to disable application updates. r=ato
☠☠ backed out by f1f136ea674c ☠ ☠
authorHenrik Skupin <mail@hskupin.info>
Mon, 03 Dec 2018 15:05:36 +0000
changeset 508518 766ba8a6c8754a0ed46567040023a9e4051353fe
parent 508517 81a6b32f2a8bf8e8579ecc6ae81ae7f0d12f0d91
child 508519 5c59407599f6c59d1a50ea850cb43384c71ab529
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato
bugs1508726
milestone65.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 1508726 - [geckodriver] Use "app.update.disabledForTesting" to disable application updates. r=ato Until Firefox 64 the preference "app.update.auto" controlled if updates can be downloaded and applied. This changed in Firefox 65, and now the preference "app.update.disabledForTesting" controls it. Depends on D13515 Differential Revision: https://phabricator.services.mozilla.com/D13516
testing/geckodriver/src/prefs.rs
testing/marionette/components/marionette.js
--- a/testing/geckodriver/src/prefs.rs
+++ b/testing/geckodriver/src/prefs.rs
@@ -16,24 +16,22 @@ lazy_static! {
     pub static ref DEFAULT: Vec<(&'static str, Pref)> = vec![
         // Make sure Shield doesn't hit the network.
         ("app.normandy.api_url", Pref::new("")),
 
         // Disable Firefox old build background check
         ("app.update.checkInstallTime", Pref::new(false)),
 
         // Disable automatically upgrading Firefox
-        // Bug 1508726: "disabledForTesting" has no effect in Marionette yet.
-        // As such automatically downloading updates, and installing those
-        // needs to be prevented. Sadly "app.update.auto" will not be enough
-        // anymore, because Windows has changed in how it handles updates. But
-        // at least we can workaround the problem on other platforms.
         //
-        // DISCLAIMER: Don't remove or change this line until bug 1508726 has
-        // been fixed.
+        // Note: Possible update tests could reset or flip the value to allow
+        // updates to be downloaded and applied.
+        ("app.update.disabledForTesting", Pref::new(true)),
+        // !!! For backward compatibility up to Firefox 64. Only remove
+        // when this Firefox version is no longer supported by geckodriver !!!
         ("app.update.auto", Pref::new(false)),
 
         // Enable the dump function, which sends messages to the system
         // console
         ("browser.dom.window.dump.enabled", Pref::new(true)),
         ("devtools.console.stdout.chrome", Pref::new(true)),
 
         // Disable safebrowsing components
--- a/testing/marionette/components/marionette.js
+++ b/testing/marionette/components/marionette.js
@@ -59,16 +59,23 @@ const ENV_PRESERVE_PREFS = "MOZ_MARIONET
 // Note: Clients do not always use the latest version of the application. As
 // such backward compatibility has to be ensured at least for the last three
 // releases.
 const RECOMMENDED_PREFS = new Map([
 
   // Make sure Shield doesn't hit the network.
   ["app.normandy.api_url", ""],
 
+  // Disable automatically upgrading Firefox
+  //
+  // Note: This preference should have already been set by the client when
+  // creating the profile. But if not and to absolutely make sure that updates
+  // of Firefox aren't downloaded and applied, enforce its presence.
+  ["app.update.disabledForTesting", true],
+
   // Increase the APZ content response timeout in tests to 1 minute.
   // This is to accommodate the fact that test environments tends to be
   // slower than production environments (with the b2g emulator being
   // the slowest of them all), resulting in the production timeout value
   // sometimes being exceeded and causing false-positive test failures.
   //
   // (bug 1176798, bug 1177018, bug 1210465)
   ["apz.content_response_timeout", 60000],