Merge mozilla-central to autoland. a=merge CLOSED TREE
authorBrindusan Cristian <cbrindusan@mozilla.com>
Tue, 02 Oct 2018 01:04:29 +0300
changeset 494802 d3aa8681ce9dfedda6db70666ac8e59d09a5e4b1
parent 494801 a2e5b2b30bfa6f6912f4af2df950284950e3fb16 (current diff)
parent 494752 856103837d4dda0e176706cc64927546459d510c (diff)
child 494803 2f9e7263731f258f1d75688ea1e9ee41a352da62
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)
reviewersmerge
milestone64.0a1
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
Merge mozilla-central to autoland. a=merge CLOSED TREE
devtools/client/debugger/test/mochitest/browser_dbg_breadcrumbs-access.js
devtools/client/debugger/test/mochitest/browser_dbg_breakpoints-pane.js
devtools/client/debugger/test/mochitest/browser_dbg_editor-contextmenu.js
devtools/client/debugger/test/mochitest/browser_dbg_editor-mode.js
devtools/client/debugger/test/mochitest/browser_dbg_function-display-name.js
devtools/client/debugger/test/mochitest/browser_dbg_instruments-pane-collapse.js
devtools/client/debugger/test/mochitest/browser_dbg_instruments-pane-collapse_keyboard.js
devtools/client/debugger/test/mochitest/browser_dbg_panel-size.js
devtools/client/debugger/test/mochitest/browser_dbg_pause-exceptions-01.js
devtools/client/debugger/test/mochitest/browser_dbg_pause-exceptions-02.js
devtools/client/debugger/test/mochitest/browser_dbg_pause-no-step.js
devtools/client/debugger/test/mochitest/browser_dbg_reload-preferred-script-02.js
devtools/client/debugger/test/mochitest/browser_dbg_reload-preferred-script-03.js
devtools/client/debugger/test/mochitest/browser_dbg_search-autofill-identifier.js
devtools/client/debugger/test/mochitest/browser_dbg_search-basic-01.js
devtools/client/debugger/test/mochitest/browser_dbg_search-basic-02.js
devtools/client/debugger/test/mochitest/browser_dbg_search-basic-03.js
devtools/client/debugger/test/mochitest/browser_dbg_search-basic-04.js
devtools/client/debugger/test/mochitest/browser_dbg_search-global-01.js
devtools/client/debugger/test/mochitest/browser_dbg_search-global-02.js
devtools/client/debugger/test/mochitest/browser_dbg_search-global-03.js
devtools/client/debugger/test/mochitest/browser_dbg_search-global-04.js
devtools/client/debugger/test/mochitest/browser_dbg_search-global-05.js
devtools/client/debugger/test/mochitest/browser_dbg_search-global-06.js
devtools/client/debugger/test/mochitest/browser_dbg_search-popup-jank.js
devtools/client/debugger/test/mochitest/browser_dbg_search-sources-01.js
devtools/client/debugger/test/mochitest/browser_dbg_search-sources-02.js
devtools/client/debugger/test/mochitest/browser_dbg_search-sources-03.js
devtools/client/debugger/test/mochitest/browser_dbg_search-symbols.js
devtools/client/debugger/test/mochitest/browser_dbg_searchbox-help-popup-01.js
devtools/client/debugger/test/mochitest/browser_dbg_searchbox-help-popup-02.js
devtools/client/debugger/test/mochitest/browser_dbg_searchbox-parse.js
devtools/client/debugger/test/mochitest/browser_dbg_source-maps-01.js
devtools/client/debugger/test/mochitest/browser_dbg_source-maps-02.js
devtools/client/debugger/test/mochitest/browser_dbg_source-maps-03.js
devtools/client/debugger/test/mochitest/browser_dbg_source-maps-04.js
devtools/client/debugger/test/mochitest/browser_dbg_sources-contextmenu-01.js
devtools/client/debugger/test/mochitest/browser_dbg_sources-contextmenu-02.js
devtools/client/debugger/test/mochitest/browser_dbg_sources-eval-01.js
devtools/client/debugger/test/mochitest/browser_dbg_sources-eval-02.js
devtools/client/debugger/test/mochitest/browser_dbg_sources-keybindings.js
devtools/client/debugger/test/mochitest/browser_dbg_stack-01.js
devtools/client/debugger/test/mochitest/browser_dbg_stack-02.js
devtools/client/debugger/test/mochitest/browser_dbg_stack-03.js
devtools/client/debugger/test/mochitest/browser_dbg_stack-04.js
devtools/client/debugger/test/mochitest/browser_dbg_stack-05.js
devtools/client/debugger/test/mochitest/browser_dbg_stack-06.js
devtools/client/debugger/test/mochitest/browser_dbg_stack-07.js
devtools/client/debugger/test/mochitest/browser_dbg_stack-contextmenu-01.js
devtools/client/debugger/test/mochitest/browser_dbg_stack-contextmenu-02.js
security/nss/cpputil/scoped_ptrs.h
toolkit/moz.configure
--- a/browser/components/downloads/DownloadsCommon.jsm
+++ b/browser/components/downloads/DownloadsCommon.jsm
@@ -39,19 +39,24 @@ XPCOMUtils.defineLazyModuleGetters(this,
   NetUtil: "resource://gre/modules/NetUtil.jsm",
   PluralForm: "resource://gre/modules/PluralForm.jsm",
   AppConstants: "resource://gre/modules/AppConstants.jsm",
   BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
   DownloadHistory: "resource://gre/modules/DownloadHistory.jsm",
   Downloads: "resource://gre/modules/Downloads.jsm",
   DownloadUIHelper: "resource://gre/modules/DownloadUIHelper.jsm",
   DownloadUtils: "resource://gre/modules/DownloadUtils.jsm",
+  PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
   PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
 });
 
+XPCOMUtils.defineLazyServiceGetters(this, {
+  gClipboardHelper: ["@mozilla.org/widget/clipboardhelper;1", "nsIClipboardHelper"],
+});
+
 XPCOMUtils.defineLazyGetter(this, "DownloadsLogger", () => {
   let { ConsoleAPI } = ChromeUtils.import("resource://gre/modules/Console.jsm", {});
   let consoleOptions = {
     maxLogLevelPref: "browser.download.loglevel",
     prefix: "Downloads",
   };
   return new ConsoleAPI(consoleOptions);
 });
@@ -275,16 +280,40 @@ var DownloadsCommon = {
         return DownloadsCommon.DOWNLOAD_PAUSED;
       }
       return DownloadsCommon.DOWNLOAD_CANCELED;
     }
     return DownloadsCommon.DOWNLOAD_NOTSTARTED;
   },
 
   /**
+   * Removes a Download object from both session and history downloads.
+   */
+  async deleteDownload(download) {
+    // Remove the associated history element first, if any, so that the views
+    // that combine history and session downloads won't resurrect the history
+    // download into the view just before it is deleted permanently.
+    try {
+      await PlacesUtils.history.remove(download.source.url);
+    } catch (ex) {
+      Cu.reportError(ex);
+    }
+    let list = await Downloads.getList(Downloads.ALL);
+    await list.remove(download);
+    await download.finalize(true);
+  },
+
+  /**
+   * Copies the source URI of the given Download object to the clipboard.
+   */
+  copyDownloadLink(download) {
+    gClipboardHelper.copyString(download.source.url);
+  },
+
+  /**
    * Given an iterable collection of Download objects, generates and returns
    * statistics about that collection.
    *
    * @param downloads An iterable collection of Download objects.
    *
    * @return Object whose properties are the generated statistics. Currently,
    *         we return the following properties:
    *
--- a/browser/components/downloads/DownloadsSubview.jsm
+++ b/browser/components/downloads/DownloadsSubview.jsm
@@ -414,31 +414,26 @@ DownloadsSubview.Button = class extends 
   onChanged() {
     let newState = DownloadsCommon.stateOfDownload(this.download);
     if (this._downloadState !== newState) {
       this._downloadState = newState;
       this.onStateChanged();
     } else {
       this._updateState();
     }
-
-    // This cannot be placed within onStateChanged because when a download goes
-    // from hasBlockedData to !hasBlockedData it will still remain in the same state.
-    this.element.classList.toggle("temporary-block",
-                                  !!this.download.hasBlockedData);
   }
 
   /**
    * Update the DOM representation of this download to match the current, recently
    * updated, state.
    */
   _updateState() {
     super._updateState();
     this.element.setAttribute("label", this.element.getAttribute("displayName"));
-    this.element.setAttribute("tooltiptext", this.element.getAttribute("fullStatus"));
+    this.element.setAttribute("tooltiptext", this.element.getAttribute("status"));
 
     if (this.isCommandEnabled("downloadsCmd_show")) {
       this.element.setAttribute("openLabel", kButtonLabels.open);
       this.element.setAttribute("showLabel", kButtonLabels.show);
       this.element.removeAttribute("retryLabel");
     } else if (this.isCommandEnabled("downloadsCmd_retry")) {
       this.element.setAttribute("retryLabel", kButtonLabels.retry);
       this.element.removeAttribute("openLabel");
@@ -458,13 +453,11 @@ DownloadsSubview.Button = class extends 
     this.element.hidden = !(state == DownloadsCommon.DOWNLOAD_FINISHED ||
       state == DownloadsCommon.DOWNLOAD_FAILED);
   }
 
   /**
    * Command handler; copy the download URL to the OS general clipboard.
    */
   downloadsCmd_copyLocation() {
-    let clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"]
-                      .getService(Ci.nsIClipboardHelper);
-    clipboard.copyString(this.download.source.url);
+    DownloadsCommon.copyDownloadLink(this.download);
   }
 };
--- a/browser/components/downloads/DownloadsViewUI.jsm
+++ b/browser/components/downloads/DownloadsViewUI.jsm
@@ -17,17 +17,16 @@ ChromeUtils.import("resource://gre/modul
 
 XPCOMUtils.defineLazyModuleGetters(this, {
   BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
   Downloads: "resource://gre/modules/Downloads.jsm",
   DownloadUtils: "resource://gre/modules/DownloadUtils.jsm",
   DownloadsCommon: "resource:///modules/DownloadsCommon.jsm",
   FileUtils: "resource://gre/modules/FileUtils.jsm",
   OS: "resource://gre/modules/osfile.jsm",
-  PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
 });
 
 var gDownloadElementButtons = {
   cancel: {
     commandName: "downloadsCmd_cancel",
     l10nId: "download-cancel",
     descriptionL10nId: "download-cancel-description",
     iconClass: "downloadIconCancel",
@@ -70,16 +69,41 @@ var gDownloadElementButtons = {
 var DownloadsViewUI = {
   /**
    * Returns true if the given string is the name of a command that can be
    * handled by the Downloads user interface, including standard commands.
    */
   isCommandName(name) {
     return name.startsWith("cmd_") || name.startsWith("downloadsCmd_");
   },
+
+  /**
+   * Returns the user-facing label for the given Download object. This is
+   * normally the leaf name of the download target file. In case this is a very
+   * old history download for which the target file is unknown, the download
+   * source URI is displayed.
+   */
+  getDisplayName(download) {
+    return download.target.path ? OS.Path.basename(download.target.path)
+                                : download.source.url;
+  },
+
+  /**
+   * Given a Download object, returns a string representing its file size with
+   * an appropriate measurement unit, for example "1.5 MB", or an empty string
+   * if the size is unknown.
+   */
+  getSizeWithUnits(download) {
+    if (download.target.size === undefined) {
+      return "";
+    }
+
+    let [size, unit] = DownloadUtils.convertByteUnits(download.target.size);
+    return DownloadsCommon.strings.sizeWithUnits(size, unit);
+  },
 };
 
 this.DownloadsViewUI.BaseView = class {
   canClearDownloads(nodeContainer) {
     // Downloads can be cleared if there's at least one removable download in
     // the list (either a history download or a completed session download).
     // Because history downloads are always removable and are listed after the
     // session downloads, check from bottom to top.
@@ -140,50 +164,16 @@ this.DownloadsViewUI.DownloadElementShel
     // icon, for example from a Windows executable. To ensure that the icon is
     // reloaded, however, we must change the URI used by the XUL image element,
     // for example by adding a query parameter. This only works if we add one of
     // the parameters explicitly supported by the nsIMozIconURI interface.
     return "moz-icon://" + this.download.target.path + "?size=32" +
            (this.download.succeeded ? "&state=normal" : "");
   },
 
-  /**
-   * The user-facing label for the download. This is normally the leaf name of
-   * the download target file. In case this is a very old history download for
-   * which the target file is unknown, the download source URI is displayed.
-   */
-  get displayName() {
-    if (!this.download.target.path) {
-      return this.download.source.url;
-    }
-    return OS.Path.basename(this.download.target.path);
-  },
-
-  /**
-   * The user-facing label for the size (if any) of the download. The return value
-   * is an object 'sizeStrings' with 2 strings:
-   *   1. stateLabel - The size with the units (e.g. "1.5 MB").
-   *   2. status - The status of the download (e.g. "Completed");
-   */
-  get sizeStrings() {
-    let s = DownloadsCommon.strings;
-    let sizeStrings = {};
-
-    if (this.download.target.size !== undefined) {
-      let [size, unit] = DownloadUtils.convertByteUnits(this.download.target.size);
-      sizeStrings.stateLabel = s.sizeWithUnits(size, unit);
-      sizeStrings.status = s.statusSeparator(s.stateCompleted, sizeStrings.stateLabel);
-    } else {
-      // History downloads may not have a size defined.
-      sizeStrings.stateLabel = s.sizeUnknown;
-      sizeStrings.status = s.stateCompleted;
-    }
-    return sizeStrings;
-  },
-
   get browserWindow() {
     return BrowserWindowTracker.getTopWindow();
   },
 
   /**
    * The progress element for the download, or undefined in case the XBL binding
    * has not been applied yet.
    */
@@ -193,16 +183,65 @@ this.DownloadsViewUI.DownloadElementShel
       this.__progressElement =
            this.element.ownerDocument.getAnonymousElementByAttribute(
                                          this.element, "anonid",
                                          "progressmeter");
     }
     return this.__progressElement;
   },
 
+  /**
+   * Updates the full status line.
+   *
+   * @param status
+   *        Status line of the Downloads Panel or the Downloads View.
+   * @param hoverStatus
+   *        Label to show in the Downloads Panel when the mouse pointer is over
+   *        the main area of the item. If not specified, this will be the same
+   *        as the status line. This is ignored in the Downloads View.
+   */
+  showStatus(status, hoverStatus = status) {
+    this.element.setAttribute("status", status);
+    this.element.setAttribute("hoverStatus", hoverStatus);
+  },
+
+  /**
+   * Updates the status line combining the given state label with other labels.
+   *
+   * @param stateLabel
+   *        Label representing the state of the download, for example "Failed".
+   *        In the Downloads Panel, this is the only text displayed when the
+   *        the mouse pointer is not over the main area of the item. In the
+   *        Downloads View, this label is combined with the host and date, for
+   *        example "Failed - example.com - 1:45 PM".
+   * @param hoverStatus
+   *        Label to show in the Downloads Panel when the mouse pointer is over
+   *        the main area of the item. If not specified, this will be the
+   *        state label combined with the host and date. This is ignored in the
+   *        Downloads View.
+   */
+  showStatusWithDetails(stateLabel, hoverStatus) {
+    let [displayHost] =
+        DownloadUtils.getURIHost(this.download.source.referrer ||
+                                 this.download.source.url);
+    let [displayDate] =
+        DownloadUtils.getReadableDates(new Date(this.download.endTime));
+
+    let firstPart =
+        DownloadsCommon.strings.statusSeparator(stateLabel, displayHost);
+    let fullStatus =
+        DownloadsCommon.strings.statusSeparator(firstPart, displayDate);
+
+    if (!this.isPanel) {
+      this.showStatus(fullStatus);
+    } else {
+      this.showStatus(stateLabel, hoverStatus || fullStatus);
+    }
+  },
+
   showButton(type) {
     let { commandName, l10nId, descriptionL10nId,
           iconClass } = gDownloadElementButtons[type];
 
     this.buttonCommandName = commandName;
     let labelAttribute = this.isPanel ? "buttonarialabel" : "buttontooltiptext";
     this.element.setAttribute(labelAttribute, this.string(l10nId));
     if (this.isPanel && descriptionL10nId) {
@@ -212,220 +251,204 @@ this.DownloadsViewUI.DownloadElementShel
     this.element.setAttribute("buttonclass", "downloadButton " + iconClass);
     this.element.removeAttribute("buttonhidden");
   },
 
   hideButton() {
     this.element.setAttribute("buttonhidden", "true");
   },
 
+  lastEstimatedSecondsLeft: Infinity,
+
   /**
-   * Processes a major state change in the user interface, then proceeds with
-   * the normal progress update. This function is not called for every progress
-   * update in order to improve performance.
+   * This is called when a major state change occurs in the download, but is not
+   * called for every progress update in order to improve performance.
    */
   _updateState() {
-    this.element.setAttribute("displayName", this.displayName);
+    this.element.setAttribute("displayName",
+                              DownloadsViewUI.getDisplayName(this.download));
     this.element.setAttribute("image", this.image);
     this.element.setAttribute("state",
                               DownloadsCommon.stateOfDownload(this.download));
 
-    // We have to check for download state properties in the specific order used
-    // here, which is the same used by stateOfDownload.
     if (!this.download.stopped) {
+      // When the download becomes in progress, we make all the major changes to
+      // the user interface here. The _updateStateInner function takes care of
+      // displaying the right button type for all other state changes.
       this.showButton("cancel");
-    } else if (this.download.succeeded) {
-      // The button is updated in _updateProgress, since its presence also
-      // depends on state that doesn't trigger _updateState when it changes.
-    } else if (this.download.error) {
-      if (this.download.error.becauseBlockedByParentalControls) {
-        this.hideButton();
-      } else if (this.download.error.becauseBlockedByReputationCheck) {
-        // The button is updated in _updateProgress, since its presence also
-        // depends on state that doesn't trigger _updateState when it changes.
-      } else {
-        this.showButton("retry");
-      }
-    } else if (this.download.canceled) {
-      if (this.download.hasPartialData) {
-        this.showButton("cancel");
-      } else {
-        this.showButton("retry");
-      }
-    } else {
-      this.showButton("cancel");
-    }
-
-    if (!this.download.succeeded && this.download.error &&
-        this.download.error.becauseBlockedByReputationCheck) {
-      this.element.setAttribute("verdict",
-                                this.download.error.reputationCheckVerdict);
-    } else {
-      this.element.removeAttribute("verdict");
     }
 
     // Since state changed, reset the time left estimation.
     this.lastEstimatedSecondsLeft = Infinity;
 
-    this._updateProgress();
+    this._updateStateInner();
   },
 
   /**
-   * Updates the elements that change regularly for in-progress downloads,
-   * namely the progress bar and the status line.
+   * This is called for all changes in the download, including progress updates.
+   * For major state changes, _updateState is called first, but several elements
+   * are still updated here. When the download is in progress, this function
+   * takes a faster path with less element updates to improve performance.
    */
-  _updateProgress() {
-    // Handle major state changes that don't trigger _updateState. These states
-    // don't occur for in-progress downloads, thus performance is not affected.
-    if (this.download.succeeded) {
-      if (this.download.target.exists) {
-        this.element.setAttribute("exists", "true");
-        this.showButton("show");
+  _updateStateInner() {
+    let progressPaused = false;
+
+    if (!this.download.stopped) {
+      // The download is in progress, so we don't change the button state
+      // because the _updateState function already did it. We still need to
+      // update all elements that may change during the download.
+      let totalBytes = this.download.hasProgress ? this.download.totalBytes
+                                                 : -1;
+      let [status, newEstimatedSecondsLeft] = DownloadUtils.getDownloadStatus(
+                                              this.download.currentBytes,
+                                              totalBytes,
+                                              this.download.speed,
+                                              this.lastEstimatedSecondsLeft);
+      this.lastEstimatedSecondsLeft = newEstimatedSecondsLeft;
+      this.showStatus(status);
+    } else {
+      let verdict = "";
+
+      // The download is not in progress, so we update the user interface based
+      // on other properties. The order in which we check the properties of the
+      // Download object is the same used by stateOfDownload.
+      if (this.download.succeeded) {
+        if (this.download.target.exists) {
+          // This is a completed download, and the target file still exists.
+          this.element.setAttribute("exists", "true");
+          let sizeWithUnits = DownloadsViewUI.getSizeWithUnits(this.download);
+          if (this.isPanel) {
+            // In the Downloads Panel, we show the file size after the state
+            // label, for example "Completed - 1.5 MB". When the pointer is over
+            // the main area of the item, this label is replaced with a
+            // description of the default action, which opens the file.
+            let status = DownloadsCommon.strings.stateCompleted;
+            if (sizeWithUnits) {
+              status = DownloadsCommon.strings.statusSeparator(status,
+                                                               sizeWithUnits);
+            }
+            this.showStatus(status,
+                            this.string("download-open-file-description"));
+          } else {
+            // In the Downloads View, we show the file size in place of the
+            // state label, for example "1.5 MB - example.com - 1:45 PM".
+            this.showStatusWithDetails(sizeWithUnits ||
+                                       DownloadsCommon.strings.sizeUnknown);
+          }
+          this.showButton("show");
+        } else {
+          // This is a completed download, but the target file does not exist
+          // anymore, so the main action of opening the file is unavailable.
+          this.element.removeAttribute("exists");
+          let label = DownloadsCommon.strings.fileMovedOrMissing;
+          this.showStatusWithDetails(label, label);
+          this.hideButton();
+        }
+      } else if (this.download.error) {
+        if (this.download.error.becauseBlockedByParentalControls) {
+          // This download was blocked permanently by parental controls.
+          this.showStatusWithDetails(
+            DownloadsCommon.strings.stateBlockedParentalControls);
+          this.hideButton();
+        } else if (this.download.error.becauseBlockedByReputationCheck) {
+          verdict = this.download.error.reputationCheckVerdict;
+          let hover = "";
+          if (!this.download.hasBlockedData) {
+            // This download was blocked permanently by reputation check.
+            this.hideButton();
+          } else if (this.isPanel) {
+            // This download was blocked temporarily by reputation check. In the
+            // Downloads Panel, a subview can be used to remove the file or open
+            // the download anyways.
+            this.showButton("subviewOpenOrRemoveFile");
+            hover = this.string("download-show-more-information-description");
+          } else {
+            // This download was blocked temporarily by reputation check. In the
+            // Downloads View, the interface depends on the threat severity.
+            switch (verdict) {
+              case Downloads.Error.BLOCK_VERDICT_UNCOMMON:
+                this.showButton("askOpenOrRemoveFile");
+                break;
+              case Downloads.Error.BLOCK_VERDICT_POTENTIALLY_UNWANTED:
+                this.showButton("askRemoveFileOrAllow");
+                break;
+              default: // Assume Downloads.Error.BLOCK_VERDICT_MALWARE
+                this.showButton("removeFile");
+                break;
+            }
+          }
+          this.showStatusWithDetails(this.rawBlockedTitleAndDetails[0], hover);
+        } else {
+          // This download failed without being blocked, and can be restarted.
+          this.showStatusWithDetails(DownloadsCommon.strings.stateFailed);
+          this.showButton("retry");
+        }
+      } else if (this.download.canceled) {
+        if (this.download.hasPartialData) {
+          // This download was paused. The main action button will cancel the
+          // download, and in both the Downloads Panel and the Downlods View the
+          // status includes the size, for example "Paused - 1.1 MB".
+          let totalBytes =
+              this.download.hasProgress ? this.download.totalBytes : -1;
+          let transfer =
+              DownloadUtils.getTransferTotal(this.download.currentBytes,
+                                             totalBytes);
+          this.showStatus(DownloadsCommon.strings.statusSeparatorBeforeNumber(
+                          DownloadsCommon.strings.statePaused, transfer));
+          this.showButton("cancel");
+          progressPaused = true;
+        } else {
+          // This download was canceled.
+          this.showStatusWithDetails(DownloadsCommon.strings.stateCanceled);
+          this.showButton("retry");
+        }
       } else {
-        this.element.removeAttribute("exists");
-        this.hideButton();
+        // This download was added to the global list before it started. While
+        // we still support this case, at the moment it can only be triggered by
+        // internally developed add-ons and regression tests, and should not
+        // happen unless there is a bug. This means the stateStarting string can
+        // probably be removed when converting the localization to Fluent.
+        this.showStatus(DownloadsCommon.strings.stateStarting);
+        this.showButton("cancel");
       }
-    } else if (this.download.error &&
-               this.download.error.becauseBlockedByReputationCheck) {
-      if (!this.download.hasBlockedData) {
-        this.hideButton();
-      } else if (this.isPanel) {
-        this.showButton("subviewOpenOrRemoveFile");
+
+      // These attributes are only set in this slower code path, because they
+      // are irrelevant for downloads that are in progress.
+      if (verdict) {
+        this.element.setAttribute("verdict", verdict);
       } else {
-        switch (this.download.error.reputationCheckVerdict) {
-          case Downloads.Error.BLOCK_VERDICT_UNCOMMON:
-            this.showButton("askOpenOrRemoveFile");
-            break;
-          case Downloads.Error.BLOCK_VERDICT_POTENTIALLY_UNWANTED:
-            this.showButton("askRemoveFileOrAllow");
-            break;
-          default: // Assume Downloads.Error.BLOCK_VERDICT_MALWARE
-            this.showButton("removeFile");
-            break;
-        }
+        this.element.removeAttribute("verdict");
       }
+
+      this.element.classList.toggle("temporary-block",
+                                    !!this.download.hasBlockedData);
     }
 
-    // When a block is confirmed, the removal of blocked data will not trigger a
-    // state change for the download, so this class must be updated here.
-    this.element.classList.toggle("temporary-block",
-                                  !!this.download.hasBlockedData);
-
-    // The progress bar is only displayed for in-progress downloads.
+    // These attributes are set in all code paths, because they are relevant for
+    // downloads that are in progress and for other states where the progress
+    // bar is visible.
     if (this.download.hasProgress) {
       this.element.setAttribute("progressmode", "normal");
       this.element.setAttribute("progress", this.download.progress);
     } else {
       this.element.setAttribute("progressmode", "undetermined");
     }
 
-    if (this.download.stopped && this.download.canceled &&
-        this.download.hasPartialData) {
+    if (progressPaused) {
       this.element.setAttribute("progresspaused", "true");
     } else {
       this.element.removeAttribute("progresspaused");
     }
 
     // Dispatch the ValueChange event for accessibility, if possible.
     if (this._progressElement) {
       let event = this.element.ownerDocument.createEvent("Events");
       event.initEvent("ValueChange", true, true);
       this._progressElement.dispatchEvent(event);
     }
-
-    let labels = this.statusLabels;
-    if (this.isPanel) {
-      this.element.setAttribute("status", labels.status);
-      this.element.setAttribute("hoverStatus", labels.hoverStatus);
-    } else {
-      this.element.setAttribute("status", labels.fullStatus);
-      this.element.setAttribute("fullStatus", labels.fullStatus);
-    }
-  },
-
-  lastEstimatedSecondsLeft: Infinity,
-
-  /**
-   * Returns the labels for the status of normal, full, and hovering cases. These
-   * are returned by a single property because they are computed together.
-   */
-  get statusLabels() {
-    let s = DownloadsCommon.strings;
-
-    let status = "";
-    let hoverStatus = "";
-    let fullStatus = "";
-
-    if (!this.download.stopped) {
-      let totalBytes = this.download.hasProgress ? this.download.totalBytes
-                                                 : -1;
-      let newEstimatedSecondsLeft;
-      [status, newEstimatedSecondsLeft] = DownloadUtils.getDownloadStatus(
-                                          this.download.currentBytes,
-                                          totalBytes,
-                                          this.download.speed,
-                                          this.lastEstimatedSecondsLeft);
-      this.lastEstimatedSecondsLeft = newEstimatedSecondsLeft;
-      hoverStatus = status;
-    } else if (this.download.canceled && this.download.hasPartialData) {
-      let totalBytes = this.download.hasProgress ? this.download.totalBytes
-                                                 : -1;
-      let transfer = DownloadUtils.getTransferTotal(this.download.currentBytes,
-                                                    totalBytes);
-
-      // We use the same XUL label to display both the state and the amount
-      // transferred, for example "Paused -  1.1 MB".
-      status = s.statusSeparatorBeforeNumber(s.statePaused, transfer);
-      hoverStatus = status;
-    } else if (!this.download.succeeded && !this.download.canceled &&
-               !this.download.error) {
-      status = s.stateStarting;
-      hoverStatus = status;
-    } else {
-      let stateLabel;
-
-      if (this.download.succeeded && !this.download.target.exists) {
-        stateLabel = s.fileMovedOrMissing;
-        hoverStatus = stateLabel;
-      } else if (this.download.succeeded) {
-        // For completed downloads, show the file size
-        let sizeStrings = this.sizeStrings;
-        stateLabel = sizeStrings.stateLabel;
-        status = sizeStrings.status;
-        hoverStatus = this.string("download-open-file-description");
-      } else if (this.download.canceled) {
-        stateLabel = s.stateCanceled;
-      } else if (this.download.error.becauseBlockedByParentalControls) {
-        stateLabel = s.stateBlockedParentalControls;
-      } else if (this.download.error.becauseBlockedByReputationCheck) {
-        stateLabel = this.rawBlockedTitleAndDetails[0];
-        if (this.download.hasBlockedData) {
-          hoverStatus = this.string(
-            "download-show-more-information-description");
-        }
-      } else {
-        stateLabel = s.stateFailed;
-      }
-
-      let referrer = this.download.source.referrer || this.download.source.url;
-      let [displayHost /* ,fullHost */] = DownloadUtils.getURIHost(referrer);
-
-      let date = new Date(this.download.endTime);
-      let [displayDate /* ,fullDate */] = DownloadUtils.getReadableDates(date);
-
-      let firstPart = s.statusSeparator(stateLabel, displayHost);
-      fullStatus = s.statusSeparator(firstPart, displayDate);
-      status = status || stateLabel;
-    }
-
-    return {
-      status,
-      hoverStatus: hoverStatus || fullStatus,
-      fullStatus: fullStatus || status,
-    };
   },
 
   /**
    * Returns [title, [details1, details2]] for blocked downloads.
    */
   get rawBlockedTitleAndDetails() {
     let s = DownloadsCommon.strings;
     if (!this.download.error ||
@@ -612,23 +635,11 @@ this.DownloadsViewUI.DownloadElementShel
   downloadsCmd_delete() {
     // Alias for the 'cmd_delete' command, because it may clash with another
     // controller which causes unexpected behavior as different codepaths claim
     // ownership.
     this.cmd_delete();
   },
 
   cmd_delete() {
-    (async () => {
-      // Remove the associated history element first, if any, so that the views
-      // that combine history and session downloads won't resurrect the history
-      // download into the view just before it is deleted permanently.
-      try {
-        await PlacesUtils.history.remove(this.download.source.url);
-      } catch (ex) {
-        Cu.reportError(ex);
-      }
-      let list = await Downloads.getList(Downloads.ALL);
-      await list.remove(this.download);
-      await this.download.finalize(true);
-    })().catch(Cu.reportError);
+    DownloadsCommon.deleteDownload(this.download).catch(Cu.reportError);
   },
 };
--- a/browser/components/downloads/content/allDownloadsView.js
+++ b/browser/components/downloads/content/allDownloadsView.js
@@ -92,24 +92,19 @@ HistoryDownloadElementShell.prototype = 
     if (!this.active) {
       return;
     }
 
     let newState = DownloadsCommon.stateOfDownload(this.download);
     if (this._downloadState !== newState) {
       this._downloadState = newState;
       this.onStateChanged();
+    } else {
+      this._updateStateInner();
     }
-
-    // This cannot be placed within onStateChanged because
-    // when a download goes from hasBlockedData to !hasBlockedData
-    // it will still remain in the same state.
-    this.element.classList.toggle("temporary-block",
-                                  !!this.download.hasBlockedData);
-    this._updateProgress();
   },
   _downloadState: null,
 
   isCommandEnabled(aCommand) {
     // The only valid command for inactive elements is cmd_delete.
     if (!this.active && aCommand != "cmd_delete") {
       return false;
     }
@@ -132,17 +127,18 @@ HistoryDownloadElementShell.prototype = 
   // Returns whether or not the download handled by this shell should
   // show up in the search results for the given term.  Both the display
   // name for the download and the url are searched.
   matchesSearchTerm(aTerm) {
     if (!aTerm) {
       return true;
     }
     aTerm = aTerm.toLowerCase();
-    return this.displayName.toLowerCase().includes(aTerm) ||
+    let displayName = DownloadsViewUI.getDisplayName(this.download);
+    return displayName.toLowerCase().includes(aTerm) ||
            this.download.source.url.toLowerCase().includes(aTerm);
   },
 
   // Handles return keypress on the element (the keypress listener is
   // set in the DownloadsPlacesView object).
   doDefaultCommand() {
     let command = this.currentDefaultCommandName;
     if (command && this.isCommandEnabled(command)) {
--- a/browser/components/downloads/content/download.xml
+++ b/browser/components/downloads/content/download.xml
@@ -41,17 +41,17 @@
                            xbl:inherits="value=displayName,tooltiptext=displayName"/>
           <xul:progressmeter anonid="progressmeter"
                              class="downloadProgress"
                              min="0"
                              max="100"
                              xbl:inherits="mode=progressmode,value=progress,paused=progresspaused"/>
           <xul:description class="downloadDetails downloadDetailsNormal"
                            crop="end"
-                           xbl:inherits="value=status,tooltiptext=fullStatus"/>
+                           xbl:inherits="value=status,tooltiptext=status"/>
           <xul:description class="downloadDetails downloadDetailsHover"
                            crop="end"
                            xbl:inherits="value=hoverStatus"/>
           <xul:description class="downloadDetails downloadDetailsButtonHover"
                            crop="end"
                            xbl:inherits="value=buttonHoverStatus"/>
         </xul:vbox>
       </xul:hbox>
@@ -63,17 +63,17 @@
   </binding>
 
   <binding id="download-subview-toolbarbutton"
            extends="chrome://global/content/bindings/button.xml#button-base">
     <content>
       <xul:image class="toolbarbutton-icon" xbl:inherits="validate,src=image,label,consumeanchor"/>
       <xul:vbox class="toolbarbutton-text" flex="1">
         <xul:label crop="end" xbl:inherits="value=label,accesskey,crop,wrap"/>
-        <xul:label class="status-text status-full" crop="end" xbl:inherits="value=fullStatus"/>
+        <xul:label class="status-text status-full" crop="end" xbl:inherits="value=status"/>
         <xul:label class="status-text status-open" crop="end" xbl:inherits="value=openLabel"/>
         <xul:label class="status-text status-retry" crop="end" xbl:inherits="value=retryLabel"/>
         <xul:label class="status-text status-show" crop="end" xbl:inherits="value=showLabel"/>
       </xul:vbox>
       <xul:toolbarbutton anonid="button" class="action-button"/>
     </content>
   </binding>
 </bindings>
--- a/browser/components/downloads/content/downloads.js
+++ b/browser/components/downloads/content/downloads.js
@@ -931,18 +931,19 @@ DownloadsViewItem.prototype = {
    */
   _element: null,
 
   onChanged() {
     let newState = DownloadsCommon.stateOfDownload(this.download);
     if (this.downloadState != newState) {
       this.downloadState = newState;
       this._updateState();
+    } else {
+      this._updateStateInner();
     }
-    this._updateProgress();
   },
 
   isCommandEnabled(aCommand) {
     switch (aCommand) {
       case "downloadsCmd_open": {
         if (!this.download.succeeded) {
           return false;
         }
@@ -1025,19 +1026,17 @@ DownloadsViewItem.prototype = {
                                    ...this.rawBlockedTitleAndDetails);
   },
 
   downloadsCmd_openReferrer() {
     openURL(this.download.source.referrer);
   },
 
   downloadsCmd_copyLocation() {
-    let clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"]
-                    .getService(Ci.nsIClipboardHelper);
-    clipboard.copyString(this.download.source.url);
+    DownloadsCommon.copyDownloadLink(this.download);
   },
 
   downloadsCmd_doDefault() {
     let defaultCommand = this.currentDefaultCommandName;
     if (defaultCommand && this.isCommandEnabled(defaultCommand)) {
       this.doCommand(defaultCommand);
     }
   },
--- a/browser/components/newtab/lib/DownloadsManager.jsm
+++ b/browser/components/newtab/lib/DownloadsManager.jsm
@@ -1,123 +1,103 @@
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 XPCOMUtils.defineLazyGlobalGetters(this, ["URL"]);
 
 const {actionTypes: at} = ChromeUtils.import("resource://activity-stream/common/Actions.jsm", {});
 
-ChromeUtils.defineModuleGetter(this, "DownloadsViewUI",
-  "resource:///modules/DownloadsViewUI.jsm");
-ChromeUtils.defineModuleGetter(this, "DownloadsCommon",
-  "resource:///modules/DownloadsCommon.jsm");
+XPCOMUtils.defineLazyModuleGetters(this, {
+  DownloadsCommon: "resource:///modules/DownloadsCommon.jsm",
+  DownloadsViewUI: "resource:///modules/DownloadsViewUI.jsm",
+  FileUtils: "resource://gre/modules/FileUtils.jsm",
+});
 
 const DOWNLOAD_CHANGED_DELAY_TIME = 1000; // time in ms to delay timer for downloads changed events
 
-class DownloadElement extends DownloadsViewUI.DownloadElementShell {
-  constructor(download, browser) {
-    super();
-    this._download = download;
-    this.element = browser;
-    this.element._shell = this;
-  }
-
-  get download() {
-    return this._download;
-  }
-
-  downloadsCmd_copyLocation() {
-    let clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"].getService(Ci.nsIClipboardHelper);
-    clipboard.copyString(this.download.source.url);
-  }
-}
-
 this.DownloadsManager = class DownloadsManager {
   constructor(store) {
     this._downloadData = null;
     this._store = null;
-    this._viewableDownloadItems = new Map();
+    this._downloadItems = new Map();
     this._downloadTimer = null;
   }
 
   setTimeout(callback, delay) {
     let timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
     timer.initWithCallback(callback, delay, Ci.nsITimer.TYPE_ONE_SHOT);
     return timer;
   }
 
-  formatDownload(element) {
-    const downloadedItem = element.download;
-    const description = element.sizeStrings.stateLabel;
+  formatDownload(download) {
     return {
-      hostname: new URL(downloadedItem.source.url).hostname,
-      url: downloadedItem.source.url,
-      path: downloadedItem.target.path,
-      title: element.displayName,
-      description,
-      referrer: downloadedItem.source.referrer,
-      date_added: downloadedItem.endTime,
+      hostname: new URL(download.source.url).hostname,
+      url: download.source.url,
+      path: download.target.path,
+      title: DownloadsViewUI.getDisplayName(download),
+      description: DownloadsViewUI.getSizeWithUnits(download) ||
+                   DownloadsCommon.strings.sizeUnknown,
+      referrer: download.source.referrer,
+      date_added: download.endTime,
     };
   }
 
   init(store) {
     this._store = store;
     this._browser = Services.appShell.hiddenDOMWindow;
     this._downloadData = DownloadsCommon.getData(this._browser.ownerGlobal, true, false, true);
     this._downloadData.addView(this);
   }
 
   onDownloadAdded(download) {
-    const elem = new DownloadElement(download, this._browser);
-    const downloadedItem = elem.download;
-    if (!this._viewableDownloadItems.has(downloadedItem.source.url)) {
-      this._viewableDownloadItems.set(downloadedItem.source.url, elem);
+    if (!this._downloadItems.has(download.source.url)) {
+      this._downloadItems.set(download.source.url, download);
 
       // On startup, all existing downloads fire this notification, so debounce them
       if (this._downloadTimer) {
         this._downloadTimer.delay = DOWNLOAD_CHANGED_DELAY_TIME;
       } else {
         this._downloadTimer = this.setTimeout(() => {
           this._downloadTimer = null;
           this._store.dispatch({type: at.DOWNLOAD_CHANGED});
         }, DOWNLOAD_CHANGED_DELAY_TIME);
       }
     }
   }
 
   onDownloadRemoved(download) {
-    if (this._viewableDownloadItems.has(download.source.url)) {
-      this._viewableDownloadItems.delete(download.source.url);
+    if (this._downloadItems.has(download.source.url)) {
+      this._downloadItems.delete(download.source.url);
       this._store.dispatch({type: at.DOWNLOAD_CHANGED});
     }
   }
 
-  async getDownloads(threshold, {numItems = this._viewableDownloadItems.size, onlySucceeded = false, onlyExists = false}) {
+  async getDownloads(threshold, {numItems = this._downloadItems.size, onlySucceeded = false, onlyExists = false}) {
     if (!threshold) {
       return [];
     }
     let results = [];
 
     // Only get downloads within the time threshold specified and sort by recency
     const downloadThreshold = Date.now() - threshold;
-    let downloads = [...this._viewableDownloadItems.values()]
-                      .filter(elem => elem.download.endTime > downloadThreshold)
-                      .sort((elem1, elem2) => elem1.download.endTime < elem2.download.endTime);
+    let downloads = [...this._downloadItems.values()]
+                      .filter(download => download.endTime > downloadThreshold)
+                      .sort((download1, download2) => download1.endTime < download2.endTime);
 
-    for (const elem of downloads) {
+    for (const download of downloads) {
       // Only include downloads where the file still exists
       if (onlyExists) {
         // Refresh download to ensure the 'exists' attribute is up to date
-        await elem.download.refresh();
-        if (!elem.download.target.exists) { continue; }
+        await download.refresh();
+        if (!download.target.exists) { continue; }
       }
       // Only include downloads that were completed successfully
       if (onlySucceeded) {
-        if (!elem.download.succeeded) { continue; }
+        if (!download.succeeded) { continue; }
       }
-      const formattedDownloadForHighlights = this.formatDownload(elem);
+      const formattedDownloadForHighlights = this.formatDownload(download);
       results.push(formattedDownloadForHighlights);
       if (results.length === numItems) {
         break;
       }
     }
     return results;
   }
 
@@ -128,36 +108,46 @@ this.DownloadsManager = class DownloadsM
     }
     if (this._downloadTimer) {
       this._downloadTimer.cancel();
       this._downloadTimer = null;
     }
   }
 
   onAction(action) {
-    let downloadsCmd;
+    let doDownloadAction = callback => {
+      let download = this._downloadItems.get(action.data.url);
+      if (download) {
+        callback(download);
+      }
+    };
+
     switch (action.type) {
       case at.COPY_DOWNLOAD_LINK:
-        downloadsCmd = "downloadsCmd_copyLocation";
+        doDownloadAction(download => {
+          DownloadsCommon.copyDownloadLink(download);
+        });
         break;
       case at.REMOVE_DOWNLOAD_FILE:
-        downloadsCmd = "downloadsCmd_delete";
+        doDownloadAction(download => {
+          DownloadsCommon.deleteDownload(download).catch(Cu.reportError);
+        });
         break;
       case at.SHOW_DOWNLOAD_FILE:
-        downloadsCmd = "downloadsCmd_show";
+        doDownloadAction(download => {
+          DownloadsCommon.showDownloadedFile(
+            new FileUtils.File(download.target.path));
+        });
         break;
       case at.OPEN_DOWNLOAD_FILE:
-        downloadsCmd = "downloadsCmd_open";
+        doDownloadAction(download => {
+          DownloadsCommon.openDownloadedFile(
+            new FileUtils.File(download.target.path), null,
+            this._browser.ownerGlobal);
+        });
         break;
       case at.UNINIT:
         this.uninit();
         break;
     }
-    // Call the appropriate downloads command function based on the event we received
-    if (downloadsCmd) {
-      let elem = this._viewableDownloadItems.get(action.data.url);
-      if (elem) {
-        elem[downloadsCmd]();
-      }
-    }
   }
 };
 this.EXPORTED_SYMBOLS = ["DownloadsManager"];
--- a/browser/components/newtab/test/unit/lib/DownloadsManager.test.js
+++ b/browser/components/newtab/test/unit/lib/DownloadsManager.test.js
@@ -1,122 +1,112 @@
 import {actionTypes as at} from "common/Actions.jsm";
 import {DownloadsManager} from "lib/DownloadsManager.jsm";
 import {GlobalOverrider} from "test/unit/utils";
 
 describe("Downloads Manager", () => {
   let downloadsManager;
   let globals;
-  let download;
-  let sandbox;
   const DOWNLOAD_URL = "https://site.com/download.mov";
 
   beforeEach(() => {
     globals = new GlobalOverrider();
-    sandbox = globals.sandbox;
-    global.Cc["@mozilla.org/widget/clipboardhelper;1"] = {
-      getService() {
-        return {copyString: sinon.stub()};
-      },
-    };
     global.Cc["@mozilla.org/timer;1"] = {
       createInstance() {
         return {
           initWithCallback: sinon.stub().callsFake(callback => callback()),
           cancel: sinon.spy(),
         };
       },
     };
 
     globals.set("DownloadsCommon", {
       getData: sinon.stub().returns({
         addView: sinon.stub(),
         removeView: sinon.stub(),
       }),
+      copyDownloadLink: sinon.stub(),
+      deleteDownload: sinon.stub().returns(Promise.resolve()),
+      openDownloadedFile: sinon.stub(),
+      showDownloadedFile: sinon.stub(),
     });
-    sandbox.stub(global.DownloadsViewUI.DownloadElementShell.prototype, "downloadsCmd_open");
-    sandbox.stub(global.DownloadsViewUI.DownloadElementShell.prototype, "downloadsCmd_show");
-    sandbox.stub(global.DownloadsViewUI.DownloadElementShell.prototype, "downloadsCmd_delete");
 
     downloadsManager = new DownloadsManager();
     downloadsManager.init({dispatch() {}});
     downloadsManager.onDownloadAdded({
       source: {url: DOWNLOAD_URL},
       endTime: Date.now(),
       target: {path: "/path/to/download.mov", exists: true},
       succeeded: true,
       refresh: async () => {},
     });
-    download = downloadsManager._viewableDownloadItems.get(DOWNLOAD_URL);
+    assert.ok(downloadsManager._downloadItems.has(DOWNLOAD_URL));
   });
   afterEach(() => {
-    downloadsManager._viewableDownloadItems.clear();
+    downloadsManager._downloadItems.clear();
     globals.restore();
   });
   describe("#init", () => {
     it("should add a DownloadsCommon view on init", () => {
       downloadsManager.init({dispatch() {}});
       assert.calledTwice(global.DownloadsCommon.getData().addView);
     });
   });
   describe("#onAction", () => {
     it("should copy the file on COPY_DOWNLOAD_LINK", () => {
-      sinon.spy(download, "downloadsCmd_copyLocation");
       downloadsManager.onAction({type: at.COPY_DOWNLOAD_LINK, data: {url: DOWNLOAD_URL}});
-      assert.calledOnce(download.downloadsCmd_copyLocation);
+      assert.calledOnce(global.DownloadsCommon.copyDownloadLink);
     });
     it("should remove the file on REMOVE_DOWNLOAD_FILE", () => {
       downloadsManager.onAction({type: at.REMOVE_DOWNLOAD_FILE, data: {url: DOWNLOAD_URL}});
-      assert.calledOnce(download.downloadsCmd_delete);
+      assert.calledOnce(global.DownloadsCommon.deleteDownload);
     });
     it("should show the file on SHOW_DOWNLOAD_FILE", () => {
       downloadsManager.onAction({type: at.SHOW_DOWNLOAD_FILE, data: {url: DOWNLOAD_URL}});
-      assert.calledOnce(download.downloadsCmd_show);
+      assert.calledOnce(global.DownloadsCommon.showDownloadedFile);
     });
     it("should open the file on OPEN_DOWNLOAD_FILE if the type is download", () => {
       downloadsManager.onAction({type: at.OPEN_DOWNLOAD_FILE, data: {url: DOWNLOAD_URL, type: "download"}});
-      assert.calledOnce(download.downloadsCmd_open);
+      assert.calledOnce(global.DownloadsCommon.openDownloadedFile);
     });
     it("should copy the file on UNINIT", () => {
       // DownloadsManager._downloadData needs to exist first
       downloadsManager.onAction({type: at.UNINIT});
       assert.calledOnce(global.DownloadsCommon.getData().removeView);
     });
     it("should not execute a download command if we do not have the correct url", () => {
       downloadsManager.onAction({type: at.SHOW_DOWNLOAD_FILE, data: {url: "unknown_url"}});
-      assert.notCalled(download.downloadsCmd_show);
+      assert.notCalled(global.DownloadsCommon.showDownloadedFile);
     });
   });
   describe("#onDownloadAdded", () => {
     let newDownload;
     beforeEach(() => {
-      downloadsManager._viewableDownloadItems.clear();
+      downloadsManager._downloadItems.clear();
       newDownload = {
         source: {url: "https://site.com/newDownload.mov"},
         endTime: Date.now(),
         target: {path: "/path/to/newDownload.mov", exists: true},
         succeeded: true,
         refresh: async () => {},
       };
     });
     afterEach(() => {
-      downloadsManager._viewableDownloadItems.clear();
+      downloadsManager._downloadItems.clear();
     });
     it("should add a download on onDownloadAdded", () => {
       downloadsManager.onDownloadAdded(newDownload);
-      const result = downloadsManager._viewableDownloadItems.get("https://site.com/newDownload.mov");
-      assert.ok(result);
-      assert.instanceOf(result, global.DownloadsViewUI.DownloadElementShell);
+      assert.ok(downloadsManager._downloadItems.has("https://site.com/newDownload.mov"));
     });
     it("should not add a download if it already exists", () => {
       downloadsManager.onDownloadAdded(newDownload);
       downloadsManager.onDownloadAdded(newDownload);
       downloadsManager.onDownloadAdded(newDownload);
       downloadsManager.onDownloadAdded(newDownload);
-      const results = downloadsManager._viewableDownloadItems;
+      const results = downloadsManager._downloadItems;
       assert.equal(results.size, 1);
     });
     it("should not return any downloads if no threshold is provided", async () => {
       downloadsManager.onDownloadAdded(newDownload);
       const results = await downloadsManager.getDownloads(null, {});
       assert.equal(results.length, 0);
     });
     it("should stop at numItems when it found one it's looking for", async () => {
@@ -270,17 +260,17 @@ describe("Downloads Manager", () => {
       const results = await downloadsManager.getDownloads(Infinity, {numItems: 5, onlySucceeded: true, onlyExists: true});
       assert.equal(results.length, 1);
       assert.equal(results[0].description, "1.5 MB"); // see unit-entry.js to see where this comes from
     });
   });
   describe("#onDownloadRemoved", () => {
     let newDownload;
     beforeEach(() => {
-      downloadsManager._viewableDownloadItems.clear();
+      downloadsManager._downloadItems.clear();
       newDownload = {
         source: {url: "https://site.com/removeMe.mov"},
         endTime: Date.now(),
         target: {path: "/path/to/removeMe.mov", exists: true},
         succeeded: true,
         refresh: async () => {},
       };
       downloadsManager.onDownloadAdded(newDownload);
--- a/browser/components/newtab/test/unit/unit-entry.js
+++ b/browser/components/newtab/test/unit/unit-entry.js
@@ -1,24 +1,15 @@
 import {EventEmitter, FakePerformance, FakePrefs, GlobalOverrider} from "test/unit/utils";
 import Adapter from "enzyme-adapter-react-16";
 import {chaiAssertions} from "test/schemas/pings";
 import chaiJsonSchema from "chai-json-schema";
 import enzyme from "enzyme";
 enzyme.configure({adapter: new Adapter()});
 
-class DownloadElementShell {
-  downloadsCmd_open() {}
-  downloadsCmd_show() {}
-  downloadsCmd_openReferrer() {}
-  downloadsCmd_delete() {}
-  get sizeStrings() { return {stateLabel: "1.5 MB"}; }
-  displayName() {}
-}
-
 // Cause React warnings to make tests that trigger them fail
 const origConsoleError = console.error; // eslint-disable-line no-console
 console.error = function(msg, ...args) { // eslint-disable-line no-console
   // eslint-disable-next-line no-console
   origConsoleError.apply(console, [msg, ...args]);
 
   if (/(Invalid prop|Failed prop type|Check the render method|React Intl)/.test(msg)) {
     throw new Error(msg);
@@ -99,17 +90,24 @@ const TEST_GLOBAL = {
     },
     get history() {
       return TEST_GLOBAL.Cc["@mozilla.org/browser/nav-history-service;1"];
     },
   },
   PluralForm: {get() {}},
   Preferences: FakePrefs,
   PrivateBrowsingUtils: {isWindowPrivate: () => false},
-  DownloadsViewUI: {DownloadElementShell},
+  DownloadsViewUI: {
+    getDisplayName: () => "filename.ext",
+    getSizeWithUnits: () => "1.5 MB",
+  },
+  FileUtils: {
+    // eslint-disable-next-line object-shorthand
+    File: function() {}, // NB: This is a function/constructor
+  },
   Services: {
     locale: {
       get appLocaleAsLangTag() { return "en-US"; },
       negotiateLanguages() {},
     },
     urlFormatter: {formatURL: str => str, formatURLPref: str => str},
     mm: {
       addMessageListener: (msg, cb) => cb(),
--- a/browser/confvars.sh
+++ b/browser/confvars.sh
@@ -3,23 +3,17 @@
 # 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/.
 
 MOZ_APP_BASENAME=Firefox
 MOZ_APP_VENDOR=Mozilla
 MOZ_UPDATER=1
 MOZ_PHOENIX=1
 
-if test "$OS_ARCH" = "WINNT" -o \
-        "$OS_ARCH" = "Linux"; then
-  MOZ_BUNDLED_FONTS=1
-fi
-
 if test "$OS_ARCH" = "WINNT"; then
-  MOZ_MAINTENANCE_SERVICE=1
   if ! test "$HAVE_64BIT_BUILD"; then
     if test "$MOZ_UPDATE_CHANNEL" = "nightly" -o \
             "$MOZ_UPDATE_CHANNEL" = "nightly-try" -o \
             "$MOZ_UPDATE_CHANNEL" = "aurora" -o \
             "$MOZ_UPDATE_CHANNEL" = "beta" -o \
             "$MOZ_UPDATE_CHANNEL" = "release"; then
       if ! test "$MOZ_DEBUG"; then
         if ! test "$USE_STUB_INSTALLER"; then
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -165,70 +165,61 @@ def old_configure_options(*options):
     return depends(prepare_configure, extra_old_configure_args, all_options,
                    *options)
 
 
 @old_configure_options(
     '--cache-file',
     '--datadir',
     '--enable-accessibility',
-    '--enable-bundled-fonts',
     '--enable-content-sandbox',
     '--enable-cookies',
     '--enable-cpp-rtti',
     '--enable-crashreporter',
     '--enable-dbus',
     '--enable-debug-js-modules',
     '--enable-directshow',
     '--enable-dtrace',
     '--enable-dump-painting',
     '--enable-extensions',
-    '--enable-faststripe',
     '--enable-feeds',
-    '--enable-gamepad',
     '--enable-gconf',
-    '--enable-hardware-aec-ns',
     '--enable-icf',
     '--enable-install-strip',
     '--enable-ios-target',
     '--enable-libjpeg-turbo',
     '--enable-libproxy',
     '--enable-llvm-hacks',
     '--enable-logrefcnt',
-    '--enable-maintenance-service',
     '--enable-memory-sanitizer',
     '--enable-mobile-optimize',
     '--enable-necko-wifi',
     '--enable-negotiateauth',
     '--enable-nfc',
     '--enable-nspr-build',
     '--enable-official-branding',
     '--enable-parental-controls',
     '--enable-posix-nspr-emulation',
     '--enable-pref-extensions',
-    '--enable-raw',
     '--enable-readline',
-    '--enable-reflow-perf',
     '--enable-sandbox',
     '--enable-signmar',
     '--enable-startup-notification',
     '--enable-startupcache',
     '--enable-strip',
     '--enable-synth-pico',
     '--enable-system-cairo',
     '--enable-system-extension-dirs',
     '--enable-system-pixman',
     '--enable-system-sqlite',
-    '--enable-tasktracer',
     '--enable-thread-sanitizer',
     '--enable-signed-overflow-sanitizer',
     '--enable-universalchardet',
     '--enable-unsigned-overflow-sanitizer',
     '--enable-updater',
-    '--enable-verify-mar',
     '--enable-xul',
     '--enable-zipwriter',
     '--includedir',
     '--libdir',
     '--no-create',
     '--prefix',
     '--with-android-distribution-directory',
     '--with-android-max-sdk',
--- a/devtools/client/debugger/test/mochitest/browser.ini
+++ b/devtools/client/debugger/test/mochitest/browser.ini
@@ -127,18 +127,16 @@ tags = addons
 [browser_dbg_addon-modules-unpacked.js]
 skip-if = e10s # TODO
 tags = addons
 [browser_dbg_addon-console.js]
 skip-if = e10s && debug || os == 'win' || verify # bug 1005274
 tags = addons
 [browser_dbg_bfcache.js]
 skip-if = e10s || true # bug 1113935
-[browser_dbg_breadcrumbs-access.js]
-uses-unsafe-cpows = true
 [browser_dbg_break-in-anon.js]
 uses-unsafe-cpows = true
 [browser_dbg_break-on-next.js]
 skip-if = true # Bug 1437712
 [browser_dbg_break-on-next-console.js]
 uses-unsafe-cpows = true
 [browser_dbg_break-on-dom-01.js]
 skip-if = true # bug 1368908
@@ -186,19 +184,16 @@ skip-if = e10s && debug
 uses-unsafe-cpows = true
 skip-if = e10s && debug
 [browser_dbg_breakpoints-new-script.js]
 uses-unsafe-cpows = true
 skip-if = e10s && debug
 [browser_dbg_breakpoints-other-tabs.js]
 uses-unsafe-cpows = true
 skip-if = e10s && debug
-[browser_dbg_breakpoints-pane.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
 [browser_dbg_breakpoints-reload.js]
 uses-unsafe-cpows = true
 skip-if = e10s && debug
 [browser_dbg_bug-896139.js]
 uses-unsafe-cpows = true
 skip-if = e10s && debug
 [browser_dbg_chrome-create.js]
 skip-if = (e10s && debug) || (verify && os == "linux") # Exit code mismatch with verify
@@ -250,55 +245,40 @@ skip-if = e10s && debug
 [browser_dbg_controller-evaluate-01.js]
 uses-unsafe-cpows = true
 skip-if = e10s && debug
 [browser_dbg_controller-evaluate-02.js]
 uses-unsafe-cpows = true
 skip-if = e10s && debug
 [browser_dbg_debugger-statement.js]
 skip-if = e10s && debug
-[browser_dbg_editor-contextmenu.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_editor-mode.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
 [browser_dbg_event-listeners-01.js]
 uses-unsafe-cpows = true
 skip-if = e10s && debug
 [browser_dbg_event-listeners-02.js]
 uses-unsafe-cpows = true
 skip-if = e10s && debug
 [browser_dbg_event-listeners-03.js]
 skip-if = e10s && debug
 [browser_dbg_file-reload.js]
 uses-unsafe-cpows = true
 skip-if = e10s && debug
-[browser_dbg_function-display-name.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
 [browser_dbg_global-method-override.js]
 uses-unsafe-cpows = true
 skip-if = e10s && debug
 [browser_dbg_globalactor.js]
 skip-if = e10s
 [browser_dbg_host-layout.js]
 uses-unsafe-cpows = true
 skip-if = e10s && debug
 [browser_dbg_jump-to-function-definition.js]
 uses-unsafe-cpows = true
 skip-if = e10s && debug
 [browser_dbg_iframes.js]
 skip-if = e10s # TODO
-[browser_dbg_instruments-pane-collapse.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_instruments-pane-collapse_keyboard.js]
-uses-unsafe-cpows = true
-skip-if = (os == 'mac' && e10s && debug) # Full keyboard navigation on OSX only works if Full Keyboard Access setting is set to All Control
 [browser_dbg_interrupts.js]
 uses-unsafe-cpows = true
 skip-if = e10s && debug
 [browser_dbg_listaddons.js]
 skip-if = e10s && debug
 tags = addons
 [browser_dbg_listtabs-01.js]
 [browser_dbg_listtabs-02.js]
--- a/devtools/client/debugger/test/mochitest/browser2.ini
+++ b/devtools/client/debugger/test/mochitest/browser2.ini
@@ -122,28 +122,16 @@ support-files =
 uses-unsafe-cpows = true
 skip-if = e10s && debug
 [browser_dbg_on-pause-raise.js]
 uses-unsafe-cpows = true
 skip-if = e10s && debug || os == "linux" # Bug 888811 & bug 891176
 [browser_dbg_optimized-out-vars.js]
 uses-unsafe-cpows = true
 skip-if = e10s && debug
-[browser_dbg_panel-size.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_pause-exceptions-01.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_pause-exceptions-02.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_pause-no-step.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
 [browser_dbg_pause-resume.js]
 uses-unsafe-cpows = true
 skip-if = e10s && debug
 [browser_dbg_pause-warning.js]
 uses-unsafe-cpows = true
 skip-if = e10s && debug
 [browser_dbg_paused-keybindings.js]
 skip-if = e10s
@@ -159,154 +147,39 @@ skip-if = e10s && debug
 uses-unsafe-cpows = true
 skip-if = true # Bug 1177730
 [browser_dbg_promises-fulfillment-stack.js]
 uses-unsafe-cpows = true
 skip-if = e10s && debug
 [browser_dbg_promises-rejection-stack.js]
 uses-unsafe-cpows = true
 skip-if = e10s && debug
-[browser_dbg_reload-preferred-script-02.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_reload-preferred-script-03.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
 [browser_dbg_reload-same-script.js]
 uses-unsafe-cpows = true
 skip-if = e10s && debug
-[browser_dbg_search-autofill-identifier.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_search-basic-01.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_search-basic-02.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_search-basic-03.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_search-basic-04.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_search-global-01.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_search-global-02.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_search-global-03.js]
-skip-if = e10s # Bug 1093535
-[browser_dbg_search-global-04.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_search-global-05.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_search-global-06.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_search-popup-jank.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_search-sources-01.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_search-sources-02.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_search-sources-03.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_search-symbols.js]
-uses-unsafe-cpows = true
-skip-if = (e10s && debug) || os == "linux" || (os == "win" && !debug) # Bug 1132375 # Bug 1465683
-[browser_dbg_searchbox-help-popup-01.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_searchbox-help-popup-02.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_searchbox-parse.js]
-uses-unsafe-cpows = true
-skip-if = (debug) || (os == 'linux' && asan) # asan, bug 1313861, debug: bug 1313861
-[browser_dbg_source-maps-01.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_source-maps-02.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_source-maps-03.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_source-maps-04.js]
-skip-if = e10s # Bug 1093535
 [browser_dbg_sources-cache.js]
 uses-unsafe-cpows = true
-[browser_dbg_sources-contextmenu-01.js]
-uses-unsafe-cpows = true
-subsuite = clipboard
-skip-if = (os == 'linux' && bits == 32 && debug) # bug 1328915, disable linux32 debug devtools for timeouts
-[browser_dbg_sources-contextmenu-02.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_sources-eval-01.js]
-skip-if = true # non-named eval sources turned off for now, bug 1124106
-[browser_dbg_sources-eval-02.js]
-uses-unsafe-cpows = true
 [browser_dbg_sources-iframe-reload.js]
 uses-unsafe-cpows = true
 skip-if = (os == "linux" && debug && bits == 64) #Bug 1455225, disable on Linux x64 debug for frequent failures
-[browser_dbg_sources-keybindings.js]
-uses-unsafe-cpows = true
-subsuite = clipboard
-skip-if = (e10s && debug) || (os == 'linux' && bits == 32 && debug) # bug 1328915, disable linux32 debug devtools for timeouts
 [browser_dbg_sources-labels.js]
 uses-unsafe-cpows = true
 skip-if = e10s && debug
 [browser_dbg_sources-large.js]
 uses-unsafe-cpows = true
 [browser_dbg_sources-sorting.js]
 uses-unsafe-cpows = true
 skip-if = e10s && debug
 [browser_dbg_sources-bookmarklet.js]
 uses-unsafe-cpows = true
 skip-if = e10s && debug
 [browser_dbg_sources-webext-contentscript.js]
 uses-unsafe-cpows = true
 [browser_dbg_split-console-paused-reload.js]
 skip-if = true # Bug 1288348 - previously e10s && debug
-[browser_dbg_stack-01.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_stack-02.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_stack-03.js]
-skip-if = e10s || (!e10s && os == "win") || coverage # TODO, win !e10s: Bug 1391369, coverage: Bug 1400683
-[browser_dbg_stack-04.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug || (!e10s && os == "win") # Bug 1391369
-[browser_dbg_stack-05.js]
-uses-unsafe-cpows = true
-skip-if = e10s && (debug || asan) || (!e10s && os == "win") # timeouts, Bug 1391369
-[browser_dbg_stack-06.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug || (!e10s && os == "win") # Bug 1391369
-[browser_dbg_stack-07.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug || (!e10s && os == "win") # Bug 1391369
-[browser_dbg_stack-contextmenu-01.js]
-uses-unsafe-cpows = true
-skip-if = e10s && debug
-[browser_dbg_stack-contextmenu-02.js]
-uses-unsafe-cpows = true
-subsuite = clipboard
-skip-if = (e10s && debug) || (os == 'linux' && bits == 32 && debug) # bug 1328915, disable linux32 debug devtools for timeouts
 [browser_dbg_step-out.js]
 uses-unsafe-cpows = true
 skip-if = e10s && debug
 [browser_dbg_target-scoped-actor-01.js]
 [browser_dbg_target-scoped-actor-02.js]
 [browser_dbg_terminate-on-tab-close.js]
 uses-unsafe-cpows = true
 skip-if = e10s && debug
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_breadcrumbs-access.js
+++ /dev/null
@@ -1,98 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests if the stackframe breadcrumbs are keyboard accessible.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
-
-function test() {
-  let gTab, gPanel, gDebugger;
-  let gSources, gFrames;
-
-  let options = {
-    source: EXAMPLE_URL + "code_script-switching-01.js",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gSources = gDebugger.DebuggerView.Sources;
-    gFrames = gDebugger.DebuggerView.StackFrames;
-
-    waitForSourceAndCaretAndScopes(gPanel, "-02.js", 6)
-      .then(checkNavigationWhileNotFocused)
-      .then(focusCurrentStackFrame)
-      .then(checkNavigationWhileFocused)
-      .then(() => resumeDebuggerThenCloseAndFinish(gPanel))
-      .catch(aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-
-    callInTab(gTab, "firstCall");
-  });
-
-  function checkNavigationWhileNotFocused() {
-    checkState({ frame: 1, source: 1, line: 6 });
-
-    return Task.spawn(function* () {
-      EventUtils.sendKey("DOWN", gDebugger);
-      checkState({ frame: 1, source: 1, line: 7 });
-
-      EventUtils.sendKey("UP", gDebugger);
-      checkState({ frame: 1, source: 1, line: 6 });
-    });
-  }
-
-  function focusCurrentStackFrame() {
-    EventUtils.sendMouseEvent({ type: "mousedown" },
-      gFrames.selectedItem.target,
-      gDebugger);
-  }
-
-  function checkNavigationWhileFocused() {
-    return Task.spawn(function* () {
-      yield promise.all([
-        waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FETCHED_SCOPES),
-        waitForSourceAndCaret(gPanel, "-01.js", 5),
-        EventUtils.sendKey("UP", gDebugger)
-      ]);
-      checkState({ frame: 0, source: 0, line: 5 });
-
-      // Need to refocus the stack frame due to a focus bug in e10s
-      // (See Bug 1205482)
-      focusCurrentStackFrame();
-
-      yield promise.all([
-        waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FETCHED_SCOPES),
-        waitForSourceAndCaret(gPanel, "-02.js", 6),
-        EventUtils.sendKey("END", gDebugger)
-      ]);
-      checkState({ frame: 1, source: 1, line: 6 });
-
-      // Need to refocus the stack frame due to a focus bug in e10s
-      // (See Bug 1205482)
-      focusCurrentStackFrame();
-
-      yield promise.all([
-        waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FETCHED_SCOPES),
-        waitForSourceAndCaret(gPanel, "-01.js", 5),
-        EventUtils.sendKey("HOME", gDebugger)
-      ]);
-      checkState({ frame: 0, source: 0, line: 5 });
-    });
-  }
-
-  function checkState({ frame, source, line, column }) {
-    is(gFrames.selectedIndex, frame,
-      "The currently selected stackframe is incorrect.");
-    is(gSources.selectedIndex, source,
-      "The currently selected source is incorrect.");
-    ok(isCaretPos(gPanel, line, column),
-      "The source editor caret position was incorrect.");
-  }
-}
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_breakpoints-pane.js
+++ /dev/null
@@ -1,238 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Bug 723071: Test adding a pane to display the list of breakpoints across
- * all sources in the debuggee.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
-
-function test() {
-  let options = {
-    source: EXAMPLE_URL + "code_script-switching-01.js",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    const gTab = aTab;
-    const gPanel = aPanel;
-    const gDebugger = gPanel.panelWin;
-    const gEditor = gDebugger.DebuggerView.editor;
-    const gSources = gDebugger.DebuggerView.Sources;
-    const queries = gDebugger.require("./content/queries");
-    const actions = bindActionCreators(gPanel);
-    const getState = gDebugger.DebuggerController.getState;
-    const { getBreakpoint } = queries;
-
-    let breakpointsAdded = 0;
-    let breakpointsDisabled = 0;
-    let breakpointsRemoved = 0;
-    let breakpointsList;
-
-    const addBreakpoints = Task.async(function* (aIncrementFlag) {
-      const loc1 = { actor: gSources.selectedValue, line: 6 };
-      yield actions.addBreakpoint(loc1);
-      onBreakpointAdd(getBreakpoint(getState(), loc1), {
-        increment: aIncrementFlag,
-        line: 6,
-        text: "debugger;"
-      });
-
-      const loc2 = { actor: gSources.selectedValue, line: 7 };
-      yield actions.addBreakpoint(loc2);
-      onBreakpointAdd(getBreakpoint(getState(), loc2), {
-        increment: aIncrementFlag,
-        line: 7,
-        text: "function foo() {}"
-      });
-
-      const loc3 = {actor: gSources.selectedValue, line: 9 };
-      yield actions.addBreakpoint(loc3);
-      onBreakpointAdd(getBreakpoint(getState(), loc3), {
-        increment: aIncrementFlag,
-        line: 9,
-        text: "foo();"
-      });
-    });
-
-    function disableBreakpoints() {
-      let deferred = promise.defer();
-
-      let nodes = breakpointsList.querySelectorAll(".dbg-breakpoint");
-      info("Nodes to disable: " + breakpointsAdded.length);
-
-      is(nodes.length, breakpointsAdded,
-         "The number of nodes to disable is incorrect.");
-
-      for (let node of nodes) {
-        info("Disabling breakpoint: " + node.id);
-
-        let sourceItem = gSources.getItemForElement(node);
-        let breakpointItem = gSources.getItemForElement.call(sourceItem, node);
-        info("Found data: " + breakpointItem.attachment.toSource());
-
-        actions.disableBreakpoint(breakpointItem.attachment).then(() => {
-          if (++breakpointsDisabled == breakpointsAdded) {
-            deferred.resolve();
-          }
-        });
-      }
-
-      return deferred.promise;
-    }
-
-    function removeBreakpoints() {
-      let deferred = promise.defer();
-
-      let nodes = breakpointsList.querySelectorAll(".dbg-breakpoint");
-      info("Nodes to remove: " + breakpointsAdded.length);
-
-      is(nodes.length, breakpointsAdded,
-         "The number of nodes to remove is incorrect.");
-
-      for (let node of nodes) {
-        info("Removing breakpoint: " + node.id);
-
-        let sourceItem = gSources.getItemForElement(node);
-        let breakpointItem = gSources.getItemForElement.call(sourceItem, node);
-        info("Found data: " + breakpointItem.attachment.toSource());
-
-        actions.removeBreakpoint(breakpointItem.attachment).then(() => {
-          if (++breakpointsRemoved == breakpointsAdded) {
-            deferred.resolve();
-          }
-        });
-      }
-
-      return deferred.promise;
-    }
-
-    function onBreakpointAdd(bp, testData) {
-      if (testData.increment) {
-        breakpointsAdded++;
-      }
-
-      is(breakpointsList.querySelectorAll(".dbg-breakpoint").length, breakpointsAdded,
-         testData.increment
-         ? "Should have added a breakpoint in the pane."
-         : "Should have the same number of breakpoints in the pane.");
-
-      let identifier = queries.makeLocationId(bp.location);
-      let node = gDebugger.document.getElementById("breakpoint-" + identifier);
-      let line = node.getElementsByClassName("dbg-breakpoint-line")[0];
-      let text = node.getElementsByClassName("dbg-breakpoint-text")[0];
-      let check = node.querySelector("checkbox");
-
-      ok(node,
-         "Breakpoint element found successfully.");
-      is(line.getAttribute("value"), testData.line,
-         "The expected information wasn't found in the breakpoint element.");
-      is(text.getAttribute("value"), testData.text,
-         "The expected line text wasn't found in the breakpoint element.");
-      is(check.getAttribute("checked"), "true",
-         "The breakpoint enable checkbox is checked as expected.");
-    }
-
-    Task.spawn(function* () {
-      yield waitForSourceAndCaretAndScopes(gPanel, "-02.js", 1);
-
-      is(gDebugger.gThreadClient.state, "paused",
-         "Should only be getting stack frames while paused.");
-      is(queries.getSourceCount(getState()), 2,
-         "Found the expected number of sources.");
-      is(gEditor.getText().indexOf("debugger"), 166,
-         "The correct source was loaded initially.");
-      is(gSources.selectedValue, gSources.values[1],
-         "The correct source is selected.");
-
-      is(queries.getBreakpoints(getState()).length, 0,
-         "No breakpoints currently added.");
-
-      let breakpointsParent = gSources.widget._parent;
-      breakpointsList = gSources.widget._list;
-
-      is(breakpointsParent.childNodes.length, 1, // one sources list
-         "Found junk in the breakpoints container.");
-      is(breakpointsList.childNodes.length, 1, // one sources group
-         "Found junk in the breakpoints container.");
-      is(breakpointsList.querySelectorAll(".dbg-breakpoint").length, 0,
-         "No breakpoints should be visible at this point.");
-
-      yield addBreakpoints(true);
-
-      is(breakpointsAdded, 3,
-        "Should have added 3 breakpoints so far.");
-      is(breakpointsDisabled, 0,
-        "Shouldn't have disabled anything so far.");
-      is(breakpointsRemoved, 0,
-        "Shouldn't have removed anything so far.");
-
-      is(breakpointsParent.childNodes.length, 1, // one sources list
-        "Found junk in the breakpoints container.");
-      is(breakpointsList.childNodes.length, 1, // one sources group
-        "Found junk in the breakpoints container.");
-      is(breakpointsList.querySelectorAll(".dbg-breakpoint").length, 3,
-         "3 breakpoints should be visible at this point.");
-
-      yield disableBreakpoints();
-
-      is(breakpointsAdded, 3,
-         "Should still have 3 breakpoints added so far.");
-      is(breakpointsDisabled, 3,
-         "Should have 3 disabled breakpoints.");
-      is(breakpointsRemoved, 0,
-         "Shouldn't have removed anything so far.");
-
-      is(breakpointsParent.childNodes.length, 1, // one sources list
-         "Found junk in the breakpoints container.");
-      is(breakpointsList.childNodes.length, 1, // one sources group
-         "Found junk in the breakpoints container.");
-      is(breakpointsList.querySelectorAll(".dbg-breakpoint").length, breakpointsAdded,
-         "Should have the same number of breakpoints in the pane.");
-      is(breakpointsList.querySelectorAll(".dbg-breakpoint").length, breakpointsDisabled,
-         "Should have the same number of disabled breakpoints.");
-
-      yield addBreakpoints();
-
-      is(breakpointsAdded, 3,
-         "Should still have only 3 breakpoints added so far.");
-      is(breakpointsDisabled, 3,
-         "Should still have 3 disabled breakpoints.");
-      is(breakpointsRemoved, 0,
-         "Shouldn't have removed anything so far.");
-
-      is(breakpointsParent.childNodes.length, 1, // one sources list
-         "Found junk in the breakpoints container.");
-      is(breakpointsList.childNodes.length, 1, // one sources group
-         "Found junk in the breakpoints container.");
-      is(breakpointsList.querySelectorAll(".dbg-breakpoint").length, breakpointsAdded,
-         "Since half of the breakpoints already existed, but disabled, " +
-         "only half of the added breakpoints are actually in the pane.");
-
-      yield removeBreakpoints();
-
-      is(breakpointsRemoved, 3,
-         "Should have 3 removed breakpoints.");
-
-      is(breakpointsParent.childNodes.length, 1, // one sources list
-         "Found junk in the breakpoints container.");
-      is(breakpointsList.childNodes.length, 1, // one sources group
-         "Found junk in the breakpoints container.");
-      is(breakpointsList.querySelectorAll(".dbg-breakpoint").length, 0,
-         "No breakpoints should be visible at this point.");
-
-      const cleared = waitForDebuggerEvents(gPanel, gDebugger.EVENTS.AFTER_FRAMES_CLEARED);
-      gDebugger.gThreadClient.resume();
-      yield cleared;
-
-      is(queries.getBreakpoints(getState()).length, 0,
-         "No breakpoints currently added.");
-
-      closeDebuggerAndFinish(gPanel);
-    });
-
-    callInTab(gTab, "firstCall");
-  });
-}
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_editor-contextmenu.js
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Bug 731394: Test the debugger source editor default context menu.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
-
-function test() {
-  let gTab, gPanel, gDebugger;
-  let gEditor, gSources, gContextMenu;
-
-  let options = {
-    source: EXAMPLE_URL + "code_script-switching-01.js",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gEditor = gDebugger.DebuggerView.editor;
-    gSources = gDebugger.DebuggerView.Sources;
-    gContextMenu = gDebugger.document.getElementById("sourceEditorContextMenu");
-
-    waitForSourceAndCaretAndScopes(gPanel, "-02.js", 1).then(performTest).catch(info);
-    callInTab(gTab, "firstCall");
-  });
-
-  function performTest() {
-    is(gDebugger.gThreadClient.state, "paused",
-      "Should only be getting stack frames while paused.");
-    is(gSources.itemCount, 2,
-      "Found the expected number of sources.");
-    is(gEditor.getText().indexOf("debugger"), 166,
-      "The correct source was loaded initially.");
-    is(gSources.selectedValue, gSources.values[1],
-      "The correct source is selected.");
-
-    is(gEditor.getText().indexOf("\u263a"), 162,
-      "Unicode characters are converted correctly.");
-
-    ok(gContextMenu,
-      "The source editor's context menupopup is available.");
-    ok(gEditor.getOption("readOnly"),
-      "The source editor is read only.");
-
-    gEditor.focus();
-    gEditor.setSelection({ line: 1, ch: 0 }, { line: 1, ch: 10 });
-
-    once(gContextMenu, "popupshown").then(testContextMenu).catch(info);
-    gContextMenu.openPopup(gEditor.container, "overlap", 0, 0, true, false);
-  }
-
-  function testContextMenu() {
-    let document = gDebugger.document;
-
-    ok(document.getElementById("editMenuCommands"),
-      "#editMenuCommands found.");
-    ok(!document.getElementById("editMenuKeys"),
-      "#editMenuKeys not found.");
-
-    gContextMenu.hidePopup();
-    resumeDebuggerThenCloseAndFinish(gPanel);
-  }
-}
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_editor-mode.js
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Make sure that updating the editor mode sets the right highlighting engine,
- * and source URIs with extra query parameters also get the right engine.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_editor-mode.html";
-
-var gTab, gPanel, gDebugger;
-var gEditor, gSources;
-
-function test() {
-  let options = {
-    source: EXAMPLE_URL + "code_script-switching-01.js?a=b",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gEditor = gDebugger.DebuggerView.editor;
-    gSources = gDebugger.DebuggerView.Sources;
-
-    waitForSourceAndCaretAndScopes(gPanel, "code_test-editor-mode", 1)
-      .then(testInitialSource)
-      .then(testSwitch1)
-      .then(testSwitch2)
-      .then(() => resumeDebuggerThenCloseAndFinish(gPanel))
-      .catch(aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-
-    callInTab(gTab, "firstCall");
-  });
-}
-
-function testInitialSource() {
-  is(gSources.itemCount, 3,
-    "Found the expected number of sources.");
-
-  is(gEditor.getMode().name, "text",
-    "Found the expected editor mode.");
-  is(gEditor.getText().search(/firstCall/), -1,
-    "The first source is not displayed.");
-  is(gEditor.getText().search(/debugger/), 135,
-    "The second source is displayed.");
-  is(gEditor.getText().search(/banana/), -1,
-    "The third source is not displayed.");
-
-  let finished = waitForDebuggerEvents(gPanel, gDebugger.EVENTS.SOURCE_SHOWN);
-  gSources.selectedItem = e => e.attachment.label == "code_script-switching-01.js";
-  return finished;
-}
-
-function testSwitch1() {
-  is(gSources.itemCount, 3,
-    "Found the expected number of sources.");
-
-  is(gEditor.getMode().name, "javascript",
-    "Found the expected editor mode.");
-  is(gEditor.getText().search(/firstCall/), 118,
-    "The first source is displayed.");
-  is(gEditor.getText().search(/debugger/), -1,
-    "The second source is not displayed.");
-  is(gEditor.getText().search(/banana/), -1,
-    "The third source is not displayed.");
-
-  let finished = waitForDebuggerEvents(gPanel, gDebugger.EVENTS.SOURCE_SHOWN);
-  gSources.selectedItem = e => e.attachment.label == "doc_editor-mode.html";
-  return finished;
-}
-
-function testSwitch2() {
-  is(gSources.itemCount, 3,
-    "Found the expected number of sources.");
-
-  is(gEditor.getMode().name, "htmlmixed",
-    "Found the expected editor mode.");
-  is(gEditor.getText().search(/firstCall/), -1,
-    "The first source is not displayed.");
-  is(gEditor.getText().search(/debugger/), -1,
-    "The second source is not displayed.");
-  is(gEditor.getText().search(/banana/), 443,
-    "The third source is displayed.");
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gEditor = null;
-  gSources = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_function-display-name.js
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests that anonymous functions appear in the stack frame list with either
- * their displayName property or a SpiderMonkey-inferred name.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_function-display-name.html";
-
-var gTab, gPanel, gDebugger;
-
-function test() {
-  let options = {
-    source: TAB_URL,
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-
-    testAnonCall();
-  });
-}
-
-function testAnonCall() {
-  let onCaretUpdated = waitForCaretUpdated(gPanel, 15);
-  let onScopes = waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FETCHED_SCOPES);
-  callInTab(gTab, "evalCall");
-  promise.all([onCaretUpdated, onScopes]).then(() => {
-    ok(isCaretPos(gPanel, 15),
-      "The source editor caret position was incorrect.");
-    is(gDebugger.gThreadClient.state, "paused",
-      "Should only be getting stack frames while paused.");
-    is(gDebugger.document.querySelectorAll(".dbg-stackframe").length, 3,
-      "Should have three frames.");
-    is(gDebugger.document.querySelector("#stackframe-0 .dbg-stackframe-title").getAttribute("value"),
-      "anonFunc", "Frame name should be 'anonFunc'.");
-
-    testInferredName();
-  });
-}
-
-function testInferredName() {
-  waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FETCHED_SCOPES).then(() => {
-    ok(isCaretPos(gPanel, 15),
-      "The source editor caret position was incorrect.");
-    is(gDebugger.gThreadClient.state, "paused",
-      "Should only be getting stack frames while paused.");
-    is(gDebugger.document.querySelectorAll(".dbg-stackframe").length, 3,
-      "Should have three frames.");
-    is(gDebugger.document.querySelector("#stackframe-0 .dbg-stackframe-title").getAttribute("value"),
-      "a/<", "Frame name should be 'a/<'.");
-
-    resumeDebuggerThenCloseAndFinish(gPanel);
-  });
-
-  gDebugger.gThreadClient.resume();
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_instruments-pane-collapse.js
+++ /dev/null
@@ -1,167 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests that the debugger panes collapse properly.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_recursion-stack.html";
-
-var gTab, gPanel, gDebugger;
-var gPrefs, gOptions;
-
-function test() {
-  Task.spawn(function* () {
-    let options = {
-      source: TAB_URL,
-      line: 1
-    };
-
-    let [aTab,, aPanel] = yield initDebugger(TAB_URL, options);
-
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gPrefs = gDebugger.Prefs;
-    gOptions = gDebugger.DebuggerView.Options;
-
-    testPanesState();
-
-    gDebugger.DebuggerView.toggleInstrumentsPane({ visible: true, animated: false });
-
-    yield testInstrumentsPaneCollapse();
-    testPanesStartupPref();
-
-    closeDebuggerAndFinish(gPanel);
-  });
-}
-
-function testPanesState() {
-  let instrumentsPane =
-    gDebugger.document.getElementById("instruments-pane");
-  let instrumentsPaneToggleButton =
-    gDebugger.document.getElementById("instruments-pane-toggle");
-
-  ok(instrumentsPane.classList.contains("pane-collapsed") &&
-     instrumentsPaneToggleButton.classList.contains("pane-collapsed"),
-    "The debugger view instruments pane should initially be hidden.");
-  is(gPrefs.panesVisibleOnStartup, false,
-    "The debugger view instruments pane should initially be preffed as hidden.");
-  isnot(gOptions._showPanesOnStartupItem.getAttribute("checked"), "true",
-    "The options menu item should not be checked.");
-}
-
-function* testInstrumentsPaneCollapse () {
-  let instrumentsPane =
-    gDebugger.document.getElementById("instruments-pane");
-  let instrumentsPaneToggleButton =
-    gDebugger.document.getElementById("instruments-pane-toggle");
-
-  let width = parseInt(instrumentsPane.getAttribute("width"));
-  is(width, gPrefs.instrumentsWidth,
-    "The instruments pane has an incorrect width.");
-  is(instrumentsPane.style.marginLeft, "0px",
-    "The instruments pane has an incorrect left margin.");
-  is(instrumentsPane.style.marginRight, "0px",
-    "The instruments pane has an incorrect right margin.");
-  ok(!instrumentsPane.hasAttribute("animated"),
-    "The instruments pane has an incorrect animated attribute.");
-  ok(!instrumentsPane.classList.contains("pane-collapsed") &&
-     !instrumentsPaneToggleButton.classList.contains("pane-collapsed"),
-    "The instruments pane should at this point be visible.");
-
-  // Trigger reflow to make sure the UI is in required state.
-  gDebugger.document.documentElement.getBoundingClientRect();
-
-  gDebugger.DebuggerView.toggleInstrumentsPane({ visible: false, animated: true });
-
-  yield once(instrumentsPane, "transitionend");
-
-  is(gPrefs.panesVisibleOnStartup, false,
-    "The debugger view panes should still initially be preffed as hidden.");
-  isnot(gOptions._showPanesOnStartupItem.getAttribute("checked"), "true",
-    "The options menu item should still not be checked.");
-
-  let margin = -(width + 1) + "px";
-  is(width, gPrefs.instrumentsWidth,
-    "The instruments pane has an incorrect width after collapsing.");
-  is(instrumentsPane.style.marginLeft, margin,
-    "The instruments pane has an incorrect left margin after collapsing.");
-  is(instrumentsPane.style.marginRight, margin,
-    "The instruments pane has an incorrect right margin after collapsing.");
-
-  ok(!instrumentsPane.hasAttribute("animated"),
-    "The instruments pane has an incorrect attribute after an animated collapsing.");
-  ok(instrumentsPane.classList.contains("pane-collapsed") &&
-     instrumentsPaneToggleButton.classList.contains("pane-collapsed"),
-    "The instruments pane should not be visible after collapsing.");
-
-  gDebugger.DebuggerView.toggleInstrumentsPane({ visible: true, animated: false });
-
-  is(gPrefs.panesVisibleOnStartup, false,
-    "The debugger view panes should still initially be preffed as hidden.");
-  isnot(gOptions._showPanesOnStartupItem.getAttribute("checked"), "true",
-    "The options menu item should still not be checked.");
-
-  is(width, gPrefs.instrumentsWidth,
-    "The instruments pane has an incorrect width after uncollapsing.");
-  is(instrumentsPane.style.marginLeft, "0px",
-    "The instruments pane has an incorrect left margin after uncollapsing.");
-  is(instrumentsPane.style.marginRight, "0px",
-    "The instruments pane has an incorrect right margin after uncollapsing.");
-  ok(!instrumentsPane.hasAttribute("animated"),
-    "The instruments pane has an incorrect attribute after an unanimated uncollapsing.");
-  ok(!instrumentsPane.classList.contains("pane-collapsed") &&
-     !instrumentsPaneToggleButton.classList.contains("pane-collapsed"),
-    "The instruments pane should be visible again after uncollapsing.");
-}
-
-function testPanesStartupPref() {
-  let instrumentsPane =
-    gDebugger.document.getElementById("instruments-pane");
-  let instrumentsPaneToggleButton =
-    gDebugger.document.getElementById("instruments-pane-toggle");
-
-  is(gPrefs.panesVisibleOnStartup, false,
-    "The debugger view panes should still initially be preffed as hidden.");
-
-  ok(!instrumentsPane.classList.contains("pane-collapsed") &&
-     !instrumentsPaneToggleButton.classList.contains("pane-collapsed"),
-    "The debugger instruments pane should at this point be visible.");
-  is(gPrefs.panesVisibleOnStartup, false,
-    "The debugger view panes should initially be preffed as hidden.");
-  isnot(gOptions._showPanesOnStartupItem.getAttribute("checked"), "true",
-    "The options menu item should still not be checked.");
-
-  gOptions._showPanesOnStartupItem.setAttribute("checked", "true");
-  gOptions._toggleShowPanesOnStartup();
-
-  ok(!instrumentsPane.classList.contains("pane-collapsed") &&
-     !instrumentsPaneToggleButton.classList.contains("pane-collapsed"),
-    "The debugger instruments pane should at this point be visible.");
-  is(gPrefs.panesVisibleOnStartup, true,
-    "The debugger view panes should now be preffed as visible.");
-  is(gOptions._showPanesOnStartupItem.getAttribute("checked"), "true",
-    "The options menu item should now be checked.");
-
-  gOptions._showPanesOnStartupItem.setAttribute("checked", "false");
-  gOptions._toggleShowPanesOnStartup();
-
-  ok(!instrumentsPane.classList.contains("pane-collapsed") &&
-     !instrumentsPaneToggleButton.classList.contains("pane-collapsed"),
-    "The debugger instruments pane should at this point be visible.");
-  is(gPrefs.panesVisibleOnStartup, false,
-    "The debugger view panes should now be preffed as hidden.");
-  isnot(gOptions._showPanesOnStartupItem.getAttribute("checked"), "true",
-    "The options menu item should now be unchecked.");
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gPrefs = null;
-  gOptions = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_instruments-pane-collapse_keyboard.js
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests that the debugger panes collapse properly.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_recursion-stack.html";
-
-async function test() {
-  let [aTab,, aPanel] = await initDebugger(TAB_URL);
-
-  let doc = aPanel.panelWin.document;
-  let panel = doc.getElementById("instruments-pane");
-  let button = doc.getElementById("instruments-pane-toggle");
-  ok(panel.classList.contains("pane-collapsed"),
-     "The instruments panel is initially in collapsed state");
-
-  await togglePane(button, "Press on the toggle button to expand", panel, "KEY_Enter");
-  ok(!panel.classList.contains("pane-collapsed"),
-     "The instruments panel is in the expanded state");
-
-  await togglePane(button, "Press on the toggle button to collapse", panel, " ");
-  ok(panel.classList.contains("pane-collapsed"),
-     "The instruments panel is in the collapsed state");
-
-  closeDebuggerAndFinish(aPanel);
-}
-
-async function togglePane(button, message, pane, key) {
-  let onTransitionEnd = once(pane, "transitionend");
-  info(message);
-  button.focus();
-  EventUtils.synthesizeKey(key);
-  await onTransitionEnd;
-
-  // Wait for the next event tick to make sure all transitionend event
-  // handlers finish.
-  await waitForTick();
-}
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_panel-size.js
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test that the sources and instruments panels widths are properly
- * remembered when the debugger closes.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_recursion-stack.html";
-
-function test() {
-  let gTab, gPanel, gDebugger;
-  let gPrefs, gSources, gInstruments;
-
-  let options = {
-    source: TAB_URL,
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gPrefs = gDebugger.Prefs;
-    gSources = gDebugger.document.getElementById("workers-and-sources-pane");
-    gInstruments = gDebugger.document.getElementById("instruments-pane");
-
-    performTest();
-  });
-
-  function performTest() {
-    let preferredWsw = Services.prefs.getIntPref("devtools.debugger.ui.panes-workers-and-sources-width");
-    let preferredIw = Services.prefs.getIntPref("devtools.debugger.ui.panes-instruments-width");
-    let someWidth1, someWidth2;
-
-    do {
-      someWidth1 = parseInt(Math.random() * 200) + 100;
-      someWidth2 = parseInt(Math.random() * 300) + 100;
-    } while ((someWidth1 == preferredWsw) || (someWidth2 == preferredIw));
-
-    info("Preferred sources width: " + preferredWsw);
-    info("Preferred instruments width: " + preferredIw);
-    info("Generated sources width: " + someWidth1);
-    info("Generated instruments width: " + someWidth2);
-
-    ok(gPrefs.workersAndSourcesWidth,
-      "The debugger preferences should have a saved workersAndSourcesWidth value.");
-    ok(gPrefs.instrumentsWidth,
-      "The debugger preferences should have a saved instrumentsWidth value.");
-
-    is(gPrefs.workersAndSourcesWidth, preferredWsw,
-      "The debugger preferences should have a correct workersAndSourcesWidth value.");
-    is(gPrefs.instrumentsWidth, preferredIw,
-      "The debugger preferences should have a correct instrumentsWidth value.");
-
-    is(gSources.getAttribute("width"), gPrefs.workersAndSourcesWidth,
-      "The workers and sources pane width should be the same as the preferred value.");
-    is(gInstruments.getAttribute("width"), gPrefs.instrumentsWidth,
-      "The instruments pane width should be the same as the preferred value.");
-
-    gSources.setAttribute("width", someWidth1);
-    gInstruments.setAttribute("width", someWidth2);
-
-    is(gPrefs.workersAndSourcesWidth, preferredWsw,
-      "The workers and sources pane width pref should still be the same as the preferred value.");
-    is(gPrefs.instrumentsWidth, preferredIw,
-      "The instruments pane width pref should still be the same as the preferred value.");
-
-    isnot(gSources.getAttribute("width"), gPrefs.workersAndSourcesWidth,
-      "The workers and sources pane width should not be the preferred value anymore.");
-    isnot(gInstruments.getAttribute("width"), gPrefs.instrumentsWidth,
-      "The instruments pane width should not be the preferred value anymore.");
-
-    teardown(gPanel).then(() => {
-      is(gPrefs.workersAndSourcesWidth, someWidth1,
-        "The workers and sources pane width should have been saved by now.");
-      is(gPrefs.instrumentsWidth, someWidth2,
-        "The instruments pane width should have been saved by now.");
-
-      // Cleanup after ourselves!
-      Services.prefs.setIntPref("devtools.debugger.ui.panes-workers-and-sources-width", preferredWsw);
-      Services.prefs.setIntPref("devtools.debugger.ui.panes-instruments-width", preferredIw);
-
-      finish();
-    });
-  }
-}
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_pause-exceptions-01.js
+++ /dev/null
@@ -1,246 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Make sure that pausing on exceptions works.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_pause-exceptions.html";
-
-var gTab, gPanel, gDebugger;
-var gFrames, gVariables, gPrefs, gOptions;
-
-function test() {
-  requestLongerTimeout(2);
-  let options = {
-    source: TAB_URL,
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gFrames = gDebugger.DebuggerView.StackFrames;
-    gVariables = gDebugger.DebuggerView.Variables;
-    gPrefs = gDebugger.Prefs;
-    gOptions = gDebugger.DebuggerView.Options;
-
-    is(gPrefs.pauseOnExceptions, false,
-      "The pause-on-exceptions pref should be disabled by default.");
-    isnot(gOptions._pauseOnExceptionsItem.getAttribute("checked"), "true",
-      "The pause-on-exceptions menu item should not be checked.");
-
-    testPauseOnExceptionsDisabled()
-      .then(enablePauseOnExceptions)
-      .then(disableIgnoreCaughtExceptions)
-      .then(testPauseOnExceptionsEnabled)
-      .then(disablePauseOnExceptions)
-      .then(enableIgnoreCaughtExceptions)
-      .then(() => closeDebuggerAndFinish(gPanel))
-      .catch(aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-  });
-}
-
-function testPauseOnExceptionsDisabled() {
-  let finished = waitForCaretAndScopes(gPanel, 26).then(() => {
-    info("Testing disabled pause-on-exceptions.");
-
-    is(gDebugger.gThreadClient.state, "paused",
-      "Should only be getting stack frames while paused (1).");
-    ok(isCaretPos(gPanel, 26),
-      "Should be paused on the debugger statement (1).");
-
-    let innerScope = gVariables.getScopeAtIndex(0);
-    let innerNodes = innerScope.target.querySelector(".variables-view-element-details").childNodes;
-
-    is(gFrames.itemCount, 1,
-      "Should have one frame.");
-    is(gVariables._store.length, 4,
-      "Should have four scopes.");
-
-    is(innerNodes[0].querySelector(".name").getAttribute("value"), "this",
-      "Should have the right property name for 'this'.");
-    is(innerNodes[0].querySelector(".value").getAttribute("value"), "<button>",
-      "Should have the right property value for 'this'.");
-
-    let finished = waitForDebuggerEvents(gPanel, gDebugger.EVENTS.AFTER_FRAMES_CLEARED).then(() => {
-      isnot(gDebugger.gThreadClient.state, "paused",
-        "Should not be paused after resuming.");
-      ok(isCaretPos(gPanel, 26),
-        "Should be idle on the debugger statement.");
-
-      ok(true, "Frames were cleared, debugger didn't pause again.");
-    });
-
-    EventUtils.sendMouseEvent({ type: "mousedown" },
-      gDebugger.document.getElementById("resume"),
-      gDebugger);
-
-    return finished;
-  });
-
-  generateMouseClickInTab(gTab, "content.document.querySelector('button')");
-
-  return finished;
-}
-
-function testPauseOnExceptionsEnabled() {
-  let finished = waitForCaretAndScopes(gPanel, 19).then(() => {
-    info("Testing enabled pause-on-exceptions.");
-
-    is(gDebugger.gThreadClient.state, "paused",
-      "Should only be getting stack frames while paused.");
-    ok(isCaretPos(gPanel, 19),
-      "Should be paused on the debugger statement.");
-
-    let innerScope = gVariables.getScopeAtIndex(0);
-    let innerNodes = innerScope.target.querySelector(".variables-view-element-details").childNodes;
-
-    is(gFrames.itemCount, 1,
-      "Should have one frame.");
-    is(gVariables._store.length, 4,
-      "Should have four scopes.");
-
-    is(innerNodes[0].querySelector(".name").getAttribute("value"), "<exception>",
-      "Should have the right property name for <exception>.");
-    is(innerNodes[0].querySelector(".value").getAttribute("value"), "Error",
-      "Should have the right property value for <exception>.");
-
-    let finished = waitForCaretAndScopes(gPanel, 26).then(() => {
-      info("Testing enabled pause-on-exceptions and resumed after pause.");
-
-      is(gDebugger.gThreadClient.state, "paused",
-        "Should only be getting stack frames while paused.");
-      ok(isCaretPos(gPanel, 26),
-        "Should be paused on the debugger statement.");
-
-      let innerScope = gVariables.getScopeAtIndex(0);
-      let innerNodes = innerScope.target.querySelector(".variables-view-element-details").childNodes;
-
-      is(gFrames.itemCount, 1,
-        "Should have one frame.");
-      is(gVariables._store.length, 4,
-        "Should have four scopes.");
-
-      is(innerNodes[0].querySelector(".name").getAttribute("value"), "this",
-        "Should have the right property name for 'this'.");
-      is(innerNodes[0].querySelector(".value").getAttribute("value"), "<button>",
-        "Should have the right property value for 'this'.");
-
-      let finished = waitForDebuggerEvents(gPanel, gDebugger.EVENTS.AFTER_FRAMES_CLEARED).then(() => {
-        isnot(gDebugger.gThreadClient.state, "paused",
-          "Should not be paused after resuming.");
-        ok(isCaretPos(gPanel, 26),
-          "Should be idle on the debugger statement.");
-
-        ok(true, "Frames were cleared, debugger didn't pause again.");
-      });
-
-      EventUtils.sendMouseEvent({ type: "mousedown" },
-        gDebugger.document.getElementById("resume"),
-        gDebugger);
-
-      return finished;
-    });
-
-    EventUtils.sendMouseEvent({ type: "mousedown" },
-      gDebugger.document.getElementById("resume"),
-      gDebugger);
-
-    return finished;
-  });
-
-  generateMouseClickInTab(gTab, "content.document.querySelector('button')");
-
-  return finished;
-}
-
-function enablePauseOnExceptions() {
-  let deferred = promise.defer();
-
-  gDebugger.gThreadClient.addOneTimeListener("resumed", () => {
-    is(gPrefs.pauseOnExceptions, true,
-      "The pause-on-exceptions pref should now be enabled.");
-    is(gOptions._pauseOnExceptionsItem.getAttribute("checked"), "true",
-      "The pause-on-exceptions menu item should now be checked.");
-
-    ok(true, "Pausing on exceptions was enabled.");
-    deferred.resolve();
-  });
-
-  gOptions._pauseOnExceptionsItem.setAttribute("checked", "true");
-  gOptions._togglePauseOnExceptions();
-
-  return deferred.promise;
-}
-
-function disablePauseOnExceptions() {
-  let deferred = promise.defer();
-
-  gDebugger.gThreadClient.addOneTimeListener("resumed", () => {
-    is(gPrefs.pauseOnExceptions, false,
-      "The pause-on-exceptions pref should now be disabled.");
-    isnot(gOptions._pauseOnExceptionsItem.getAttribute("checked"), "true",
-      "The pause-on-exceptions menu item should now be unchecked.");
-
-    ok(true, "Pausing on exceptions was disabled.");
-    deferred.resolve();
-  });
-
-  gOptions._pauseOnExceptionsItem.setAttribute("checked", "false");
-  gOptions._togglePauseOnExceptions();
-
-  return deferred.promise;
-}
-
-function enableIgnoreCaughtExceptions() {
-  let deferred = promise.defer();
-
-  gDebugger.gThreadClient.addOneTimeListener("resumed", () => {
-    is(gPrefs.ignoreCaughtExceptions, true,
-      "The ignore-caught-exceptions pref should now be enabled.");
-    is(gOptions._ignoreCaughtExceptionsItem.getAttribute("checked"), "true",
-      "The ignore-caught-exceptions menu item should now be checked.");
-
-    ok(true, "Ignore caught exceptions was enabled.");
-    deferred.resolve();
-  });
-
-  gOptions._ignoreCaughtExceptionsItem.setAttribute("checked", "true");
-  gOptions._toggleIgnoreCaughtExceptions();
-
-  return deferred.promise;
-}
-
-function disableIgnoreCaughtExceptions() {
-  let deferred = promise.defer();
-
-  gDebugger.gThreadClient.addOneTimeListener("resumed", () => {
-    is(gPrefs.ignoreCaughtExceptions, false,
-      "The ignore-caught-exceptions pref should now be disabled.");
-    isnot(gOptions._ignoreCaughtExceptionsItem.getAttribute("checked"), "true",
-      "The ignore-caught-exceptions menu item should now be unchecked.");
-
-    ok(true, "Ignore caught exceptions was disabled.");
-    deferred.resolve();
-  });
-
-  gOptions._ignoreCaughtExceptionsItem.setAttribute("checked", "false");
-  gOptions._toggleIgnoreCaughtExceptions();
-
-  return deferred.promise;
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gFrames = null;
-  gVariables = null;
-  gPrefs = null;
-  gOptions = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_pause-exceptions-02.js
+++ /dev/null
@@ -1,204 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Make sure that pausing on exceptions works after reload.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_pause-exceptions.html";
-
-var gTab, gPanel, gDebugger;
-var gFrames, gVariables, gPrefs, gOptions;
-
-function test() {
-  let options = {
-    source: TAB_URL,
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gFrames = gDebugger.DebuggerView.StackFrames;
-    gVariables = gDebugger.DebuggerView.Variables;
-    gPrefs = gDebugger.Prefs;
-    gOptions = gDebugger.DebuggerView.Options;
-
-    is(gPrefs.pauseOnExceptions, false,
-      "The pause-on-exceptions pref should be disabled by default.");
-    isnot(gOptions._pauseOnExceptionsItem.getAttribute("checked"), "true",
-      "The pause-on-exceptions menu item should not be checked.");
-
-    enablePauseOnExceptions()
-      .then(disableIgnoreCaughtExceptions)
-      .then(() => reloadActiveTab(gPanel, gDebugger.EVENTS.SOURCE_SHOWN))
-      .then(() => {
-        generateMouseClickInTab(gTab, "content.document.querySelector('button')");
-      })
-      .then(testPauseOnExceptionsAfterReload)
-      .then(disablePauseOnExceptions)
-      .then(enableIgnoreCaughtExceptions)
-      .then(() => closeDebuggerAndFinish(gPanel))
-      .catch(aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-  });
-}
-
-function testPauseOnExceptionsAfterReload() {
-  let finished = waitForCaretAndScopes(gPanel, 19).then(() => {
-    info("Testing enabled pause-on-exceptions.");
-
-    is(gDebugger.gThreadClient.state, "paused",
-      "Should only be getting stack frames while paused.");
-    ok(isCaretPos(gPanel, 19),
-      "Should be paused on the debugger statement.");
-
-    let innerScope = gVariables.getScopeAtIndex(0);
-    let innerNodes = innerScope.target.querySelector(".variables-view-element-details").childNodes;
-
-    is(gFrames.itemCount, 1,
-      "Should have one frame.");
-    is(gVariables._store.length, 4,
-      "Should have four scopes.");
-
-    is(innerNodes[0].querySelector(".name").getAttribute("value"), "<exception>",
-      "Should have the right property name for <exception>.");
-    is(innerNodes[0].querySelector(".value").getAttribute("value"), "Error",
-      "Should have the right property value for <exception>.");
-
-    let finished = waitForCaretAndScopes(gPanel, 26).then(() => {
-      info("Testing enabled pause-on-exceptions and resumed after pause.");
-
-      is(gDebugger.gThreadClient.state, "paused",
-        "Should only be getting stack frames while paused.");
-      ok(isCaretPos(gPanel, 26),
-        "Should be paused on the debugger statement.");
-
-      let innerScope = gVariables.getScopeAtIndex(0);
-      let innerNodes = innerScope.target.querySelector(".variables-view-element-details").childNodes;
-
-      is(gFrames.itemCount, 1,
-        "Should have one frame.");
-      is(gVariables._store.length, 4,
-        "Should have four scopes.");
-
-      is(innerNodes[0].querySelector(".name").getAttribute("value"), "this",
-        "Should have the right property name for 'this'.");
-      is(innerNodes[0].querySelector(".value").getAttribute("value"), "<button>",
-        "Should have the right property value for 'this'.");
-
-      let finished = waitForDebuggerEvents(gPanel, gDebugger.EVENTS.AFTER_FRAMES_CLEARED).then(() => {
-        isnot(gDebugger.gThreadClient.state, "paused",
-          "Should not be paused after resuming.");
-        ok(isCaretPos(gPanel, 26),
-          "Should be idle on the debugger statement.");
-
-        ok(true, "Frames were cleared, debugger didn't pause again.");
-      });
-
-      EventUtils.sendMouseEvent({ type: "mousedown" },
-        gDebugger.document.getElementById("resume"),
-        gDebugger);
-
-      return finished;
-    });
-
-    EventUtils.sendMouseEvent({ type: "mousedown" },
-      gDebugger.document.getElementById("resume"),
-      gDebugger);
-
-    return finished;
-  });
-
-  generateMouseClickInTab(gTab, "content.document.querySelector('button')");
-
-  return finished;
-}
-
-function enablePauseOnExceptions() {
-  let deferred = promise.defer();
-
-  gDebugger.gThreadClient.addOneTimeListener("resumed", () => {
-    is(gPrefs.pauseOnExceptions, true,
-      "The pause-on-exceptions pref should now be enabled.");
-    is(gOptions._pauseOnExceptionsItem.getAttribute("checked"), "true",
-      "The pause-on-exceptions menu item should now be checked.");
-
-    ok(true, "Pausing on exceptions was enabled.");
-    deferred.resolve();
-  });
-
-  gOptions._pauseOnExceptionsItem.setAttribute("checked", "true");
-  gOptions._togglePauseOnExceptions();
-  return deferred.promise;
-}
-
-function disablePauseOnExceptions() {
-  let deferred = promise.defer();
-
-  gDebugger.gThreadClient.addOneTimeListener("resumed", () => {
-    is(gPrefs.pauseOnExceptions, false,
-      "The pause-on-exceptions pref should now be disabled.");
-    isnot(gOptions._pauseOnExceptionsItem.getAttribute("checked"), "true",
-      "The pause-on-exceptions menu item should now be unchecked.");
-
-    ok(true, "Pausing on exceptions was disabled.");
-    deferred.resolve();
-  });
-
-  gOptions._pauseOnExceptionsItem.setAttribute("checked", "false");
-  gOptions._togglePauseOnExceptions();
-
-  return deferred.promise;
-}
-
-function enableIgnoreCaughtExceptions() {
-  let deferred = promise.defer();
-
-  gDebugger.gThreadClient.addOneTimeListener("resumed", () => {
-    is(gPrefs.ignoreCaughtExceptions, true,
-      "The ignore-caught-exceptions pref should now be enabled.");
-    is(gOptions._ignoreCaughtExceptionsItem.getAttribute("checked"), "true",
-      "The ignore-caught-exceptions menu item should now be checked.");
-
-    ok(true, "Ignore caught exceptions was enabled.");
-    deferred.resolve();
-  });
-
-  gOptions._ignoreCaughtExceptionsItem.setAttribute("checked", "true");
-  gOptions._toggleIgnoreCaughtExceptions();
-
-  return deferred.promise;
-}
-
-function disableIgnoreCaughtExceptions() {
-  let deferred = promise.defer();
-
-  gDebugger.gThreadClient.addOneTimeListener("resumed", () => {
-    is(gPrefs.ignoreCaughtExceptions, false,
-      "The ignore-caught-exceptions pref should now be disabled.");
-    isnot(gOptions._ignoreCaughtExceptionsItem.getAttribute("checked"), "true",
-      "The ignore-caught-exceptions menu item should now be unchecked.");
-
-    ok(true, "Ignore caught exceptions was disabled.");
-    deferred.resolve();
-  });
-
-  gOptions._ignoreCaughtExceptionsItem.setAttribute("checked", "false");
-  gOptions._toggleIgnoreCaughtExceptions();
-
-  return deferred.promise;
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gFrames = null;
-  gVariables = null;
-  gPrefs = null;
-  gOptions = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_pause-no-step.js
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests that pausing / stepping is only enabled when there is a
- * location.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_pause-exceptions.html";
-
-var gTab, gPanel, gDebugger;
-var gResumeButton, gStepOverButton, gStepOutButton, gStepInButton;
-var gResumeKey, gFrames;
-
-function test() {
-  let options = {
-    source: TAB_URL,
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gResumeButton = gDebugger.document.getElementById("resume");
-    gStepOverButton = gDebugger.document.getElementById("step-over");
-    gStepInButton = gDebugger.document.getElementById("step-in");
-    gStepOutButton = gDebugger.document.getElementById("step-out");
-    gResumeKey = gDebugger.document.getElementById("resumeKey");
-    gFrames = gDebugger.DebuggerView.StackFrames;
-
-    testPause();
-  });
-}
-
-function testPause() {
-  ok(!gDebugger.gThreadClient.paused, "Should be running after starting the test.");
-  ok(gStepOutButton.disabled, "Stepping out button should be disabled");
-  ok(gStepInButton.disabled, "Stepping in button should be disabled");
-  ok(gStepOverButton.disabled, "Stepping over button should be disabled");
-
-  gDebugger.gThreadClient.addOneTimeListener("paused", () => {
-    ok(gDebugger.gThreadClient.paused,
-       "Should be paused after an interrupt request.");
-
-    ok(!gStepOutButton.disabled, "Stepping out button should be enabled");
-    ok(!gStepInButton.disabled, "Stepping in button should be enabled");
-    ok(!gStepOverButton.disabled, "Stepping over button should be enabled");
-
-    waitForDebuggerEvents(gPanel, gDebugger.EVENTS.AFTER_FRAMES_REFILLED).then(() => {
-      is(gFrames.itemCount, 1,
-         "Should have 1 frame from the evalInTab call.");
-      gDebugger.gThreadClient.resume(testBreakAtLocation);
-    });
-
-  });
-
-  EventUtils.sendMouseEvent({ type: "mousedown" }, gResumeButton, gDebugger);
-
-  ok(!gDebugger.gThreadClient.paused,
-    "Shouldn't be paused until the next script is executed.");
-  ok(gStepOutButton.disabled, "Stepping out button should be disabled");
-  ok(gStepInButton.disabled, "Stepping in button should be disabled");
-  ok(gStepOverButton.disabled, "Stepping over button should be disabled");
-
-  // Evaluate a script to fully pause the debugger
-  once(gDebugger.gClient, "willInterrupt").then(() => {
-    evalInTab(gTab, "1+1;");
-  });
-}
-
-function testBreakAtLocation() {
-  gDebugger.gThreadClient.addOneTimeListener("paused", () => {
-    ok(!gStepOutButton.disabled, "Stepping out button should be enabled");
-    ok(!gStepInButton.disabled, "Stepping in button should be enabled");
-    ok(!gStepOverButton.disabled, "Stepping over button should be enabled");
-
-    resumeDebuggerThenCloseAndFinish(gPanel);
-  });
-
-  BrowserTestUtils.synthesizeMouseAtCenter("button", {}, gBrowser.selectedBrowser);
-}
-
-registerCleanupFunction(function () {
-  gPanel = null;
-  gDebugger = null;
-  gResumeButton = null;
-  gStepOverButton = null;
-  gStepInButton = null;
-  gStepOutButton = null;
-  gResumeKey = null;
-  gFrames = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_reload-preferred-script-02.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests if the preferred source is shown when a page is loaded and
- * the preferred source is specified after another source might have been shown.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
-const PREFERRED_URL = EXAMPLE_URL + "code_script-switching-02.js";
-
-var gTab, gPanel, gDebugger;
-var gSources;
-
-function test() {
-  let options = {
-    source: EXAMPLE_URL + "code_script-switching-01.js",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gSources = gDebugger.DebuggerView.Sources;
-
-    waitForSourceShown(gPanel, PREFERRED_URL).then(finishTest);
-    gSources.preferredSource = getSourceActor(gSources, PREFERRED_URL);
-  });
-}
-
-function finishTest() {
-  info("Currently preferred source: " + gSources.preferredValue);
-  info("Currently selected source: " + gSources.selectedValue);
-
-  is(getSourceURL(gSources, gSources.preferredValue), PREFERRED_URL,
-    "The preferred source url wasn't set correctly.");
-  is(getSourceURL(gSources, gSources.selectedValue), PREFERRED_URL,
-    "The selected source isn't the correct one.");
-
-  closeDebuggerAndFinish(gPanel);
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gSources = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_reload-preferred-script-03.js
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests if the preferred source is shown when a page is loaded and
- * the preferred source is specified after another source was definitely shown.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
-const FIRST_URL = EXAMPLE_URL + "code_script-switching-01.js";
-const SECOND_URL = EXAMPLE_URL + "code_script-switching-02.js";
-
-var gTab, gPanel, gDebugger;
-var gSources;
-
-function test() {
-  let options = {
-    source: FIRST_URL,
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gSources = gDebugger.DebuggerView.Sources;
-
-    testSource(undefined, FIRST_URL);
-    switchToSource(SECOND_URL)
-      .then(() => testSource(SECOND_URL))
-      .then(() => switchToSource(FIRST_URL))
-      .then(() => testSource(FIRST_URL))
-      .then(() => closeDebuggerAndFinish(gPanel))
-      .catch(aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-  });
-}
-
-function testSource(aPreferredUrl, aSelectedUrl = aPreferredUrl) {
-  info("Currently preferred source: " + gSources.preferredValue);
-  info("Currently selected source: " + gSources.selectedValue);
-
-  is(getSourceURL(gSources, gSources.preferredValue), aPreferredUrl,
-    "The preferred source url wasn't set correctly.");
-  is(getSourceURL(gSources, gSources.selectedValue), aSelectedUrl,
-    "The selected source isn't the correct one.");
-}
-
-function switchToSource(aUrl) {
-  let finished = waitForSourceShown(gPanel, aUrl);
-  gSources.preferredSource = getSourceActor(gSources, aUrl);
-  return finished;
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gSources = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_search-autofill-identifier.js
+++ /dev/null
@@ -1,138 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests that Debugger Search uses the identifier under cursor if nothing is
- * selected or manually passed and searching using certain operators.
- */
-"use strict";
-
-function test() {
-  const TAB_URL = EXAMPLE_URL + "doc_function-search.html";
-
-  let options = {
-    source: EXAMPLE_URL + "code_function-search-01.js",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    let Debugger = aPanel.panelWin;
-    let Editor = Debugger.DebuggerView.editor;
-    let Filtering = Debugger.DebuggerView.Filtering;
-
-    function doSearch(aOperator) {
-      Editor.dropSelection();
-      Filtering._doSearch(aOperator);
-    }
-
-    info("Testing with cursor at the beginning of the file...");
-
-    doSearch();
-    is(Filtering._searchbox.value, "",
-      "The searchbox value should not be auto-filled when searching for files.");
-    is(Filtering._searchbox.selectionStart, Filtering._searchbox.selectionEnd,
-      "The searchbox contents should not be selected");
-    is(Editor.getSelection(), "",
-      "The selection in the editor should be empty.");
-
-    doSearch("!");
-    is(Filtering._searchbox.value, "!",
-      "The searchbox value should not be auto-filled when searching across all files.");
-    is(Filtering._searchbox.selectionStart, Filtering._searchbox.selectionEnd,
-      "The searchbox contents should not be selected");
-    is(Editor.getSelection(), "",
-      "The selection in the editor should be empty.");
-
-    doSearch("@");
-    is(Filtering._searchbox.value, "@",
-      "The searchbox value should not be auto-filled when searching for functions.");
-    is(Filtering._searchbox.selectionStart, Filtering._searchbox.selectionEnd,
-      "The searchbox contents should not be selected");
-    is(Editor.getSelection(), "",
-      "The selection in the editor should be empty.");
-
-    doSearch("#");
-    is(Filtering._searchbox.value, "#",
-      "The searchbox value should not be auto-filled when searching inside a file.");
-    is(Filtering._searchbox.selectionStart, Filtering._searchbox.selectionEnd,
-      "The searchbox contents should not be selected");
-    is(Editor.getSelection(), "",
-      "The selection in the editor should be empty.");
-
-    doSearch(":");
-    is(Filtering._searchbox.value, ":",
-      "The searchbox value should not be auto-filled when searching for a line.");
-    is(Filtering._searchbox.selectionStart, Filtering._searchbox.selectionEnd,
-      "The searchbox contents should not be selected");
-    is(Editor.getSelection(), "",
-      "The selection in the editor should be empty.");
-
-    doSearch("*");
-    is(Filtering._searchbox.value, "*",
-      "The searchbox value should not be auto-filled when searching for variables.");
-    is(Filtering._searchbox.selectionStart, Filtering._searchbox.selectionEnd,
-      "The searchbox contents should not be selected");
-    is(Editor.getSelection(), "",
-      "The selection in the editor should be empty.");
-
-    Editor.setCursor({ line: 7, ch: 0});
-    info("Testing with cursor at line 8 and char 1...");
-
-    doSearch();
-    is(Filtering._searchbox.value, "",
-      "The searchbox value should not be auto-filled when searching for files.");
-    is(Filtering._searchbox.selectionStart, Filtering._searchbox.selectionEnd,
-      "The searchbox contents should not be selected");
-    is(Editor.getSelection(), "",
-      "The selection in the editor should be empty.");
-
-    doSearch("!");
-    is(Filtering._searchbox.value, "!test",
-      "The searchbox value was incorrect when searching across all files.");
-    is(Filtering._searchbox.selectionStart, 1,
-      "The searchbox operator should not be selected");
-    is(Filtering._searchbox.selectionEnd, 5,
-      "The searchbox contents should be selected");
-    is(Editor.getSelection(), "",
-      "The selection in the editor should be empty.");
-
-    doSearch("@");
-    is(Filtering._searchbox.value, "@test",
-      "The searchbox value was incorrect when searching for functions.");
-    is(Filtering._searchbox.selectionStart, 1,
-      "The searchbox operator should not be selected");
-    is(Filtering._searchbox.selectionEnd, 5,
-      "The searchbox contents should be selected");
-    is(Editor.getSelection(), "",
-      "The selection in the editor should be empty.");
-
-    doSearch("#");
-    is(Filtering._searchbox.value, "#test",
-      "The searchbox value should be auto-filled when searching inside a file.");
-    is(Filtering._searchbox.selectionStart, 1,
-      "The searchbox operator should not be selected");
-    is(Filtering._searchbox.selectionEnd, 5,
-      "The searchbox contents should be selected");
-    is(Editor.getSelection(), "test",
-      "The selection in the editor should be 'test'.");
-
-    doSearch(":");
-    is(Filtering._searchbox.value, ":",
-      "The searchbox value should not be auto-filled when searching for a line.");
-    is(Filtering._searchbox.selectionStart, Filtering._searchbox.selectionEnd,
-      "The searchbox contents should not be selected");
-    is(Editor.getSelection(), "",
-      "The selection in the editor should be empty.");
-
-    doSearch("*");
-    is(Filtering._searchbox.value, "*",
-      "The searchbox value should not be auto-filled when searching for variables.");
-    is(Filtering._searchbox.selectionStart, Filtering._searchbox.selectionEnd,
-      "The searchbox contents should not be selected");
-    is(Editor.getSelection(), "",
-      "The selection in the editor should be empty.");
-
-    closeDebuggerAndFinish(aPanel);
-  });
-}
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_search-basic-01.js
+++ /dev/null
@@ -1,327 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests basic search functionality (find token and jump to line).
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_recursion-stack.html";
-
-var gTab, gPanel, gDebugger;
-var gEditor, gSources, gFiltering, gSearchBox;
-
-function test() {
-  let options = {
-    source: TAB_URL,
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gEditor = gDebugger.DebuggerView.editor;
-    gSources = gDebugger.DebuggerView.Sources;
-    gFiltering = gDebugger.DebuggerView.Filtering;
-    gSearchBox = gDebugger.DebuggerView.Filtering._searchbox;
-
-    performTest();
-  });
-}
-
-function performTest() {
-  // Make sure that the search box becomes focused when pressing ctrl+f - Bug 1211038
-  gEditor.focus();
-  synthesizeKeyFromKeyTag(gDebugger.document.getElementById("tokenSearchKey"));
-
-  setText(gSearchBox, "#html");
-
-  EventUtils.synthesizeKey("VK_RETURN", { shiftKey: true }, gDebugger);
-  is(gFiltering.searchData.toSource(), '["#", ["", "html"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 35, 7),
-    "The editor didn't jump to the correct line.");
-
-  EventUtils.synthesizeKey("VK_RETURN", { shiftKey: true }, gDebugger);
-  is(gFiltering.searchData.toSource(), '["#", ["", "html"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 5, 6),
-    "The editor didn't jump to the correct line.");
-
-  EventUtils.synthesizeKey("VK_RETURN", { shiftKey: true }, gDebugger);
-  is(gFiltering.searchData.toSource(), '["#", ["", "html"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 3, 15),
-    "The editor didn't jump to the correct line.");
-
-  setText(gSearchBox, ":12");
-  is(gFiltering.searchData.toSource(), '[":", ["", 12]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 12),
-    "The editor didn't jump to the correct line.");
-
-  EventUtils.synthesizeKey("g", { metaKey: true }, gDebugger);
-  is(gFiltering.searchData.toSource(), '[":", ["", 13]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 13),
-    "The editor didn't jump to the correct line after Meta+G.");
-
-  EventUtils.synthesizeKey("n", { ctrlKey: true }, gDebugger);
-  is(gFiltering.searchData.toSource(), '[":", ["", 14]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 14),
-    "The editor didn't jump to the correct line after Ctrl+N.");
-
-  EventUtils.synthesizeKey("G", { metaKey: true, shiftKey: true }, gDebugger);
-  is(gFiltering.searchData.toSource(), '[":", ["", 13]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 13),
-    "The editor didn't jump to the correct line after Meta+Shift+G.");
-
-  EventUtils.synthesizeKey("p", { ctrlKey: true }, gDebugger);
-  is(gFiltering.searchData.toSource(), '[":", ["", 12]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 12),
-    "The editor didn't jump to the correct line after Ctrl+P.");
-
-  for (let i = 0; i < 100; i++) {
-    EventUtils.sendKey("DOWN", gDebugger);
-  }
-  is(gFiltering.searchData.toSource(), '[":", ["", 36]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 36),
-    "The editor didn't jump to the correct line after multiple DOWN keys.");
-
-  for (let i = 0; i < 100; i++) {
-    EventUtils.sendKey("UP", gDebugger);
-  }
-  is(gFiltering.searchData.toSource(), '[":", ["", 1]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 1),
-    "The editor didn't jump to the correct line after multiple UP keys.");
-
-
-  let token = "debugger";
-  setText(gSearchBox, "#" + token);
-  is(gFiltering.searchData.toSource(), '["#", ["", "debugger"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 8, 12 + token.length),
-    "The editor didn't jump to the correct token (1).");
-
-  EventUtils.sendKey("DOWN", gDebugger);
-  is(gFiltering.searchData.toSource(), '["#", ["", "debugger"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 14, 9 + token.length),
-    "The editor didn't jump to the correct token (2).");
-
-  EventUtils.sendKey("DOWN", gDebugger);
-  is(gFiltering.searchData.toSource(), '["#", ["", "debugger"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 18, 15 + token.length),
-    "The editor didn't jump to the correct token (3).");
-
-  EventUtils.sendKey("RETURN", gDebugger);
-  is(gFiltering.searchData.toSource(), '["#", ["", "debugger"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 26, 11 + token.length),
-    "The editor didn't jump to the correct token (4).");
-
-  EventUtils.sendKey("RETURN", gDebugger);
-  is(gFiltering.searchData.toSource(), '["#", ["", "debugger"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 8, 12 + token.length),
-    "The editor didn't jump to the correct token (5).");
-
-  EventUtils.sendKey("UP", gDebugger);
-  is(gFiltering.searchData.toSource(), '["#", ["", "debugger"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 26, 11 + token.length),
-    "The editor didn't jump to the correct token (6).");
-
-  setText(gSearchBox, ":bogus#" + token + ";");
-  is(gFiltering.searchData.toSource(), '["#", [":bogus", "debugger;"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 14, 9 + token.length + 1),
-    "The editor didn't jump to the correct token (7).");
-
-  setText(gSearchBox, ":13#" + token + ";");
-  is(gFiltering.searchData.toSource(), '["#", [":13", "debugger;"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 14, 9 + token.length + 1),
-    "The editor didn't jump to the correct token (8).");
-
-  setText(gSearchBox, ":#" + token + ";");
-  is(gFiltering.searchData.toSource(), '["#", [":", "debugger;"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 14, 9 + token.length + 1),
-    "The editor didn't jump to the correct token (9).");
-
-  setText(gSearchBox, "::#" + token + ";");
-  is(gFiltering.searchData.toSource(), '["#", ["::", "debugger;"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 14, 9 + token.length + 1),
-    "The editor didn't jump to the correct token (10).");
-
-  setText(gSearchBox, ":::#" + token + ";");
-  is(gFiltering.searchData.toSource(), '["#", [":::", "debugger;"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 14, 9 + token.length + 1),
-    "The editor didn't jump to the correct token (11).");
-
-
-  setText(gSearchBox, "#" + token + ";" + ":bogus");
-  is(gFiltering.searchData.toSource(), '["#", ["", "debugger;:bogus"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 14, 9 + token.length + 1),
-    "The editor didn't jump to the correct token (12).");
-
-  setText(gSearchBox, "#" + token + ";" + ":13");
-  is(gFiltering.searchData.toSource(), '["#", ["", "debugger;:13"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 14, 9 + token.length + 1),
-    "The editor didn't jump to the correct token (13).");
-
-  setText(gSearchBox, "#" + token + ";" + ":");
-  is(gFiltering.searchData.toSource(), '["#", ["", "debugger;:"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 14, 9 + token.length + 1),
-    "The editor didn't jump to the correct token (14).");
-
-  setText(gSearchBox, "#" + token + ";" + "::");
-  is(gFiltering.searchData.toSource(), '["#", ["", "debugger;::"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 14, 9 + token.length + 1),
-    "The editor didn't jump to the correct token (15).");
-
-  setText(gSearchBox, "#" + token + ";" + ":::");
-  is(gFiltering.searchData.toSource(), '["#", ["", "debugger;:::"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 14, 9 + token.length + 1),
-    "The editor didn't jump to the correct token (16).");
-
-
-  setText(gSearchBox, ":i am not a number");
-  is(gFiltering.searchData.toSource(), '[":", ["", 0]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 14, 9 + token.length + 1),
-    "The editor didn't remain at the correct token (17).");
-
-  setText(gSearchBox, "#__i do not exist__");
-  is(gFiltering.searchData.toSource(), '["#", ["", "__i do not exist__"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 14, 9 + token.length + 1),
-    "The editor didn't remain at the correct token (18).");
-
-
-  setText(gSearchBox, "#" + token);
-  is(gFiltering.searchData.toSource(), '["#", ["", "debugger"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 8, 12 + token.length),
-    "The editor didn't jump to the correct token (19).");
-
-
-  clearText(gSearchBox);
-  is(gFiltering.searchData.toSource(), '["", [""]]',
-    "The searchbox data wasn't parsed correctly.");
-
-  EventUtils.sendKey("RETURN", gDebugger);
-  is(gFiltering.searchData.toSource(), '["", [""]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 8, 12 + token.length),
-    "The editor shouldn't jump to another token (20).");
-
-  EventUtils.sendKey("RETURN", gDebugger);
-  is(gFiltering.searchData.toSource(), '["", [""]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 8, 12 + token.length),
-    "The editor shouldn't jump to another token (21).");
-
-
-  setText(gSearchBox, ":1:2:3:a:b:c:::12");
-  is(gFiltering.searchData.toSource(), '[":", [":1:2:3:a:b:c::", 12]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 12),
-    "The editor didn't jump to the correct line (22).");
-
-  setText(gSearchBox, "#don't#find#me#instead#find#" + token);
-  is(gFiltering.searchData.toSource(), '["#", ["#don\'t#find#me#instead#find", "debugger"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 8, 12 + token.length),
-    "The editor didn't jump to the correct token (23).");
-
-  EventUtils.sendKey("DOWN", gDebugger);
-  is(gFiltering.searchData.toSource(), '["#", ["#don\'t#find#me#instead#find", "debugger"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 14, 9 + token.length),
-    "The editor didn't jump to the correct token (24).");
-
-  EventUtils.sendKey("DOWN", gDebugger);
-  is(gFiltering.searchData.toSource(), '["#", ["#don\'t#find#me#instead#find", "debugger"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 18, 15 + token.length),
-    "The editor didn't jump to the correct token (25).");
-
-  EventUtils.sendKey("RETURN", gDebugger);
-  is(gFiltering.searchData.toSource(), '["#", ["#don\'t#find#me#instead#find", "debugger"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 26, 11 + token.length),
-    "The editor didn't jump to the correct token (26).");
-
-  EventUtils.sendKey("RETURN", gDebugger);
-  is(gFiltering.searchData.toSource(), '["#", ["#don\'t#find#me#instead#find", "debugger"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 8, 12 + token.length),
-    "The editor didn't jump to the correct token (27).");
-
-  EventUtils.sendKey("UP", gDebugger);
-  is(gFiltering.searchData.toSource(), '["#", ["#don\'t#find#me#instead#find", "debugger"]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 26, 11 + token.length),
-    "The editor didn't jump to the correct token (28).");
-
-
-  clearText(gSearchBox);
-  is(gFiltering.searchData.toSource(), '["", [""]]',
-    "The searchbox data wasn't parsed correctly.");
-  ok(isCaretPos(gPanel, 26, 11 + token.length),
-    "The editor didn't remain at the correct token (29).");
-  is(gSources.visibleItems.length, 1,
-    "Not all the sources are shown after the search (30).");
-
-
-  gEditor.focus();
-  gEditor.setSelection.apply(gEditor, gEditor.getPosition(1, 5));
-  ok(isCaretPos(gPanel, 1, 6),
-    "The editor caret position didn't update after selecting some text.");
-
-  EventUtils.synthesizeKey("F", { accelKey: true });
-  is(gFiltering.searchData.toSource(), '["#", ["", "!-- "]]',
-    "The searchbox data wasn't parsed correctly.");
-  is(gSearchBox.value, "#!-- ",
-    "The search field has the right initial value (1).");
-
-  gEditor.focus();
-  gEditor.setSelection.apply(gEditor, gEditor.getPosition(415, 418));
-  ok(isCaretPos(gPanel, 21, 30),
-    "The editor caret position didn't update after selecting some number.");
-
-  EventUtils.synthesizeKey("L", { accelKey: true });
-  is(gFiltering.searchData.toSource(), '[":", ["", 100]]',
-    "The searchbox data wasn't parsed correctly.");
-  is(gSearchBox.value, ":100",
-    "The search field has the right initial value (2).");
-
-
-  closeDebuggerAndFinish(gPanel);
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gEditor = null;
-  gSources = null;
-  gFiltering = null;
-  gSearchBox = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_search-basic-02.js
+++ /dev/null
@@ -1,129 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests basic file search functionality.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
-
-var gTab, gPanel, gDebugger;
-var gSources, gSearchBox;
-
-function test() {
-  let options = {
-    source: EXAMPLE_URL + "code_script-switching-01.js",
-    line: 1,
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gSources = gDebugger.DebuggerView.Sources;
-    gSearchBox = gDebugger.DebuggerView.Filtering._searchbox;
-
-    // Calling `firstCall` is going to break into the other script
-    waitForSourceAndCaretAndScopes(gPanel, "-02.js", 6)
-      .then(performSimpleSearch)
-      .then(() => verifySourceAndCaret("-01.js", 1, 1, [1, 1]))
-      .then(combineWithLineSearch)
-      .then(() => verifySourceAndCaret("-01.js", 2, 1, [53, 53]))
-      .then(combineWithTokenSearch)
-      .then(() => verifySourceAndCaret("-01.js", 2, 48, [96, 100]))
-      .then(combineWithTokenColonSearch)
-      .then(() => verifySourceAndCaret("-01.js", 2, 11, [56, 63]))
-      .then(() => resumeDebuggerThenCloseAndFinish(gPanel))
-      .catch(aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-
-    callInTab(gTab, "firstCall");
-  });
-}
-
-function performSimpleSearch() {
-  let finished = promise.all([
-    ensureSourceIs(gPanel, "-02.js"),
-    ensureCaretAt(gPanel, 6),
-    waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FILE_SEARCH_MATCH_FOUND),
-    waitForSourceShown(gPanel, "-01.js")
-  ]);
-
-  setText(gSearchBox, "1");
-
-  return finished.then(() => promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 1)
-  ]));
-}
-
-function combineWithLineSearch() {
-  let finished = promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 1),
-    waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FILE_SEARCH_MATCH_FOUND),
-    waitForCaretUpdated(gPanel, 2)
-  ]);
-
-  typeText(gSearchBox, ":2");
-
-  return finished.then(() => promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 2)
-  ]));
-}
-
-function combineWithTokenSearch() {
-  let finished = promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 2),
-    waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FILE_SEARCH_MATCH_FOUND),
-    waitForCaretUpdated(gPanel, 2, 48)
-  ]);
-
-  backspaceText(gSearchBox, 2);
-  typeText(gSearchBox, "#zero");
-
-  return finished.then(() => promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 2, 48)
-  ]));
-}
-
-function combineWithTokenColonSearch() {
-  let finished = promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 2, 48),
-    waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FILE_SEARCH_MATCH_FOUND),
-    waitForCaretUpdated(gPanel, 2, 11)
-  ]);
-
-  backspaceText(gSearchBox, 4);
-  typeText(gSearchBox, "http://");
-
-  return finished.then(() => promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 2, 11)
-  ]));
-}
-
-function verifySourceAndCaret(aUrl, aLine, aColumn, aSelection) {
-  ok(gSources.selectedItem.attachment.label.includes(aUrl),
-    "The selected item's label appears to be correct.");
-  ok(gSources.selectedItem.attachment.source.url.includes(aUrl),
-    "The selected item's value appears to be correct.");
-  ok(isCaretPos(gPanel, aLine, aColumn),
-    "The current caret position appears to be correct.");
-  ok(isEditorSel(gPanel, aSelection),
-    "The current editor selection appears to be correct.");
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gSources = null;
-  gSearchBox = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_search-basic-03.js
+++ /dev/null
@@ -1,123 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests that searches which cause a popup to be shown properly handle the
- * ESCAPE key.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
-
-var gTab, gPanel, gDebugger;
-var gSources, gSearchBox;
-
-function test() {
-  let options = {
-    source: EXAMPLE_URL + "code_script-switching-01.js",
-    line: 1,
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gSources = gDebugger.DebuggerView.Sources;
-    gSearchBox = gDebugger.DebuggerView.Filtering._searchbox;
-
-    // Calling `firstCall` is going to break into the other script
-    waitForSourceAndCaretAndScopes(gPanel, "-02.js", 6)
-      .then(performFileSearch)
-      .then(escapeAndHide)
-      .then(escapeAndClear)
-      .then(() => verifySourceAndCaret("-01.js", 1, 1))
-      .then(performFunctionSearch)
-      .then(escapeAndHide)
-      .then(escapeAndClear)
-      .then(() => verifySourceAndCaret("-01.js", 4, 10))
-      .then(performGlobalSearch)
-      .then(escapeAndClear)
-      .then(() => verifySourceAndCaret("-01.js", 4, 10))
-      .then(() => resumeDebuggerThenCloseAndFinish(gPanel))
-      .catch(aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-
-    callInTab(gTab, "firstCall");
-  });
-}
-
-function performFileSearch() {
-  let finished = promise.all([
-    ensureSourceIs(gPanel, "-02.js"),
-    ensureCaretAt(gPanel, 6),
-    once(gDebugger, "popupshown"),
-    waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FILE_SEARCH_MATCH_FOUND),
-    waitForSourceShown(gPanel, "-01.js")
-  ]);
-
-  setText(gSearchBox, ".");
-
-  return finished.then(() => promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 1)
-  ]));
-}
-
-function performFunctionSearch() {
-  let finished = promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 1),
-    once(gDebugger, "popupshown"),
-    waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FUNCTION_SEARCH_MATCH_FOUND)
-  ]);
-
-  setText(gSearchBox, "@");
-
-  return finished.then(() => promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 4, 10)
-  ]));
-}
-
-function performGlobalSearch() {
-  let finished = promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 4, 10),
-    waitForDebuggerEvents(gPanel, gDebugger.EVENTS.GLOBAL_SEARCH_MATCH_FOUND)
-  ]);
-
-  setText(gSearchBox, "!first");
-
-  return finished.then(() => promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 4, 10)
-  ]));
-}
-
-function escapeAndHide() {
-  let finished = once(gDebugger, "popuphidden", true);
-  EventUtils.sendKey("ESCAPE", gDebugger);
-  return finished;
-}
-
-function escapeAndClear() {
-  EventUtils.sendKey("ESCAPE", gDebugger);
-  is(gSearchBox.getAttribute("value"), "",
-    "The searchbox has properly emptied after pressing escape.");
-}
-
-function verifySourceAndCaret(aUrl, aLine, aColumn) {
-  ok(gSources.selectedItem.attachment.label.includes(aUrl),
-    "The selected item's label appears to be correct.");
-  ok(gSources.selectedItem.attachment.source.url.includes(aUrl),
-    "The selected item's value appears to be correct.");
-  ok(isCaretPos(gPanel, aLine, aColumn),
-    "The current caret position appears to be correct.");
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gSources = null;
-  gSearchBox = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_search-basic-04.js
+++ /dev/null
@@ -1,132 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests that the selection is dropped for line and token searches, after
- * pressing backspace enough times.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
-
-var gTab, gPanel, gDebugger;
-var gEditor, gSources, gSearchBox;
-
-function test() {
-  let options = {
-    source: EXAMPLE_URL + "code_script-switching-01.js",
-    line: 1,
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gEditor = gDebugger.DebuggerView.editor;
-    gSources = gDebugger.DebuggerView.Sources;
-    gSearchBox = gDebugger.DebuggerView.Filtering._searchbox;
-
-    testLineSearch();
-    testTokenSearch();
-    closeDebuggerAndFinish(gPanel);
-  });
-}
-
-function testLineSearch() {
-  setText(gSearchBox, ":42");
-  ok(isCaretPos(gPanel, 7),
-    "The editor caret position appears to be correct (1.1).");
-  ok(isEditorSel(gPanel, [151, 151]),
-    "The editor selection appears to be correct (1.1).");
-  is(gEditor.getSelection(), "",
-    "The editor selected text appears to be correct (1.1).");
-
-  backspaceText(gSearchBox, 1);
-  ok(isCaretPos(gPanel, 4),
-    "The editor caret position appears to be correct (1.2).");
-  ok(isEditorSel(gPanel, [110, 110]),
-    "The editor selection appears to be correct (1.2).");
-  is(gEditor.getSelection(), "",
-    "The editor selected text appears to be correct (1.2).");
-
-  backspaceText(gSearchBox, 1);
-  ok(isCaretPos(gPanel, 4),
-    "The editor caret position appears to be correct (1.3).");
-  ok(isEditorSel(gPanel, [110, 110]),
-    "The editor selection appears to be correct (1.3).");
-  is(gEditor.getSelection(), "",
-    "The editor selected text appears to be correct (1.3).");
-
-  setText(gSearchBox, ":4");
-  ok(isCaretPos(gPanel, 4),
-    "The editor caret position appears to be correct (1.4).");
-  ok(isEditorSel(gPanel, [110, 110]),
-    "The editor selection appears to be correct (1.4).");
-  is(gEditor.getSelection(), "",
-    "The editor selected text appears to be correct (1.4).");
-
-  gSearchBox.select();
-  backspaceText(gSearchBox, 1);
-  ok(isCaretPos(gPanel, 4),
-    "The editor caret position appears to be correct (1.5).");
-  ok(isEditorSel(gPanel, [110, 110]),
-    "The editor selection appears to be correct (1.5).");
-  is(gEditor.getSelection(), "",
-    "The editor selected text appears to be correct (1.5).");
-  is(gSearchBox.value, "",
-    "The searchbox should have been cleared.");
-}
-
-function testTokenSearch() {
-  setText(gSearchBox, "#();");
-  ok(isCaretPos(gPanel, 5, 16),
-    "The editor caret position appears to be correct (2.1).");
-  ok(isEditorSel(gPanel, [145, 148]),
-    "The editor selection appears to be correct (2.1).");
-  is(gEditor.getSelection(), "();",
-    "The editor selected text appears to be correct (2.1).");
-
-  backspaceText(gSearchBox, 1);
-  ok(isCaretPos(gPanel, 4, 21),
-    "The editor caret position appears to be correct (2.2).");
-  ok(isEditorSel(gPanel, [128, 130]),
-    "The editor selection appears to be correct (2.2).");
-  is(gEditor.getSelection(), "()",
-    "The editor selected text appears to be correct (2.2).");
-
-  backspaceText(gSearchBox, 2);
-  ok(isCaretPos(gPanel, 4, 20),
-    "The editor caret position appears to be correct (2.3).");
-  ok(isEditorSel(gPanel, [129, 129]),
-    "The editor selection appears to be correct (2.3).");
-  is(gEditor.getSelection(), "",
-    "The editor selected text appears to be correct (2.3).");
-
-  setText(gSearchBox, "#;");
-  ok(isCaretPos(gPanel, 5, 16),
-    "The editor caret position appears to be correct (2.4).");
-  ok(isEditorSel(gPanel, [147, 148]),
-    "The editor selection appears to be correct (2.4).");
-  is(gEditor.getSelection(), ";",
-    "The editor selected text appears to be correct (2.4).");
-
-  gSearchBox.select();
-  backspaceText(gSearchBox, 1);
-  ok(isCaretPos(gPanel, 5, 16),
-    "The editor caret position appears to be correct (2.5).");
-  ok(isEditorSel(gPanel, [148, 148]),
-    "The editor selection appears to be correct (2.5).");
-  is(gEditor.getSelection(), "",
-    "The editor selected text appears to be correct (2.5).");
-  is(gSearchBox.value, "",
-    "The searchbox should have been cleared.");
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gEditor = null;
-  gSources = null;
-  gSearchBox = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_search-global-01.js
+++ /dev/null
@@ -1,278 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests basic functionality of global search (lowercase + upper case, expected
- * UI behavior, number of results found etc.)
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
-
-var gTab, gPanel, gDebugger;
-var gEditor, gSources, gSearchView, gSearchBox;
-
-function test() {
-  let options = {
-    source: EXAMPLE_URL + "code_script-switching-01.js",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gEditor = gDebugger.DebuggerView.editor;
-    gSources = gDebugger.DebuggerView.Sources;
-    gSearchView = gDebugger.DebuggerView.GlobalSearch;
-    gSearchBox = gDebugger.DebuggerView.Filtering._searchbox;
-
-    waitForSourceAndCaretAndScopes(gPanel, "-02.js", 1)
-      .then(firstSearch)
-      .then(secondSearch)
-      .then(clearSearch)
-      .then(() => resumeDebuggerThenCloseAndFinish(gPanel))
-      .catch(aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-
-    callInTab(gTab, "firstCall");
-  });
-}
-
-function firstSearch() {
-  let deferred = promise.defer();
-
-  is(gSearchView.itemCount, 0,
-    "The global search pane shouldn't have any entries yet.");
-  is(gSearchView.widget._parent.hidden, true,
-    "The global search pane shouldn't be visible yet.");
-  is(gSearchView._splitter.hidden, true,
-    "The global search pane splitter shouldn't be visible yet.");
-
-  gDebugger.once(gDebugger.EVENTS.GLOBAL_SEARCH_MATCH_FOUND, () => {
-    // Some operations are synchronously dispatched on the main thread,
-    // to avoid blocking UI, thus giving the impression of faster searching.
-    executeSoon(() => {
-      info("Current source url:\n" + getSelectedSourceURL(gSources));
-      info("Debugger editor text:\n" + gEditor.getText());
-
-      ok(isCaretPos(gPanel, 6),
-        "The editor shouldn't have jumped to a matching line yet.");
-      ok(getSelectedSourceURL(gSources).includes("-02.js"),
-        "The current source shouldn't have changed after a global search.");
-      is(gSources.visibleItems.length, 2,
-        "Not all the sources are shown after the global search.");
-
-      let sourceResults = gDebugger.document.querySelectorAll(".dbg-source-results");
-      is(sourceResults.length, 2,
-        "There should be matches found in two sources.");
-
-      let item0 = gDebugger.SourceResults.getItemForElement(sourceResults[0]);
-      let item1 = gDebugger.SourceResults.getItemForElement(sourceResults[1]);
-      is(item0.instance.expanded, true,
-        "The first source results should automatically be expanded.");
-      is(item1.instance.expanded, true,
-        "The second source results should automatically be expanded.");
-
-      let searchResult0 = sourceResults[0].querySelectorAll(".dbg-search-result");
-      let searchResult1 = sourceResults[1].querySelectorAll(".dbg-search-result");
-      is(searchResult0.length, 1,
-        "There should be one line result for the first url.");
-      is(searchResult1.length, 2,
-        "There should be two line results for the second url.");
-
-      let firstLine0 = searchResult0[0];
-      is(firstLine0.querySelector(".dbg-results-line-number").getAttribute("value"), "1",
-        "The first result for the first source doesn't have the correct line attached.");
-
-      is(firstLine0.querySelectorAll(".dbg-results-line-contents").length, 1,
-        "The first result for the first source doesn't have the correct number of nodes for a line.");
-      is(firstLine0.querySelectorAll(".dbg-results-line-contents-string").length, 3,
-        "The first result for the first source doesn't have the correct number of strings in a line.");
-
-      is(firstLine0.querySelectorAll(".dbg-results-line-contents-string[match=true]").length, 1,
-        "The first result for the first source doesn't have the correct number of matches in a line.");
-      is(firstLine0.querySelectorAll(".dbg-results-line-contents-string[match=true]")[0].getAttribute("value"), "de",
-        "The first result for the first source doesn't have the correct match in a line.");
-
-      is(firstLine0.querySelectorAll(".dbg-results-line-contents-string[match=false]").length, 2,
-        "The first result for the first source doesn't have the correct number of non-matches in a line.");
-      is(firstLine0.querySelectorAll(".dbg-results-line-contents-string[match=false]")[0].getAttribute("value"), "/* Any copyright is ",
-        "The first result for the first source doesn't have the correct non-matches in a line.");
-      is(firstLine0.querySelectorAll(".dbg-results-line-contents-string[match=false]")[1].getAttribute("value"), "dicated to the Public Domain.",
-        "The first result for the first source doesn't have the correct non-matches in a line.");
-
-      let firstLine1 = searchResult1[0];
-      is(firstLine1.querySelector(".dbg-results-line-number").getAttribute("value"), "1",
-        "The first result for the second source doesn't have the correct line attached.");
-
-      is(firstLine1.querySelectorAll(".dbg-results-line-contents").length, 1,
-        "The first result for the second source doesn't have the correct number of nodes for a line.");
-      is(firstLine1.querySelectorAll(".dbg-results-line-contents-string").length, 3,
-        "The first result for the second source doesn't have the correct number of strings in a line.");
-
-      is(firstLine1.querySelectorAll(".dbg-results-line-contents-string[match=true]").length, 1,
-        "The first result for the second source doesn't have the correct number of matches in a line.");
-      is(firstLine1.querySelectorAll(".dbg-results-line-contents-string[match=true]")[0].getAttribute("value"), "de",
-        "The first result for the second source doesn't have the correct match in a line.");
-
-      is(firstLine1.querySelectorAll(".dbg-results-line-contents-string[match=false]").length, 2,
-        "The first result for the second source doesn't have the correct number of non-matches in a line.");
-      is(firstLine1.querySelectorAll(".dbg-results-line-contents-string[match=false]")[0].getAttribute("value"), "/* Any copyright is ",
-        "The first result for the second source doesn't have the correct non-matches in a line.");
-      is(firstLine1.querySelectorAll(".dbg-results-line-contents-string[match=false]")[1].getAttribute("value"), "dicated to the Public Domain.",
-        "The first result for the second source doesn't have the correct non-matches in a line.");
-
-      let secondLine1 = searchResult1[1];
-      is(secondLine1.querySelector(".dbg-results-line-number").getAttribute("value"), "6",
-        "The second result for the second source doesn't have the correct line attached.");
-
-      is(secondLine1.querySelectorAll(".dbg-results-line-contents").length, 1,
-        "The second result for the second source doesn't have the correct number of nodes for a line.");
-      is(secondLine1.querySelectorAll(".dbg-results-line-contents-string").length, 3,
-        "The second result for the second source doesn't have the correct number of strings in a line.");
-
-      is(secondLine1.querySelectorAll(".dbg-results-line-contents-string[match=true]").length, 1,
-        "The second result for the second source doesn't have the correct number of matches in a line.");
-      is(secondLine1.querySelectorAll(".dbg-results-line-contents-string[match=true]")[0].getAttribute("value"), "de",
-        "The second result for the second source doesn't have the correct match in a line.");
-
-      is(secondLine1.querySelectorAll(".dbg-results-line-contents-string[match=false]").length, 2,
-        "The second result for the second source doesn't have the correct number of non-matches in a line.");
-      is(secondLine1.querySelectorAll(".dbg-results-line-contents-string[match=false]")[0].getAttribute("value"), "  ",
-        "The second result for the second source doesn't have the correct non-matches in a line.");
-      is(secondLine1.querySelectorAll(".dbg-results-line-contents-string[match=false]")[1].getAttribute("value"), "bugger;",
-        "The second result for the second source doesn't have the correct non-matches in a line.");
-
-      deferred.resolve();
-    });
-  });
-
-  setText(gSearchBox, "!de");
-
-  return deferred.promise;
-}
-
-function secondSearch() {
-  let deferred = promise.defer();
-
-  is(gSearchView.itemCount, 2,
-    "The global search pane should have some child nodes from the previous search.");
-  is(gSearchView.widget._parent.hidden, false,
-    "The global search pane should be visible from the previous search.");
-  is(gSearchView._splitter.hidden, false,
-    "The global search pane splitter should be visible from the previous search.");
-
-  gDebugger.once(gDebugger.EVENTS.GLOBAL_SEARCH_MATCH_FOUND, () => {
-    // Some operations are synchronously dispatched on the main thread,
-    // to avoid blocking UI, thus giving the impression of faster searching.
-    executeSoon(() => {
-      info("Current source url:\n" + getSelectedSourceURL(gSources));
-      info("Debugger editor text:\n" + gEditor.getText());
-
-      ok(isCaretPos(gPanel, 6),
-        "The editor shouldn't have jumped to a matching line yet.");
-      ok(getSelectedSourceURL(gSources).includes("-02.js"),
-        "The current source shouldn't have changed after a global search.");
-      is(gSources.visibleItems.length, 2,
-        "Not all the sources are shown after the global search.");
-
-      let sourceResults = gDebugger.document.querySelectorAll(".dbg-source-results");
-      is(sourceResults.length, 2,
-        "There should be matches found in two sources.");
-
-      let item0 = gDebugger.SourceResults.getItemForElement(sourceResults[0]);
-      let item1 = gDebugger.SourceResults.getItemForElement(sourceResults[1]);
-      is(item0.instance.expanded, true,
-        "The first source results should automatically be expanded.");
-      is(item1.instance.expanded, true,
-        "The second source results should automatically be expanded.");
-
-      let searchResult0 = sourceResults[0].querySelectorAll(".dbg-search-result");
-      let searchResult1 = sourceResults[1].querySelectorAll(".dbg-search-result");
-      is(searchResult0.length, 1,
-        "There should be one line result for the first url.");
-      is(searchResult1.length, 1,
-        "There should be one line result for the second url.");
-
-      let firstLine0 = searchResult0[0];
-      is(firstLine0.querySelector(".dbg-results-line-number").getAttribute("value"), "1",
-        "The first result for the first source doesn't have the correct line attached.");
-
-      is(firstLine0.querySelectorAll(".dbg-results-line-contents").length, 1,
-        "The first result for the first source doesn't have the correct number of nodes for a line.");
-      is(firstLine0.querySelectorAll(".dbg-results-line-contents-string").length, 5,
-        "The first result for the first source doesn't have the correct number of strings in a line.");
-
-      is(firstLine0.querySelectorAll(".dbg-results-line-contents-string[match=true]").length, 2,
-        "The first result for the first source doesn't have the correct number of matches in a line.");
-      is(firstLine0.querySelectorAll(".dbg-results-line-contents-string[match=true]")[0].getAttribute("value"), "ed",
-        "The first result for the first source doesn't have the correct matches in a line.");
-      is(firstLine0.querySelectorAll(".dbg-results-line-contents-string[match=true]")[1].getAttribute("value"), "ed",
-        "The first result for the first source doesn't have the correct matches in a line.");
-
-      is(firstLine0.querySelectorAll(".dbg-results-line-contents-string[match=false]").length, 3,
-        "The first result for the first source doesn't have the correct number of non-matches in a line.");
-      is(firstLine0.querySelectorAll(".dbg-results-line-contents-string[match=false]")[0].getAttribute("value"), "/* Any copyright is d",
-        "The first result for the first source doesn't have the correct non-matches in a line.");
-      is(firstLine0.querySelectorAll(".dbg-results-line-contents-string[match=false]")[1].getAttribute("value"), "icat",
-        "The first result for the first source doesn't have the correct non-matches in a line.");
-      is(firstLine0.querySelectorAll(".dbg-results-line-contents-string[match=false]")[2].getAttribute("value"), " to the Public Domain.",
-        "The first result for the first source doesn't have the correct non-matches in a line.");
-
-      let firstLine1 = searchResult1[0];
-      is(firstLine1.querySelector(".dbg-results-line-number").getAttribute("value"), "1",
-        "The first result for the second source doesn't have the correct line attached.");
-
-      is(firstLine1.querySelectorAll(".dbg-results-line-contents").length, 1,
-        "The first result for the second source doesn't have the correct number of nodes for a line.");
-      is(firstLine1.querySelectorAll(".dbg-results-line-contents-string").length, 5,
-        "The first result for the second source doesn't have the correct number of strings in a line.");
-
-      is(firstLine1.querySelectorAll(".dbg-results-line-contents-string[match=true]").length, 2,
-        "The first result for the second source doesn't have the correct number of matches in a line.");
-      is(firstLine1.querySelectorAll(".dbg-results-line-contents-string[match=true]")[0].getAttribute("value"), "ed",
-        "The first result for the second source doesn't have the correct matches in a line.");
-      is(firstLine1.querySelectorAll(".dbg-results-line-contents-string[match=true]")[1].getAttribute("value"), "ed",
-        "The first result for the second source doesn't have the correct matches in a line.");
-
-      is(firstLine1.querySelectorAll(".dbg-results-line-contents-string[match=false]").length, 3,
-        "The first result for the second source doesn't have the correct number of non-matches in a line.");
-      is(firstLine1.querySelectorAll(".dbg-results-line-contents-string[match=false]")[0].getAttribute("value"), "/* Any copyright is d",
-        "The first result for the second source doesn't have the correct non-matches in a line.");
-      is(firstLine1.querySelectorAll(".dbg-results-line-contents-string[match=false]")[1].getAttribute("value"), "icat",
-        "The first result for the second source doesn't have the correct non-matches in a line.");
-      is(firstLine1.querySelectorAll(".dbg-results-line-contents-string[match=false]")[2].getAttribute("value"), " to the Public Domain.",
-        "The first result for the second source doesn't have the correct non-matches in a line.");
-
-      deferred.resolve();
-    });
-  });
-
-  backspaceText(gSearchBox, 2);
-  typeText(gSearchBox, "ED");
-
-  return deferred.promise;
-}
-
-function clearSearch() {
-  gSearchView.clearView();
-
-  is(gSearchView.itemCount, 0,
-    "The global search pane shouldn't have any child nodes after clearing.");
-  is(gSearchView.widget._parent.hidden, true,
-    "The global search pane shouldn't be visible after clearing.");
-  is(gSearchView._splitter.hidden, true,
-    "The global search pane splitter shouldn't be visible after clearing.");
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gEditor = null;
-  gSources = null;
-  gSearchView = null;
-  gSearchBox = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_search-global-02.js
+++ /dev/null
@@ -1,203 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests if the global search results switch back and forth, and wrap around
- * when switching between them.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
-
-var gTab, gPanel, gDebugger;
-var gEditor, gSources, gSearchView, gSearchBox;
-
-function test() {
-  let options = {
-    source: EXAMPLE_URL + "code_script-switching-01.js",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gEditor = gDebugger.DebuggerView.editor;
-    gSources = gDebugger.DebuggerView.Sources;
-    gSearchView = gDebugger.DebuggerView.GlobalSearch;
-    gSearchBox = gDebugger.DebuggerView.Filtering._searchbox;
-
-    function firstSearch() {
-      let deferred = promise.defer();
-
-      is(gSearchView.itemCount, 0,
-         "The global search pane shouldn't have any entries yet.");
-      is(gSearchView.widget._parent.hidden, true,
-         "The global search pane shouldn't be visible yet.");
-      is(gSearchView._splitter.hidden, true,
-         "The global search pane splitter shouldn't be visible yet.");
-
-      gDebugger.once(gDebugger.EVENTS.GLOBAL_SEARCH_MATCH_FOUND, () => {
-        // Some operations are synchronously dispatched on the main thread,
-        // to avoid blocking UI, thus giving the impression of faster searching.
-        executeSoon(() => {
-          info("Current source url:\n" + getSelectedSourceURL(gSources));
-          info("Debugger editor text:\n" + gEditor.getText());
-
-          ok(isCaretPos(gPanel, 6),
-             "The editor shouldn't have jumped to a matching line yet.");
-          ok(getSelectedSourceURL(gSources).includes("-02.js"),
-             "The current source shouldn't have changed after a global search.");
-          is(gSources.visibleItems.length, 2,
-             "Not all the sources are shown after the global search.");
-
-          deferred.resolve();
-        });
-      });
-
-      setText(gSearchBox, "!function");
-
-      return deferred.promise;
-    }
-
-    function doFirstJump() {
-      let deferred = promise.defer();
-
-      waitForSourceAndCaret(gPanel, "-01.js", 4).then(() => {
-        info("Current source url:\n" + getSelectedSourceURL(gSources));
-        info("Debugger editor text:\n" + gEditor.getText());
-
-        ok(getSelectedSourceURL(gSources).includes("-01.js"),
-           "The currently shown source is incorrect (1).");
-        is(gSources.visibleItems.length, 2,
-           "Not all the sources are shown after the global search (1).");
-
-        // The editor's selected text takes a tick to update.
-        ok(isCaretPos(gPanel, 4, 9),
-           "The editor didn't jump to the correct line (1).");
-        is(gEditor.getSelection(), "function",
-           "The editor didn't select the correct text (1).");
-
-        deferred.resolve();
-      });
-
-      EventUtils.sendKey("DOWN", gDebugger);
-
-      return deferred.promise;
-    }
-
-    function doSecondJump() {
-      let deferred = promise.defer();
-
-      waitForSourceAndCaret(gPanel, "-02.js", 4).then(() => {
-        info("Current source url:\n" + getSelectedSourceURL(gSources));
-        info("Debugger editor text:\n" + gEditor.getText());
-
-        ok(getSelectedSourceURL(gSources).includes("-02.js"),
-           "The currently shown source is incorrect (2).");
-        is(gSources.visibleItems.length, 2,
-           "Not all the sources are shown after the global search (2).");
-
-        ok(isCaretPos(gPanel, 4, 9),
-           "The editor didn't jump to the correct line (2).");
-        is(gEditor.getSelection(), "function",
-           "The editor didn't select the correct text (2).");
-
-        deferred.resolve();
-      });
-
-      EventUtils.sendKey("DOWN", gDebugger);
-
-      return deferred.promise;
-    }
-
-    function doWrapAroundJump() {
-      let deferred = promise.defer();
-
-      waitForSourceAndCaret(gPanel, "-01.js", 4).then(() => {
-        info("Current source url:\n" + getSelectedSourceURL(gSources));
-        info("Debugger editor text:\n" + gEditor.getText());
-
-        ok(getSelectedSourceURL(gSources).includes("-01.js"),
-           "The currently shown source is incorrect (3).");
-        is(gSources.visibleItems.length, 2,
-           "Not all the sources are shown after the global search (3).");
-
-        // The editor's selected text takes a tick to update.
-        ok(isCaretPos(gPanel, 4, 9),
-           "The editor didn't jump to the correct line (3).");
-        is(gEditor.getSelection(), "function",
-           "The editor didn't select the correct text (3).");
-
-        deferred.resolve();
-      });
-
-      EventUtils.sendKey("DOWN", gDebugger);
-      EventUtils.sendKey("DOWN", gDebugger);
-
-      return deferred.promise;
-    }
-
-    function doBackwardsWrapAroundJump() {
-      let deferred = promise.defer();
-
-      waitForSourceAndCaret(gPanel, "-02.js", 7).then(() => {
-        info("Current source url:\n" + getSelectedSourceURL(gSources));
-        info("Debugger editor text:\n" + gEditor.getText());
-
-        ok(getSelectedSourceURL(gSources).includes("-02.js"),
-           "The currently shown source is incorrect (4).");
-        is(gSources.visibleItems.length, 2,
-           "Not all the sources are shown after the global search (4).");
-
-        // The editor's selected text takes a tick to update.
-        ok(isCaretPos(gPanel, 7, 11),
-           "The editor didn't jump to the correct line (4).");
-        is(gEditor.getSelection(), "function",
-           "The editor didn't select the correct text (4).");
-
-        deferred.resolve();
-      });
-
-      EventUtils.sendKey("UP", gDebugger);
-
-      return deferred.promise;
-    }
-
-    function testSearchTokenEmpty() {
-      backspaceText(gSearchBox, 4);
-
-      info("Current source url:\n" + getSelectedSourceURL(gSources));
-      info("Debugger editor text:\n" + gEditor.getText());
-
-      ok(getSelectedSourceURL(gSources).includes("-02.js"),
-         "The currently shown source is incorrect (4).");
-      is(gSources.visibleItems.length, 2,
-         "Not all the sources are shown after the global search (4).");
-      ok(isCaretPos(gPanel, 7, 11),
-         "The editor didn't remain at the correct line (4).");
-      is(gEditor.getSelection(), "",
-         "The editor shouldn't keep the previous text selected (4).");
-
-      is(gSearchView.itemCount, 0,
-         "The global search pane shouldn't have any child nodes after clearing.");
-      is(gSearchView.widget._parent.hidden, true,
-         "The global search pane shouldn't be visible after clearing.");
-      is(gSearchView._splitter.hidden, true,
-         "The global search pane splitter shouldn't be visible after clearing.");
-    }
-
-    Task.spawn(function* () {
-      yield waitForSourceAndCaretAndScopes(gPanel, "-02.js", 1);
-      yield firstSearch();
-      yield doFirstJump();
-      yield doSecondJump();
-      yield doWrapAroundJump();
-      yield doBackwardsWrapAroundJump();
-      yield testSearchTokenEmpty();
-      resumeDebuggerThenCloseAndFinish(gPanel);
-    });
-
-    callInTab(gTab, "firstCall");
-  });
-}
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_search-global-03.js
+++ /dev/null
@@ -1,110 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests if the global search results are cleared on location changes, and
- * the expected UI behaviors are triggered.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
-
-var gTab, gPanel, gDebugger;
-var gEditor, gSources, gSearchView, gSearchBox;
-
-function test() {
-  let options = {
-    source: EXAMPLE_URL + "code_script-switching-01.js",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gEditor = gDebugger.DebuggerView.editor;
-    gSources = gDebugger.DebuggerView.Sources;
-    gSearchView = gDebugger.DebuggerView.GlobalSearch;
-    gSearchBox = gDebugger.DebuggerView.Filtering._searchbox;
-
-    waitForSourceAndCaretAndScopes(gPanel, "-02.js", 1)
-      .then(firstSearch)
-      .then(performTest)
-      .then(() => closeDebuggerAndFinish(gPanel))
-      .catch(aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-
-    callInTab(gTab, "firstCall");
-  });
-}
-
-function firstSearch() {
-  let deferred = promise.defer();
-
-  is(gSearchView.itemCount, 0,
-    "The global search pane shouldn't have any entries yet.");
-  is(gSearchView.widget._parent.hidden, true,
-    "The global search pane shouldn't be visible yet.");
-  is(gSearchView._splitter.hidden, true,
-    "The global search pane splitter shouldn't be visible yet.");
-
-  gDebugger.once(gDebugger.EVENTS.GLOBAL_SEARCH_MATCH_FOUND, () => {
-    // Some operations are synchronously dispatched on the main thread,
-    // to avoid blocking UI, thus giving the impression of faster searching.
-    executeSoon(() => {
-      info("Current source url:\n" + getSelectedSourceURL(gSources));
-      info("Debugger editor text:\n" + gEditor.getText());
-
-      ok(isCaretPos(gPanel, 6),
-        "The editor shouldn't have jumped to a matching line yet.");
-      ok(getSelectedSourceURL(gSources).includes("-02.js"),
-        "The current source shouldn't have changed after a global search.");
-      is(gSources.visibleItems.length, 2,
-        "Not all the sources are shown after the global search.");
-
-      deferred.resolve();
-    });
-  });
-
-  setText(gSearchBox, "!function");
-
-  return deferred.promise;
-}
-
-function performTest() {
-  let deferred = promise.defer();
-
-  is(gSearchView.itemCount, 2,
-    "The global search pane should have some entries from the previous search.");
-  is(gSearchView.widget._parent.hidden, false,
-    "The global search pane should be visible from the previous search.");
-  is(gSearchView._splitter.hidden, false,
-    "The global search pane splitter should be visible from the previous search.");
-
-  reloadActiveTab(gPanel, gDebugger.EVENTS.SOURCE_SHOWN).then(() => {
-    info("Current source url:\n" + getSelectedSourceURL(gSources));
-    info("Debugger editor text:\n" + gEditor.getText());
-
-    is(gSearchView.itemCount, 0,
-      "The global search pane shouldn't have any entries after a page navigation.");
-    is(gSearchView.widget._parent.hidden, true,
-      "The global search pane shouldn't be visible after a page navigation.");
-    is(gSearchView._splitter.hidden, true,
-      "The global search pane splitter shouldn't be visible after a page navigation.");
-
-    deferred.resolve();
-  });
-
-  return deferred.promise;
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gEditor = null;
-  gSources = null;
-  gSearchView = null;
-  gSearchBox = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_search-global-04.js
+++ /dev/null
@@ -1,98 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests if the global search results trigger MatchFound and NoMatchFound events
- * properly, and triggers the expected UI behavior.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
-
-var gTab, gPanel, gDebugger;
-var gEditor, gSources, gSearchView, gSearchBox;
-
-function test() {
-  let options = {
-    source: EXAMPLE_URL + "code_script-switching-01.js",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gEditor = gDebugger.DebuggerView.editor;
-    gSources = gDebugger.DebuggerView.Sources;
-    gSearchView = gDebugger.DebuggerView.GlobalSearch;
-    gSearchBox = gDebugger.DebuggerView.Filtering._searchbox;
-
-    waitForSourceAndCaretAndScopes(gPanel, "-02.js", 1)
-      .then(firstSearch)
-      .then(secondSearch)
-      .then(() => resumeDebuggerThenCloseAndFinish(gPanel))
-      .catch(aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-
-    callInTab(gTab, "firstCall");
-  });
-}
-
-function firstSearch() {
-  let deferred = promise.defer();
-
-  gDebugger.once(gDebugger.EVENTS.GLOBAL_SEARCH_MATCH_FOUND, () => {
-    // Some operations are synchronously dispatched on the main thread,
-    // to avoid blocking UI, thus giving the impression of faster searching.
-    executeSoon(() => {
-      info("Current source url:\n" + getSelectedSourceURL(gSources));
-      info("Debugger editor text:\n" + gEditor.getText());
-
-      ok(isCaretPos(gPanel, 6),
-        "The editor shouldn't have jumped to a matching line yet.");
-      ok(getSelectedSourceURL(gSources).includes("-02.js"),
-        "The current source shouldn't have changed after a global search.");
-      is(gSources.visibleItems.length, 2,
-        "Not all the sources are shown after the global search.");
-
-      deferred.resolve();
-    });
-  });
-
-  setText(gSearchBox, "!function");
-
-  return deferred.promise;
-}
-
-function secondSearch() {
-  let deferred = promise.defer();
-
-  gDebugger.once(gDebugger.EVENTS.GLOBAL_SEARCH_MATCH_NOT_FOUND, () => {
-    info("Current source url:\n" + getSelectedSourceURL(gSources));
-    info("Debugger editor text:\n" + gEditor.getText());
-
-    ok(isCaretPos(gPanel, 6),
-      "The editor shouldn't have jumped to a matching line yet.");
-    ok(getSelectedSourceURL(gSources).includes("-02.js"),
-      "The current source shouldn't have changed after a global search.");
-    is(gSources.visibleItems.length, 2,
-      "Not all the sources are shown after the global search.");
-
-    deferred.resolve();
-  });
-
-  typeText(gSearchBox, "/");
-
-  return deferred.promise;
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gEditor = null;
-  gSources = null;
-  gSearchView = null;
-  gSearchBox = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_search-global-05.js
+++ /dev/null
@@ -1,160 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests if the global search results are expanded/collapsed on click, and
- * clicking matches makes the source editor shows the correct source and
- * makes a selection based on the match.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
-
-var gTab, gPanel, gDebugger;
-var gEditor, gSources, gSearchView, gSearchBox;
-
-function test() {
-  let options = {
-    source: EXAMPLE_URL + "code_script-switching-01.js",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gEditor = gDebugger.DebuggerView.editor;
-    gSources = gDebugger.DebuggerView.Sources;
-    gSearchView = gDebugger.DebuggerView.GlobalSearch;
-    gSearchBox = gDebugger.DebuggerView.Filtering._searchbox;
-
-    waitForSourceAndCaretAndScopes(gPanel, "-02.js", 1)
-      .then(doSearch)
-      .then(testExpandCollapse)
-      .then(testClickLineToJump)
-      .then(testClickMatchToJump)
-      .then(() => resumeDebuggerThenCloseAndFinish(gPanel))
-      .catch(aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-
-    callInTab(gTab, "firstCall");
-  });
-}
-
-function doSearch() {
-  let deferred = promise.defer();
-
-  gDebugger.once(gDebugger.EVENTS.GLOBAL_SEARCH_MATCH_FOUND, () => {
-    // Some operations are synchronously dispatched on the main thread,
-    // to avoid blocking UI, thus giving the impression of faster searching.
-    executeSoon(() => {
-      info("Current source url:\n" + getSelectedSourceURL(gSources));
-      info("Debugger editor text:\n" + gEditor.getText());
-
-      ok(isCaretPos(gPanel, 6),
-        "The editor shouldn't have jumped to a matching line yet. (1)");
-      ok(getSelectedSourceURL(gSources).includes("-02.js"),
-        "The current source shouldn't have changed after a global search. (2)");
-      is(gSources.visibleItems.length, 2,
-        "Not all the sources are shown after the global search. (3)");
-
-      deferred.resolve();
-    });
-  });
-
-  setText(gSearchBox, "!a");
-
-  return deferred.promise;
-}
-
-function testExpandCollapse() {
-  let sourceResults = gDebugger.document.querySelectorAll(".dbg-source-results");
-  let item0 = gDebugger.SourceResults.getItemForElement(sourceResults[0]);
-  let item1 = gDebugger.SourceResults.getItemForElement(sourceResults[1]);
-  let firstHeader = sourceResults[0].querySelector(".dbg-results-header");
-  let secondHeader = sourceResults[1].querySelector(".dbg-results-header");
-
-  EventUtils.sendMouseEvent({ type: "click" }, firstHeader);
-  EventUtils.sendMouseEvent({ type: "click" }, secondHeader);
-
-  is(item0.instance.expanded, false,
-    "The first source results should be collapsed on click. (2)");
-  is(item1.instance.expanded, false,
-    "The second source results should be collapsed on click. (2)");
-
-  EventUtils.sendMouseEvent({ type: "click" }, firstHeader);
-  EventUtils.sendMouseEvent({ type: "click" }, secondHeader);
-
-  is(item0.instance.expanded, true,
-    "The first source results should be expanded on an additional click. (3)");
-  is(item1.instance.expanded, true,
-    "The second source results should be expanded on an additional click. (3)");
-}
-
-function testClickLineToJump() {
-  let deferred = promise.defer();
-
-  let sourceResults = gDebugger.document.querySelectorAll(".dbg-source-results");
-  let firstHeader = sourceResults[0].querySelector(".dbg-results-header");
-  let firstLine = sourceResults[0].querySelector(".dbg-results-line-contents");
-
-  waitForSourceAndCaret(gPanel, "-01.js", 1, 1).then(() => {
-    info("Current source url:\n" + getSelectedSourceURL(gSources));
-    info("Debugger editor text:\n" + gEditor.getText());
-
-    ok(isCaretPos(gPanel, 1, 5),
-      "The editor didn't jump to the correct line (4).");
-    is(gEditor.getSelection(), "A",
-      "The editor didn't select the correct text (4).");
-    ok(getSelectedSourceURL(gSources).includes("-01.js"),
-      "The currently shown source is incorrect (4).");
-    is(gSources.visibleItems.length, 2,
-      "Not all the sources are shown after the global search (4).");
-
-    deferred.resolve();
-  });
-
-  EventUtils.sendMouseEvent({ type: "click" }, firstLine);
-
-  return deferred.promise;
-}
-
-function testClickMatchToJump() {
-  let deferred = promise.defer();
-
-  let sourceResults = gDebugger.document.querySelectorAll(".dbg-source-results");
-  let secondHeader = sourceResults[1].querySelector(".dbg-results-header");
-  let secondMatches = sourceResults[1].querySelectorAll(".dbg-results-line-contents-string[match=true]");
-  let lastMatch = Array.slice(secondMatches).pop();
-
-  waitForSourceAndCaret(gPanel, "-02.js", 13, 3).then(() => {
-    info("Current source url:\n" + getSelectedSourceURL(gSources));
-    info("Debugger editor text:\n" + gEditor.getText());
-
-    ok(isCaretPos(gPanel, 13, 3),
-      "The editor didn't jump to the correct line (5).");
-    is(gEditor.getSelection(), "a",
-      "The editor didn't select the correct text (5).");
-    ok(getSelectedSourceURL(gSources).includes("-02.js"),
-      "The currently shown source is incorrect (5).");
-    is(gSources.visibleItems.length, 2,
-      "Not all the sources are shown after the global search (5).");
-
-    deferred.resolve();
-  });
-
-  EventUtils.sendMouseEvent({ type: "click" }, lastMatch);
-
-  return deferred.promise;
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gEditor = null;
-  gSources = null;
-  gSearchView = null;
-  gSearchBox = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_search-global-06.js
+++ /dev/null
@@ -1,125 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests if the global search results are hidden when they're supposed to
- * (after a focus lost, or when ESCAPE is pressed).
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
-
-var gTab, gPanel, gDebugger;
-var gEditor, gSources, gSearchView, gSearchBox;
-
-function test() {
-  let options = {
-    source: EXAMPLE_URL + "code_script-switching-01.js",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gEditor = gDebugger.DebuggerView.editor;
-    gSources = gDebugger.DebuggerView.Sources;
-    gSearchView = gDebugger.DebuggerView.GlobalSearch;
-    gSearchBox = gDebugger.DebuggerView.Filtering._searchbox;
-
-    waitForSourceAndCaretAndScopes(gPanel, "-02.js", 1)
-      .then(doSearch)
-      .then(testFocusLost)
-      .then(doSearch)
-      .then(testEscape)
-      .then(() => resumeDebuggerThenCloseAndFinish(gPanel))
-      .catch(aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-
-    callInTab(gTab, "firstCall");
-  });
-}
-
-function doSearch() {
-  let deferred = promise.defer();
-
-  is(gSearchView.itemCount, 0,
-    "The global search pane shouldn't have any entries yet.");
-  is(gSearchView.widget._parent.hidden, true,
-    "The global search pane shouldn't be visible yet.");
-  is(gSearchView._splitter.hidden, true,
-    "The global search pane splitter shouldn't be visible yet.");
-
-  gDebugger.once(gDebugger.EVENTS.GLOBAL_SEARCH_MATCH_FOUND, () => {
-    // Some operations are synchronously dispatched on the main thread,
-    // to avoid blocking UI, thus giving the impression of faster searching.
-    executeSoon(() => {
-      info("Current source url:\n" + getSelectedSourceURL(gSources));
-      info("Debugger editor text:\n" + gEditor.getText());
-
-      ok(isCaretPos(gPanel, 6),
-        "The editor shouldn't have jumped to a matching line yet.");
-      ok(getSelectedSourceURL(gSources).includes("-02.js"),
-        "The current source shouldn't have changed after a global search.");
-      is(gSources.visibleItems.length, 2,
-        "Not all the sources are shown after the global search.");
-
-      deferred.resolve();
-    });
-  });
-
-  setText(gSearchBox, "!a");
-
-  return deferred.promise;
-}
-
-function testFocusLost() {
-  is(gSearchView.itemCount, 2,
-    "The global search pane should have some entries from the previous search.");
-  is(gSearchView.widget._parent.hidden, false,
-    "The global search pane should be visible from the previous search.");
-  is(gSearchView._splitter.hidden, false,
-    "The global search pane splitter should be visible from the previous search.");
-
-  gDebugger.DebuggerView.editor.focus();
-
-  info("Current source url:\n" + getSelectedSourceURL(gSources));
-  info("Debugger editor text:\n" + gEditor.getText());
-
-  is(gSearchView.itemCount, 0,
-    "The global search pane shouldn't have any child nodes after clearing.");
-  is(gSearchView.widget._parent.hidden, true,
-    "The global search pane shouldn't be visible after clearing.");
-  is(gSearchView._splitter.hidden, true,
-    "The global search pane splitter shouldn't be visible after clearing.");
-}
-
-function testEscape() {
-  is(gSearchView.itemCount, 2,
-    "The global search pane should have some entries from the previous search.");
-  is(gSearchView.widget._parent.hidden, false,
-    "The global search pane should be visible from the previous search.");
-  is(gSearchView._splitter.hidden, false,
-    "The global search pane splitter should be visible from the previous search.");
-
-  gSearchBox.focus();
-  EventUtils.sendKey("ESCAPE", gDebugger);
-
-  is(gSearchView.itemCount, 0,
-    "The global search pane shouldn't have any child nodes after clearing.");
-  is(gSearchView.widget._parent.hidden, true,
-    "The global search pane shouldn't be visible after clearing.");
-  is(gSearchView._splitter.hidden, true,
-    "The global search pane splitter shouldn't be visible after clearing.");
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gEditor = null;
-  gSources = null;
-  gSearchView = null;
-  gSearchBox = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_search-popup-jank.js
+++ /dev/null
@@ -1,128 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests that sources aren't selected by default when finding a match.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_editor-mode.html";
-
-var gTab, gPanel, gDebugger;
-var gSearchBox;
-
-function test() {
-  let options = {
-    source: EXAMPLE_URL + "code_script-switching-01.js?a=b",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gSearchBox = gDebugger.DebuggerView.Filtering._searchbox;
-
-    gDebugger.DebuggerView.Filtering.FilteredSources._autoSelectFirstItem = false;
-    gDebugger.DebuggerView.Filtering.FilteredFunctions._autoSelectFirstItem = false;
-
-    superGenericFileSearch()
-      .then(() => ensureSourceIs(aPanel, "-01.js"))
-      .then(() => ensureCaretAt(aPanel, 1))
-
-      .then(superAccurateFileSearch)
-      .then(() => ensureSourceIs(aPanel, "-01.js"))
-      .then(() => ensureCaretAt(aPanel, 1))
-      .then(() => pressKeyToHide("RETURN"))
-      .then(() => ensureSourceIs(aPanel, "code_test-editor-mode", true))
-      .then(() => ensureCaretAt(aPanel, 1))
-
-      .then(superGenericFileSearch)
-      .then(() => ensureSourceIs(aPanel, "code_test-editor-mode"))
-      .then(() => ensureCaretAt(aPanel, 1))
-      .then(() => {
-        const shown = waitForSourceShown(aPanel, "doc_editor-mode");
-        pressKey("UP");
-        return shown;
-      })
-      .then(() => ensureCaretAt(aPanel, 1))
-      .then(() => pressKeyToHide("RETURN"))
-      .then(() => ensureSourceIs(aPanel, "doc_editor-mode"))
-      .then(() => ensureCaretAt(aPanel, 1))
-
-      .then(superAccurateFileSearch)
-      .then(() => ensureSourceIs(aPanel, "doc_editor-mode"))
-      .then(() => ensureCaretAt(aPanel, 1))
-      .then(() => {
-        const shown = waitForSourceShown(gPanel, "code_test-editor-mode");
-        typeText(gSearchBox, ":");
-        return shown;
-      })
-      .then(() => ensureSourceIs(aPanel, "code_test-editor-mode", true))
-      .then(() => ensureCaretAt(aPanel, 1))
-      .then(() => typeText(gSearchBox, "5"))
-      .then(() => ensureSourceIs(aPanel, "code_test-editor-mode"))
-      .then(() => ensureCaretAt(aPanel, 5))
-      .then(() => pressKey("DOWN"))
-      .then(() => ensureSourceIs(aPanel, "code_test-editor-mode"))
-      .then(() => ensureCaretAt(aPanel, 6))
-
-      .then(superGenericFunctionSearch)
-      .then(() => ensureSourceIs(aPanel, "code_test-editor-mode"))
-      .then(() => ensureCaretAt(aPanel, 6))
-      .then(() => pressKey("RETURN"))
-      .then(() => ensureSourceIs(aPanel, "code_test-editor-mode"))
-      .then(() => ensureCaretAt(aPanel, 4, 10))
-
-      .then(() => closeDebuggerAndFinish(gPanel))
-      .catch(aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-  });
-}
-
-function waitForMatchFoundAndResultsShown(aName) {
-  return promise.all([
-    once(gDebugger, "popupshown"),
-    waitForDebuggerEvents(gPanel, gDebugger.EVENTS[aName])
-  ]);
-}
-
-function waitForResultsHidden() {
-  return once(gDebugger, "popuphidden");
-}
-
-function superGenericFunctionSearch() {
-  let finished = waitForMatchFoundAndResultsShown("FUNCTION_SEARCH_MATCH_FOUND");
-  setText(gSearchBox, "@");
-  return finished;
-}
-
-function superGenericFileSearch() {
-  let finished = waitForMatchFoundAndResultsShown("FILE_SEARCH_MATCH_FOUND");
-  setText(gSearchBox, ".");
-  return finished;
-}
-
-function superAccurateFileSearch() {
-  let finished = waitForMatchFoundAndResultsShown("FILE_SEARCH_MATCH_FOUND");
-  setText(gSearchBox, "editor");
-  return finished;
-}
-
-function pressKey(aKey) {
-  EventUtils.sendKey(aKey, gDebugger);
-}
-
-function pressKeyToHide(aKey) {
-  let finished = waitForResultsHidden();
-  EventUtils.sendKey(aKey, gDebugger);
-  return finished;
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gSearchBox = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_search-sources-01.js
+++ /dev/null
@@ -1,232 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests basic functionality of sources filtering (file search).
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
-
-function test() {
-  // Debug test slaves are a bit slow at this test.
-  requestLongerTimeout(3);
-
-  let options = {
-    source: EXAMPLE_URL + "code_script-switching-01.js",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    const gTab = aTab;
-    const gPanel = aPanel;
-    const gDebugger = gPanel.panelWin;
-    const gSources = gDebugger.DebuggerView.Sources;
-    const gSearchView = gDebugger.DebuggerView.Filtering.FilteredSources;
-    const gSearchBox = gDebugger.DebuggerView.Filtering._searchbox;
-
-    Task.spawn(function* () {
-      // move searches to yields
-      // not sure what to do with the error...
-      yield bogusSearch();
-      yield firstSearch();
-      yield secondSearch();
-      yield thirdSearch();
-      yield fourthSearch();
-      yield fifthSearch();
-      yield sixthSearch();
-      yield seventhSearch();
-
-      return closeDebuggerAndFinish(gPanel)
-        .catch(aError => {
-          ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-        });
-    });
-
-    function bogusSearch() {
-      let finished = promise.all([
-        ensureSourceIs(gPanel, "-01.js"),
-        ensureCaretAt(gPanel, 1),
-        waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FILE_SEARCH_MATCH_NOT_FOUND)
-      ]);
-
-      setText(gSearchBox, "BOGUS");
-
-      return finished.then(() => promise.all([
-        ensureSourceIs(gPanel, "-01.js"),
-        ensureCaretAt(gPanel, 1),
-        verifyContents({ itemCount: 0, hidden: true })
-      ]));
-    }
-
-    function firstSearch() {
-      let finished = promise.all([
-        ensureSourceIs(gPanel, "-01.js"),
-        ensureCaretAt(gPanel, 1),
-        once(gDebugger, "popupshown"),
-        waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FILE_SEARCH_MATCH_FOUND),
-        waitForSourceShown(gPanel, "-02.js")
-      ]);
-
-      setText(gSearchBox, "-02.js");
-
-      return finished.then(() => promise.all([
-        ensureSourceIs(gPanel, "-02.js"),
-        ensureCaretAt(gPanel, 1),
-        verifyContents({ itemCount: 1, hidden: false })
-      ]));
-    }
-
-    function secondSearch() {
-      let finished = promise.all([
-        once(gDebugger, "popupshown"),
-        waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FILE_SEARCH_MATCH_FOUND),
-        waitForSourceShown(gPanel, "-01.js")
-      ])
-      .then(() => {
-        let finished = promise.all([
-          once(gDebugger, "popupshown"),
-          waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FILE_SEARCH_MATCH_FOUND),
-          waitForCaretUpdated(gPanel, 5)
-        ])
-        .then(() => promise.all([
-          ensureSourceIs(gPanel, "-01.js"),
-          ensureCaretAt(gPanel, 5),
-          verifyContents({ itemCount: 1, hidden: false })
-        ]));
-
-        typeText(gSearchBox, ":5");
-        return finished;
-      });
-
-      setText(gSearchBox, ".*-01\.js");
-      return finished;
-    }
-
-    function thirdSearch() {
-      let finished = promise.all([
-        once(gDebugger, "popupshown"),
-        waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FILE_SEARCH_MATCH_FOUND),
-        waitForSourceShown(gPanel, "-02.js")
-      ])
-      .then(() => {
-        let finished = promise.all([
-          once(gDebugger, "popupshown"),
-          waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FILE_SEARCH_MATCH_FOUND),
-          waitForCaretUpdated(gPanel, 6, 6)
-        ])
-        .then(() => promise.all([
-          ensureSourceIs(gPanel, "-02.js"),
-          ensureCaretAt(gPanel, 6, 6),
-          verifyContents({ itemCount: 1, hidden: false })
-        ]));
-
-        typeText(gSearchBox, "#deb");
-        return finished;
-      });
-
-      setText(gSearchBox, ".*-02\.js");
-      return finished;
-    }
-
-    function fourthSearch() {
-      let finished = promise.all([
-        once(gDebugger, "popupshown"),
-        waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FILE_SEARCH_MATCH_FOUND),
-        waitForSourceShown(gPanel, "-01.js")
-      ])
-      .then(() => {
-        let finished = promise.all([
-          once(gDebugger, "popupshown"),
-          waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FILE_SEARCH_MATCH_FOUND),
-          waitForCaretUpdated(gPanel, 2, 9),
-        ])
-        .then(() => promise.all([
-          ensureSourceIs(gPanel, "-01.js"),
-          ensureCaretAt(gPanel, 2, 9),
-          verifyContents({ itemCount: 1, hidden: false })
-          // ...because we simply searched for ":" in the current file.
-        ]));
-
-        typeText(gSearchBox, "#:"); // # has precedence.
-        return finished;
-      });
-
-      setText(gSearchBox, ".*-01\.js");
-      return finished;
-    }
-
-    function fifthSearch() {
-      let finished = promise.all([
-        once(gDebugger, "popupshown"),
-        waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FILE_SEARCH_MATCH_FOUND),
-        waitForSourceShown(gPanel, "-02.js")
-      ])
-      .then(() => {
-        let finished = promise.all([
-          once(gDebugger, "popuphidden"),
-          waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FILE_SEARCH_MATCH_NOT_FOUND),
-          waitForCaretUpdated(gPanel, 1, 3)
-        ])
-        .then(() => promise.all([
-          ensureSourceIs(gPanel, "-02.js"),
-          ensureCaretAt(gPanel, 1, 3),
-          verifyContents({ itemCount: 0, hidden: true })
-          // ...because the searched label includes ":5", so nothing is found.
-        ]));
-
-        typeText(gSearchBox, ":5#*"); // # has precedence.
-        return finished;
-      });
-
-      setText(gSearchBox, ".*-02\.js");
-      return finished;
-    }
-
-    function sixthSearch() {
-      let finished = promise.all([
-        ensureSourceIs(gPanel, "-02.js"),
-        ensureCaretAt(gPanel, 1, 3),
-        once(gDebugger, "popupshown"),
-        waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FILE_SEARCH_MATCH_FOUND),
-        waitForCaretUpdated(gPanel, 5)
-      ]);
-
-      backspaceText(gSearchBox, 2);
-
-      return finished.then(() => promise.all([
-        ensureSourceIs(gPanel, "-02.js"),
-        ensureCaretAt(gPanel, 5),
-        verifyContents({ itemCount: 1, hidden: false })
-      ]));
-    }
-
-    function seventhSearch() {
-      let finished = promise.all([
-        ensureSourceIs(gPanel, "-02.js"),
-        ensureCaretAt(gPanel, 5),
-        once(gDebugger, "popupshown"),
-        waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FILE_SEARCH_MATCH_FOUND),
-        waitForSourceShown(gPanel, "-01.js"),
-      ]);
-
-      backspaceText(gSearchBox, 6);
-
-      return finished.then(() => promise.all([
-        ensureSourceIs(gPanel, "-01.js"),
-        ensureCaretAt(gPanel, 2, 9),
-        verifyContents({ itemCount: 2, hidden: false })
-      ]));
-    }
-
-    function verifyContents(aArgs) {
-      is(gSources.visibleItems.length, 2,
-        "The unmatched sources in the widget should not be hidden.");
-      is(gSearchView.itemCount, aArgs.itemCount,
-        "No sources should be displayed in the sources container after a bogus search.");
-      is(gSearchView.hidden, aArgs.hidden,
-        "No sources should be displayed in the sources container after a bogus search.");
-    }
-
-  });
-}
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_search-sources-02.js
+++ /dev/null
@@ -1,281 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests more complex functionality of sources filtering (file search).
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_editor-mode.html";
-
-var gTab, gPanel, gDebugger;
-var gSources, gSourceUtils, gSearchView, gSearchBox;
-
-function test() {
-  // Debug test slaves are a bit slow at this test.
-  requestLongerTimeout(3);
-
-  let options = {
-    source: EXAMPLE_URL + "code_script-switching-01.js?a=b",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gSources = gDebugger.DebuggerView.Sources;
-    gSourceUtils = gDebugger.SourceUtils;
-    gSearchView = gDebugger.DebuggerView.Filtering.FilteredSources;
-    gSearchBox = gDebugger.DebuggerView.Filtering._searchbox;
-
-    firstSearch()
-      .then(secondSearch)
-      .then(thirdSearch)
-      .then(fourthSearch)
-      .then(fifthSearch)
-      .then(goDown)
-      .then(goDownAndWrap)
-      .then(goUpAndWrap)
-      .then(goUp)
-      .then(returnAndSwitch)
-      .then(firstSearch)
-      .then(clickAndSwitch)
-      .then(() => closeDebuggerAndFinish(gPanel))
-      .catch(aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-  });
-}
-
-function firstSearch() {
-  let finished = promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 1),
-    once(gDebugger, "popupshown"),
-    waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FILE_SEARCH_MATCH_FOUND)
-  ]);
-
-  setText(gSearchBox, ".");
-
-  return finished.then(() => promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 1),
-    verifyContents([
-      "code_script-switching-01.js?a=b",
-      "code_test-editor-mode?c=d",
-      "doc_editor-mode.html"
-    ])
-  ]));
-}
-
-function secondSearch() {
-  let finished = promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 1),
-    once(gDebugger, "popupshown"),
-    waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FILE_SEARCH_MATCH_FOUND)
-  ]);
-
-  typeText(gSearchBox, "-0");
-
-  return finished.then(() => promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 1),
-    verifyContents(["code_script-switching-01.js?a=b"])
-  ]));
-}
-
-function thirdSearch() {
-  let finished = promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 1),
-    once(gDebugger, "popupshown"),
-    waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FILE_SEARCH_MATCH_FOUND)
-  ]);
-
-  backspaceText(gSearchBox, 1);
-
-  return finished.then(() => promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 1),
-    verifyContents([
-      "code_script-switching-01.js?a=b",
-      "code_test-editor-mode?c=d",
-      "doc_editor-mode.html"
-    ])
-  ]));
-}
-
-function fourthSearch() {
-  let finished = promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 1),
-    once(gDebugger, "popupshown"),
-    waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FILE_SEARCH_MATCH_FOUND),
-    waitForSourceShown(gPanel, "test-editor-mode")
-  ]);
-
-  setText(gSearchBox, "code_test");
-
-  return finished.then(() => promise.all([
-    ensureSourceIs(gPanel, "test-editor-mode"),
-    ensureCaretAt(gPanel, 1),
-    verifyContents(["code_test-editor-mode?c=d"])
-  ]));
-}
-
-function fifthSearch() {
-  let finished = promise.all([
-    ensureSourceIs(gPanel, "test-editor-mode"),
-    ensureCaretAt(gPanel, 1),
-    once(gDebugger, "popupshown"),
-    waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FILE_SEARCH_MATCH_FOUND),
-    waitForSourceShown(gPanel, "-01.js")
-  ]);
-
-  backspaceText(gSearchBox, 4);
-
-  return finished.then(() => promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 1),
-    verifyContents([
-      "code_script-switching-01.js?a=b",
-      "code_test-editor-mode?c=d"
-    ])
-  ]));
-}
-
-function goDown() {
-  let finished = promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 1),
-    waitForSourceShown(gPanel, "test-editor-mode"),
-  ]);
-
-  EventUtils.sendKey("DOWN", gDebugger);
-
-  return finished.then(() => promise.all([
-    ensureSourceIs(gPanel, "test-editor-mode"),
-    ensureCaretAt(gPanel, 1),
-    verifyContents([
-      "code_script-switching-01.js?a=b",
-      "code_test-editor-mode?c=d"
-    ])
-  ]));
-}
-
-function goDownAndWrap() {
-  let finished = promise.all([
-    ensureSourceIs(gPanel, "test-editor-mode"),
-    ensureCaretAt(gPanel, 1),
-    waitForSourceShown(gPanel, "-01.js")
-  ]);
-
-  EventUtils.synthesizeKey("g", { metaKey: true }, gDebugger);
-
-  return finished.then(() => promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 1),
-    verifyContents([
-      "code_script-switching-01.js?a=b",
-      "code_test-editor-mode?c=d"
-    ])
-  ]));
-}
-
-function goUpAndWrap() {
-  let finished = promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 1),
-    waitForSourceShown(gPanel, "test-editor-mode")
-  ]);
-
-  EventUtils.synthesizeKey("G", { metaKey: true }, gDebugger);
-
-  return finished.then(() => promise.all([
-    ensureSourceIs(gPanel, "test-editor-mode"),
-    ensureCaretAt(gPanel, 1),
-    verifyContents([
-      "code_script-switching-01.js?a=b",
-      "code_test-editor-mode?c=d"
-    ])
-  ]));
-}
-
-function goUp() {
-  let finished = promise.all([
-    ensureSourceIs(gPanel, "test-editor-mode"),
-    ensureCaretAt(gPanel, 1),
-    waitForSourceShown(gPanel, "-01.js"),
-  ]);
-
-  EventUtils.sendKey("UP", gDebugger);
-
-  return finished.then(() => promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 1),
-    verifyContents([
-      "code_script-switching-01.js?a=b",
-      "code_test-editor-mode?c=d"
-    ])
-  ]));
-}
-
-function returnAndSwitch() {
-  let finished = promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 1),
-    once(gDebugger, "popuphidden")
-  ]);
-
-  EventUtils.sendKey("RETURN", gDebugger);
-
-  return finished.then(() => promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 1)
-  ]));
-}
-
-function clickAndSwitch() {
-  let finished = promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 1),
-    once(gDebugger, "popuphidden"),
-    waitForSourceShown(gPanel, "test-editor-mode")
-  ]);
-
-  EventUtils.sendMouseEvent({ type: "click" }, gSearchView.items[1].target, gDebugger);
-
-  return finished.then(() => promise.all([
-    ensureSourceIs(gPanel, "test-editor-mode"),
-    ensureCaretAt(gPanel, 1)
-  ]));
-}
-
-function verifyContents(aMatches) {
-  is(gSources.visibleItems.length, 3,
-    "The unmatched sources in the widget should not be hidden.");
-  is(gSearchView.itemCount, aMatches.length,
-    "The filtered sources view should have the right items available.");
-
-  for (let i = 0; i < gSearchView.itemCount; i++) {
-    let trimmedLabel = gSourceUtils.trimUrlLength(gSourceUtils.trimUrlQuery(aMatches[i]));
-    let trimmedLocation = gSourceUtils.trimUrlLength(EXAMPLE_URL + aMatches[i], 0, "start");
-
-    ok(gSearchView.widget._parent.querySelector(".results-panel-item-label[value=\"" + trimmedLabel + "\"]"),
-      "The filtered sources view should have the correct source labels.");
-    ok(gSearchView.widget._parent.querySelector(".results-panel-item-label-below[value=\"" + trimmedLocation + "\"]"),
-      "The filtered sources view should have the correct source locations.");
-  }
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gSources = null;
-  gSourceUtils = null;
-  gSearchView = null;
-  gSearchBox = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_search-sources-03.js
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests that while searching for files, the sources list remains unchanged.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_editor-mode.html";
-
-var gTab, gPanel, gDebugger;
-var gSources, gSearchBox;
-
-function test() {
-  let options = {
-    source: EXAMPLE_URL + "code_script-switching-01.js?a=b",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gSources = gDebugger.DebuggerView.Sources;
-    gSearchBox = gDebugger.DebuggerView.Filtering._searchbox;
-
-    superGenericSearch()
-      .then(verifySourcesPane)
-      .then(kindaInterpretableSearch)
-      .then(verifySourcesPane)
-      .then(incrediblySpecificSearch)
-      .then(verifySourcesPane)
-      .then(returnAndHide)
-      .then(verifySourcesPane)
-      .then(() => closeDebuggerAndFinish(gPanel))
-      .catch(aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-  });
-}
-
-function waitForMatchFoundAndResultsShown() {
-  return promise.all([
-    once(gDebugger, "popupshown"),
-    waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FILE_SEARCH_MATCH_FOUND)
-  ]).then(() => promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 1)
-  ]));
-}
-
-function waitForResultsHidden() {
-  return once(gDebugger, "popuphidden").then(() => promise.all([
-    ensureSourceIs(gPanel, "-01.js"),
-    ensureCaretAt(gPanel, 1)
-  ]));
-}
-
-function superGenericSearch() {
-  let finished = waitForMatchFoundAndResultsShown();
-  setText(gSearchBox, ".");
-  return finished;
-}
-
-function kindaInterpretableSearch() {
-  let finished = waitForMatchFoundAndResultsShown();
-  typeText(gSearchBox, "-0");
-  return finished;
-}
-
-function incrediblySpecificSearch() {
-  let finished = waitForMatchFoundAndResultsShown();
-  typeText(gSearchBox, "1.js");
-  return finished;
-}
-
-function returnAndHide() {
-  let finished = waitForResultsHidden();
-  EventUtils.sendKey("RETURN", gDebugger);
-  return finished;
-}
-
-function verifySourcesPane() {
-  is(gSources.itemCount, 3,
-    "There should be 3 items present in the sources container.");
-  is(gSources.visibleItems.length, 3,
-    "There should be no hidden items in the sources container.");
-
-  ok(gSources.getItemForAttachment(e => e.label == "code_script-switching-01.js"),
-    "The first source's label should be correct.");
-  ok(gSources.getItemForAttachment(e => e.label == "code_test-editor-mode"),
-    "The second source's label should be correct.");
-  ok(gSources.getItemForAttachment(e => e.label == "doc_editor-mode.html"),
-    "The third source's label should be correct.");
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gSources = null;
-  gSearchBox = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_search-symbols.js
+++ /dev/null
@@ -1,472 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests if the function searching works properly.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_function-search.html";
-
-var gTab, gPanel, gDebugger;
-var gEditor, gSources, gSearchBox, gFilteredFunctions;
-
-function test() {
-  let options = {
-    source: EXAMPLE_URL + "code_function-search-01.js",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gEditor = gDebugger.DebuggerView.editor;
-    gSources = gDebugger.DebuggerView.Sources;
-    gSearchBox = gDebugger.DebuggerView.Filtering._searchbox;
-    gFilteredFunctions = gDebugger.DebuggerView.Filtering.FilteredFunctions;
-
-   showSource("doc_function-search.html")
-      .then(htmlSearch)
-      .then(() => showSource("code_function-search-01.js"))
-      .then(firstJsSearch)
-      .then(() => showSource("code_function-search-02.js"))
-      .then(secondJsSearch)
-      .then(() => showSource("code_function-search-03.js"))
-      .then(thirdJsSearch)
-      .then(saveSearch)
-      .then(filterSearch)
-      .then(bogusSearch)
-      .then(incrementalSearch)
-      .then(emptySearch)
-      .then(() => closeDebuggerAndFinish(gPanel))
-      .catch(aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-  });
-}
-
-function htmlSearch() {
-  let deferred = promise.defer();
-
-  once(gDebugger, "popupshown").then(() => {
-    writeInfo();
-
-    is(gFilteredFunctions.selectedIndex, 0,
-      "An item should be selected in the filtered functions view (1).");
-    ok(gFilteredFunctions.selectedItem,
-      "An item should be selected in the filtered functions view (2).");
-
-    if (gSources.selectedItem.attachment.source.url.includes(".html")) {
-      let expectedResults = [
-        ["inline", ".html", "", 19, 16],
-        ["arrow", ".html", "", 20, 11],
-        ["foo", ".html", "", 22, 11],
-        ["foo2", ".html", "", 23, 11],
-        ["bar2", ".html", "", 23, 18]
-      ];
-
-      for (let [label, value, description, line, column] of expectedResults) {
-        let target = gFilteredFunctions.selectedItem.target;
-
-        if (label) {
-          is(target.querySelector(".results-panel-item-label").getAttribute("value"),
-            gDebugger.SourceUtils.trimUrlLength(label + "()"),
-            "The correct label (" + label + ") is currently selected.");
-        } else {
-          ok(!target.querySelector(".results-panel-item-label"),
-            "Shouldn't create empty label nodes.");
-        }
-        if (value) {
-          ok(target.querySelector(".results-panel-item-label-below").getAttribute("value").includes(value),
-            "The correct value (" + value + ") is attached.");
-        } else {
-          ok(!target.querySelector(".results-panel-item-label-below"),
-            "Shouldn't create empty label nodes.");
-        }
-        if (description) {
-          is(target.querySelector(".results-panel-item-label-before").getAttribute("value"), description,
-            "The correct description (" + description + ") is currently shown.");
-        } else {
-          ok(!target.querySelector(".results-panel-item-label-before"),
-            "Shouldn't create empty label nodes.");
-        }
-
-        ok(isCaretPos(gPanel, line, column),
-          "The editor didn't jump to the correct line.");
-
-        EventUtils.sendKey("DOWN", gDebugger);
-      }
-
-      ok(isCaretPos(gPanel, expectedResults[0][3], expectedResults[0][4]),
-        "The editor didn't jump to the correct line again.");
-
-      deferred.resolve();
-    } else {
-      ok(false, "How did you get here? Go away, you.");
-    }
-  });
-
-  setText(gSearchBox, "@");
-  return deferred.promise;
-}
-
-function firstJsSearch() {
-  let deferred = promise.defer();
-
-  once(gDebugger, "popupshown").then(() => {
-    writeInfo();
-
-    is(gFilteredFunctions.selectedIndex, 0,
-      "An item should be selected in the filtered functions view (1).");
-    ok(gFilteredFunctions.selectedItem,
-      "An item should be selected in the filtered functions view (2).");
-
-    if (gSources.selectedItem.attachment.source.url.includes("-01.js")) {
-      let s = " " + gDebugger.L10N.getStr("functionSearchSeparatorLabel") + " ";
-      let expectedResults = [
-        ["test", "-01.js", "", 4, 10],
-        ["anonymousExpression", "-01.js", "test.prototype", 9, 3],
-        ["namedExpression" + s + "NAME", "-01.js", "test.prototype", 11, 3],
-        ["a_test", "-01.js", "foo", 22, 3],
-        ["n_test" + s + "x", "-01.js", "foo", 24, 3],
-        ["a_test", "-01.js", "foo.sub", 27, 5],
-        ["n_test" + s + "y", "-01.js", "foo.sub", 29, 5],
-        ["a_test", "-01.js", "foo.sub.sub", 32, 7],
-        ["n_test" + s + "z", "-01.js", "foo.sub.sub", 34, 7],
-        ["test_SAME_NAME", "-01.js", "foo.sub.sub.sub", 37, 9]
-      ];
-
-      for (let [label, value, description, line, column] of expectedResults) {
-        let target = gFilteredFunctions.selectedItem.target;
-
-        if (label) {
-          is(target.querySelector(".results-panel-item-label").getAttribute("value"),
-            gDebugger.SourceUtils.trimUrlLength(label + "()"),
-            "The correct label (" + label + ") is currently selected.");
-        } else {
-          ok(!target.querySelector(".results-panel-item-label"),
-            "Shouldn't create empty label nodes.");
-        }
-        if (value) {
-          ok(target.querySelector(".results-panel-item-label-below").getAttribute("value").includes(value),
-            "The correct value (" + value + ") is attached.");
-        } else {
-          ok(!target.querySelector(".results-panel-item-label-below"),
-            "Shouldn't create empty label nodes.");
-        }
-        if (description) {
-          is(target.querySelector(".results-panel-item-label-before").getAttribute("value"), description,
-            "The correct description (" + description + ") is currently shown.");
-        } else {
-          ok(!target.querySelector(".results-panel-item-label-before"),
-            "Shouldn't create empty label nodes.");
-        }
-
-        ok(isCaretPos(gPanel, line, column),
-          "The editor didn't jump to the correct line.");
-
-        EventUtils.sendKey("DOWN", gDebugger);
-      }
-
-      ok(isCaretPos(gPanel, expectedResults[0][3], expectedResults[0][4]),
-        "The editor didn't jump to the correct line again.");
-
-      deferred.resolve();
-    } else {
-      ok(false, "How did you get here? Go away, you.");
-    }
-  });
-
-  setText(gSearchBox, "@");
-  return deferred.promise;
-}
-
-function secondJsSearch() {
-  let deferred = promise.defer();
-
-  once(gDebugger, "popupshown").then(() => {
-    writeInfo();
-
-    is(gFilteredFunctions.selectedIndex, 0,
-      "An item should be selected in the filtered functions view (1).");
-    ok(gFilteredFunctions.selectedItem,
-      "An item should be selected in the filtered functions view (2).");
-
-    if (gSources.selectedItem.attachment.source.url.includes("-02.js")) {
-      let s = " " + gDebugger.L10N.getStr("functionSearchSeparatorLabel") + " ";
-      let expectedResults = [
-        ["test2", "-02.js", "", 4, 5],
-        ["test3" + s + "test3_NAME", "-02.js", "", 8, 5],
-        ["test4_SAME_NAME", "-02.js", "", 11, 5],
-        ["x" + s + "X", "-02.js", "test.prototype", 14, 1],
-        ["y" + s + "Y", "-02.js", "test.prototype.sub", 16, 1],
-        ["z" + s + "Z", "-02.js", "test.prototype.sub.sub", 18, 1],
-        ["t", "-02.js", "test.prototype.sub.sub.sub", 20, 1],
-        ["x", "-02.js", "this", 20, 32],
-        ["y", "-02.js", "this", 20, 41],
-        ["z", "-02.js", "this", 20, 50]
-      ];
-
-      for (let [label, value, description, line, column] of expectedResults) {
-        let target = gFilteredFunctions.selectedItem.target;
-
-        if (label) {
-          is(target.querySelector(".results-panel-item-label").getAttribute("value"),
-            gDebugger.SourceUtils.trimUrlLength(label + "()"),
-            "The correct label (" + label + ") is currently selected.");
-        } else {
-          ok(!target.querySelector(".results-panel-item-label"),
-            "Shouldn't create empty label nodes.");
-        }
-        if (value) {
-          ok(target.querySelector(".results-panel-item-label-below").getAttribute("value").includes(value),
-            "The correct value (" + value + ") is attached.");
-        } else {
-          ok(!target.querySelector(".results-panel-item-label-below"),
-            "Shouldn't create empty label nodes.");
-        }
-        if (description) {
-          is(target.querySelector(".results-panel-item-label-before").getAttribute("value"), description,
-            "The correct description (" + description + ") is currently shown.");
-        } else {
-          ok(!target.querySelector(".results-panel-item-label-before"),
-            "Shouldn't create empty label nodes.");
-        }
-
-        ok(isCaretPos(gPanel, line, column),
-          "The editor didn't jump to the correct line.");
-
-        EventUtils.sendKey("DOWN", gDebugger);
-      }
-
-      ok(isCaretPos(gPanel, expectedResults[0][3], expectedResults[0][4]),
-        "The editor didn't jump to the correct line again.");
-
-      deferred.resolve();
-    } else {
-      ok(false, "How did you get here? Go away, you.");
-    }
-  });
-
-  setText(gSearchBox, "@");
-  return deferred.promise;
-}
-
-function thirdJsSearch() {
-  let deferred = promise.defer();
-
-  once(gDebugger, "popupshown").then(() => {
-    writeInfo();
-
-    is(gFilteredFunctions.selectedIndex, 0,
-      "An item should be selected in the filtered functions view (1).");
-    ok(gFilteredFunctions.selectedItem,
-      "An item should be selected in the filtered functions view (2).");
-
-    if (gSources.selectedItem.attachment.source.url.includes("-03.js")) {
-      let s = " " + gDebugger.L10N.getStr("functionSearchSeparatorLabel") + " ";
-      let expectedResults = [
-        ["namedEventListener", "-03.js", "", 4, 43],
-        ["a" + s + "A", "-03.js", "bar", 10, 5],
-        ["b" + s + "B", "-03.js", "bar.alpha", 15, 5],
-        ["c" + s + "C", "-03.js", "bar.alpha.beta", 20, 5],
-        ["d" + s + "D", "-03.js", "this.theta", 25, 5],
-        ["fun", "-03.js", "", 29, 7],
-        ["foo", "-03.js", "", 29, 13],
-        ["bar", "-03.js", "", 29, 19],
-        ["t_foo", "-03.js", "this", 29, 25],
-        ["w_bar" + s + "baz", "-03.js", "window", 29, 38]
-      ];
-
-      for (let [label, value, description, line, column] of expectedResults) {
-        let target = gFilteredFunctions.selectedItem.target;
-
-        if (label) {
-          is(target.querySelector(".results-panel-item-label").getAttribute("value"),
-            gDebugger.SourceUtils.trimUrlLength(label + "()"),
-            "The correct label (" + label + ") is currently selected.");
-        } else {
-          ok(!target.querySelector(".results-panel-item-label"),
-            "Shouldn't create empty label nodes.");
-        }
-        if (value) {
-          ok(target.querySelector(".results-panel-item-label-below").getAttribute("value").includes(value),
-            "The correct value (" + value + ") is attached.");
-        } else {
-          ok(!target.querySelector(".results-panel-item-label-below"),
-            "Shouldn't create empty label nodes.");
-        }
-        if (description) {
-          is(target.querySelector(".results-panel-item-label-before").getAttribute("value"), description,
-            "The correct description (" + description + ") is currently shown.");
-        } else {
-          ok(!target.querySelector(".results-panel-item-label-before"),
-            "Shouldn't create empty label nodes.");
-        }
-
-        ok(isCaretPos(gPanel, line, column),
-          "The editor didn't jump to the correct line.");
-
-        EventUtils.sendKey("DOWN", gDebugger);
-      }
-
-      ok(isCaretPos(gPanel, expectedResults[0][3], expectedResults[0][4]),
-        "The editor didn't jump to the correct line again.");
-
-      deferred.resolve();
-    } else {
-      ok(false, "How did you get here? Go away, you.");
-    }
-  });
-
-  setText(gSearchBox, "@");
-  return deferred.promise;
-}
-
-function filterSearch() {
-  let deferred = promise.defer();
-
-  once(gDebugger, "popupshown").then(() => {
-    writeInfo();
-
-    is(gFilteredFunctions.selectedIndex, 0,
-      "An item should be selected in the filtered functions view (1).");
-    ok(gFilteredFunctions.selectedItem,
-      "An item should be selected in the filtered functions view (2).");
-
-    if (gSources.selectedItem.attachment.source.url.includes("-03.js")) {
-      let s = " " + gDebugger.L10N.getStr("functionSearchSeparatorLabel") + " ";
-      let expectedResults = [
-        ["namedEventListener", "-03.js", "", 4, 43],
-        ["bar", "-03.js", "", 29, 19],
-        ["w_bar" + s + "baz", "-03.js", "window", 29, 38],
-        ["anonymousExpression", "-01.js", "test.prototype", 9, 3],
-        ["namedExpression" + s + "NAME", "-01.js", "test.prototype", 11, 3],
-        ["arrow", ".html", "", 20, 11],
-        ["bar2", ".html", "", 23, 18]
-      ];
-
-      for (let [label, value, description, line, column] of expectedResults) {
-        let target = gFilteredFunctions.selectedItem.target;
-
-        if (label) {
-          is(target.querySelector(".results-panel-item-label").getAttribute("value"),
-            gDebugger.SourceUtils.trimUrlLength(label + "()"),
-            "The correct label (" + label + ") is currently selected.");
-        } else {
-          ok(!target.querySelector(".results-panel-item-label"),
-            "Shouldn't create empty label nodes.");
-        }
-        if (value) {
-          ok(target.querySelector(".results-panel-item-label-below").getAttribute("value").includes(value),
-            "The correct value (" + value + ") is attached.");
-        } else {
-          ok(!target.querySelector(".results-panel-item-label-below"),
-            "Shouldn't create empty label nodes.");
-        }
-        if (description) {
-          is(target.querySelector(".results-panel-item-label-before").getAttribute("value"), description,
-            "The correct description (" + description + ") is currently shown.");
-        } else {
-          ok(!target.querySelector(".results-panel-item-label-before"),
-            "Shouldn't create empty label nodes.");
-        }
-
-        ok(isCaretPos(gPanel, line, column),
-          "The editor didn't jump to the correct line.");
-
-        EventUtils.sendKey("DOWN", gDebugger);
-      }
-
-      ok(isCaretPos(gPanel, expectedResults[0][3], expectedResults[0][4]),
-        "The editor didn't jump to the correct line again.");
-
-      deferred.resolve();
-    } else {
-      ok(false, "How did you get here? Go away, you.");
-    }
-  });
-
-  setText(gSearchBox, "@r");
-  return deferred.promise;
-}
-
-function bogusSearch() {
-  let deferred = promise.defer();
-
-  once(gDebugger, "popuphidden").then(() => {
-    ok(true, "Popup was successfully hidden after no matches were found.");
-    deferred.resolve();
-  });
-
-  setText(gSearchBox, "@bogus");
-  return deferred.promise;
-}
-
-function incrementalSearch() {
-  let deferred = promise.defer();
-
-  once(gDebugger, "popupshown").then(() => {
-    ok(true, "Popup was successfully shown after some matches were found.");
-    deferred.resolve();
-  });
-
-  setText(gSearchBox, "@NAME");
-  return deferred.promise;
-}
-
-function emptySearch() {
-  let deferred = promise.defer();
-
-  once(gDebugger, "popuphidden").then(() => {
-    ok(true, "Popup was successfully hidden when nothing was searched.");
-    deferred.resolve();
-  });
-
-  clearText(gSearchBox);
-  return deferred.promise;
-}
-
-function showSource(aLabel) {
-  let deferred = promise.defer();
-
-  waitForSourceShown(gPanel, aLabel).then(deferred.resolve);
-  gSources.selectedItem = e => e.attachment.label == aLabel;
-
-  return deferred.promise;
-}
-
-function saveSearch() {
-  let finished = once(gDebugger, "popuphidden");
-
-  // Either by pressing RETURN or clicking on an item in the popup,
-  // the popup should hide and the item should become selected.
-  let random = Math.random();
-  if (random >= 0.33) {
-    EventUtils.sendKey("RETURN", gDebugger);
-  } else if (random >= 0.66) {
-    EventUtils.sendKey("RETURN", gDebugger);
-  } else {
-    EventUtils.sendMouseEvent({ type: "click" },
-      gFilteredFunctions.selectedItem.target,
-      gDebugger);
-  }
-
-  return finished;
-}
-
-function writeInfo() {
-  info("Current source url:\n" + getSelectedSourceURL(gSources));
-  info("Debugger editor text:\n" + gEditor.getText());
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gEditor = null;
-  gSources = null;
-  gSearchBox = null;
-  gFilteredFunctions = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_searchbox-help-popup-01.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Make sure that the searchbox popup is displayed when focusing the searchbox,
- * and hidden when the user starts typing.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
-
-var gTab, gPanel, gDebugger;
-var gSearchBox, gSearchBoxPanel;
-
-function test() {
-  let options = {
-    source: EXAMPLE_URL + "code_script-switching-01.js",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gSearchBox = gDebugger.DebuggerView.Filtering._searchbox;
-    gSearchBoxPanel = gDebugger.DebuggerView.Filtering._searchboxHelpPanel;
-
-    waitForSourceAndCaretAndScopes(gPanel, "-02.js", 1)
-      .then(showPopup)
-      .then(hidePopup)
-      .then(() => resumeDebuggerThenCloseAndFinish(gPanel))
-      .catch(aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-
-    callInTab(gTab, "firstCall");
-  });
-}
-
-function showPopup() {
-  is(gSearchBoxPanel.state, "closed",
-    "The search box panel shouldn't be visible yet.");
-
-  let finished = once(gSearchBoxPanel, "popupshown");
-  EventUtils.sendMouseEvent({ type: "click" }, gSearchBox, gDebugger);
-  return finished;
-}
-
-function hidePopup() {
-  is(gSearchBoxPanel.state, "open",
-    "The search box panel should be visible after searching started.");
-
-  let finished = once(gSearchBoxPanel, "popuphidden");
-  setText(gSearchBox, "#");
-  return finished;
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gSearchBox = null;
-  gSearchBoxPanel = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_searchbox-help-popup-02.js
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Make sure that the searchbox popup isn't displayed when there's some text
- * already present.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
-
-var gTab, gPanel, gDebugger;
-var gEditor, gSearchBox, gSearchBoxPanel;
-
-function test() {
-  let options = {
-    source: EXAMPLE_URL + "code_script-switching-01.js",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gEditor = gDebugger.DebuggerView.editor;
-    gSearchBox = gDebugger.DebuggerView.Filtering._searchbox;
-    gSearchBoxPanel = gDebugger.DebuggerView.Filtering._searchboxHelpPanel;
-
-    once(gSearchBoxPanel, "popupshown").then(() => {
-      ok(false, "Damn it, this shouldn't have happened.");
-    });
-
-    waitForSourceAndCaretAndScopes(gPanel, "-02.js", 1)
-      .then(tryShowPopup)
-      .then(focusEditor)
-      .then(testFocusLost)
-      .then(() => resumeDebuggerThenCloseAndFinish(gPanel))
-      .catch(aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-
-    callInTab(gTab, "firstCall");
-  });
-}
-
-function tryShowPopup() {
-  setText(gSearchBox, "#call()");
-  ok(isCaretPos(gPanel, 4, 22),
-    "The editor caret position appears to be correct.");
-  ok(isEditorSel(gPanel, [125, 131]),
-    "The editor selection appears to be correct.");
-  is(gEditor.getSelection(), "Call()",
-    "The editor selected text appears to be correct.");
-
-  is(gSearchBoxPanel.state, "closed",
-    "The search box panel shouldn't be visible yet.");
-
-  EventUtils.sendMouseEvent({ type: "click" }, gSearchBox, gDebugger);
-}
-
-function focusEditor() {
-  let deferred = promise.defer();
-
-  // Focusing the editor takes a tick to update the caret and selection.
-  gEditor.focus();
-  executeSoon(deferred.resolve);
-
-  return deferred.promise;
-}
-
-function testFocusLost() {
-  ok(isCaretPos(gPanel, 4, 22),
-    "The editor caret position appears to be correct after gaining focus.");
-  ok(isEditorSel(gPanel, [125, 131]),
-    "The editor selection appears to be correct after gaining focus.");
-  is(gEditor.getSelection(), "Call()",
-    "The editor selected text appears to be correct after gaining focus.");
-
-  is(gSearchBoxPanel.state, "closed",
-    "The search box panel should still not be visible.");
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gEditor = null;
-  gSearchBox = null;
-  gSearchBoxPanel = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_searchbox-parse.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests that text entered in the debugger's searchbox is properly parsed.
- */
-
-function test() {
-  initDebugger().then(([aTab,, aPanel]) => {
-    let filterView = aPanel.panelWin.DebuggerView.Filtering;
-    let searchbox = aPanel.panelWin.DebuggerView.Filtering._searchbox;
-
-    setText(searchbox, "");
-    is(filterView.searchData.toSource(), '["", [""]]',
-      "The searchbox data wasn't parsed correctly (1).");
-
-    setText(searchbox, "#token");
-    is(filterView.searchData.toSource(), '["#", ["", "token"]]',
-      "The searchbox data wasn't parsed correctly (2).");
-
-    setText(searchbox, ":42");
-    is(filterView.searchData.toSource(), '[":", ["", 42]]',
-      "The searchbox data wasn't parsed correctly (3).");
-
-    setText(searchbox, "#token:42");
-    is(filterView.searchData.toSource(), '["#", ["", "token:42"]]',
-      "The searchbox data wasn't parsed correctly (4).");
-
-    setText(searchbox, ":42#token");
-    is(filterView.searchData.toSource(), '["#", [":42", "token"]]',
-      "The searchbox data wasn't parsed correctly (5).");
-
-    setText(searchbox, "#token:42#token:42");
-    is(filterView.searchData.toSource(), '["#", ["#token:42", "token:42"]]',
-      "The searchbox data wasn't parsed correctly (6).");
-
-    setText(searchbox, ":42#token:42#token");
-    is(filterView.searchData.toSource(), '["#", [":42#token:42", "token"]]',
-      "The searchbox data wasn't parsed correctly (7).");
-
-
-    setText(searchbox, "file");
-    is(filterView.searchData.toSource(), '["", ["file"]]',
-      "The searchbox data wasn't parsed correctly (8).");
-
-    setText(searchbox, "file#token");
-    is(filterView.searchData.toSource(), '["#", ["file", "token"]]',
-      "The searchbox data wasn't parsed correctly (9).");
-
-    setText(searchbox, "file:42");
-    is(filterView.searchData.toSource(), '[":", ["file", 42]]',
-      "The searchbox data wasn't parsed correctly (10).");
-
-    setText(searchbox, "file#token:42");
-    is(filterView.searchData.toSource(), '["#", ["file", "token:42"]]',
-      "The searchbox data wasn't parsed correctly (11).");
-
-    setText(searchbox, "file:42#token");
-    is(filterView.searchData.toSource(), '["#", ["file:42", "token"]]',
-      "The searchbox data wasn't parsed correctly (12).");
-
-    setText(searchbox, "file#token:42#token:42");
-    is(filterView.searchData.toSource(), '["#", ["file#token:42", "token:42"]]',
-      "The searchbox data wasn't parsed correctly (13).");
-
-    setText(searchbox, "file:42#token:42#token");
-    is(filterView.searchData.toSource(), '["#", ["file:42#token:42", "token"]]',
-      "The searchbox data wasn't parsed correctly (14).");
-
-
-    setText(searchbox, "!token");
-    is(filterView.searchData.toSource(), '["!", ["token"]]',
-      "The searchbox data wasn't parsed correctly (15).");
-
-    setText(searchbox, "!token#global");
-    is(filterView.searchData.toSource(), '["!", ["token#global"]]',
-      "The searchbox data wasn't parsed correctly (16).");
-
-    setText(searchbox, "!token#global:42");
-    is(filterView.searchData.toSource(), '["!", ["token#global:42"]]',
-      "The searchbox data wasn't parsed correctly (17).");
-
-    setText(searchbox, "!token:42#global");
-    is(filterView.searchData.toSource(), '["!", ["token:42#global"]]',
-      "The searchbox data wasn't parsed correctly (18).");
-
-
-    setText(searchbox, "@token");
-    is(filterView.searchData.toSource(), '["@", ["token"]]',
-      "The searchbox data wasn't parsed correctly (19).");
-
-    setText(searchbox, "@token#global");
-    is(filterView.searchData.toSource(), '["@", ["token#global"]]',
-      "The searchbox data wasn't parsed correctly (20).");
-
-    setText(searchbox, "@token#global:42");
-    is(filterView.searchData.toSource(), '["@", ["token#global:42"]]',
-      "The searchbox data wasn't parsed correctly (21).");
-
-    setText(searchbox, "@token:42#global");
-    is(filterView.searchData.toSource(), '["@", ["token:42#global"]]',
-      "The searchbox data wasn't parsed correctly (22).");
-
-
-    setText(searchbox, "*token");
-    is(filterView.searchData.toSource(), '["*", ["token"]]',
-      "The searchbox data wasn't parsed correctly (23).");
-
-    setText(searchbox, "*token#global");
-    is(filterView.searchData.toSource(), '["*", ["token#global"]]',
-      "The searchbox data wasn't parsed correctly (24).");
-
-    setText(searchbox, "*token#global:42");
-    is(filterView.searchData.toSource(), '["*", ["token#global:42"]]',
-      "The searchbox data wasn't parsed correctly (25).");
-
-    setText(searchbox, "*token:42#global");
-    is(filterView.searchData.toSource(), '["*", ["token:42#global"]]',
-      "The searchbox data wasn't parsed correctly (26).");
-
-
-    closeDebuggerAndFinish(aPanel);
-  });
-}
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_source-maps-01.js
+++ /dev/null
@@ -1,166 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test that we can set breakpoints and step through source mapped
- * coffee script.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_binary_search.html";
-const COFFEE_URL = EXAMPLE_URL + "code_binary_search.coffee";
-
-var gTab, gPanel, gDebugger;
-var gEditor, gSources;
-
-function test() {
-  let options = {
-    source: COFFEE_URL,
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gEditor = gDebugger.DebuggerView.editor;
-    gSources = gDebugger.DebuggerView.Sources;
-
-    checkSourceMapsEnabled();
-
-    checkInitialSource();
-    testSetBreakpoint()
-      .then(testSetBreakpointBlankLine)
-      .then(testHitBreakpoint)
-      .then(testStepping)
-      .then(() => resumeDebuggerThenCloseAndFinish(gPanel))
-      .catch(aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-  });
-}
-
-function checkSourceMapsEnabled() {
-  is(Services.prefs.getBoolPref("devtools.debugger.source-maps-enabled"), true,
-    "The source maps functionality should be enabled by default.");
-  is(gDebugger.Prefs.sourceMapsEnabled, true,
-    "The source maps pref should be true from startup.");
-  is(gDebugger.DebuggerView.Options._showOriginalSourceItem.getAttribute("checked"), "true",
-    "Source maps should be enabled from startup.");
-}
-
-function checkInitialSource() {
-  isnot(gSources.selectedItem.attachment.source.url.indexOf(".coffee"), -1,
-    "The debugger should show the source mapped coffee source file.");
-  is(gSources.selectedValue.indexOf(".js"), -1,
-    "The debugger should not show the generated js source file.");
-  is(gEditor.getText().indexOf("isnt"), 218,
-    "The debugger's editor should have the coffee source source displayed.");
-  is(gEditor.getText().indexOf("function"), -1,
-    "The debugger's editor should not have the JS source displayed.");
-}
-
-function testSetBreakpoint() {
-  let deferred = promise.defer();
-  let sourceForm = getSourceForm(gSources, COFFEE_URL);
-
-  gDebugger.gThreadClient.interrupt(aResponse => {
-    let source = gDebugger.gThreadClient.source(sourceForm);
-    source.setBreakpoint({ line: 5 }).then(([aResponse]) => {
-      ok(!aResponse.actualLocation,
-        "Should be able to set a breakpoint on line 5.");
-
-      deferred.resolve();
-    });
-  });
-
-  return deferred.promise;
-}
-
-function testSetBreakpointBlankLine() {
-  let deferred = promise.defer();
-  let sourceForm = getSourceForm(gSources, COFFEE_URL);
-
-  let source = gDebugger.gThreadClient.source(sourceForm);
-  source.setBreakpoint({ line: 8 }).then(([aResponse]) => {
-    ok(!aResponse.isPending,
-       "Should not be a pending breakpoint.");
-    ok(!aResponse.actualLocation,
-       "Should not be a moved breakpoint.");
-
-    deferred.resolve();
-  });
-
-  return deferred.promise;
-}
-
-function testHitBreakpoint() {
-  let deferred = promise.defer();
-
-  gDebugger.gThreadClient.resume(aResponse => {
-    ok(!aResponse.error, "Shouldn't get an error resuming.");
-    is(aResponse.type, "resumed", "Type should be 'resumed'.");
-
-    gDebugger.gThreadClient.addOneTimeListener("paused", (aEvent, aPacket) => {
-      is(aPacket.type, "paused",
-        "We should now be paused again.");
-      is(aPacket.why.type, "breakpoint",
-        "and the reason we should be paused is because we hit a breakpoint.");
-
-      // Check that we stopped at the right place, by making sure that the
-      // environment is in the state that we expect.
-      is(aPacket.frame.environment.bindings.variables.start.value, 0,
-         "'start' is 0.");
-      is(aPacket.frame.environment.bindings.variables.stop.value.type, "undefined",
-         "'stop' hasn't been assigned to yet.");
-      is(aPacket.frame.environment.bindings.variables.pivot.value.type, "undefined",
-         "'pivot' hasn't been assigned to yet.");
-
-      waitForCaretUpdated(gPanel, 5).then(deferred.resolve);
-    });
-
-    // This will cause the breakpoint to be hit, and put us back in the
-    // paused state.
-    callInTab(gTab, "binary_search", [0, 2, 3, 5, 7, 10], 5);
-  });
-
-  return deferred.promise;
-}
-
-function testStepping() {
-  let deferred = promise.defer();
-
-  gDebugger.gThreadClient.stepIn(aResponse => {
-    ok(!aResponse.error, "Shouldn't get an error resuming.");
-    is(aResponse.type, "resumed", "Type should be 'resumed'.");
-
-    // After stepping, we will pause again, so listen for that.
-    gDebugger.gThreadClient.addOneTimeListener("paused", (aEvent, aPacket) => {
-      is(aPacket.type, "paused",
-        "We should now be paused again.");
-      is(aPacket.why.type, "resumeLimit",
-        "and the reason we should be paused is because we hit the resume limit.");
-
-      // Check that we stopped at the right place, by making sure that the
-      // environment is in the state that we expect.
-      is(aPacket.frame.environment.bindings.variables.start.value, 0,
-         "'start' is 0.");
-      is(aPacket.frame.environment.bindings.variables.stop.value, 5,
-         "'stop' is 5.");
-      is(aPacket.frame.environment.bindings.variables.pivot.value.type, "undefined",
-         "'pivot' hasn't been assigned to yet.");
-
-      waitForCaretUpdated(gPanel, 6).then(deferred.resolve);
-    });
-  });
-
-  return deferred.promise;
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gEditor = null;
-  gSources = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_source-maps-02.js
+++ /dev/null
@@ -1,150 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test that we can toggle between the original and generated sources.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_binary_search.html";
-const JS_URL = EXAMPLE_URL + "code_binary_search.js";
-
-var gTab, gPanel, gDebugger, gEditor;
-var gSources, gFrames, gPrefs, gOptions;
-
-function test() {
-  let options = {
-    source: EXAMPLE_URL + "code_binary_search.coffee",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gEditor = gDebugger.DebuggerView.editor;
-    gSources = gDebugger.DebuggerView.Sources;
-    gFrames = gDebugger.DebuggerView.StackFrames;
-    gPrefs = gDebugger.Prefs;
-    gOptions = gDebugger.DebuggerView.Options;
-
-    testToggleGeneratedSource()
-      .then(testSetBreakpoint)
-      .then(testToggleOnPause)
-      .then(testResume)
-      .then(() => closeDebuggerAndFinish(gPanel))
-      .catch(aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-  });
-}
-
-function testToggleGeneratedSource() {
-  let finished = waitForSourceShown(gPanel, ".js").then(() => {
-    is(gPrefs.sourceMapsEnabled, false,
-      "The source maps pref should have been set to false.");
-    is(gOptions._showOriginalSourceItem.getAttribute("checked"), "false",
-      "Source maps should now be disabled.");
-
-    is(gSources.selectedItem.attachment.source.url.indexOf(".coffee"), -1,
-      "The debugger should not show the source mapped coffee source file.");
-    isnot(gSources.selectedItem.attachment.source.url.indexOf(".js"), -1,
-      "The debugger should show the generated js source file.");
-
-    is(gEditor.getText().indexOf("isnt"), -1,
-      "The debugger's editor should not have the coffee source source displayed.");
-    is(gEditor.getText().indexOf("function"), 36,
-      "The debugger's editor should have the JS source displayed.");
-  });
-
-  gOptions._showOriginalSourceItem.setAttribute("checked", "false");
-  gOptions._toggleShowOriginalSource();
-  gOptions._onPopupHidden();
-
-  return finished;
-}
-
-function testSetBreakpoint() {
-  let deferred = promise.defer();
-  let sourceForm = getSourceForm(gSources, JS_URL);
-  let source = gDebugger.gThreadClient.source(sourceForm);
-
-  source.setBreakpoint({ line: 7 }).then(([aResponse]) => {
-    gDebugger.gClient.addOneTimeListener("resumed", () => {
-      waitForCaretAndScopes(gPanel, 7).then(() => {
-        // Make sure that we have JavaScript stack frames.
-        is(gFrames.itemCount, 1,
-          "Should have only one frame.");
-        is(gFrames.getItemAtIndex(0).attachment.url.indexOf(".coffee"), -1,
-          "First frame should not be a coffee source frame.");
-        isnot(gFrames.getItemAtIndex(0).attachment.url.indexOf(".js"), -1,
-          "First frame should be a JS frame.");
-
-        deferred.resolve();
-      });
-
-      // This will cause the breakpoint to be hit, and put us back in the
-      // paused state.
-      callInTab(gTab, "binary_search", [0, 2, 3, 5, 7, 10], 5);
-    });
-  });
-
-  return deferred.promise;
-}
-
-function testToggleOnPause() {
-  let finished = waitForSourceAndCaretAndScopes(gPanel, ".coffee", 5).then(() => {
-    is(gPrefs.sourceMapsEnabled, true,
-      "The source maps pref should have been set to true.");
-    is(gOptions._showOriginalSourceItem.getAttribute("checked"), "true",
-      "Source maps should now be enabled.");
-
-    isnot(gSources.selectedItem.attachment.source.url.indexOf(".coffee"), -1,
-      "The debugger should show the source mapped coffee source file.");
-    is(gSources.selectedItem.attachment.source.url.indexOf(".js"), -1,
-      "The debugger should not show the generated js source file.");
-
-    is(gEditor.getText().indexOf("isnt"), 218,
-      "The debugger's editor should have the coffee source source displayed.");
-    is(gEditor.getText().indexOf("function"), -1,
-      "The debugger's editor should not have the JS source displayed.");
-
-    // Make sure that we have coffee source stack frames.
-    is(gFrames.itemCount, 1,
-      "Should have only one frame.");
-    is(gFrames.getItemAtIndex(0).attachment.url.indexOf(".js"), -1,
-      "First frame should not be a JS frame.");
-    isnot(gFrames.getItemAtIndex(0).attachment.url.indexOf(".coffee"), -1,
-      "First frame should be a coffee source frame.");
-  });
-
-  gOptions._showOriginalSourceItem.setAttribute("checked", "true");
-  gOptions._toggleShowOriginalSource();
-  gOptions._onPopupHidden();
-
-  return finished;
-}
-
-function testResume() {
-  let deferred = promise.defer();
-
-  gDebugger.gThreadClient.resume(aResponse => {
-    ok(!aResponse.error, "Shouldn't get an error resuming.");
-    is(aResponse.type, "resumed", "Type should be 'resumed'.");
-
-    deferred.resolve();
-  });
-
-  return deferred.promise;
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gEditor = null;
-  gSources = null;
-  gFrames = null;
-  gPrefs = null;
-  gOptions = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_source-maps-03.js
+++ /dev/null
@@ -1,86 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test that we can debug minified javascript with source maps.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_minified.html";
-const JS_URL = EXAMPLE_URL + "code_math.js";
-
-var gTab, gPanel, gDebugger;
-var gEditor, gSources, gFrames;
-
-function test() {
-  let options = {
-    source: JS_URL,
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gEditor = gDebugger.DebuggerView.editor;
-    gSources = gDebugger.DebuggerView.Sources;
-    gFrames = gDebugger.DebuggerView.StackFrames;
-
-    checkInitialSource()
-    testSetBreakpoint()
-      .then(() => resumeDebuggerThenCloseAndFinish(gPanel))
-      .catch(aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-  });
-}
-
-function checkInitialSource() {
-  isnot(gSources.selectedItem.attachment.source.url.indexOf(".js"), -1,
-    "The debugger should not show the minified js file.");
-  is(gSources.selectedItem.attachment.source.url.indexOf(".min.js"), -1,
-    "The debugger should show the original js file.");
-  is(gEditor.getText().split("\n").length, 46,
-    "The debugger's editor should have the original source displayed, " +
-    "not the whitespace stripped minified version.");
-}
-
-function testSetBreakpoint() {
-  let deferred = promise.defer();
-  let sourceForm = getSourceForm(gSources, JS_URL);
-  let source = gDebugger.gThreadClient.source(sourceForm);
-
-  source.setBreakpoint({ line: 30 }).then(([aResponse]) => {
-    ok(!aResponse.actualLocation,
-      "Should be able to set a breakpoint on line 30.");
-
-    gDebugger.gClient.addOneTimeListener("resumed", () => {
-      waitForCaretAndScopes(gPanel, 30).then(() => {
-        // Make sure that we have the right stack frames.
-        is(gFrames.itemCount, 9,
-          "Should have nine frames.");
-        is(gFrames.getItemAtIndex(0).attachment.url.indexOf(".min.js"), -1,
-          "First frame should not be a minified JS frame.");
-        isnot(gFrames.getItemAtIndex(0).attachment.url.indexOf(".js"), -1,
-          "First frame should be a JS frame.");
-
-        deferred.resolve();
-      });
-
-      // This will cause the breakpoint to be hit, and put us back in the
-      // paused state.
-      callInTab(gTab, "arithmetic");
-    });
-  });
-
-  return deferred.promise;
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gEditor = null;
-  gSources = null;
-  gFrames = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_source-maps-04.js
+++ /dev/null
@@ -1,185 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test that bogus source maps don't break debugging.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_minified_bogus_map.html";
-const JS_URL = EXAMPLE_URL + "code_math_bogus_map.js";
-
-// This test causes an error to be logged in the console, which appears in TBPL
-// logs, so we are disabling that here.
-DevToolsUtils.reportingDisabled = true;
-
-var gPanel, gDebugger, gFrames, gSources, gPrefs, gOptions;
-
-function test() {
-  let options = {
-    source: JS_URL,
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gFrames = gDebugger.DebuggerView.StackFrames;
-    gSources = gDebugger.DebuggerView.Sources;
-    gPrefs = gDebugger.Prefs;
-    gOptions = gDebugger.DebuggerView.Options;
-
-    is(gPrefs.pauseOnExceptions, false,
-      "The pause-on-exceptions pref should be disabled by default.");
-    isnot(gOptions._pauseOnExceptionsItem.getAttribute("checked"), "true",
-      "The pause-on-exceptions menu item should not be checked.");
-
-    checkInitialSource();
-    enablePauseOnExceptions()
-      .then(disableIgnoreCaughtExceptions)
-      .then(testSetBreakpoint)
-      .then(reloadPage)
-      .then(testHitBreakpoint)
-      .then(enableIgnoreCaughtExceptions)
-      .then(disablePauseOnExceptions)
-      .then(() => closeDebuggerAndFinish(gPanel))
-      .catch(aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-  });
-}
-
-function checkInitialSource() {
-  isnot(gSources.selectedItem.attachment.source.url.indexOf("code_math_bogus_map.js"), -1,
-    "The debugger should show the minified js file.");
-}
-
-function enablePauseOnExceptions() {
-  let deferred = promise.defer();
-
-  gDebugger.gThreadClient.addOneTimeListener("resumed", () => {
-    is(gPrefs.pauseOnExceptions, true,
-      "The pause-on-exceptions pref should now be enabled.");
-
-    ok(true, "Pausing on exceptions was enabled.");
-    deferred.resolve();
-  });
-
-  gOptions._pauseOnExceptionsItem.setAttribute("checked", "true");
-  gOptions._togglePauseOnExceptions();
-
-  return deferred.promise;
-}
-
-function disableIgnoreCaughtExceptions() {
-  let deferred = promise.defer();
-
-  gDebugger.gThreadClient.addOneTimeListener("resumed", () => {
-    is(gPrefs.ignoreCaughtExceptions, false,
-      "The ignore-caught-exceptions pref should now be disabled.");
-
-    ok(true, "Ignore caught exceptions was disabled.");
-    deferred.resolve();
-  });
-
-  gOptions._ignoreCaughtExceptionsItem.setAttribute("checked", "false");
-  gOptions._toggleIgnoreCaughtExceptions();
-
-  return deferred.promise;
-}
-
-function testSetBreakpoint() {
-  let deferred = promise.defer();
-  let sourceForm = getSourceForm(gSources, JS_URL);
-  let source = gDebugger.gThreadClient.source(sourceForm);
-
-  source.setBreakpoint({ line: 3, column: 18 }).then(([aResponse]) => {
-    ok(!aResponse.actualLocation,
-      "Should be able to set a breakpoint on line 3 and column 18.");
-
-    deferred.resolve();
-  });
-
-  return deferred.promise;
-}
-
-function reloadPage() {
-  let loaded = waitForSourceAndCaret(gPanel, ".js", 3);
-  gDebugger.DebuggerController._target.activeTab.reload();
-  return loaded.then(() => ok(true, "Page was reloaded and execution resumed."));
-}
-
-function testHitBreakpoint() {
-  let deferred = promise.defer();
-
-  gDebugger.gThreadClient.resume(aResponse => {
-    ok(!aResponse.error, "Shouldn't get an error resuming.");
-    is(aResponse.type, "resumed", "Type should be 'resumed'.");
-
-    waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FETCHED_SCOPES).then(() => {
-      is(gFrames.itemCount, 2, "Should have two frames.");
-
-      // This is weird, but we need to let the debugger a chance to
-      // update first
-      executeSoon(() => {
-        gDebugger.gThreadClient.resume(() => {
-          gDebugger.gThreadClient.addOneTimeListener("paused", () => {
-            gDebugger.gThreadClient.resume(() => {
-              // We also need to make sure the next step doesn't add a
-              // "resumed" handler until this is completely finished
-              executeSoon(() => {
-                deferred.resolve();
-              });
-            });
-          });
-        });
-      });
-    });
-  });
-
-  return deferred.promise;
-}
-
-function enableIgnoreCaughtExceptions() {
-  let deferred = promise.defer();
-
-  gDebugger.gThreadClient.addOneTimeListener("resumed", () => {
-    is(gPrefs.ignoreCaughtExceptions, true,
-      "The ignore-caught-exceptions pref should now be enabled.");
-
-    ok(true, "Ignore caught exceptions was enabled.");
-    deferred.resolve();
-  });
-
-  gOptions._ignoreCaughtExceptionsItem.setAttribute("checked", "true");
-  gOptions._toggleIgnoreCaughtExceptions();
-
-  return deferred.promise;
-}
-
-function disablePauseOnExceptions() {
-  let deferred = promise.defer();
-
-  gDebugger.gThreadClient.addOneTimeListener("resumed", () => {
-    is(gPrefs.pauseOnExceptions, false,
-      "The pause-on-exceptions pref should now be disabled.");
-
-    ok(true, "Pausing on exceptions was disabled.");
-    deferred.resolve();
-  });
-
-  gOptions._pauseOnExceptionsItem.setAttribute("checked", "false");
-  gOptions._togglePauseOnExceptions();
-
-  return deferred.promise;
-}
-
-registerCleanupFunction(function () {
-  gPanel = null;
-  gDebugger = null;
-  gFrames = null;
-  gSources = null;
-  gPrefs = null;
-  gOptions = null;
-  DevToolsUtils.reportingDisabled = false;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_sources-contextmenu-01.js
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests the "Copy URL" functionality of the sources panel context menu
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_function-search.html";
-const SCRIPT_URI = EXAMPLE_URL + "code_function-search-01.js";
-
-function test() {
-  let gTab, gPanel, gDebugger, gSources;
-
-  let options = {
-    source: SCRIPT_URI,
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gSources = gDebugger.DebuggerView.Sources;
-
-    openContextMenu()
-      .then(testCopyMenuItem)
-      .then(() => closeDebuggerAndFinish(gPanel))
-      .catch(aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-  });
-
-  function clickCopyURL() {
-    return new Promise((resolve, reject) => {
-      let copyURLMenuItem = gDebugger.document.getElementById("debugger-sources-context-copyurl");
-      if (!copyURLMenuItem) {
-        reject(new Error("The Copy URL context menu item is not available."));
-      }
-
-      ok(copyURLMenuItem, "The Copy URL context menu item is available.");
-      EventUtils.synthesizeMouseAtCenter(copyURLMenuItem, {}, gDebugger);
-      resolve();
-    });
-  }
-
-  function testCopyMenuItem() {
-    return waitForClipboardPromise(clickCopyURL, SCRIPT_URI);
-  }
-
-  function openContextMenu() {
-    let contextMenu = gDebugger.document.getElementById("debuggerSourcesContextMenu");
-    let contextMenuShown = once(contextMenu, "popupshown");
-    EventUtils.synthesizeMouseAtCenter(gSources.selectedItem.prebuiltNode, {type: "contextmenu"}, gDebugger);
-    return contextMenuShown;
-  }
-}
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_sources-contextmenu-02.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests the "Open in New Tab" functionality of the sources panel context menu
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_function-search.html";
-const SCRIPT_URI = EXAMPLE_URL + "code_function-search-01.js";
-
-function test() {
-  let gTab, gPanel, gDebugger;
-  let gSources;
-
-  let options = {
-    source: SCRIPT_URI,
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gSources = gDebugger.DebuggerView.Sources;
-
-    openContextMenu()
-      .then(testNewTabMenuItem)
-      .then(testNewTabURI)
-      .then(() => closeDebuggerAndFinish(gPanel))
-      .catch(aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-  });
-
-  function testNewTabURI(tabUri) {
-    is(tabUri, SCRIPT_URI, "The tab contains the right script.");
-    gBrowser.removeCurrentTab();
-  }
-
-  function waitForTabOpen() {
-    return new Promise(resolve => {
-      gBrowser.tabContainer.addEventListener("TabOpen", function (e) {
-        ok(true, "A new tab loaded");
-
-        BrowserTestUtils.waitForContentEvent(e.target.linkedBrowser, "DOMContentLoaded").then(function () {
-          // Pass along the new tab's URI.
-          resolve(gBrowser.currentURI.spec);
-        });
-      }, {once: true});
-    });
-  }
-
-  function testNewTabMenuItem() {
-    return new Promise((resolve, reject) => {
-      let newTabMenuItem = gDebugger.document.getElementById("debugger-sources-context-newtab");
-      if (!newTabMenuItem) {
-        reject(new Error("The Open in New Tab context menu item is not available."));
-      }
-
-      ok(newTabMenuItem, "The Open in New Tab context menu item is available.");
-      waitForTabOpen().then(resolve);
-      EventUtils.synthesizeMouseAtCenter(newTabMenuItem, {}, gDebugger);
-    });
-  }
-
-  function openContextMenu() {
-    let contextMenu = gDebugger.document.getElementById("debuggerSourcesContextMenu");
-    let contextMenuShown = once(contextMenu, "popupshown");
-    EventUtils.synthesizeMouseAtCenter(gSources.selectedItem.prebuiltNode, {type: "contextmenu"}, gDebugger);
-    return contextMenuShown;
-  }
-}
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_sources-eval-01.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Make sure eval scripts appear in the source list
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-eval.html";
-
-function test() {
-  let gTab, gPanel, gDebugger;
-  let gSources, gBreakpoints;
-
-  let options = {
-    source: EXAMPLE_URL + "code_script-eval.js",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gSources = gDebugger.DebuggerView.Sources;
-    gBreakpoints = gDebugger.DebuggerController.Breakpoints;
-
-    return Task.spawn(function* () {
-      is(gSources.values.length, 1, "Should have 1 source");
-
-      let newSource = waitForDebuggerEvents(gPanel, gDebugger.EVENTS.NEW_SOURCE);
-      callInTab(gTab, "evalSource");
-      yield newSource;
-
-      is(gSources.values.length, 2, "Should have 2 sources");
-
-      let item = gSources.getItemForAttachment(e => e.label.includes("> eval"));
-      ok(item, "Source label is incorrect.");
-      is(item.attachment.group, gDebugger.L10N.getStr("evalGroupLabel"),
-         "Source group is incorrect");
-
-      yield closeDebuggerAndFinish(gPanel);
-    });
-  });
-}
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_sources-eval-02.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Make sure eval scripts with the sourceURL pragma are correctly
- * displayed
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-eval.html";
-
-function test() {
-  let gTab, gPanel, gDebugger;
-  let gSources, gBreakpoints, gEditor;
-
-  let options = {
-    source: EXAMPLE_URL + "code_script-eval.js",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gSources = gDebugger.DebuggerView.Sources;
-    gBreakpoints = gDebugger.DebuggerController.Breakpoints;
-    gEditor = gDebugger.DebuggerView.editor;
-    const constants = gDebugger.require("./content/constants");
-    const queries = gDebugger.require("./content/queries");
-    const actions = bindActionCreators(gPanel);
-    const getState = gDebugger.DebuggerController.getState;
-
-    return Task.spawn(function* () {
-      is(queries.getSourceCount(getState()), 1, "Should have 1 source");
-
-      const newSource = waitForDispatch(gPanel, constants.ADD_SOURCE);
-      callInTab(gTab, "evalSourceWithSourceURL");
-      yield newSource;
-
-      is(queries.getSourceCount(getState()), 2, "Should have 2 sources");
-
-      const source = queries.getSourceByURL(getState(), EXAMPLE_URL + "bar.js");
-      ok(source, "Source exists.");
-
-      let shown = waitForDebuggerEvents(gPanel, gDebugger.EVENTS.SOURCE_SHOWN);
-      actions.selectSource(source);
-      yield shown;
-
-      ok(gEditor.getText().indexOf("bar = function() {") === 0,
-         "Correct source is shown");
-
-      yield closeDebuggerAndFinish(gPanel);
-    });
-  });
-}
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_sources-keybindings.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests related to source panel keyboard shortcut bindings
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_function-search.html";
-const SCRIPT_URI = EXAMPLE_URL + "code_function-search-01.js";
-
-function test() {
-  let gTab, gPanel, gDebugger, gSources;
-
-  let options = {
-    source: SCRIPT_URI,
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gSources = gDebugger.DebuggerView.Sources;
-
-    testCopyURLShortcut()
-      .then(() => closeDebuggerAndFinish(gPanel))
-      .catch(aError => {
-        ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-      });
-  });
-
-  function testCopyURLShortcut() {
-    return waitForClipboardPromise(sendCopyShortcut, SCRIPT_URI);
-  }
-
-  function sendCopyShortcut() {
-    EventUtils.synthesizeKey("C", { accelKey: true }, gDebugger);
-  }
-}
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_stack-01.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test that stackframes are added when debugger is paused.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_recursion-stack.html";
-
-var gTab, gPanel, gDebugger;
-var gFrames, gClassicFrames;
-
-function test() {
-  let options = {
-    source: TAB_URL,
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gFrames = gDebugger.DebuggerView.StackFrames;
-    gClassicFrames = gDebugger.DebuggerView.StackFramesClassicList;
-
-    waitForCaretAndScopes(gPanel, 14).then(performTest);
-    callInTab(gTab, "simpleCall");
-  });
-}
-
-function performTest() {
-  is(gDebugger.gThreadClient.state, "paused",
-    "Should only be getting stack frames while paused.");
-  is(gFrames.itemCount, 1,
-    "Should have only one frame.");
-  is(gClassicFrames.itemCount, 1,
-    "Should also have only one frame in the mirrored view.");
-
-  resumeDebuggerThenCloseAndFinish(gPanel);
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gFrames = null;
-  gClassicFrames = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_stack-02.js
+++ /dev/null
@@ -1,115 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test that stackframes are added when debugger is paused in eval calls.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_recursion-stack.html";
-
-function test() {
-  let options = {
-    source: TAB_URL,
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    const gTab = aTab;
-    const gPanel = aPanel;
-    const gDebugger = gPanel.panelWin;
-    const gFrames = gDebugger.DebuggerView.StackFrames;
-    const gClassicFrames = gDebugger.DebuggerView.StackFramesClassicList;
-
-    const performTest = Task.async(function* () {
-      is(gDebugger.gThreadClient.state, "paused",
-         "Should only be getting stack frames while paused.");
-      is(gFrames.itemCount, 2,
-         "Should have two frames.");
-      is(gClassicFrames.itemCount, 2,
-         "Should also have only two in the mirrored view.");
-
-      is(gFrames.getItemAtIndex(0).attachment.title,
-         "evalCall", "Oldest frame name should be correct.");
-      is(gFrames.getItemAtIndex(0).attachment.url,
-         TAB_URL, "Oldest frame url should be correct.");
-      is(gClassicFrames.getItemAtIndex(0).attachment.depth,
-         0, "Oldest frame name is mirrored correctly.");
-
-      is(gFrames.getItemAtIndex(1).attachment.title,
-         "(eval)", "Newest frame name should be correct.");
-      is(gFrames.getItemAtIndex(1).attachment.url,
-         "SCRIPT0", "Newest frame url should be correct.");
-      is(gClassicFrames.getItemAtIndex(1).attachment.depth,
-         1, "Newest frame name is mirrored correctly.");
-
-      is(gFrames.selectedIndex, 1,
-         "Newest frame should be selected by default.");
-      is(gClassicFrames.selectedIndex, 0,
-         "Newest frame should be selected by default in the mirrored view.");
-
-      isnot(gFrames.selectedIndex, 0,
-            "Oldest frame should not be selected.");
-      isnot(gClassicFrames.selectedIndex, 1,
-            "Oldest frame should not be selected in the mirrored view.");
-
-      EventUtils.sendMouseEvent({ type: "mousedown" },
-                                gFrames.getItemAtIndex(0).target,
-                                gDebugger);
-
-      isnot(gFrames.selectedIndex, 1,
-            "Newest frame should not be selected after click.");
-      isnot(gClassicFrames.selectedIndex, 0,
-            "Newest frame in the mirrored view should not be selected.");
-
-      is(gFrames.selectedIndex, 0,
-         "Oldest frame should be selected after click.");
-      is(gClassicFrames.selectedIndex, 1,
-         "Oldest frame in the mirrored view should be selected.");
-
-      EventUtils.sendMouseEvent({ type: "mousedown" },
-                                gFrames.getItemAtIndex(1).target.querySelector(".dbg-stackframe-title"),
-                                gDebugger);
-      // Give the UI some time to update. For some reason if we don't
-      // do this there is global window leakage. We are continually
-      // cleaning up our tests so this will be refactored out at some
-      // point.
-      yield waitForTime(1);
-
-      is(gFrames.selectedIndex, 1,
-         "Newest frame should be selected after click inside the newest frame.");
-      is(gClassicFrames.selectedIndex, 0,
-         "Newest frame in the mirrored view should be selected.");
-
-      isnot(gFrames.selectedIndex, 0,
-            "Oldest frame should not be selected after click inside the newest frame.");
-      isnot(gClassicFrames.selectedIndex, 1,
-            "Oldest frame in the mirrored view should not be selected.");
-
-      EventUtils.sendMouseEvent({ type: "mousedown" },
-                                gFrames.getItemAtIndex(0).target.querySelector(".dbg-stackframe-details"),
-                                gDebugger);
-      // See comment above on the same statement.
-      yield waitForTime(1);
-
-      isnot(gFrames.selectedIndex, 1,
-            "Newest frame should not be selected after click inside the oldest frame.");
-      isnot(gClassicFrames.selectedIndex, 0,
-            "Newest frame in the mirrored view should not be selected.");
-
-      is(gFrames.selectedIndex, 0,
-         "Oldest frame should be selected after click inside the oldest frame.");
-      is(gClassicFrames.selectedIndex, 1,
-         "Oldest frame in the mirrored view should be selected.");
-
-      resumeDebuggerThenCloseAndFinish(gPanel);
-    });
-
-    Task.spawn(function* () {
-      yield waitForCaretAndScopes(gPanel, 1);
-      performTest();
-    });
-
-    callInTab(gTab, "evalCall");
-  });
-}
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_stack-03.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test that stackframes are scrollable.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_recursion-stack.html";
-let framesScrollingInterval;
-
-function test() {
-  let options = {
-    source: TAB_URL,
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab, aDebuggee, aPanel]) => {
-    const tab = aTab;
-    const debuggee = aDebuggee;
-    const panel = aPanel;
-    const gDebugger = panel.panelWin;
-    const frames = gDebugger.DebuggerView.StackFrames;
-    const classicFrames = gDebugger.DebuggerView.StackFramesClassicList;
-
-    Task.spawn(function* () {
-      framesScrollingInterval = window.setInterval(() => {
-        frames.widget._list.scrollByIndex(-1);
-      }, 100);
-
-      yield waitForDebuggerEvents(panel, gDebugger.EVENTS.AFTER_FRAMES_REFILLED);
-
-      is(gDebugger.gThreadClient.state, "paused",
-        "Should only be getting stack frames while paused.");
-      is(frames.itemCount, gDebugger.gCallStackPageSize,
-        "Should have only the max limit of frames.");
-      is(classicFrames.itemCount, gDebugger.gCallStackPageSize,
-        "Should have only the max limit of frames in the mirrored view as well.");
-
-      yield waitForDebuggerEvents(panel, gDebugger.EVENTS.AFTER_FRAMES_REFILLED);
-
-      is(frames.itemCount, gDebugger.gCallStackPageSize * 2,
-        "Should now have twice the max limit of frames.");
-      is(classicFrames.itemCount, gDebugger.gCallStackPageSize * 2,
-        "Should now have twice the max limit of frames in the mirrored view as well.");
-
-      yield waitForDebuggerEvents(panel, gDebugger.EVENTS.AFTER_FRAMES_REFILLED);
-
-      is(frames.itemCount, debuggee.gRecurseLimit,
-        "Should have reached the recurse limit.");
-      is(classicFrames.itemCount, debuggee.gRecurseLimit,
-        "Should have reached the recurse limit in the mirrored view as well.");
-
-
-      // Call stack frame scrolling should stop before
-      // we resume the gDebugger as it could be a source of race conditions.
-      window.clearInterval(framesScrollingInterval);
-      resumeDebuggerThenCloseAndFinish(panel);
-    });
-
-    debuggee.gRecurseLimit = (gDebugger.gCallStackPageSize * 2) + 1;
-    debuggee.recurse();
-  });
-}
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_stack-04.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test that stackframes are cleared after resume.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_recursion-stack.html";
-
-var gTab, gPanel, gDebugger;
-var gFrames, gClassicFrames;
-
-function test() {
-  let options = {
-    source: TAB_URL,
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gFrames = gDebugger.DebuggerView.StackFrames;
-    gClassicFrames = gDebugger.DebuggerView.StackFramesClassicList;
-
-    waitForCaretAndScopes(gPanel, 1).then(performTest);
-    callInTab(gTab, "evalCall");
-  });
-}
-
-function performTest() {
-  is(gDebugger.gThreadClient.state, "paused",
-    "Should only be getting stack frames while paused.");
-  is(gFrames.itemCount, 2,
-    "Should have two frames.");
-  is(gClassicFrames.itemCount, 2,
-    "Should also have two frames in the mirrored view.");
-
-  gDebugger.once(gDebugger.EVENTS.AFTER_FRAMES_CLEARED, () => {
-    is(gFrames.itemCount, 0,
-      "Should have no frames after resume.");
-    is(gClassicFrames.itemCount, 0,
-      "Should also have no frames in the mirrored view after resume.");
-
-    closeDebuggerAndFinish(gPanel);
-  }, true);
-
-  gDebugger.gThreadClient.resume();
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gFrames = null;
-  gClassicFrames = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_stack-05.js
+++ /dev/null
@@ -1,102 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test that switching between stack frames properly sets the current debugger
- * location in the source editor.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
-
-function test() {
-  let options = {
-    source: EXAMPLE_URL + "code_script-switching-01.js",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    const gTab = aTab;
-    const gPanel = aPanel;
-    const gDebugger = gPanel.panelWin;
-    const gEditor = gDebugger.DebuggerView.editor;
-    const gSources = gDebugger.DebuggerView.Sources;
-    const gFrames = gDebugger.DebuggerView.StackFrames;
-    const gClassicFrames = gDebugger.DebuggerView.StackFramesClassicList;
-
-    function initialChecks() {
-      is(gDebugger.gThreadClient.state, "paused",
-         "Should only be getting stack frames while paused.");
-      is(gFrames.itemCount, 2,
-         "Should have four frames.");
-      is(gClassicFrames.itemCount, 2,
-         "Should also have four frames in the mirrored view.");
-    }
-
-    function testNewestFrame() {
-      is(gFrames.selectedIndex, 1,
-         "Newest frame should be selected by default.");
-      is(gClassicFrames.selectedIndex, 0,
-         "Newest frame should be selected in the mirrored view as well.");
-      is(gSources.selectedIndex, 1,
-         "The second source is selected in the widget.");
-      ok(isCaretPos(gPanel, 6),
-         "Editor caret location is correct.");
-      is(gEditor.getDebugLocation(), 5,
-         "Editor debug location is correct.");
-    }
-
-    function testOldestFrame() {
-      const shown = waitForSourceAndCaret(gPanel, "-01.js", 5).then(() => {
-        is(gFrames.selectedIndex, 0,
-           "Second frame should be selected after click.");
-        is(gClassicFrames.selectedIndex, 1,
-           "Second frame should be selected in the mirrored view as well.");
-        is(gSources.selectedIndex, 0,
-           "The first source is now selected in the widget.");
-        ok(isCaretPos(gPanel, 5),
-           "Editor caret location is correct (3).");
-        is(gEditor.getDebugLocation(), 4,
-           "Editor debug location is correct.");
-      });
-
-      EventUtils.sendMouseEvent({ type: "mousedown" },
-                                gDebugger.document.querySelector("#stackframe-1"),
-                                gDebugger);
-
-      return shown;
-    }
-
-    function testAfterResume() {
-      let deferred = promise.defer();
-
-      gDebugger.once(gDebugger.EVENTS.AFTER_FRAMES_CLEARED, () => {
-        is(gFrames.itemCount, 0,
-           "Should have no frames after resume.");
-        is(gClassicFrames.itemCount, 0,
-           "Should have no frames in the mirrored view as well.");
-        ok(isCaretPos(gPanel, 5),
-           "Editor caret location is correct after resume.");
-        is(gEditor.getDebugLocation(), null,
-           "Editor debug location is correct after resume.");
-
-        deferred.resolve();
-      }, true);
-
-      gDebugger.gThreadClient.resume();
-
-      return deferred.promise;
-    }
-
-    Task.spawn(function* () {
-      yield waitForSourceAndCaretAndScopes(gPanel, "-02.js", 6);
-      yield initialChecks();
-      yield testNewestFrame();
-      yield testOldestFrame();
-      yield testAfterResume();
-      closeDebuggerAndFinish(gPanel);
-    });
-
-    callInTab(gTab, "firstCall");
-  });
-}
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_stack-06.js
+++ /dev/null
@@ -1,92 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Make sure that selecting a stack frame loads the right source in the editor
- * pane and highlights the proper line.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
-
-var gTab, gPanel, gDebugger;
-var gEditor, gSources, gFrames, gClassicFrames;
-
-function test() {
-  let options = {
-    source: EXAMPLE_URL + "code_script-switching-01.js",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gEditor = gDebugger.DebuggerView.editor;
-    gSources = gDebugger.DebuggerView.Sources;
-    gFrames = gDebugger.DebuggerView.StackFrames;
-    gClassicFrames = gDebugger.DebuggerView.StackFramesClassicList;
-
-    waitForSourceAndCaretAndScopes(gPanel, "-02.js", 1).then(performTest);
-    callInTab(gTab, "firstCall");
-  });
-}
-
-function performTest() {
-  is(gFrames.selectedIndex, 1,
-    "Newest frame should be selected by default.");
-  is(gClassicFrames.selectedIndex, 0,
-    "Newest frame should also be selected in the mirrored view.");
-  is(gSources.selectedIndex, 1,
-    "The second source is selected in the widget.");
-  is(gEditor.getText().search(/firstCall/), -1,
-    "The first source is not displayed.");
-  is(gEditor.getText().search(/debugger/), 166,
-    "The second source is displayed.");
-
-  waitForSourceAndCaret(gPanel, "-01.js", 5).then(waitForTick).then(() => {
-    is(gFrames.selectedIndex, 0,
-      "Oldest frame should be selected after click.");
-    is(gClassicFrames.selectedIndex, 1,
-      "Oldest frame should also be selected in the mirrored view.");
-    is(gSources.selectedIndex, 0,
-      "The first source is now selected in the widget.");
-    is(gEditor.getText().search(/firstCall/), 118,
-      "The first source is displayed.");
-    is(gEditor.getText().search(/debugger/), -1,
-      "The second source is not displayed.");
-
-    waitForSourceAndCaret(gPanel, "-02.js", 6).then(waitForTick).then(() => {
-      is(gFrames.selectedIndex, 1,
-        "Newest frame should be selected again after click.");
-      is(gClassicFrames.selectedIndex, 0,
-        "Newest frame should also be selected again in the mirrored view.");
-      is(gSources.selectedIndex, 1,
-        "The second source is selected in the widget.");
-      is(gEditor.getText().search(/firstCall/), -1,
-        "The first source is not displayed.");
-      is(gEditor.getText().search(/debugger/), 166,
-        "The second source is displayed.");
-
-      resumeDebuggerThenCloseAndFinish(gPanel);
-    });
-
-    EventUtils.sendMouseEvent({ type: "mousedown" },
-      gDebugger.document.querySelector("#classic-stackframe-0"),
-      gDebugger);
-  });
-
-  EventUtils.sendMouseEvent({ type: "mousedown" },
-    gDebugger.document.querySelector("#stackframe-1"),
-    gDebugger);
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gEditor = null;
-  gSources = null;
-  gFrames = null;
-  gClassicFrames = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_stack-07.js
+++ /dev/null
@@ -1,126 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Make sure that after selecting a different stack frame, resuming reselects
- * the topmost stackframe, loads the right source in the editor pane and
- * highlights the proper line.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_script-switching-01.html";
-
-var gTab, gPanel, gDebugger;
-var gEditor, gSources, gFrames, gClassicFrames, gToolbar;
-
-function test() {
-  let options = {
-    source: EXAMPLE_URL + "code_script-switching-01.js",
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gEditor = gDebugger.DebuggerView.editor;
-    gSources = gDebugger.DebuggerView.Sources;
-    gFrames = gDebugger.DebuggerView.StackFrames;
-    gClassicFrames = gDebugger.DebuggerView.StackFramesClassicList;
-    gToolbar = gDebugger.DebuggerView.Toolbar;
-
-    waitForSourceAndCaretAndScopes(gPanel, "-02.js", 1).then(performTest);
-    callInTab(gTab, "firstCall");
-  });
-}
-
-function performTest() {
-  return Task.spawn(function* () {
-    yield selectBottomFrame();
-    testBottomFrame(4);
-
-    yield performStep("StepOver");
-    testTopFrame(1);
-
-    yield selectBottomFrame();
-    testBottomFrame(4);
-
-    yield performStep("StepIn");
-    testTopFrame(1);
-
-    yield selectBottomFrame();
-    testBottomFrame(4);
-
-    yield performStep("StepOut");
-    testStepOutFrame(0);
-
-    yield resumeDebuggerThenCloseAndFinish(gPanel);
-  });
-
-  function selectBottomFrame() {
-    let shown = waitForSourceShown(gPanel, "-01.js");
-    gClassicFrames.selectedIndex = gClassicFrames.itemCount - 1;
-    return shown;
-  }
-
-  function testBottomFrame(debugLocation) {
-    is(gFrames.selectedIndex, 0,
-      "Oldest frame should be selected after click.");
-    is(gClassicFrames.selectedIndex, gFrames.itemCount - 1,
-      "Oldest frame should also be selected in the mirrored view.");
-    is(gSources.selectedIndex, 0,
-      "The first source is now selected in the widget.");
-    is(gEditor.getText().search(/firstCall/), 118,
-      "The first source is displayed.");
-    is(gEditor.getText().search(/debugger/), -1,
-      "The second source is not displayed.");
-
-    is(gEditor.getDebugLocation(), debugLocation,
-      "Editor debugger location is correct.");
-    ok(gEditor.hasLineClass(debugLocation, "debug-line"),
-      "The debugged line is highlighted appropriately.");
-  }
-
-  function performStep(type) {
-    let updated = waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FETCHED_SCOPES);
-    gToolbar["_on" + type + "Pressed"]();
-    return updated.then(waitForTick);
-  }
-
-  function testTopFrame(frameIndex) {
-    is(gFrames.selectedIndex, frameIndex,
-      "Topmost frame should be selected after click.");
-    is(gClassicFrames.selectedIndex, gFrames.itemCount - frameIndex - 1,
-      "Topmost frame should also be selected in the mirrored view.");
-    is(gSources.selectedIndex, 1,
-      "The second source is now selected in the widget.");
-    is(gEditor.getText().search(/firstCall/), -1,
-      "The second source is displayed.");
-    is(gEditor.getText().search(/debugger/), 166,
-      "The first source is not displayed.");
-  }
-
-  function testStepOutFrame(frameIndex) {
-    is(gFrames.selectedIndex, frameIndex,
-      "Topmost frame should be selected after click.");
-    is(gClassicFrames.selectedIndex, gFrames.itemCount - frameIndex - 1,
-      "Topmost frame should also be selected in the mirrored view.");
-    is(gSources.selectedIndex, 0,
-      "The first source is now selected in the widget.");
-    is(gEditor.getText().search(/firstCall/), 118,
-      "The first source is displayed.");
-    is(gEditor.getText().search(/debugger/), -1,
-      "The first source is not displayed.");
-  }
-}
-
-registerCleanupFunction(function () {
-  gTab = null;
-  gPanel = null;
-  gDebugger = null;
-  gEditor = null;
-  gSources = null;
-  gFrames = null;
-  gClassicFrames = null;
-  gToolbar = null;
-});
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_stack-contextmenu-01.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test that the copy contextmenu has been added to the stack frames view.
- */
-
- const TAB_URL = EXAMPLE_URL + "doc_recursion-stack.html";
- let gTab, gPanel, gDebugger;
- let gFrames, gContextMenu;
-
- function test() {
-   let options = {
-     source: TAB_URL,
-     line: 1
-   };
-   initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-     gTab = aTab;
-     gPanel = aPanel;
-     gDebugger = gPanel.panelWin;
-     gFrames = gDebugger.DebuggerView.StackFrames;
-
-     waitForDebuggerEvents(gPanel, gDebugger.EVENTS.AFTER_FRAMES_REFILLED)
-      .then(performTest);
-     callInTab(gTab, "simpleCall");
-   });
- }
-
- function performTest() {
-   gContextMenu = gDebugger.document.getElementById("stackFramesContextMenu");
-   is(gDebugger.gThreadClient.state, "paused",
-     "Should only be getting stack frames while paused.");
-   is(gFrames.itemCount, 1,
-     "Should have only one frame.");
-   ok(gContextMenu, "The stack frame's context menupopup is available.");
-
-   once(gContextMenu, "popupshown").then(testContextMenu);
-   EventUtils.synthesizeMouseAtCenter(gFrames.getItemAtIndex(0).prebuiltNode, {type: "contextmenu", button: 2}, gDebugger);
- }
-
- function testContextMenu() {
-   let document = gDebugger.document;
-   ok(document.getElementById("copyStackMenuItem"),
-    "#copyStackMenuItem found.");
-
-   gContextMenu.hidePopup();
-   resumeDebuggerThenCloseAndFinish(gPanel);
- }
-
- registerCleanupFunction(function () {
-   gTab = null;
-   gPanel = null;
-   gDebugger = null;
-   gFrames = null;
-   gContextMenu = null;
- });
deleted file mode 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg_stack-contextmenu-02.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
-/* Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Test that the copy contextmenu copys the stack frames to the clipboard.
- */
-
-const TAB_URL = EXAMPLE_URL + "doc_recursion-stack.html";
-const STACK_STRING = "simpleCall@" + EXAMPLE_URL + "doc_recursion-stack.html:14:8";
-
-function test() {
-  let gTab, gPanel, gDebugger, gFrames;
-  let options = {
-    source: TAB_URL,
-    line: 1
-  };
-  initDebugger(TAB_URL, options).then(([aTab,, aPanel]) => {
-    gTab = aTab;
-    gPanel = aPanel;
-    gDebugger = gPanel.panelWin;
-    gFrames = gDebugger.DebuggerView.StackFrames;
-
-    waitForDebuggerEvents(gPanel, gDebugger.EVENTS.AFTER_FRAMES_REFILLED)
-     .then(openContextMenu)
-     .then(testCopyStackMenuItem)
-     .then(() => resumeDebuggerThenCloseAndFinish(gPanel))
-     .catch(aError => {
-       ok(false, "Got an error: " + aError.message + "\n" + aError.stack);
-     });
-    callInTab(gTab, "simpleCall");
-  });
-
-  function clickCopyStack() {
-    return new Promise((resolve, reject) => {
-      let copyStackMenuItem = gDebugger.document.getElementById("copyStackMenuItem");
-      if (!copyStackMenuItem) {
-        reject(new Error("The Copy stack context menu item is not available."));
-      }
-
-      ok(copyStackMenuItem, "The Copy stack context menu item is available.");
-      EventUtils.synthesizeMouseAtCenter(copyStackMenuItem, {}, gDebugger);
-      resolve();
-    });
-  }
-
-  function testCopyStackMenuItem() {
-    return waitForClipboardPromise(clickCopyStack, STACK_STRING);
-  }
-
-  function openContextMenu() {
-    let contextMenu = gDebugger.document.getElementById("stackFramesContextMenu");
-    let contextMenuShown = once(contextMenu, "popupshown");
-    EventUtils.synthesizeMouseAtCenter(gFrames.getItemAtIndex(0).prebuiltNode, {type: "contextmenu", button: 2}, gDebugger);
-    return contextMenuShown;
-  }
-}
--- a/devtools/client/inspector/boxmodel/box-model.js
+++ b/devtools/client/inspector/boxmodel/box-model.js
@@ -7,17 +7,16 @@
 const {
   updateGeometryEditorEnabled,
   updateLayout,
   updateOffsetParent,
 } = require("./actions/box-model");
 
 loader.lazyRequireGetter(this, "EditingSession", "devtools/client/inspector/boxmodel/utils/editing-session");
 loader.lazyRequireGetter(this, "InplaceEditor", "devtools/client/shared/inplace-editor", true);
-loader.lazyRequireGetter(this, "getCssProperties", "devtools/shared/fronts/css-properties", true);
 
 const NUMERIC = /^-?[\d\.]+$/;
 
 /**
  * A singleton instance of the box model controllers.
  *
  * @param  {Inspector} inspector
  *         An instance of the Inspector currently loaded in the toolbox.
@@ -314,17 +313,17 @@ BoxModel.prototype = {
           session.revert().then(() => {
             session.destroy();
           }, console.error);
           return;
         }
 
         this.updateBoxModel("editable-value-change");
       },
-      cssProperties: getCssProperties(this.inspector.toolbox)
+      cssProperties: this.inspector.cssProperties,
     }, event);
   },
 
   /**
    * Shows the box-model highlighter on the currently selected element.
    *
    * @param  {Object} options
    *         Options passed to the highlighter actor.
--- a/devtools/client/inspector/boxmodel/utils/editing-session.js
+++ b/devtools/client/inspector/boxmodel/utils/editing-session.js
@@ -1,16 +1,14 @@
 /* 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.lazyRequireGetter(this, "getCssProperties", "devtools/shared/fronts/css-properties", true);
-
 /**
  * An instance of EditingSession tracks changes that have been made during the
  * modification of box model values. All of these changes can be reverted by
  * calling revert.
  *
  * @param  {InspectorPanel} inspector
  *         The inspector panel.
  * @param  {Document} doc
@@ -23,24 +21,16 @@ loader.lazyRequireGetter(this, "getCssPr
 function EditingSession({inspector, doc, elementRules}) {
   this._doc = doc;
   this._inspector = inspector;
   this._rules = elementRules;
   this._modifications = new Map();
 }
 
 EditingSession.prototype = {
-  get cssProperties() {
-    if (!this._cssProperties) {
-      this._cssProperties = getCssProperties(this._inspector.toolbox);
-    }
-
-    return this._cssProperties;
-  },
-
   /**
    * Gets the value of a single property from the CSS rule.
    *
    * @param  {StyleRuleFront} rule
    *         The CSS rule.
    * @param  {String} property
    *         The name of the property.
    * @return {String} the value.
@@ -115,17 +105,18 @@ EditingSession.prototype = {
    * @return {Promise} Resolves when the modifications are complete.
    */
   async setProperties(properties) {
     for (const property of properties) {
       // Get a RuleModificationList or RuleRewriter helper object from the
       // StyleRuleActor to make changes to CSS properties.
       // Note that RuleRewriter doesn't support modifying several properties at
       // once, so we do this in a sequence here.
-      const modifications = this._rules[0].startModifyingProperties(this.cssProperties);
+      const modifications = this._rules[0].startModifyingProperties(
+        this._inspector.cssProperties);
 
       // Remember the property so it can be reverted.
       if (!this._modifications.has(property.name)) {
         this._modifications.set(property.name,
           this.getPropertyFromRule(this._rules[0], property.name));
       }
 
       // Find the index of the property to be changed, or get the next index to
@@ -149,17 +140,18 @@ EditingSession.prototype = {
    * Reverts all of the property changes made by this instance.
    *
    * @return {Promise} Resolves when all properties have been reverted.
    */
   async revert() {
     // Revert each property that we modified previously, one by one. See
     // setProperties for information about why.
     for (const [property, value] of this._modifications) {
-      const modifications = this._rules[0].startModifyingProperties(this.cssProperties);
+      const modifications = this._rules[0].startModifyingProperties(
+        this._inspector.cssProperties);
 
       // Find the index of the property to be reverted.
       let index = this.getPropertyIndex(property);
 
       if (value != "") {
         // If the property doesn't exist anymore, insert at the beginning of the
         // rule.
         if (index === -1) {
--- a/devtools/client/inspector/computed/computed.js
+++ b/devtools/client/inspector/computed/computed.js
@@ -10,17 +10,16 @@ const promise = require("promise");
 const flags = require("devtools/shared/flags");
 const ToolDefinitions = require("devtools/client/definitions").Tools;
 const CssLogic = require("devtools/shared/inspector/css-logic");
 const {ELEMENT_STYLE} = require("devtools/shared/specs/styles");
 const OutputParser = require("devtools/client/shared/output-parser");
 const {PrefObserver} = require("devtools/client/shared/prefs");
 const {createChild} = require("devtools/client/inspector/shared/utils");
 const {gDevTools} = require("devtools/client/framework/devtools");
-const {getCssProperties} = require("devtools/shared/fronts/css-properties");
 const {
   VIEW_NODE_SELECTOR_TYPE,
   VIEW_NODE_PROPERTY_TYPE,
   VIEW_NODE_VALUE_TYPE,
   VIEW_NODE_IMAGE_URL_TYPE,
   VIEW_NODE_FONT_TYPE,
 } = require("devtools/client/inspector/shared/node-types");
 const TooltipsOverlay = require("devtools/client/inspector/shared/tooltips-overlay");
@@ -153,18 +152,17 @@ UpdateProcess.prototype = {
 function CssComputedView(inspector, document, pageStyle) {
   this.inspector = inspector;
   this.styleDocument = document;
   this.styleWindow = this.styleDocument.defaultView;
   this.pageStyle = pageStyle;
 
   this.propertyViews = [];
 
-  const cssProperties = getCssProperties(inspector.toolbox);
-  this._outputParser = new OutputParser(document, cssProperties);
+  this._outputParser = new OutputParser(document, inspector.cssProperties);
 
   // Create bound methods.
   this.focusWindow = this.focusWindow.bind(this);
   this._onClearSearch = this._onClearSearch.bind(this);
   this._onClick = this._onClick.bind(this);
   this._onContextMenu = this._onContextMenu.bind(this);
   this._onCopy = this._onCopy.bind(this);
   this._onFilterStyles = this._onFilterStyles.bind(this);
--- a/devtools/client/inspector/fonts/fonts.js
+++ b/devtools/client/inspector/fonts/fonts.js
@@ -5,17 +5,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const Services = require("Services");
 const { gDevTools } = require("devtools/client/framework/devtools");
 const { getColor } = require("devtools/client/shared/theme");
 const { createFactory, createElement } = require("devtools/client/shared/vendor/react");
-const { getCssProperties } = require("devtools/shared/fronts/css-properties");
 const { Provider } = require("devtools/client/shared/vendor/react-redux");
 const { debounce } = require("devtools/shared/debounce");
 const { ELEMENT_STYLE } = require("devtools/shared/specs/styles");
 
 const FontsApp = createFactory(require("./components/FontsApp"));
 
 const { LocalizationHelper } = require("devtools/shared/l10n");
 const INSPECTOR_L10N =
@@ -57,17 +56,17 @@ const REGISTERED_AXES_TO_FONT_PROPERTIES
 const REGISTERED_AXES = Object.keys(REGISTERED_AXES_TO_FONT_PROPERTIES);
 
 const HISTOGRAM_N_FONT_AXES = "DEVTOOLS_FONTEDITOR_N_FONT_AXES";
 const HISTOGRAM_N_FONTS_RENDERED = "DEVTOOLS_FONTEDITOR_N_FONTS_RENDERED";
 const HISTOGRAM_FONT_TYPE_DISPLAYED = "DEVTOOLS_FONTEDITOR_FONT_TYPE_DISPLAYED";
 
 class FontInspector {
   constructor(inspector, window) {
-    this.cssProperties = getCssProperties(inspector.toolbox);
+    this.cssProperties = inspector.cssProperties;
     this.document = window.document;
     this.inspector = inspector;
     // Set of unique keyword values supported by designated font properties.
     this.keywordValues = new Set(this.getFontPropertyValueKeywords());
     this.nodeComputedStyle = {};
     this.pageStyle = this.inspector.pageStyle;
     this.ruleViewTool = this.inspector.getPanel("ruleview");
     this.ruleView = this.ruleViewTool.view;
--- a/devtools/client/inspector/inspector.js
+++ b/devtools/client/inspector/inspector.js
@@ -259,16 +259,20 @@ Inspector.prototype = {
   get search() {
     if (!this._search) {
       this._search = new InspectorSearch(this, this.searchBox, this.searchClearButton);
     }
 
     return this._search;
   },
 
+  get cssProperties() {
+    return this._cssProperties.cssProperties;
+  },
+
   /**
    * Handle promise rejections for various asynchronous actions, and only log errors if
    * the inspector panel still exists.
    * This is useful to silence useless errors that happen when the inspector is closed
    * while still initializing (and making protocol requests).
    */
   _handleRejectionIfNotDestroyed: function(e) {
     if (!this._panelDestroyer) {
--- a/devtools/client/inspector/markup/views/element-editor.js
+++ b/devtools/client/inspector/markup/views/element-editor.js
@@ -4,17 +4,16 @@
 
 "use strict";
 
 const Services = require("Services");
 const TextEditor = require("devtools/client/inspector/markup/views/text-editor");
 const { truncateString } = require("devtools/shared/inspector/utils");
 const { editableField, InplaceEditor } = require("devtools/client/shared/inplace-editor");
 const { parseAttribute } = require("devtools/client/shared/node-attribute-parser");
-const { getCssProperties } = require("devtools/shared/fronts/css-properties");
 
 loader.lazyRequireGetter(this, "flashElementOn", "devtools/client/inspector/markup/utils", true);
 loader.lazyRequireGetter(this, "flashElementOff", "devtools/client/inspector/markup/utils", true);
 loader.lazyRequireGetter(this, "getAutocompleteMaxWidth", "devtools/client/inspector/markup/utils", true);
 loader.lazyRequireGetter(this, "parseAttributeValues", "devtools/client/inspector/markup/utils", true);
 
 const {LocalizationHelper} = require("devtools/shared/l10n");
 const INSPECTOR_L10N =
@@ -53,17 +52,17 @@ const DISPLAY_TYPES = {
  */
 function ElementEditor(container, node) {
   this.container = container;
   this.node = node;
   this.markup = this.container.markup;
   this.doc = this.markup.doc;
   this.inspector = this.markup.inspector;
   this.highlighters = this.markup.highlighters;
-  this._cssProperties = getCssProperties(this.markup.toolbox);
+  this._cssProperties = this.inspector.cssProperties;
 
   this.attrElements = new Map();
   this.animationTimers = {};
 
   this.elt = null;
   this.tag = null;
   this.closeTag = null;
   this.attrList = null;
--- a/devtools/client/inspector/markup/views/text-editor.js
+++ b/devtools/client/inspector/markup/views/text-editor.js
@@ -3,17 +3,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const { editableField } = require("devtools/client/shared/inplace-editor");
 const { LocalizationHelper } = require("devtools/shared/l10n");
 
 loader.lazyRequireGetter(this, "getAutocompleteMaxWidth", "devtools/client/inspector/markup/utils", true);
-loader.lazyRequireGetter(this, "getCssProperties", "devtools/shared/fronts/css-properties", true);
 
 const INSPECTOR_L10N =
   new LocalizationHelper("devtools/client/locales/inspector.properties");
 
 /**
  * Creates a simple text editor node, used for TEXT and COMMENT
  * nodes.
  *
@@ -50,17 +49,17 @@ function TextEditor(container, node, typ
           this.container.undo.do(() => {
             this.node.setNodeValue(val);
           }, () => {
             this.node.setNodeValue(oldValue);
           });
         });
       });
     },
-    cssProperties: getCssProperties(this.markup.toolbox),
+    cssProperties: this.markup.inspector.cssProperties,
   });
 
   this.update();
 }
 
 TextEditor.prototype = {
   buildMarkup: function(type) {
     const doc = this.markup.doc;
--- a/devtools/client/inspector/rules/rules.js
+++ b/devtools/client/inspector/rules/rules.js
@@ -11,17 +11,16 @@ const Services = require("Services");
 const flags = require("devtools/shared/flags");
 const {l10n} = require("devtools/shared/inspector/css-logic");
 const {ELEMENT_STYLE} = require("devtools/shared/specs/styles");
 const OutputParser = require("devtools/client/shared/output-parser");
 const {PrefObserver} = require("devtools/client/shared/prefs");
 const ElementStyle = require("devtools/client/inspector/rules/models/element-style");
 const Rule = require("devtools/client/inspector/rules/models/rule");
 const RuleEditor = require("devtools/client/inspector/rules/views/rule-editor");
-const {getCssProperties} = require("devtools/shared/fronts/css-properties");
 const {
   VIEW_NODE_SELECTOR_TYPE,
   VIEW_NODE_PROPERTY_TYPE,
   VIEW_NODE_VALUE_TYPE,
   VIEW_NODE_IMAGE_URL_TYPE,
   VIEW_NODE_LOCATION_TYPE,
   VIEW_NODE_SHAPE_POINT_TYPE,
   VIEW_NODE_SHAPE_SWATCH,
@@ -100,29 +99,28 @@ const INSET_POINT_TYPES = ["top", "right
  *        set of disabled properties.
  * @param {PageStyleFront} pageStyle
  *        The PageStyleFront for communicating with the remote server.
  */
 function CssRuleView(inspector, document, store, pageStyle) {
   EventEmitter.decorate(this);
 
   this.inspector = inspector;
+  this.cssProperties = inspector.cssProperties;
   this.styleDocument = document;
   this.styleWindow = this.styleDocument.defaultView;
   this.store = store || {};
   // References to rules marked by various editors where they intend to write changes.
   // @see selectRule(), unselectRule()
   this.selectedRules = new Map();
   this.pageStyle = pageStyle;
 
   // Allow tests to override debouncing behavior, as this can cause intermittents.
   this.debounce = debounce;
 
-  this.cssProperties = getCssProperties(inspector.toolbox);
-
   this._outputParser = new OutputParser(document, this.cssProperties);
 
   this._onAddRule = this._onAddRule.bind(this);
   this._onContextMenu = this._onContextMenu.bind(this);
   this._onCopy = this._onCopy.bind(this);
   this._onFilterStyles = this._onFilterStyles.bind(this);
   this._onClearSearch = this._onClearSearch.bind(this);
   this._onTogglePseudoClassPanel = this._onTogglePseudoClassPanel.bind(this);
--- a/devtools/client/inspector/shared/tooltips-overlay.js
+++ b/devtools/client/inspector/shared/tooltips-overlay.js
@@ -7,28 +7,28 @@
 "use strict";
 
 /**
  * The tooltip overlays are tooltips that appear when hovering over property values and
  * editor tooltips that appear when clicking swatch based editors.
  */
 
 const Services = require("Services");
+const flags = require("devtools/shared/flags");
 const {
   VIEW_NODE_VALUE_TYPE,
   VIEW_NODE_FONT_TYPE,
   VIEW_NODE_IMAGE_URL_TYPE,
   VIEW_NODE_VARIABLE_TYPE,
 } = require("devtools/client/inspector/shared/node-types");
-const { getColor } = require("devtools/client/shared/theme");
-const { HTMLTooltip } = require("devtools/client/shared/widgets/tooltip/HTMLTooltip");
 
-loader.lazyRequireGetter(this, "getCssProperties",
-  "devtools/shared/fronts/css-properties", true);
-
+loader.lazyRequireGetter(this, "getColor",
+  "devtools/client/shared/theme", true);
+loader.lazyRequireGetter(this, "HTMLTooltip",
+  "devtools/client/shared/widgets/tooltip/HTMLTooltip", true);
 loader.lazyRequireGetter(this, "getImageDimensions",
   "devtools/client/shared/widgets/tooltip/ImageTooltipHelper", true);
 loader.lazyRequireGetter(this, "setImageTooltip",
   "devtools/client/shared/widgets/tooltip/ImageTooltipHelper", true);
 loader.lazyRequireGetter(this, "setBrokenImageTooltip",
   "devtools/client/shared/widgets/tooltip/ImageTooltipHelper", true);
 loader.lazyRequireGetter(this, "setVariableTooltip",
   "devtools/client/shared/widgets/tooltip/VariableTooltipHelper", true);
@@ -53,20 +53,17 @@ function TooltipsOverlay(view) {
   this._onNewSelection = this._onNewSelection.bind(this);
   this.view.inspector.selection.on("new-node-front", this._onNewSelection);
 
   this.addToView();
 }
 
 TooltipsOverlay.prototype = {
   get _cssProperties() {
-    delete TooltipsOverlay.prototype._cssProperties;
-    const properties = getCssProperties(this.view.inspector.toolbox);
-    TooltipsOverlay.prototype._cssProperties = properties;
-    return properties;
+    return this.view.inspector.cssProperties;
   },
 
   get isEditing() {
     for (const [, tooltip] of this._instances) {
       if (typeof (tooltip.isEditing) == "function" && tooltip.isEditing()) {
         return true;
       }
     }
@@ -79,20 +76,27 @@ TooltipsOverlay.prototype = {
    */
   addToView: function() {
     if (this._isStarted || this._isDestroyed) {
       return;
     }
 
     this._isStarted = true;
 
-    // For now, preview tooltip has to be instantiated on startup in order to
-    // call tooltip.startTogglingOnHover. Ideally startTogglingOnHover wouldn't be part
-    // of HTMLTooltip and offer a way to lazy load this tooltip.
-    this.getTooltip("previewTooltip");
+    // Instantiate the preview tooltip when the rule/computed view is hovered over in
+    // order to call tooltip.starTogglingOnHover. This will allow the preview tooltip
+    // to be shown when an appropriate element is hovered over.
+    if (flags.testing) {
+      this.getTooltip("previewTooltip");
+    } else {
+      // Lazily get the preview tooltip to avoid loading HTMLTooltip.
+      this.view.element.addEventListener("mousemove", () => {
+        this.getTooltip("previewTooltip");
+      }, { once: true });
+    }
   },
 
   /**
    * Lazily fetch and initialize the different tooltips that are used in the inspector.
    * These tooltips are attached to the toolbox document if they require a popup panel.
    * Otherwise, it is attached to the inspector panel document if it is an inline editor.
    *
    * @param {String} name
--- a/devtools/client/shared/redux/middleware/promise.js
+++ b/devtools/client/shared/redux/middleware/promise.js
@@ -1,17 +1,18 @@
 /* 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 { generateUUID } = require("devtools/shared/generate-uuid");
-const {
-  entries, toObject, executeSoon
-} = require("devtools/shared/DevToolsUtils");
+loader.lazyRequireGetter(this, "generateUUID", "devtools/shared/generate-uuid", true);
+loader.lazyRequireGetter(this, "entries", "devtools/shared/DevToolsUtils", true);
+loader.lazyRequireGetter(this, "executeSoon", "devtools/shared/DevToolsUtils", true);
+loader.lazyRequireGetter(this, "toObject", "devtools/shared/DevToolsUtils", true);
+
 const PROMISE = exports.PROMISE = "@@dispatch/promise";
 
 function promiseMiddleware({ dispatch, getState }) {
   return next => action => {
     if (!(PROMISE in action)) {
       return next(action);
     }
     // Return the promise so action creators can still compose if they
--- a/devtools/client/shared/redux/middleware/task.js
+++ b/devtools/client/shared/redux/middleware/task.js
@@ -1,16 +1,19 @@
 /* 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 { Task } = require("devtools/shared/task");
-const { executeSoon, isGenerator, isAsyncFunction, reportException } =
-  require("devtools/shared/DevToolsUtils");
+loader.lazyRequireGetter(this, "Task", "devtools/shared/task", true);
+loader.lazyRequireGetter(this, "executeSoon", "devtools/shared/DevToolsUtils", true);
+loader.lazyRequireGetter(this, "isGenerator", "devtools/shared/DevToolsUtils", true);
+loader.lazyRequireGetter(this, "isAsyncFunction", "devtools/shared/DevToolsUtils", true);
+loader.lazyRequireGetter(this, "reportException", "devtools/shared/DevToolsUtils", true);
+
 const ERROR_TYPE = exports.ERROR_TYPE = "@@redux/middleware/task#error";
 
 /**
  * A middleware that allows generator thunks (functions) and promise
  * to be dispatched. If it's a generator, it is called with `dispatch`
  * and `getState`, allowing the action to create multiple actions (most likely
  * asynchronously) and yield on each. If called with a promise, calls `dispatch`
  * on the results.
--- a/devtools/client/shared/widgets/tooltip/HTMLTooltip.js
+++ b/devtools/client/shared/widgets/tooltip/HTMLTooltip.js
@@ -1,23 +1,23 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 /* 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 Services = require("Services");
 const EventEmitter = require("devtools/shared/event-emitter");
-const {TooltipToggle} = require("devtools/client/shared/widgets/tooltip/TooltipToggle");
-const {focusableSelector} = require("devtools/client/shared/focus");
-const {getCurrentZoom} = require("devtools/shared/layout/utils");
-const {listenOnce} = require("devtools/shared/async-utils");
 
-const Services = require("Services");
+loader.lazyRequireGetter(this, "focusableSelector", "devtools/client/shared/focus", true);
+loader.lazyRequireGetter(this, "TooltipToggle", "devtools/client/shared/widgets/tooltip/TooltipToggle", true);
+loader.lazyRequireGetter(this, "getCurrentZoom", "devtools/shared/layout/utils", true);
+loader.lazyRequireGetter(this, "listenOnce", "devtools/shared/async-utils", true);
 
 const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
 const XHTML_NS = "http://www.w3.org/1999/xhtml";
 
 const POSITION = {
   TOP: "top",
   BOTTOM: "bottom",
 };
@@ -324,20 +324,16 @@ function HTMLTooltip(toolboxDoc, {
   this.topWindow = this._getTopWindow();
 
   this._position = null;
 
   this._onClick = this._onClick.bind(this);
   this._onMouseup = this._onMouseup.bind(this);
   this._onXulPanelHidden = this._onXulPanelHidden.bind(this);
 
-  this._toggle = new TooltipToggle(this);
-  this.startTogglingOnHover = this._toggle.start.bind(this._toggle);
-  this.stopTogglingOnHover = this._toggle.stop.bind(this._toggle);
-
   this.container = this._createContainer();
 
   if (this.useXulWrapper) {
     // When using a XUL panel as the wrapper, the actual markup for the tooltip is as
     // follows :
     // <panel> <!-- XUL panel used to position the tooltip anywhere on screen -->
     //   <div> <!-- div wrapper used to isolate the tooltip container -->
     //     <div> <! the actual tooltip.container element -->
@@ -375,16 +371,24 @@ HTMLTooltip.prototype = {
 
   /**
    * Retrieve the displayed position used for the tooltip. Null if the tooltip is hidden.
    */
   get position() {
     return this.isVisible() ? this._position : null;
   },
 
+  get toggle() {
+    if (!this._toggle) {
+      this._toggle = new TooltipToggle(this);
+    }
+
+    return this._toggle;
+  },
+
   /**
    * Set the preferred width/height of the panel content.
    * The panel content is set by appending content to `this.panel`.
    *
    * @param {Object}
    *        - {Number} width: preferred width for the tooltip container. If not specified
    *          the tooltip container will be measured before being displayed, and the
    *          measured width will be used as the preferred width.
@@ -444,16 +448,24 @@ HTMLTooltip.prototype = {
       // Update the top window reference each time in case the host changes.
       this.topWindow = this._getTopWindow();
       this.topWindow.addEventListener("click", this._onClick, true);
       this.topWindow.addEventListener("mouseup", this._onMouseup, true);
       this.emit("shown");
     }, 0);
   },
 
+  startTogglingOnHover(baseNode, targetNodeCb, options) {
+    this.toggle.start(baseNode, targetNodeCb, options);
+  },
+
+  stopTogglingOnHover() {
+    this.toggle.stop();
+  },
+
   /**
    * Recalculate the dimensions and position of the tooltip in response to
    * changes to its content.
    *
    * Parameters are identical to show().
    */
   updateContainerBounds(anchor, options) {
     if (!this.isVisible()) {
@@ -731,17 +743,20 @@ HTMLTooltip.prototype = {
    */
   destroy: function() {
     this.hide();
     this.removeEventListeners();
     this.container.remove();
     if (this.xulPanelWrapper) {
       this.xulPanelWrapper.remove();
     }
-    this._toggle.destroy();
+    if (this._toggle) {
+      this._toggle.destroy();
+      this._toggle = null;
+    }
   },
 
   _createContainer: function() {
     const container = this.doc.createElementNS(XHTML_NS, "div");
     container.setAttribute("type", this.type);
 
     if (this.id) {
       container.setAttribute("id", this.id);
--- a/dom/html/HTMLIFrameElement.cpp
+++ b/dom/html/HTMLIFrameElement.cpp
@@ -169,17 +169,18 @@ HTMLIFrameElement::AfterSetAttr(int32_t 
         // If we have an nsFrameLoader, apply the new sandbox flags.
         // Since this is called after the setter, the sandbox flags have
         // alreay been updated.
         mFrameLoader->ApplySandboxFlags(GetSandboxFlags());
       }
     }
     if ((aName == nsGkAtoms::allow ||
          aName == nsGkAtoms::src ||
-         aName == nsGkAtoms::sandbox) &&
+         aName == nsGkAtoms::sandbox ||
+         aName == nsGkAtoms::allowpaymentrequest) &&
         StaticPrefs::dom_security_featurePolicy_enabled()) {
       RefreshFeaturePolicy();
     }
   }
   return nsGenericHTMLFrameElement::AfterSetAttr(aNameSpaceID, aName,
                                                  aValue, aOldValue,
                                                  aMaybeScriptedPrincipal,
                                                  aNotify);
@@ -302,14 +303,18 @@ HTMLIFrameElement::RefreshFeaturePolicy(
 
     // Set or reset the FeaturePolicy directives.
     mFeaturePolicy->SetDeclaredPolicy(OwnerDoc(), allow, documentOrigin,
                                       origin, true /* 'src' enabled */);
   }
 
   mFeaturePolicy->InheritPolicy(OwnerDoc()->Policy());
 
+  if (AllowPaymentRequest()) {
+    mFeaturePolicy->MaybeSetAllowedPolicy(NS_LITERAL_STRING("payment"));
+  }
+
   // TODO: https://wicg.github.io/feature-policy/#process-feature-policy-attributes
-  // requires to check allowfullscreen, allowpaymentrequest and allowusermediarequest
+  // requires to check allowfullscreen, and allowusermediarequest
 }
 
 } // namespace dom
 } // namespace mozilla
--- a/dom/payments/PaymentRequest.cpp
+++ b/dom/payments/PaymentRequest.cpp
@@ -1,16 +1,17 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
 #include "BasicCardPayment.h"
 #include "mozilla/dom/Element.h"
+#include "mozilla/dom/FeaturePolicyUtils.h"
 #include "mozilla/dom/PaymentRequest.h"
 #include "mozilla/dom/PaymentRequestChild.h"
 #include "mozilla/dom/PaymentResponse.h"
 #include "mozilla/EventStateManager.h"
 #include "mozilla/StaticPrefs.h"
 #include "nsContentUtils.h"
 #include "nsIScriptError.h"
 #include "nsIURLParser.h"
@@ -555,16 +556,22 @@ PaymentRequest::Constructor(const Global
 
 
   nsCOMPtr<nsIDocument> doc = window->GetExtantDoc();
   if (!doc) {
     aRv.Throw(NS_ERROR_UNEXPECTED);
     return nullptr;
   }
 
+  if (!FeaturePolicyUtils::IsFeatureAllowed(doc,
+                                            NS_LITERAL_STRING("payment"))) {
+    aRv.Throw(NS_ERROR_DOM_SECURITY_ERR);
+    return nullptr;
+  }
+
   // Check if AllowPaymentRequest on the owner document
   if (!doc->AllowPaymentRequest()) {
     aRv.Throw(NS_ERROR_DOM_SECURITY_ERR);
     return nullptr;
   }
 
   // Get the top level principal
   nsCOMPtr<nsIDocument> topLevelDoc = doc->GetTopLevelContentDocument();
--- a/dom/quota/test/head-shared.js
+++ b/dom/quota/test/head-shared.js
@@ -5,16 +5,19 @@
 
 function getBuffer(size)
 {
   let buffer = new ArrayBuffer(size);
   is(buffer.byteLength, size, "Correct byte length");
   return buffer;
 }
 
+// May be called for any size, but you should call getBuffer() if you know
+// that size is big and that randomness is not necessary because it is
+// noticeably faster.
 function getRandomBuffer(size)
 {
   let buffer = getBuffer(size);
   let view = new Uint8Array(buffer);
   for (let i = 0; i < size; i++) {
     view[i] = parseInt(Math.random() * 255)
   }
   return buffer;
new file mode 100644
--- /dev/null
+++ b/dom/quota/test/unit/test_persist_eviction.js
@@ -0,0 +1,79 @@
+/**
+ * Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/
+ */
+
+async function fillOrigin(principal, size) {
+  let database = getSimpleDatabase(principal);
+
+  let request = database.open("data");
+  await requestFinished(request);
+
+  try {
+    request = database.write(getBuffer(size));
+    await requestFinished(request);
+    ok(true, "Should not have thrown");
+  } catch (ex) {
+    ok(false, "Should not have thrown");
+  }
+
+  request = database.close();
+  await requestFinished(request);
+}
+
+/**
+ * This test is mainly to verify that normally the oldest origin will be
+ * evicted if the global limit is reached, but if the oldest origin is
+ * persisted, then it won't be evicted.
+ */
+
+async function testSteps()
+{
+  // The group limit is calculated as 20% of the global limit and the minimum
+  // value of the group limit is 10 MB.
+
+  const groupLimitKB = 10 * 1024;
+  const globalLimitKB = groupLimitKB * 5;
+
+  setGlobalLimit(globalLimitKB);
+
+  let request = clear();
+  await requestFinished(request);
+
+  for (let persistOldestOrigin of [false, true]) {
+    info("Testing " + (persistOldestOrigin ? "with" : "without") +
+         " persisting the oldest origin");
+
+    info("Step 1: Filling six separate origins to reach the global limit " +
+         "and trigger eviction");
+
+    for (let index = 1; index <= 6; index++) {
+      let spec = "http://example" + index + ".com";
+      if (index == 1 && persistOldestOrigin) {
+        request = persist(getPrincipal(spec));
+        await requestFinished(request);
+      }
+      await fillOrigin(getPrincipal(spec), groupLimitKB * 1024);
+    }
+
+    info("Step 2: Verifying origin directories");
+
+    for (let index = 1; index <= 6; index++) {
+      let path = "storage/default/http+++example" + index + ".com";
+      let file = getRelativeFile(path);
+      if (index == (persistOldestOrigin ? 2 : 1)) {
+        ok(!file.exists(), "The origin directory " + path + " doesn't exist");
+      } else {
+        ok(file.exists(), "The origin directory " + path + " does exist");
+      }
+    }
+
+    request = clear();
+    await requestFinished(request);
+  }
+
+  resetGlobalLimit();
+
+  request = reset();
+  await requestFinished(request);
+}
--- a/dom/quota/test/unit/xpcshell.ini
+++ b/dom/quota/test/unit/xpcshell.ini
@@ -24,16 +24,17 @@ support-files =
 [test_bad_origin_directory.js]
 [test_defaultStorageUpgrade.js]
 [test_getUsage.js]
 [test_idbSubdirUpgrade.js]
 [test_morgueCleanup.js]
 [test_obsoleteOriginAttributesUpgrade.js]
 [test_originAttributesUpgrade.js]
 [test_persist.js]
+[test_persist_eviction.js]
 [test_persist_groupLimit.js]
 [test_removeAppsUpgrade.js]
 [test_removeLocalStorage.js]
 [test_simpledb.js]
 [test_storagePersistentUpgrade.js]
 [test_tempMetadataCleanup.js]
 [test_unknownFiles.js]
 [test_version2_1upgrade.js]
--- a/dom/security/featurepolicy/FeaturePolicy.cpp
+++ b/dom/security/featurepolicy/FeaturePolicy.cpp
@@ -177,8 +177,23 @@ FeaturePolicy::GetAllowlistForFeature(co
 
   nsString defaultAllowList;
   FeaturePolicyUtils::DefaultAllowListFeature(aFeatureName, mDefaultOrigin,
                                               defaultAllowList);
    if (!defaultAllowList.IsEmpty()) {
     aList.AppendElement(defaultAllowList);
   }
 }
+
+void
+FeaturePolicy::MaybeSetAllowedPolicy(const nsAString& aFeatureName)
+{
+  MOZ_ASSERT(FeaturePolicyUtils::IsSupportedFeature(aFeatureName));
+
+  if (HasDeclaredFeature(aFeatureName)) {
+    return;
+  }
+
+  Feature feature(aFeatureName);
+  feature.SetAllowsAll();
+
+  mFeatures.AppendElement(feature);
+}
--- a/dom/security/featurepolicy/FeaturePolicy.h
+++ b/dom/security/featurepolicy/FeaturePolicy.h
@@ -96,16 +96,22 @@ public:
   // or for the 'allow' HTML attribute.
   void
   SetDeclaredPolicy(nsIDocument* aDocument,
                     const nsAString& aPolicyString,
                     const nsAString& aSelfOrigin,
                     const nsAString& aSrcOrigin,
                     bool aSrcEnabled);
 
+  // This method creates a policy for aFeatureName allowing it to '*' if it
+  // doesn't exist yet. It's used by HTMLIFrameElement to enable features by
+  // attributes.
+  void
+  MaybeSetAllowedPolicy(const nsAString& aFeatureName);
+
   // Clears all the declarative policy directives. This is needed when the
   // 'allow' attribute or the 'src' attribute change for HTMLIFrameElement's
   // policy.
   void
   ResetDeclaredPolicy();
 
   // WebIDL internal methods.
 
--- a/dom/security/featurepolicy/FeaturePolicyUtils.cpp
+++ b/dom/security/featurepolicy/FeaturePolicyUtils.cpp
@@ -42,17 +42,16 @@ static FeatureMap sSupportedFeatures[] =
   // TODO: not supported yet!!!
   { "gyroscope", FeatureMap::eSelf  },
   // TODO: not supported yet!!!
   { "magnetometer", FeatureMap::eSelf  },
   // TODO: not supported yet!!!
   { "microphone", FeatureMap::eSelf  },
   // TODO: not supported yet!!!
   { "midi", FeatureMap::eSelf  },
-  // TODO: not supported yet!!!
   { "payment", FeatureMap::eSelf  },
   // TODO: not supported yet!!!
   { "picture-in-picture", FeatureMap::eAll  },
   // TODO: not supported yet!!!
   { "speaker", FeatureMap::eSelf  },
   // TODO: not supported yet!!!
   { "usb", FeatureMap::eSelf  },
   // TODO: not supported yet!!!
--- a/dom/webauthn/WebAuthnTransactionChild.cpp
+++ b/dom/webauthn/WebAuthnTransactionChild.cpp
@@ -23,41 +23,56 @@ WebAuthnTransactionChild::WebAuthnTransa
 mozilla::ipc::IPCResult
 WebAuthnTransactionChild::RecvConfirmRegister(const uint64_t& aTransactionId,
                                               const WebAuthnMakeCredentialResult& aResult)
 {
   if (NS_WARN_IF(!mManager)) {
     return IPC_FAIL_NO_REASON(this);
   }
 
-  mManager->FinishMakeCredential(aTransactionId, aResult);
+  // We don't own the reference to mManager. We need to prevent its refcount
+  // going to 0 while we call anything that can reach the call to
+  // StopListeningForVisibilityEvents in WebAuthnManager::ClearTransaction
+  // (often via WebAuthnManager::RejectTransaction).
+  RefPtr<WebAuthnManagerBase> kungFuDeathGrip(mManager);
+  kungFuDeathGrip->FinishMakeCredential(aTransactionId, aResult);
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult
 WebAuthnTransactionChild::RecvConfirmSign(const uint64_t& aTransactionId,
                                           const WebAuthnGetAssertionResult& aResult)
 {
   if (NS_WARN_IF(!mManager)) {
     return IPC_FAIL_NO_REASON(this);
   }
 
-  mManager->FinishGetAssertion(aTransactionId, aResult);
+  // We don't own the reference to mManager. We need to prevent its refcount
+  // going to 0 while we call anything that can reach the call to
+  // StopListeningForVisibilityEvents in WebAuthnManager::ClearTransaction
+  // (often via WebAuthnManager::RejectTransaction).
+  RefPtr<WebAuthnManagerBase> kungFuDeathGrip(mManager);
+  kungFuDeathGrip->FinishGetAssertion(aTransactionId, aResult);
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult
 WebAuthnTransactionChild::RecvAbort(const uint64_t& aTransactionId,
                                     const nsresult& aError)
 {
   if (NS_WARN_IF(!mManager)) {
     return IPC_FAIL_NO_REASON(this);
   }
 
-  mManager->RequestAborted(aTransactionId, aError);
+  // We don't own the reference to mManager. We need to prevent its refcount
+  // going to 0 while we call anything that can reach the call to
+  // StopListeningForVisibilityEvents in WebAuthnManager::ClearTransaction
+  // (often via WebAuthnManager::RejectTransaction).
+  RefPtr<WebAuthnManagerBase> kungFuDeathGrip(mManager);
+  kungFuDeathGrip->RequestAborted(aTransactionId, aError);
   return IPC_OK();
 }
 
 void
 WebAuthnTransactionChild::ActorDestroy(ActorDestroyReason why)
 {
   // Called by either a __delete__ message from the parent, or when the
   // channel disconnects. Clear out the child actor reference to be sure.
new file mode 100644
--- /dev/null
+++ b/dom/webauthn/tests/get_assertion_dead_object.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+</head>
+<body>
+<script type="text/javascript">
+  window.addEventListener('load', function() {
+    let o = [];
+    o[0] = window.navigator;
+    document.writeln('');
+    // Since the USB token is enabled by default, this will pop up a notification that the
+    // user can insert/interact with it. Since this is just a test, this won't happen. The
+    // request will eventually time out.
+    // Unfortunately the minimum timeout is 15 seconds.
+    o[0].credentials.get({ publicKey: { challenge: new Uint8Array(128), timeout: 15000 } });
+    o.forEach((n, i) => o[i] = null);
+  });
+</script>
+</body>
+</html>
--- a/dom/webauthn/tests/mochitest.ini
+++ b/dom/webauthn/tests/mochitest.ini
@@ -1,20 +1,22 @@
 [DEFAULT]
 support-files =
   cbor.js
   u2futil.js
   pkijs/*
+  get_assertion_dead_object.html
 skip-if = !e10s
 scheme = https
 
 [test_webauthn_abort_signal.html]
 [test_webauthn_attestation_conveyance.html]
 [test_webauthn_authenticator_selection.html]
 [test_webauthn_authenticator_transports.html]
 [test_webauthn_loopback.html]
 [test_webauthn_no_token.html]
 [test_webauthn_make_credential.html]
 [test_webauthn_get_assertion.html]
+[test_webauthn_get_assertion_dead_object.html]
 [test_webauthn_override_request.html]
 [test_webauthn_store_credential.html]
 [test_webauthn_sameorigin.html]
 [test_webauthn_isplatformauthenticatoravailable.html]
new file mode 100644
--- /dev/null
+++ b/dom/webauthn/tests/test_webauthn_get_assertion_dead_object.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<meta charset=utf-8>
+<head>
+  <title>Test for GetAssertion on dead object</title>
+  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <script type="text/javascript" src="/tests/SimpleTest/AddTask.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+</head>
+<body>
+
+  <h1>Test for GetAssertion on dead object</h1>
+  <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1483905">Mozilla Bug 1483905</a>
+
+  <script class="testbody" type="text/javascript">
+    "use strict";
+    SimpleTest.waitForExplicitFinish();
+    SimpleTest.requestFlakyTimeout(
+      "Due to the nature of this test, there's no way for the window we're opening to signal " +
+      "that it's done (the `document.writeln('')` is essential and basically clears any state " +
+      "we could use). So, we have to wait at least 15 seconds for the webauthn call to time out.");
+    let win = window.open("https://example.com/tests/dom/webauthn/tests/get_assertion_dead_object.html");
+    setTimeout(() => {
+      win.close();
+      SimpleTest.finish();
+    }, 20000);
+  </script>
+
+</body>
+</html>
--- a/gfx/layers/wr/WebRenderCommandBuilder.cpp
+++ b/gfx/layers/wr/WebRenderCommandBuilder.cpp
@@ -742,18 +742,27 @@ struct DIGroup
       }
 
       if (mInvalidRect.Contains(bounds)) {
         GP("Wholely contained\n");
         BlobItemData* data = GetBlobItemData(item);
         data->mInvalid = false;
       } else {
         BlobItemData* data = GetBlobItemData(item);
-        if (data->mInvalid)
-          gfxCriticalError() << "DisplayItem" << item->Name() << "should be invalid";
+        if (data->mInvalid) {
+          if (item->GetType() == DisplayItemType::TYPE_TRANSFORM) {
+            nsDisplayTransform* transformItem = static_cast<nsDisplayTransform*>(item);
+            const Matrix4x4Flagged& t = transformItem->GetTransform();
+            Matrix t2d;
+            bool is2D = t.Is2D(&t2d);
+            gfxCriticalError() << "DisplayItemTransform-" << is2D << "-should-be-invalid";
+          } else {
+            gfxCriticalError() << "DisplayItem" << item->Name() << "should be invalid";
+          }
+        }
         // if the item is invalid it needs to be fully contained
         MOZ_RELEASE_ASSERT(!data->mInvalid);
       }
 
       nsDisplayList* children = item->GetChildren();
       if (children) {
         GP("doing children in EndGroup\n");
         aGrouper->PaintContainerItem(this, item, bounds, children, aContext, aRecorder);
--- a/js/src/wasm/cranelift/build.rs
+++ b/js/src/wasm/cranelift/build.rs
@@ -50,39 +50,42 @@ fn main() {
         .whitelist_type("BD_.*|Trap|TypeCode|FuncTypeIdDescKind")
         .header("baldrapi.h")
         .clang_args(&["-x", "c++", "-std=gnu++14", "-fno-sized-deallocation", "-DRUST_BINDGEN"])
         .clang_arg("-I../..");
 
     let arch = {
         let target_arch = env::var("CARGO_CFG_TARGET_ARCH");
         match target_arch.as_ref().map(|x| x.as_str()) {
-            Ok("aarch64") => Arch::Aarch64,
-            Ok("arm") => Arch::Arm,
-            Ok("x86") => Arch::X86,
-            Ok("x86_64") => Arch::X64,
-            _ => panic!("unknown arch")
+            Ok("aarch64") => Some(Arch::Aarch64),
+            Ok("arm") => Some(Arch::Arm),
+            Ok("x86") => Some(Arch::X86),
+            Ok("x86_64") => Some(Arch::X64),
+            _ => None
         }
     };
 
     match env::var("CARGO_CFG_TARGET_OS").as_ref().map(|x| x.as_str()) {
         Ok("android") => {
             bindings = bindings.clang_arg("-DOS_ANDROID=1");
-            bindings = match arch {
+            bindings = match arch.expect("unknown android architecture") {
                 Arch::Aarch64 => { bindings.clang_arg("--target=aarch64-linux-android") }
                 Arch::Arm => { bindings.clang_arg("--target=armv7-linux-androideabi") }
                 Arch::X86 => { bindings.clang_arg("--target=i686-linux-android") }
                 Arch::X64 => { bindings.clang_arg("--target=x86_64-linux-android") }
             };
         }
+
         Ok("linux") | Ok("freebsd") | Ok("dragonfly") | Ok("openbsd") | Ok(&q