Bug 1371576 - Update more default preferences to prevent remote access. draft
authorHenrik Skupin <mail@hskupin.info>
Wed, 09 Aug 2017 18:00:51 +0200
changeset 643306 e59d5978883983ac06d6f46c9e9e707d2d13f044
parent 643305 2c6241ba3faf325b8f4979418ed4bbce662c169f
child 725268 4bc0c94776cbc44d8a4e29e6ac946fe990f63aa8
push id73059
push userbmo:hskupin@gmail.com
push dateWed, 09 Aug 2017 16:01:17 +0000
bugs1371576
milestone57.0a1
Bug 1371576 - Update more default preferences to prevent remote access. MozReview-Commit-ID: HDFhCMWBtOe
testing/marionette/client/marionette_driver/geckoinstance.py
--- a/testing/marionette/client/marionette_driver/geckoinstance.py
+++ b/testing/marionette/client/marionette_driver/geckoinstance.py
@@ -43,48 +43,55 @@ 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": "",
 
         # Allow the application to have focus even it runs in the background
         "focusmanager.testmode": True,
 
         # Disable useragent updates
         "general.useragent.updates.enabled": False,
 
         # Always use network provider for geolocation tests
         # so we bypass the OSX dialog raised by the corelocation provider
         "geo.provider.testing": True,
-        # Do not scan Wifi
+        # Do not scan Wifi to not hit the network
         "geo.wifi.scan": False,
+        "geo.wifi.uri": "",
 
         # No hang monitor
         "hangmonitor.timeout": 0,
 
         "javascript.options.showInConsole": True,
 
         # Enable Marionette component
         # (deprecated and can be removed when Firefox 60 ships)
         "marionette.enabled": True,
         "marionette.defaultPrefs.enabled": True,
 
         # Disable recommended automation prefs in CI
         "marionette.prefs.recommended": False,
 
+        # Make sure GMPInstallManager won't hit the network.
+        "media.gmp-manager.updateEnabled": False,
         "media.volume_scale": "0.01",
 
         # Do not prompt for temporary redirects
         "network.http.prompt-temp-redirect": False,
         # 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
@@ -415,31 +422,48 @@ class DesktopInstance(GeckoInstance):
 
         # Indicate that the download panel has been shown once so that whichever
         # download test runs first doesn"t show the popup inconsistently
         "browser.download.panel.shown": True,
 
         # Do not show the EULA notification which can interfer with tests
         "browser.EULA.override": True,
 
+        # Don't fetch directory tiles data from real servers
+        "browser.newtabpage.directory.source": "",
         # Turn off about:newtab and make use of about:blank instead for new opened tabs
         "browser.newtabpage.enabled": False,
         # Assume the about:newtab page"s intro panels have been shown to not depend on
         # which test runs first and happens to open about:newtab
         "browser.newtabpage.introShown": True,
 
+        "browser.newtabpage.activity-stream.default.sites": "",
+        "browser.newtabpage.activity-stream.telemetry": False,
+        "browser.newtabpage.activity-stream.feeds.section.topstories": False,
+        "browser.newtabpage.activity-stream.feeds.snippets": False,
+
         # Background thumbnails in particular cause grief, and disabling thumbnails
         # in general can"t hurt - we re-enable them when tests need them
         "browser.pagethumbnails.capturing_disabled": True,
 
         # Disable safebrowsing components
         "browser.safebrowsing.blockedURIs.enabled": False,
         "browser.safebrowsing.downloads.enabled": False,
         "browser.safebrowsing.malware.enabled": False,
         "browser.safebrowsing.phishing.enabled": False,
+        # TODO: feedback from Francois
+        "browser.safebrowsing.provider.mozilla.gethashURL": "",
+        "browser.safebrowsing.provider.mozilla.updateURL": "",
+
+        # Tell the search service we are running in the US.  This also has the desired
+        # side-effect of preventing our geoip lookup.
+        "browser.search.isUS": True,
+        "browser.search.countryCode": "US",
+        # This will prevent HTTP requests for region defaults.
+        "browser.search.geoSpecificDefaults": False,
 
         # Disable updates to search engines
         "browser.search.update": False,
 
         # Do not restore the last open set of tabs if the browser has crashed
         "browser.sessionstore.resume_from_crash": False,
 
         # Don't check for the default web browser during startup
@@ -450,16 +474,20 @@ class DesktopInstance(GeckoInstance):
         "browser.tabs.remote.autostart.2": False,
         "browser.tabs.remote.autostart": False,
 
         # Needed for branded builds to prevent opening a second tab on startup
         "browser.startup.homepage_override.mstone": "ignore",
         # Start with a blank page by default
         "browser.startup.page": 0,
 
+        # Turn off search suggestions in the location bar so as not to trigger network
+        # connections.
+        "browser.urlbar.suggest.searches": False,
+
         # Disable browser animations
         "toolkit.cosmeticAnimations.enabled": False,
 
         # Do not warn on exit when multiple tabs are open
         "browser.tabs.warnOnClose": False,
         # Do not warn when closing all other open tabs
         "browser.tabs.warnOnCloseOtherTabs": False,
         # Do not warn when multiple tabs will be opened