Backed out 5 changesets (bug 1493104) for ESlint failure at builds/worker/checkouts/gecko/devtools/client/webide/content/addons.js on a CLOSED TREE
authorCoroiu Cristina <ccoroiu@mozilla.com>
Wed, 10 Oct 2018 14:49:13 +0300
changeset 496179 c24bf71170530c4eadb3f8c05c42f6c08e95e036
parent 496178 a6cbba097c8a8300e51d3675b8e098756bc37a63
child 496180 973ea169460670805ba5dbe8bc0051313a1a2979
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1493104
milestone64.0a1
backs outa6cbba097c8a8300e51d3675b8e098756bc37a63
8df2a288391c37d980e5ec0ddbf98c449ec12e6c
cb9f55dd42570c4568d45c54ceb5176c3543df1c
f7ecf841eb8fc2cdc516a9720f0a555c7f1e9b16
fa20c2c68c4286c28c3ea4a8371d5d55396355cf
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 5 changesets (bug 1493104) for ESlint failure at builds/worker/checkouts/gecko/devtools/client/webide/content/addons.js on a CLOSED TREE Backed out changeset a6cbba097c8a (bug 1493104) Backed out changeset 8df2a288391c (bug 1493104) Backed out changeset cb9f55dd4257 (bug 1493104) Backed out changeset f7ecf841eb8f (bug 1493104) Backed out changeset fa20c2c68c42 (bug 1493104)
devtools/client/aboutdebugging-new/src/modules/usb-runtimes.js
devtools/client/webide/content/addons.js
devtools/client/webide/modules/runtimes.js
devtools/shared/adb/adb-scanner.js
devtools/shared/adb/addon-aware-adb-scanner.js
devtools/shared/adb/moz.build
devtools/shared/adb/test/test_adb.js
devtools/shared/adb/test/test_addon-aware-adb-scanner.js
devtools/shared/adb/test/xpcshell-head.js
devtools/shared/adb/test/xpcshell.ini
--- a/devtools/client/aboutdebugging-new/src/modules/usb-runtimes.js
+++ b/devtools/client/aboutdebugging-new/src/modules/usb-runtimes.js
@@ -1,39 +1,43 @@
 /* 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/. */
 
 "use strict";
 
-loader.lazyGetter(this, "adbScanner", () => {
-  const { AddonAwareADBScanner } = require("devtools/shared/adb/addon-aware-adb-scanner");
-  return new AddonAwareADBScanner();
-});
+const { ADBScanner } = require("devtools/shared/adb/adb-scanner");
+loader.lazyRequireGetter(this, "adbAddon", "devtools/shared/adb/adb-addon", true);
+loader.lazyRequireGetter(this, "ADB_ADDON_STATES", "devtools/shared/adb/adb-addon", true);
 
 /**
  * This module provides a collection of helper methods to detect USB runtimes whom Firefox
  * is running on.
  */
 function addUSBRuntimesObserver(listener) {
-  adbScanner.on("runtime-list-updated", listener);
+  ADBScanner.on("runtime-list-updated", listener);
 }
 exports.addUSBRuntimesObserver = addUSBRuntimesObserver;
 
 function disableUSBRuntimes() {
-  adbScanner.disable();
+  ADBScanner.disable();
 }
 exports.disableUSBRuntimes = disableUSBRuntimes;
 
 async function enableUSBRuntimes() {
-  adbScanner.enable();
+  if (adbAddon.status !== ADB_ADDON_STATES.INSTALLED) {
+    console.error("ADB extension is not installed");
+    return;
+  }
+
+  ADBScanner.enable();
 }
 exports.enableUSBRuntimes = enableUSBRuntimes;
 
 function getUSBRuntimes() {
-  return adbScanner.listRuntimes();
+  return ADBScanner.listRuntimes();
 }
 exports.getUSBRuntimes = getUSBRuntimes;
 
 function removeUSBRuntimesObserver(listener) {
-  adbScanner.off("runtime-list-updated", listener);
+  ADBScanner.off("runtime-list-updated", listener);
 }
 exports.removeUSBRuntimesObserver = removeUSBRuntimesObserver;
--- a/devtools/client/webide/content/addons.js
+++ b/devtools/client/webide/content/addons.js
@@ -3,16 +3,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 const {loader, require} = ChromeUtils.import("resource://devtools/shared/Loader.jsm", {});
 
 const Services = require("Services");
 const Strings = Services.strings.createBundle("chrome://devtools/locale/webide.properties");
 
 const {gDevTools} = require("devtools/client/framework/devtools");
+const {ADBScanner} = require("devtools/shared/adb/adb-scanner");
+const {RuntimeScanners} = require("devtools/client/webide/modules/runtimes");
 
 loader.lazyRequireGetter(this, "adbAddon", "devtools/shared/adb/adb-addon", true);
 loader.lazyRequireGetter(this, "ADB_ADDON_STATES", "devtools/shared/adb/adb-addon", true);
 
 window.addEventListener("load", function() {
   document.querySelector("#aboutaddons").onclick = function() {
     const browserWin = Services.wm.getMostRecentWindow(gDevTools.chromeWindowType);
     if (browserWin && browserWin.BrowserOpenAddonsMgr) {
@@ -27,16 +29,21 @@ function CloseUI() {
   window.parent.UI.openProject();
 }
 
 function BuildUI() {
   function onAddonUpdate(arg) {
     progress.removeAttribute("value");
     li.setAttribute("status", adbAddon.status);
     status.textContent = Strings.GetStringFromName("addons_status_" + adbAddon.status);
+    if (adbAddon.status == ADB_ADDON_STATES.INSTALLED) {
+      RuntimeScanners.add(ADBScanner);
+    } else if (adbAddon.status == ADB_ADDON_STATES.UNINSTALLED) {
+      RuntimeScanners.remove(ADBScanner);
+    }
   }
 
   function onAddonFailure(arg) {
     window.parent.UI.reportError("error_operationFail", arg);
   }
 
   function onAddonProgress(arg) {
     if (arg == -1) {
--- a/devtools/client/webide/modules/runtimes.js
+++ b/devtools/client/webide/modules/runtimes.js
@@ -5,22 +5,16 @@
 "use strict";
 
 const Services = require("Services");
 const {DebuggerServer} = require("devtools/server/main");
 const discovery = require("devtools/shared/discovery/discovery");
 const EventEmitter = require("devtools/shared/event-emitter");
 const {RuntimeTypes} = require("devtools/client/webide/modules/runtime-types");
 const promise = require("promise");
-
-loader.lazyGetter(this, "adbScanner", () => {
-  const { AddonAwareADBScanner } = require("devtools/shared/adb/addon-aware-adb-scanner");
-  return new AddonAwareADBScanner();
-});
-
 loader.lazyRequireGetter(this, "AuthenticationResult",
   "devtools/shared/security/auth", true);
 loader.lazyRequireGetter(this, "DevToolsUtils",
   "devtools/shared/DevToolsUtils");
 
 const Strings = Services.strings.createBundle("chrome://devtools/locale/webide.properties");
 
 /**
@@ -193,20 +187,16 @@ var RuntimeScanners = {
 };
 
 EventEmitter.decorate(RuntimeScanners);
 
 exports.RuntimeScanners = RuntimeScanners;
 
 /* SCANNERS */
 
-// The adb-scanner will automatically start and stop when the ADB extension is installed
-// and uninstalled, so the scanner itself can always be used.
-RuntimeScanners.add(adbScanner);
-
 var WiFiScanner = {
 
   _runtimes: [],
 
   init() {
     this.updateRegistration();
     Services.prefs.addObserver(this.ALLOWED_PREF, this);
   },
--- a/devtools/shared/adb/adb-scanner.js
+++ b/devtools/shared/adb/adb-scanner.js
@@ -7,60 +7,57 @@
 const EventEmitter = require("devtools/shared/event-emitter");
 const { Devices } = require("devtools/shared/apps/Devices.jsm");
 const { dumpn } = require("devtools/shared/DevToolsUtils");
 const { RuntimeTypes } =
   require("devtools/client/webide/modules/runtime-types");
 const { ADB } = require("devtools/shared/adb/adb");
 loader.lazyRequireGetter(this, "Device", "devtools/shared/adb/adb-device");
 
-class ADBScanner extends EventEmitter {
-  constructor() {
-    super();
-    this._runtimes = [];
+const ADBScanner = {
 
+  _runtimes: [],
+
+  enable() {
     this._onDeviceConnected = this._onDeviceConnected.bind(this);
     this._onDeviceDisconnected = this._onDeviceDisconnected.bind(this);
-    this._updateRuntimes = this._updateRuntimes.bind(this);
-  }
-
-  enable() {
     EventEmitter.on(ADB, "device-connected", this._onDeviceConnected);
     EventEmitter.on(ADB, "device-disconnected", this._onDeviceDisconnected);
 
+    this._updateRuntimes = this._updateRuntimes.bind(this);
     Devices.on("register", this._updateRuntimes);
     Devices.on("unregister", this._updateRuntimes);
     Devices.on("addon-status-updated", this._updateRuntimes);
 
     ADB.start().then(() => {
       ADB.trackDevices();
     });
     this._updateRuntimes();
-  }
+  },
 
   disable() {
     EventEmitter.off(ADB, "device-connected", this._onDeviceConnected);
     EventEmitter.off(ADB, "device-disconnected", this._onDeviceDisconnected);
     Devices.off("register", this._updateRuntimes);
     Devices.off("unregister", this._updateRuntimes);
     Devices.off("addon-status-updated", this._updateRuntimes);
-  }
+  },
 
   _emitUpdated() {
     this.emit("runtime-list-updated");
-  }
+  },
 
   _onDeviceConnected(deviceId) {
     const device = new Device(deviceId);
     Devices.register(deviceId, device);
-  }
+  },
 
   _onDeviceDisconnected(deviceId) {
     Devices.unregister(deviceId);
-  }
+  },
 
   _updateRuntimes() {
     if (this._updatingPromise) {
       return this._updatingPromise;
     }
     this._runtimes = [];
     const promises = [];
     for (const id of Devices.available()) {
@@ -70,33 +67,36 @@ class ADBScanner extends EventEmitter {
     this._updatingPromise = Promise.all(promises);
     this._updatingPromise.then(() => {
       this._emitUpdated();
       this._updatingPromise = null;
     }, () => {
       this._updatingPromise = null;
     });
     return this._updatingPromise;
-  }
+  },
 
-  async _detectRuntimes(device) {
+  _detectRuntimes: async function(device) {
     const model = await device.getModel();
     const detectedRuntimes =
       await FirefoxOnAndroidRuntime.detect(device, model);
     this._runtimes.push(...detectedRuntimes);
-  }
+  },
 
   scan() {
     return this._updateRuntimes();
-  }
+  },
 
   listRuntimes() {
     return this._runtimes;
   }
-}
+
+};
+
+EventEmitter.decorate(ADBScanner);
 
 function Runtime(device, model, socketPath) {
   this.device = device;
   this._model = model;
   this._socketPath = socketPath;
 }
 
 Runtime.prototype = {
deleted file mode 100644
--- a/devtools/shared/adb/addon-aware-adb-scanner.js
+++ /dev/null
@@ -1,98 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-const EventEmitter = require("devtools/shared/event-emitter");
-
-loader.lazyRequireGetter(this, "adbAddon", "devtools/shared/adb/adb-addon", true);
-loader.lazyRequireGetter(this, "ADBScanner", "devtools/shared/adb/adb-scanner", true);
-
-/**
- * The AddonAwareADBScanner decorates an instance of ADBScanner. It will wait until the
- * ADB addon is installed to enable() the real scanner, and will automatically disable
- * it if the addon is uninstalled.
- *
- * It implements the following public API of ADBScanner:
- * - enable
- * - disable
- * - scan
- * - listRuntimes
- * - event "runtime-list-updated"
- */
-class AddonAwareADBScanner extends EventEmitter {
-  /**
-   * Parameters are provided only to allow tests to replace actual implementations with
-   * mocks.
-   *
-   * @param {ADBScanner} scanner
-   *        Only provided in tests for mocks
-   * @param {ADBAddon} addon
-   *        Only provided in tests for mocks
-   */
-  constructor(scanner = new ADBScanner(), addon = adbAddon) {
-    super();
-
-    this._onScannerListUpdated = this._onScannerListUpdated.bind(this);
-    this._onAddonUpdate = this._onAddonUpdate.bind(this);
-
-    this._scanner = scanner;
-    this._scanner.on("runtime-list-updated", this._onScannerListUpdated);
-
-    this._addon = addon;
-  }
-
-  /**
-   * Only forward the enable() call if the addon is installed, because ADBScanner::enable
-   * only works if the addon is installed.
-   */
-  enable() {
-    if (this._addon.status === "installed") {
-      this._scanner.enable();
-    }
-
-    // Remove any previous listener, to make sure we only add one listener if enable() is
-    // called several times.
-    this._addon.off("update", this._onAddonUpdate);
-
-    this._addon.on("update", this._onAddonUpdate);
-  }
-
-  disable() {
-    this._scanner.disable();
-
-    this._addon.off("update", this._onAddonUpdate);
-  }
-
-  /**
-   * Scan for USB devices.
-   *
-   * @return {Promise} Promise that will resolve when the scan is completed.
-   */
-  scan() {
-    return this._scanner.scan();
-  }
-
-  /**
-   * Get the list of currently detected runtimes.
-   *
-   * @return {Array} Array of currently detected runtimes.
-   */
-  listRuntimes() {
-    return this._scanner.listRuntimes();
-  }
-
-  _onAddonUpdate() {
-    if (this._addon.status === "installed") {
-      this._scanner.enable();
-    } else {
-      this._scanner.disable();
-    }
-  }
-
-  _onScannerListUpdated() {
-    this.emit("runtime-list-updated");
-  }
-}
-exports.AddonAwareADBScanner = AddonAwareADBScanner;
--- a/devtools/shared/adb/moz.build
+++ b/devtools/shared/adb/moz.build
@@ -6,15 +6,14 @@ DevToolsModules(
     'adb-addon.js',
     'adb-binary.js',
     'adb-client.js',
     'adb-device.js',
     'adb-running-checker.js',
     'adb-scanner.js',
     'adb-socket.js',
     'adb.js',
-    'addon-aware-adb-scanner.js',
 )
 
 with Files('**'):
     BUG_COMPONENT = ('DevTools', 'about:debugging')
 
 XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell.ini']
--- a/devtools/shared/adb/test/test_adb.js
+++ b/devtools/shared/adb/test/test_adb.js
@@ -1,11 +1,8 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
 "use strict";
 
 const EventEmitter = require("devtools/shared/event-emitter");
 const { ExtensionTestUtils } = ChromeUtils.import("resource://testing-common/ExtensionXPCShellUtils.jsm", {});
 const { NetUtil } = require("resource://gre/modules/NetUtil.jsm");
 const { getFileForBinary } = require("devtools/shared/adb/adb-binary");
 const { check } = require("devtools/shared/adb/adb-running-checker");
 const { ADB } = require("devtools/shared/adb/adb");
deleted file mode 100644
--- a/devtools/shared/adb/test/test_addon-aware-adb-scanner.js
+++ /dev/null
@@ -1,221 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-const EventEmitter = require("devtools/shared/event-emitter");
-const { AddonAwareADBScanner } = require("devtools/shared/adb/addon-aware-adb-scanner");
-
-/**
- * For the scanner mock, we create an object with spies for each of the public methods
- * used by the AddonAwareADBScanner, and the ability to emit events.
- */
-function prepareMockScanner() {
-  const mockScanner = {
-    enable: sinon.spy(),
-    disable: sinon.spy(),
-    scan: sinon.spy(),
-    listRuntimes: sinon.spy()
-  };
-  EventEmitter.decorate(mockScanner);
-  return mockScanner;
-}
-
-/**
- * For the addon mock, we simply need an object that is able to emit events and has a
- * status.
- */
-function prepareMockAddon() {
-  const mockAddon = {
-    status: "unknown",
-  };
-  EventEmitter.decorate(mockAddon);
-  return mockAddon;
-}
-
-/**
- * Prepare all mocks needed for the scanner tests.
- */
-function prepareMocks() {
-  const mockScanner = prepareMockScanner();
-  const mockAddon = prepareMockAddon();
-  const addonAwareAdbScanner = new AddonAwareADBScanner(mockScanner, mockAddon);
-  return { addonAwareAdbScanner, mockAddon, mockScanner };
-}
-
-/**
- * This test covers basic usage of enable() on the AddonAwareADBScanner, and checks the
- * different behaviors based on the addon status.
- */
-add_task(async function testCallingEnable() {
-  const { mockScanner, mockAddon, addonAwareAdbScanner } = prepareMocks();
-
-  // Check that enable() is not called if the addon is uninstalled
-  mockAddon.status = "uninstalled";
-  addonAwareAdbScanner.enable();
-  ok(mockScanner.enable.notCalled, "enable() was not called");
-  mockScanner.enable.reset();
-
-  // Check that enable() is called if the addon is installed
-  mockAddon.status = "installed";
-  addonAwareAdbScanner.enable();
-  ok(mockScanner.enable.called, "enable() was called");
-  mockScanner.enable.reset();
-});
-
-/**
- * This test checks that enable()/disable() methods from the internal ADBScanner are
- * called when the addon is installed or uninstalled.
- */
-add_task(async function testUpdatingAddonEnablesDisablesScanner() {
-  const { mockScanner, mockAddon, addonAwareAdbScanner } = prepareMocks();
-
-  // Enable the addon aware scanner
-  addonAwareAdbScanner.enable();
-  ok(mockScanner.enable.notCalled, "enable() was not called initially");
-
-  // Check that enable() is called automatically when the addon is installed
-  mockAddon.status = "installed";
-  mockAddon.emit("update");
-  ok(mockScanner.enable.called, "enable() was called when installing the addon");
-  ok(mockScanner.disable.notCalled, "disable() was not called when installing the addon");
-  mockScanner.enable.reset();
-  mockScanner.disable.reset();
-
-  // Check that disabled() is called automatically when the addon is uninstalled
-  mockAddon.status = "uninstalled";
-  mockAddon.emit("update");
-  ok(mockScanner.enable.notCalled, "enable() was not called when uninstalling the addon");
-  ok(mockScanner.disable.called, "disable() was called when uninstalling the addon");
-  mockScanner.enable.reset();
-  mockScanner.disable.reset();
-
-  // Check that enable() is called again when the addon is reinstalled
-  mockAddon.status = "installed";
-  mockAddon.emit("update");
-  ok(mockScanner.enable.called, "enable() was called when installing the addon");
-  ok(mockScanner.disable.notCalled, "disable() was not called when installing the addon");
-  mockScanner.enable.reset();
-  mockScanner.disable.reset();
-});
-
-/**
- * This test checks that disable() is forwarded from the AddonAwareADBScanner to the real
- * scanner even if the addon is uninstalled. We might miss the addon uninstall
- * notification, so it is safer to always proceed with disabling.
- */
-add_task(async function testScannerIsDisabledWhenMissingAddonUpdate() {
-  const { mockScanner, mockAddon, addonAwareAdbScanner } = prepareMocks();
-
-  // Enable the addon aware scanner
-  mockAddon.status = "installed";
-  addonAwareAdbScanner.enable();
-  ok(mockScanner.enable.called, "enable() was called initially");
-  mockScanner.enable.reset();
-
-  // Uninstall the addon without firing any event
-  mockAddon.status = "uninstalled";
-
-  // Programmatically call disable, check that the scanner's disable is called even though
-  // the addon was uninstalled.
-  addonAwareAdbScanner.disable();
-  ok(mockScanner.disable.called, "disable() was called when uninstalling the addon");
-  mockScanner.disable.reset();
-});
-
-/**
- * This test checks that when the AddonAwareADBScanner is disabled, then enable/disable
- * are not called on the inner scanner when the addon status changes.
- */
-add_task(async function testInnerEnableIsNotCalledIfNotStarted() {
-  const { mockScanner, mockAddon, addonAwareAdbScanner } = prepareMocks();
-
-  // Check that enable() is not called on the inner scanner when the addon is installed
-  // if the AddonAwareADBScanner was not enabled
-  mockAddon.status = "installed";
-  mockAddon.emit("update");
-  ok(mockScanner.enable.notCalled, "enable() was not called");
-
-  // Same for disable() and "uninstall"
-  mockAddon.status = "uninstalled";
-  mockAddon.emit("update");
-  ok(mockScanner.disable.notCalled, "disable() was not called");
-
-  // Enable the addon aware scanner
-  addonAwareAdbScanner.enable();
-  ok(mockScanner.enable.notCalled, "enable() was not called");
-  ok(mockScanner.disable.notCalled, "disable() was not called");
-});
-
-/**
- * This test checks that when the AddonAwareADBScanner is disabled, installing the addon
- * no longer enables the internal ADBScanner.
- */
-add_task(async function testEnableIsNoLongerCalledAfterDisabling() {
-  const { mockScanner, mockAddon, addonAwareAdbScanner } = prepareMocks();
-
-  // Start with the addon installed
-  mockAddon.status = "installed";
-  addonAwareAdbScanner.enable();
-  ok(mockScanner.enable.called, "enable() was called since addon was already installed");
-  mockScanner.enable.reset();
-
-  // Here we call enable again to check that we will not add too many events.
-  // A single call to disable() should stop all listeners, even if we called enable()
-  // several times.
-  addonAwareAdbScanner.enable();
-  ok(mockScanner.enable.called, "enable() was called again");
-  mockScanner.enable.reset();
-
-  // Disable the scanner
-  addonAwareAdbScanner.disable();
-  ok(mockScanner.disable.called, "disable() was called");
-  mockScanner.disable.reset();
-
-  // Emit an addon update event
-  mockAddon.emit("update");
-  ok(mockScanner.enable.notCalled,
-    "enable() is not called since the main scanner is disabled");
-});
-
-/**
- * Basic check that the "runtime-list-updated" event is forwarded.
- */
-add_task(async function testListUpdatedEventForwarding() {
-  const { mockScanner, addonAwareAdbScanner } = prepareMocks();
-
-  const spy = sinon.spy();
-  addonAwareAdbScanner.on("runtime-list-updated", spy);
-  mockScanner.emit("runtime-list-updated");
-  ok(spy.called, "The runtime-list-updated event was forwarded from ADBScanner");
-  addonAwareAdbScanner.off("runtime-list-updated", spy);
-});
-
-/**
- * Basic check that calls to scan() are forwarded.
- */
-add_task(async function testScanCallForwarding() {
-  const { mockScanner, addonAwareAdbScanner } = prepareMocks();
-
-  ok(mockScanner.scan.notCalled, "ADBScanner scan() is not called initially");
-
-  addonAwareAdbScanner.scan();
-  mockScanner.emit("runtime-list-updated");
-  ok(mockScanner.scan.called, "ADBScanner scan() was called");
-  mockScanner.scan.reset();
-});
-
-/**
- * Basic check that calls to scan() are forwarded.
- */
-add_task(async function testListRuntimesCallForwarding() {
-  const { mockScanner, addonAwareAdbScanner } = prepareMocks();
-
-  ok(mockScanner.listRuntimes.notCalled,
-    "ADBScanner listRuntimes() is not called initially");
-
-  addonAwareAdbScanner.listRuntimes();
-  mockScanner.emit("runtime-list-updated");
-  ok(mockScanner.listRuntimes.called, "ADBScanner listRuntimes() was called");
-  mockScanner.scan.reset();
-});
--- a/devtools/shared/adb/test/xpcshell-head.js
+++ b/devtools/shared/adb/test/xpcshell-head.js
@@ -1,17 +1,8 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 /* eslint no-unused-vars: [2, {"vars": "local"}] */
 
 const { require } = ChromeUtils.import("resource://devtools/shared/Loader.jsm", {});
-const Services = require("Services");
-
-// ================================================
-// Load mocking/stubbing library, sinon
-// docs: http://sinonjs.org/releases/v2.3.2/
-ChromeUtils.import("resource://gre/modules/Timer.jsm");
-Services.scriptloader.loadSubScript("resource://testing-common/sinon-2.3.2.js", this);
-/* globals sinon */
-// ================================================
--- a/devtools/shared/adb/test/xpcshell.ini
+++ b/devtools/shared/adb/test/xpcshell.ini
@@ -3,9 +3,8 @@ tags = devtools
 head = xpcshell-head.js
 firefox-appdir = browser
 skip-if = toolkit == 'android'
 support-files =
   adb.py
 
 [test_adb.js]
 run-sequentially = An extension having the same id is installed/uninstalled in different tests
-[test_addon-aware-adb-scanner.js]