зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1508726 - [marionette] 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 D13516 Differential Revision: https://phabricator.services.mozilla.com/D13517 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
631d5b3bc1
Коммит
89fd7d7867
|
@ -29,7 +29,8 @@ class TestSoftwareUpdate(PuppeteerMixin, MarionetteTestCase):
|
|||
self.assertTrue(self.software_update.ABI)
|
||||
|
||||
def test_allowed(self):
|
||||
self.assertTrue(self.software_update.allowed)
|
||||
# Updates are only allowed when run via the UpdateTestCase class
|
||||
self.assertFalse(self.software_update.allowed)
|
||||
|
||||
def test_build_info(self):
|
||||
self.software_update.update_url = self.marionette.absolute_url(
|
||||
|
|
|
@ -500,14 +500,12 @@ class DesktopInstance(GeckoInstance):
|
|||
"app.update.checkInstallTime": 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": True,
|
||||
# !!! For backward compatibility up to Firefox 64. Only remove
|
||||
# when this Firefox version is no longer supported by the client !!!
|
||||
"app.update.auto": False,
|
||||
|
||||
# Don't show the content blocking introduction panel
|
||||
|
|
|
@ -61,6 +61,18 @@ class TestMarionette(MarionetteTestCase):
|
|||
self.assertEqual(current_socket_timeout,
|
||||
self.marionette.client._sock.gettimeout())
|
||||
|
||||
@skip_if_mobile("No application update service available on Android")
|
||||
def test_application_update_disabled(self):
|
||||
# Updates of the application should always be disabled by default
|
||||
with self.marionette.using_context("chrome"):
|
||||
update_allowed = self.marionette.execute_script("""
|
||||
let aus = Cc['@mozilla.org/updates/update-service;1']
|
||||
.getService(Ci.nsIApplicationUpdateService);
|
||||
return aus.canCheckForUpdates;
|
||||
""")
|
||||
|
||||
self.assertFalse(update_allowed)
|
||||
|
||||
|
||||
class TestContext(MarionetteTestCase):
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче