Bug 1350887 - Include Marionette prefs amongst defaults; r=ted,whimboo
authorAndreas Tolfsen <ato@mozilla.com>
Wed, 29 Mar 2017 18:25:55 +0100
changeset 399361 6f536b2275ae93552dec3c10c5625b04373532ed
parent 399360 b548f63d4a81eca3e9073cd9bfa4b9d2c659c259
child 399362 a493e86fcf0d528164c5d82fc9f3898de472a682
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted, whimboo
bugs1350887
milestone55.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 1350887 - Include Marionette prefs amongst defaults; r=ted,whimboo The Marionette component ships in Firefox, but is not enabled by default. We want to facilitate activating Marionette at runtime by flipping the marionette.enabled preference, and showing the Marionette related preferences in about:config helps discoverability. It is also useful to rely on the preferences' default values so that they do not have to be hardcoded in the component. When Marionette is enabled by setting marionette.enabled to true, a set of recommended automation preferences found in testing/marionette/server.js are set if the user has not overriden/user-defined one of them and marionette.prefs.recommended is true (default). When Marionette is stopped, the altered preferences are reset. MozReview-Commit-ID: 3HLnEI0TEBB
browser/installer/package-manifest.in
testing/marionette/moz.build
testing/marionette/prefs/marionette.js
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -648,16 +648,20 @@
 @RESPATH@/browser/defaults/permissions
 @RESPATH@/browser/defaults/blocklists
 
 ; Warning: changing the path to channel-prefs.js can cause bugs (Bug 756325)
 ; Technically this is an app pref file, but we are keeping it in the original
 ; gre location for now.
 @RESPATH@/defaults/pref/channel-prefs.js
 
+; Remote control protocol prefs
+; defined in ../../testing/marionette/prefs/marionette.js
+@RESPATH@/defaults/pref/marionette.js
+
 ; Services (gre) prefs
 @RESPATH@/defaults/pref/services-sync.js
 
 ; [Layout Engine Resources]
 ; Style Sheets, Graphics and other Resources used by the layout engine.
 @RESPATH@/res/EditorOverride.css
 @RESPATH@/res/contenteditable.css
 @RESPATH@/res/designmode.css
--- a/testing/marionette/moz.build
+++ b/testing/marionette/moz.build
@@ -1,15 +1,15 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ["components"]
 
-JS_PREFERENCE_FILES += ["prefs.js"]
+JAR_MANIFESTS += ["jar.mn"]
+JS_PREFERENCE_FILES += ["prefs/marionette.js"]
 
-JAR_MANIFESTS += ["jar.mn"]
 MARIONETTE_UNIT_MANIFESTS += ["harness/marionette_harness/tests/unit/unit-tests.ini"]
 MARIONETTE_WEBAPI_MANIFESTS += ["harness/marionette_harness/tests/webapi-tests.ini"]
 XPCSHELL_TESTS_MANIFESTS += ["unit.ini"]
 
 with Files("**"):
     BUG_COMPONENT = ("Testing", "Marionette")
--- a/testing/marionette/prefs/marionette.js
+++ b/testing/marionette/prefs/marionette.js
@@ -1,12 +1,19 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+// Marionette is the remote protocol that lets OOP programs communicate
+// with, instrument, and control Gecko.
+//
+// It is included in Firefox, but not enabled by default unless the
+// --marionette flag is passed or the marionette.enabled preference is
+// set to true.
+
 // Whether or not Marionette is enabled.
 pref("marionette.enabled", false);
 
 // Port to start Marionette server on.
 pref("marionette.port", 2828);
 
 // Forces client connections to come from a loopback device.
 pref("marionette.forcelocal", true);