Bug 1344748 - Remove B2G offline management from Marionette; r=maja_zf, a=test-only
authorAndreas Tolfsen <ato@mozilla.com>
Mon, 06 Mar 2017 16:45:35 +0000
changeset 395536 eff9e30b6f7528ef8af39ac526f7eb00d9b1eab7
parent 395535 39cc9278d2fab01442a3349169f0f86805a152e9
child 395537 0b16ceaefbeb2b8d2661cae10616d4276185619a
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaja_zf, test-only
bugs1344748
milestone54.0a2
Bug 1344748 - Remove B2G offline management from Marionette; r=maja_zf, a=test-only MozReview-Commit-ID: 68iUhwT7xdv
testing/marionette/server.js
--- 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);
-}