mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1428795 - Set MOZ_MARIONETTE in component. r=automatedtester
Setting the MOZ_MARIONETTE environment variable is not a task that naturally belongs to the TCP listener. This patch moves it to the Marionette XPCOM component. MozReview-Commit-ID: 7896Sv91wFy --HG-- extra : rebase_source : a43335d289c2568f60be3ecc5a9491b2bee27fe9
This commit is contained in:
parent
9a121d83f5
commit
00a171e75d
@ -552,6 +552,7 @@ class MarionetteMainProcess {
|
||||
Services.startup.quit(Ci.nsIAppStartup.eForceQuit);
|
||||
}
|
||||
|
||||
env.set(ENV_ENABLED, "1");
|
||||
Services.obs.notifyObservers(this, NOTIFY_RUNNING, true);
|
||||
log.info(`Listening on port ${this.server.port}`);
|
||||
});
|
||||
|
@ -14,7 +14,6 @@ const ServerSocket = CC(
|
||||
ChromeUtils.import("resource://gre/modules/Log.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Preferences.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
ChromeUtils.import("chrome://marionette/content/assert.js");
|
||||
const {GeckoDriver} = ChromeUtils.import("chrome://marionette/content/driver.js", {});
|
||||
@ -30,9 +29,6 @@ const {
|
||||
} = ChromeUtils.import("chrome://marionette/content/message.js", {});
|
||||
const {DebuggerTransport} = ChromeUtils.import("chrome://marionette/content/transport.js", {});
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(
|
||||
this, "env", "@mozilla.org/process/environment;1", "nsIEnvironment");
|
||||
|
||||
const logger = Log.repository.getLogger("Marionette");
|
||||
|
||||
const {KeepWhenOffline, LoopbackOnly} = Ci.nsIServerSocket;
|
||||
@ -44,8 +40,6 @@ this.server = {};
|
||||
|
||||
const PROTOCOL_VERSION = 3;
|
||||
|
||||
const ENV_ENABLED = "MOZ_MARIONETTE";
|
||||
|
||||
const PREF_CONTENT_LISTENER = "marionette.contentListener";
|
||||
const PREF_PORT = "marionette.port";
|
||||
|
||||
@ -115,10 +109,7 @@ server.TCPListener = class {
|
||||
|
||||
// Start socket server and listening for connection attempts
|
||||
this.acceptConnections = true;
|
||||
|
||||
Preferences.set(PREF_PORT, this.port);
|
||||
env.set(ENV_ENABLED, "1");
|
||||
|
||||
this.alive = true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user