Don't apply unittest-features prefs when running Firefox stable
This skips over adding the unittest-features profile's user.js prefs if the browser channel is not Nightly. This should in theory mean the wpt run will only use preferences necessary for the tests to technically run, plus whatever the version of Firefox used for the tests includes as default out of the box prefs.
Differential Revision: https://phabricator.services.mozilla.com/D17428
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1520806
gecko-commit: ac194fa2a3307ebb098272e52033a764a459a00f
gecko-integration-branch: central
gecko-reviewers: jgraham
diff --git a/tools/wptrunner/wptrunner/browsers/firefox.py b/tools/wptrunner/wptrunner/browsers/firefox.py
index 72d8f48..1d2286e 100644
--- a/tools/wptrunner/wptrunner/browsers/firefox.py
+++ b/tools/wptrunner/wptrunner/browsers/firefox.py
@@ -87,6 +87,7 @@
"stylo_threads": kwargs["stylo_threads"],
"chaos_mode_flags": kwargs["chaos_mode_flags"],
"config": config,
+ "browser_channel": kwargs["browser_channel"],
"headless": kwargs["headless"]}
@@ -187,7 +188,7 @@
symbols_path=None, stackwalk_binary=None, certutil_binary=None,
ca_certificate_path=None, e10s=False, lsan_dir=None, stackfix_dir=None,
binary_args=None, timeout_multiplier=None, leak_check=False, asan=False,
- stylo_threads=1, chaos_mode_flags=None, config=None, headless=None, **kwargs):
+ stylo_threads=1, chaos_mode_flags=None, config=None, browser_channel="nightly", headless=None, **kwargs):
Browser.__init__(self, logger)
self.binary = binary
self.prefs_root = prefs_root
@@ -224,6 +225,7 @@
self.lsan_handler = None
self.stylo_threads = stylo_threads
self.chaos_mode_flags = chaos_mode_flags
+ self.browser_channel = browser_channel
self.headless = headless
def settings(self, test):
@@ -326,7 +328,10 @@
if os.path.isfile(profiles):
with open(profiles, 'r') as fh:
for name in json.load(fh)['web-platform-tests']:
- pref_paths.append(os.path.join(self.prefs_root, name, 'user.js'))
+ if self.browser_channel in (None, 'nightly'):
+ pref_paths.append(os.path.join(self.prefs_root, name, 'user.js'))
+ elif name != 'unittest-features':
+ pref_paths.append(os.path.join(self.prefs_root, name, 'user.js'))
else:
# Old preference files used before the creation of profiles.json (remove when no longer supported)
legacy_pref_paths = (