Bug 1344748 - Remove B2G offline management from Marionette; r?maja_zf
MozReview-Commit-ID: 68iUhwT7xdv
--- a/testing/marionette/server.js
+++ b/testing/marionette/server.js
@@ -21,17 +21,16 @@ Cu.import("chrome://marionette/content/s
// Bug 1083711: Load transport.js as an SDK module instead of subscript
loader.loadSubScript("resource://devtools/shared/transport/transport.js");
const logger = Log.repository.getLogger("Marionette");
this.EXPORTED_SYMBOLS = ["MarionetteServer"];
const CONTENT_LISTENER_PREF = "marionette.contentListener";
-const MANAGE_OFFLINE_STATUS_PREF = "network.gonk.manage-offline-status";
/**
* Bootstraps Marionette and handles incoming client connections.
*
* Once started, it opens a TCP socket sporting the debugger transport
* protocol on the provided port. For every new client a Dispatcher is
* created.
*
@@ -54,29 +53,18 @@ this.MarionetteServer = function (port,
* Function produces a GeckoDriver.
*
* Determines application nameto initialise the driver with.
*
* @return {GeckoDriver}
* A driver instance.
*/
MarionetteServer.prototype.driverFactory = function() {
- let appName = isMulet() ? "B2G" : Services.appinfo.name;
- let bypassOffline = false;
-
Preferences.set(CONTENT_LISTENER_PREF, false);
-
- if (bypassOffline) {
- logger.debug("Bypassing offline status");
- Preferences.set(MANAGE_OFFLINE_STATUS_PREF, false);
- Services.io.manageOfflineStatus = false;
- Services.io.offline = false;
- }
-
- return new GeckoDriver(appName, this);
+ return new GeckoDriver(Services.appinfo.name, this);
};
MarionetteServer.prototype.__defineSetter__("acceptConnections", function (value) {
if (!value) {
logger.info("New connections will no longer be accepted");
} else {
logger.info("New connections are accepted again");
}
@@ -134,11 +122,8 @@ MarionetteServer.prototype.onSocketAccep
};
MarionetteServer.prototype.onConnectionClosed = function (conn) {
let id = conn.connId;
delete this.conns[id];
logger.debug(`Closed connection ${id}`);
};
-function isMulet() {
- return Preferences.get("b2g.is_mulet", false);
-}