Bug 1172574 - Prevent the default browser check and the about:config warning by default for the scratch_user;r=Mossop draft
authorBrian Grinstead <bgrinstead@mozilla.com>
Fri, 28 Jul 2017 12:46:28 -0700
changeset 617661 0be1726f6b86194b458d3a49f3a7004e447cd881
parent 617660 17ed3e03d98b20538e3f5d0a755f66e76ab704c1
child 639867 12da88b9c093936a7aaa3814fc509b3b53268124
push id71113
push userbgrinstead@mozilla.com
push dateFri, 28 Jul 2017 19:50:10 +0000
reviewersMossop
bugs1172574
milestone56.0a1
Bug 1172574 - Prevent the default browser check and the about:config warning by default for the scratch_user;r=Mossop MozReview-Commit-ID: 6ghEgnCi319
python/mozbuild/mozbuild/mach_commands.py
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -1324,17 +1324,20 @@ class RunProgram(MachCommandBase):
                 args.append('-no-remote')
 
             if not background and sys.platform == 'darwin':
                 args.append('-foreground')
 
             no_profile_option_given = \
                 all(p not in params for p in ['-profile', '--profile', '-P'])
             if no_profile_option_given and not noprofile:
-                prefs = { }
+                prefs = {
+                   'browser.shell.checkDefaultBrowser': False,
+                   'general.warnOnAboutConfig': False,
+                }
                 prefs.update(self._mach_context.settings.runprefs)
                 prefs.update([p.split('=', 1) for p in setpref])
 
                 path = os.path.join(self.topobjdir, 'tmp', 'scratch_user')
                 profile = Profile(path, preferences=prefs, restore=False)
                 args.append('-profile')
                 args.append(profile.profile)