Bug 1344748 - Remove ENABLE_MARIONETTE check from MarionetteComponent; r?whimboo
If ENABLE_MARIONETTE is false, the Marionette jar will not be included
in the omnijar, making the check in MarionetteComponent superfluous.
It also does not belong in this file: the intention of ENABLE_MARIONETTE
is to disable the compilation and inclusion of Marionette altogether,
not to gate whether to enable the Marionette server.
The Marionette component is considered enables if the
marionette.enabled/marionette.defaultPrefs.enable preference is true or
--marionette is passed as a flag. This presupposes that the Marionette
component is packaged.
MozReview-Commit-ID: K8gam5hOvB0
--- a/testing/marionette/components/marionette.js
+++ b/testing/marionette/components/marionette.js
@@ -46,22 +46,18 @@ const ServerSocket = CC("@mozilla.org/ne
// Marionette preferences recently changed names. This is an abstraction
// that first looks for the new name, but falls back to using the old name
// if the new does not exist.
//
// This shim can be removed when Firefox 55 ships.
const prefs = {
get enabled () {
-#ifdef ENABLE_MARIONETTE
let fallback = Preferences.get("marionette.defaultPrefs.enabled", false);
return Preferences.get("marionette.enabled", fallback);
-#else
- return false;
-#endif
},
get port () {
let fallback = Preferences.get("marionette.defaultPrefs.port", DEFAULT_PORT);
return Preferences.get("marionette.port", fallback);
},
get logLevel () {
--- a/testing/marionette/components/moz.build
+++ b/testing/marionette/components/moz.build
@@ -1,9 +1,8 @@
# 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/.
-EXTRA_COMPONENTS += ["marionette.manifest"]
-EXTRA_PP_COMPONENTS += ["marionette.js"]
-
-if CONFIG["ENABLE_MARIONETTE"]:
- DEFINES["ENABLE_MARIONETTE"] = 1
+EXTRA_COMPONENTS += [
+ "marionette.js",
+ "marionette.manifest",
+]