From 914224d7365d4a80a9090bf3fc57f306c79c884a Mon Sep 17 00:00:00 2001 From: Andreas Tolfsen Date: Wed, 29 Mar 2017 18:25:55 +0100 Subject: [PATCH] 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 --HG-- extra : rebase_source : 8be91ed46c443dd120cbc4b42c729cf3ae250b5f --- browser/installer/package-manifest.in | 4 ++++ testing/marionette/moz.build | 4 ++-- testing/marionette/prefs/marionette.js | 7 +++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in index 743fccb7fc95..48f3480dae64 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in @@ -653,6 +653,10 @@ ; 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 diff --git a/testing/marionette/moz.build b/testing/marionette/moz.build index 44a65fa34ab7..8156b980516d 100644 --- a/testing/marionette/moz.build +++ b/testing/marionette/moz.build @@ -4,9 +4,9 @@ DIRS += ["components"] -JS_PREFERENCE_FILES += ["prefs.js"] - JAR_MANIFESTS += ["jar.mn"] +JS_PREFERENCE_FILES += ["prefs/marionette.js"] + 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"] diff --git a/testing/marionette/prefs/marionette.js b/testing/marionette/prefs/marionette.js index 62076e5cd793..3c2534d01501 100644 --- a/testing/marionette/prefs/marionette.js +++ b/testing/marionette/prefs/marionette.js @@ -2,6 +2,13 @@ * 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);