Bug 1509256 - Fix application update preferences for backward compatibility in Marionette and geckodriver. r=ato,bytesized
authorHenrik Skupin <mail@hskupin.info>
Wed, 28 Nov 2018 22:10:40 +0000
changeset 505031 0ed1cec73c666a422436ed04879fb8b5229fb9ca
parent 505030 50ff40cd5813e399775dfe026353a9407fd0c053
child 505032 b1441844989695a3d9e979107bfaa36d531ca38c
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato, bytesized
bugs1509256, 1508726
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 1509256 - Fix application update preferences for backward compatibility in Marionette and geckodriver. r=ato,bytesized Because in Marionette the application updates cannot be turned off via the preference "app.update.disabledForTesting" (see bug 1508726), the preference "app.update.auto" has to be used for the time being to control that by default no updates should be downloaded and installed. Even "app.update.disabledForTesting" doesn't work right now, it might be good to leave it. It would help us in the future so that we won't have to release new Marionette client and geckodriver releases, if it gets supported in Firefox. Note that this band-aid fix will only work for Firefox releases from 57 to 64. For Firefox 65 and onwards the fix on bug 1508726 will be needed. Depends on D13059 Differential Revision: https://phabricator.services.mozilla.com/D13060
testing/geckodriver/src/prefs.rs
testing/marionette/client/marionette_driver/geckoinstance.py
testing/marionette/components/marionette.js
--- a/testing/geckodriver/src/prefs.rs
+++ b/testing/geckodriver/src/prefs.rs
@@ -16,17 +16,25 @@ 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
-        ("app.update.disabledForTesting", Pref::new(true)),
+        // 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.
+        ("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
         ("browser.safebrowsing.blockedURIs.enabled", Pref::new(false)),
--- a/testing/marionette/client/marionette_driver/geckoinstance.py
+++ b/testing/marionette/client/marionette_driver/geckoinstance.py
@@ -490,22 +490,27 @@ class FennecInstance(GeckoInstance):
                 self.unresponsive_count += 1
                 traceback.print_exception(*sys.exc_info())
 
 
 class DesktopInstance(GeckoInstance):
     desktop_prefs = {
         # Disable Firefox old build background check
         "app.update.checkInstallTime": False,
-        # Disable application updates
-        "app.update.disabledForTesting": True,
-        "security.turn_off_all_security_so_that_viruses_can_take_over_this_computer": True,
-        # app.update.enabled is being removed. Once Firefox 62 becomes stable,
-        # the line below can be removed as well.
-        "app.update.enabled": 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.
+        "app.update.auto": False,
 
         # Don't show the content blocking introduction panel
         # We use a larger number than the default 22 to have some buffer
         "browser.contentblocking.introCount": 99,
 
         # Enable output for dump() and chrome console API
         "browser.dom.window.dump.enabled": True,
         "devtools.console.stdout.chrome": True,
--- a/testing/marionette/components/marionette.js
+++ b/testing/marionette/components/marionette.js
@@ -59,24 +59,16 @@ 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.
-  //
-  // This should also be set in the profile prior to starting Firefox,
-  // as it is picked up at runtime.
-  ["app.update.checkInstallTime", false],
-  ["app.update.disabledForTesting", true],
-  ["security.turn_off_all_security_so_that_viruses_can_take_over_this_computer", 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],