Bug 1451659 - Automated ESLint fixes for devtools/client/framework/. r?jdescottes draft
authorMark Banner <standard8@mozilla.com>
Wed, 04 Apr 2018 22:10:09 +0100
changeset 777827 e97dccc542cceb3f18cda4778307539e25abb217
parent 777826 19b9bbed57f53dda62f1a462b65b8ea9501eeb4c
child 777828 13e14ca47b8f68d4a669296652c7a47d27f13863
push id105298
push userbmo:standard8@mozilla.com
push dateThu, 05 Apr 2018 10:56:03 +0000
reviewersjdescottes
bugs1451659
milestone61.0a1
Bug 1451659 - Automated ESLint fixes for devtools/client/framework/. r?jdescottes MozReview-Commit-ID: 26jRtf8ZzTr
devtools/client/framework/attach-thread.js
devtools/client/framework/browser-menus.js
devtools/client/framework/connect/connect.js
devtools/client/framework/gDevTools.jsm
devtools/client/framework/menu.js
devtools/client/framework/sidebar.js
devtools/client/framework/source-map-url-service.js
devtools/client/framework/test/browser_browser_toolbox.js
devtools/client/framework/test/browser_browser_toolbox_debugger.js
devtools/client/framework/test/browser_devtools_api.js
devtools/client/framework/test/browser_devtools_api_destroy.js
devtools/client/framework/test/browser_ignore_toolbox_network_requests.js
devtools/client/framework/test/browser_keybindings_01.js
devtools/client/framework/test/browser_keybindings_02.js
devtools/client/framework/test/browser_keybindings_03.js
devtools/client/framework/test/browser_menu_api.js
devtools/client/framework/test/browser_new_activation_workflow.js
devtools/client/framework/test/browser_source_map-01.js
devtools/client/framework/test/browser_source_map-absolute.js
devtools/client/framework/test/browser_source_map-cross-domain.js
devtools/client/framework/test/browser_source_map-init.js
devtools/client/framework/test/browser_source_map-inline.js
devtools/client/framework/test/browser_source_map-no-race.js
devtools/client/framework/test/browser_source_map-reload.js
devtools/client/framework/test/browser_target_events.js
devtools/client/framework/test/browser_target_from_url.js
devtools/client/framework/test/browser_target_support.js
devtools/client/framework/test/browser_toolbox_custom_host.js
devtools/client/framework/test/browser_toolbox_dynamic_registration.js
devtools/client/framework/test/browser_toolbox_getpanelwhenready.js
devtools/client/framework/test/browser_toolbox_highlight.js
devtools/client/framework/test/browser_toolbox_hosts_size.js
devtools/client/framework/test/browser_toolbox_hosts_telemetry.js
devtools/client/framework/test/browser_toolbox_keyboard_navigation.js
devtools/client/framework/test/browser_toolbox_options.js
devtools/client/framework/test/browser_toolbox_options_disable_buttons.js
devtools/client/framework/test/browser_toolbox_options_disable_cache-01.js
devtools/client/framework/test/browser_toolbox_options_disable_cache-02.js
devtools/client/framework/test/browser_toolbox_options_disable_js.js
devtools/client/framework/test/browser_toolbox_options_enable_serviceworkers_testing.js
devtools/client/framework/test/browser_toolbox_options_enable_serviceworkers_testing_frame_script.js
devtools/client/framework/test/browser_toolbox_races.js
devtools/client/framework/test/browser_toolbox_raise.js
devtools/client/framework/test/browser_toolbox_ready.js
devtools/client/framework/test/browser_toolbox_remoteness_change.js
devtools/client/framework/test/browser_toolbox_select_event.js
devtools/client/framework/test/browser_toolbox_selected_tool_unavailable.js
devtools/client/framework/test/browser_toolbox_selectionchanged_event.js
devtools/client/framework/test/browser_toolbox_sidebar.js
devtools/client/framework/test/browser_toolbox_sidebar_events.js
devtools/client/framework/test/browser_toolbox_sidebar_existing_tabs.js
devtools/client/framework/test/browser_toolbox_sidebar_overflow_menu.js
devtools/client/framework/test/browser_toolbox_split_console.js
devtools/client/framework/test/browser_toolbox_tabsswitch_shortcuts.js
devtools/client/framework/test/browser_toolbox_target.js
devtools/client/framework/test/browser_toolbox_textbox_context_menu.js
devtools/client/framework/test/browser_toolbox_toggle.js
devtools/client/framework/test/browser_toolbox_tool_ready.js
devtools/client/framework/test/browser_toolbox_tool_remote_reopen.js
devtools/client/framework/test/browser_toolbox_toolbar_overflow.js
devtools/client/framework/test/browser_toolbox_tools_per_toolbox_registration.js
devtools/client/framework/test/browser_toolbox_transport_events.js
devtools/client/framework/test/browser_toolbox_window_shortcuts.js
devtools/client/framework/test/browser_toolbox_window_title_changes.js
devtools/client/framework/test/browser_toolbox_window_title_frame_select.js
devtools/client/framework/test/browser_toolbox_zoom.js
devtools/client/framework/test/browser_two_tabs.js
devtools/client/framework/test/head.js
devtools/client/framework/test/helper_disable_cache.js
devtools/client/framework/test/test_browser_toolbox_debugger.js
--- a/devtools/client/framework/attach-thread.js
+++ b/devtools/client/framework/attach-thread.js
@@ -43,17 +43,17 @@ function attachThread(toolbox) {
 
   // Sourcemaps are always turned off when using the new debugger
   // frontend. This is because it does sourcemapping on the
   // client-side, so the server should not do it.
   let useSourceMaps = false;
   let autoBlackBox = false;
   let ignoreFrameEnvironment = false;
   const newDebuggerEnabled = Services.prefs.getBoolPref("devtools.debugger.new-debugger-frontend");
-  if(!newDebuggerEnabled) {
+  if (!newDebuggerEnabled) {
     useSourceMaps = Services.prefs.getBoolPref("devtools.debugger.source-maps-enabled");
     autoBlackBox = Services.prefs.getBoolPref("devtools.debugger.auto-black-box");
   } else {
     ignoreFrameEnvironment = true;
   }
 
   let threadOptions = { useSourceMaps, autoBlackBox, ignoreFrameEnvironment };
 
@@ -98,17 +98,17 @@ function attachThread(toolbox) {
   if (target.isTabActor) {
     // Attaching a tab, a browser process, or a WebExtensions add-on.
     target.activeTab.attachThread(threadOptions, handleResponse);
   } else if (target.isAddon) {
     // Attaching a legacy addon.
     target.client.attachAddon(actor, res => {
       target.client.attachThread(res.threadActor, handleResponse);
     });
-  }  else {
+  } else {
     // Attaching an old browser debugger or a content process.
     target.client.attachThread(chromeDebugger, handleResponse);
   }
 
   return deferred.promise;
 }
 
 function detachThread(threadClient) {
--- a/devtools/client/framework/browser-menus.js
+++ b/devtools/client/framework/browser-menus.js
@@ -69,17 +69,17 @@ function createToolMenuElements(toolDefi
   let id = toolDefinition.id;
   let menuId = "menuitem_" + id;
 
   // Prevent multiple entries for the same tool.
   if (doc.getElementById(menuId)) {
     return;
   }
 
-  let oncommand = function (id, event) {
+  let oncommand = function(id, event) {
     let window = event.target.ownerDocument.defaultView;
     gDevToolsBrowser.selectToolCommand(window.gBrowser, id, window.performance.now());
   }.bind(null, id);
 
   let menuitem = createMenuItem({
     doc,
     id: "menuitem_" + id,
     label: toolDefinition.menuLabel || toolDefinition.label,
@@ -248,25 +248,25 @@ function removeTopLevelItems(doc) {
 }
 
 /**
  * Add menus to a browser document
  *
  * @param {XULDocument} doc
  *        The document to which menus are to be added.
  */
-exports.addMenus = function (doc) {
+exports.addMenus = function(doc) {
   addTopLevelItems(doc);
 
   addAllToolsToMenu(doc);
 };
 
 /**
  * Remove menus from a browser document
  *
  * @param {XULDocument} doc
  *        The document to which menus are to be removed.
  */
-exports.removeMenus = function (doc) {
+exports.removeMenus = function(doc) {
   // We only remove top level entries. Per-tool entries are removed while
   // unregistering each tool.
   removeTopLevelItems(doc);
 };
--- a/devtools/client/framework/connect/connect.js
+++ b/devtools/client/framework/connect/connect.js
@@ -17,42 +17,42 @@ var L10N = new LocalizationHelper("devto
 
 var gClient;
 var gConnectionTimeout;
 
 /**
  * Once DOM is ready, we prefil the host/port inputs with
  * pref-stored values.
  */
-window.addEventListener("DOMContentLoaded", function () {
+window.addEventListener("DOMContentLoaded", function() {
   let host = Services.prefs.getCharPref("devtools.debugger.remote-host");
   let port = Services.prefs.getIntPref("devtools.debugger.remote-port");
 
   if (host) {
     document.getElementById("host").value = host;
   }
 
   if (port) {
     document.getElementById("port").value = port;
   }
 
   let form = document.querySelector("#connection-form form");
-  form.addEventListener("submit", function () {
+  form.addEventListener("submit", function() {
     window.submit().catch(e => {
       console.error(e);
       // Bug 921850: catch rare exception from DebuggerClient.socketConnect
       showError("unexpected");
     });
   });
 }, {capture: true, once: true});
 
 /**
  * Called when the "connect" button is clicked.
  */
-var submit = async function () {
+var submit = async function() {
   // Show the "connecting" screen
   document.body.classList.add("connecting");
 
   let host = document.getElementById("host").value;
   let port = document.getElementById("port").value;
 
   // Save the host/port values
   try {
@@ -69,40 +69,39 @@ var submit = async function () {
   gConnectionTimeout = setTimeout(handleConnectionTimeout, delay);
   let response = await gClient.connect();
   await onConnectionReady(...response);
 };
 
 /**
  * Connection is ready. List actors and build buttons.
  */
-var onConnectionReady = async function ([aType, aTraits]) {
+var onConnectionReady = async function([aType, aTraits]) {
   clearTimeout(gConnectionTimeout);
 
   let addons = [];
   try {
     let response = await gClient.listAddons();
     if (!response.error && response.addons.length > 0) {
       addons = response.addons;
     }
-  } catch(e) {
+  } catch (e) {
     // listAddons throws if the runtime doesn't support addons
   }
 
   let parent = document.getElementById("addonActors");
   if (addons.length > 0) {
     // Add one entry for each add-on.
     for (let addon of addons) {
       if (!addon.debuggable) {
         continue;
       }
       buildAddonLink(addon, parent);
     }
-  }
-  else {
+  } else {
     // Hide the section when there are no add-ons
     parent.previousElementSibling.remove();
     parent.remove();
   }
 
   let response = await gClient.listTabs();
 
   parent = document.getElementById("tabActors");
@@ -121,17 +120,17 @@ var onConnectionReady = async function (
 
   let gParent = document.getElementById("globalActors");
 
   // Build the Remote Process button
   // If Fx<39, tab actors were used to be exposed on RootActor
   // but in Fx>=39, chrome is debuggable via getProcess() and ChromeActor
   if (globals.consoleActor || gClient.mainRoot.traits.allowChromeProcess) {
     let a = document.createElement("a");
-    a.onclick = function () {
+    a.onclick = function() {
       if (gClient.mainRoot.traits.allowChromeProcess) {
         gClient.getProcess()
                .then(aResponse => {
                  openToolbox(aResponse.form, true);
                });
       } else if (globals.consoleActor) {
         openToolbox(globals, true, "webconsole", false);
       }
@@ -157,34 +156,34 @@ var onConnectionReady = async function (
   }
 };
 
 /**
  * Build one button for an add-on actor.
  */
 function buildAddonLink(addon, parent) {
   let a = document.createElement("a");
-  a.onclick = async function () {
+  a.onclick = async function() {
     const isTabActor = addon.isWebExtension;
     openToolbox(addon, true, "webconsole", isTabActor);
   };
 
   a.textContent = addon.name;
   a.title = addon.id;
   a.href = "#";
 
   parent.appendChild(a);
 }
 
 /**
  * Build one button for a tab actor.
  */
 function buildTabLink(tab, parent, selected) {
   let a = document.createElement("a");
-  a.onclick = function () {
+  a.onclick = function() {
     openToolbox(tab);
   };
 
   a.textContent = tab.title;
   a.title = tab.url;
   if (!a.textContent) {
     a.textContent = tab.url;
   }
@@ -228,15 +227,15 @@ function openToolbox(form, chrome = fals
     form: form,
     client: gClient,
     chrome: chrome,
     isTabActor: isTabActor
   };
   TargetFactory.forRemoteTab(options).then((target) => {
     let hostType = Toolbox.HostType.WINDOW;
     gDevTools.showToolbox(target, tool, hostType).then((toolbox) => {
-      toolbox.once("destroyed", function () {
+      toolbox.once("destroyed", function() {
         gClient.close();
       });
     }, console.error);
     window.close();
   }, console.error);
 }
--- a/devtools/client/framework/gDevTools.jsm
+++ b/devtools/client/framework/gDevTools.jsm
@@ -88,29 +88,28 @@ let gDevToolsMethods = [
 this.gDevTools = {
   // Used by tests
   get _toolboxes() {
     return devtools._toolboxes;
   },
   get _tools() {
     return devtools._tools;
   },
-  *[Symbol.iterator ]() {
+  * [Symbol.iterator ]() {
     for (let toolbox of this._toolboxes) {
       yield toolbox;
     }
   }
 };
 gDevToolsMethods.forEach(name => {
   this.gDevTools[name] = (...args) => {
     return devtools[name].apply(devtools, args);
   };
 });
 
-
 /**
  * gDevToolsBrowser exposes functions to connect the gDevTools instance with a
  * Firefox instance.
  */
 let gDevToolsBrowserMethods = [
   // used by browser-sets.inc, command
   "toggleToolboxCommand",
 
--- a/devtools/client/framework/menu.js
+++ b/devtools/client/framework/menu.js
@@ -31,43 +31,43 @@ function Menu({ id = null } = {}) {
   EventEmitter.decorate(this);
 }
 
 /**
  * Add an item to the end of the Menu
  *
  * @param {MenuItem} menuItem
  */
-Menu.prototype.append = function (menuItem) {
+Menu.prototype.append = function(menuItem) {
   this.menuitems.push(menuItem);
 };
 
 /**
  * Add an item to a specified position in the menu
  *
  * @param {int} pos
  * @param {MenuItem} menuItem
  */
-Menu.prototype.insert = function (pos, menuItem) {
+Menu.prototype.insert = function(pos, menuItem) {
   throw Error("Not implemented");
 };
 
 /**
  * Show the Menu at a specified location on the screen
  *
  * Missing features:
  *   - browserWindow - BrowserWindow (optional) - Default is null.
  *   - positioningItem Number - (optional) OS X
  *
  * @param {int} screenX
  * @param {int} screenY
  * @param Toolbox toolbox (non standard)
  *        Needed so we in which window to inject XUL
  */
-Menu.prototype.popup = function (screenX, screenY, toolbox) {
+Menu.prototype.popup = function(screenX, screenY, toolbox) {
   let doc = toolbox.doc;
   let popupset = doc.querySelector("popupset");
   // See bug 1285229, on Windows, opening the same popup multiple times in a
   // row ends up duplicating the popup. The newly inserted popup doesn't
   // dismiss the old one. So remove any previously displayed popup before
   // opening a new one.
   let popup = popupset.querySelector("menupopup[menu-api=\"true\"]");
   if (popup) {
@@ -95,17 +95,17 @@ Menu.prototype.popup = function (screenX
       this.emit("open");
     }
   });
 
   popupset.appendChild(popup);
   popup.openPopupAtScreen(screenX, screenY, true);
 };
 
-Menu.prototype._createMenuItems = function (parent) {
+Menu.prototype._createMenuItems = function(parent) {
   let doc = parent.ownerDocument;
   this.menuitems.forEach(item => {
     if (!item.visible) {
       return;
     }
 
     if (item.submenu) {
       let menupopup = doc.createElement("menupopup");
--- a/devtools/client/framework/sidebar.js
+++ b/devtools/client/framework/sidebar.js
@@ -104,17 +104,17 @@ ToolSidebar.prototype = {
   /**
    * Add a "…" button at the end of the tabstripe that toggles a dropdown menu
    * containing the list of all tabs if any become hidden due to lack of room.
    *
    * If the ToolSidebar was created with the "showAllTabsMenu" option set to
    * true, this is already done automatically. If not, you may call this
    * function at any time to add the menu.
    */
-  addAllTabsMenu: function () {
+  addAllTabsMenu: function() {
     if (this._allTabsBtn) {
       return;
     }
 
     let tabs = this._tabbox.tabs;
 
     // Create a container and insert it first in the tabbox
     let allTabsContainer = this._panelDoc.createElementNS(XULNS, "stack");
@@ -150,45 +150,45 @@ ToolSidebar.prototype = {
         selected: tab.hasAttribute("selected")
       });
       if (tab.hidden) {
         item.hidden = true;
       }
     }
   },
 
-  removeAllTabsMenu: function () {
+  removeAllTabsMenu: function() {
     if (!this._allTabsBtn) {
       return;
     }
 
     let tabs = this._tabbox.tabs;
 
     tabs.removeEventListener("overflow", this._onTabBoxOverflow);
     tabs.removeEventListener("underflow", this._onTabBoxUnderflow);
 
     // Moving back the tabs as a first child of the tabbox
     this._tabbox.insertBefore(tabs, this._tabbox.tabpanels);
     this._tabbox.querySelector("stack").remove();
 
     this._allTabsBtn = null;
   },
 
-  _onTabBoxOverflow: function () {
+  _onTabBoxOverflow: function() {
     this._allTabsBtn.removeAttribute("hidden");
   },
 
-  _onTabBoxUnderflow: function () {
+  _onTabBoxUnderflow: function() {
     this._allTabsBtn.setAttribute("hidden", "true");
   },
 
   /**
    * Add an item in the allTabs menu for a given tab.
    */
-  _addItemToAllTabsMenu: function (id, tab, options) {
+  _addItemToAllTabsMenu: function(id, tab, options) {
     if (!this._allTabsBtn) {
       return;
     }
 
     let item = this._panelDoc.createElementNS(XULNS, "menuitem");
     let idPrefix = "sidebar-alltabs-item-";
     item.setAttribute("id", idPrefix + id);
     item.setAttribute("label", tab.getAttribute("label"));
@@ -223,17 +223,17 @@ ToolSidebar.prototype = {
    *
    * @param {string} id The unique id for this tab.
    * @param {string} url The URL of the document to load in this new tab.
    * @param {Object} options A set of options for this new tab:
    * - {Boolean} selected Set to true to make this new tab selected by default.
    * - {String} insertBefore By default, the new tab is appended at the end of the
    * tabbox, pass the ID of an existing tab to insert it before that tab instead.
    */
-  addTab: function (id, url, options = {}) {
+  addTab: function(id, url, options = {}) {
     let iframe = this._panelDoc.createElementNS(XULNS, "iframe");
     iframe.className = "iframe-" + id;
     iframe.setAttribute("flex", "1");
     iframe.setAttribute("src", url);
     iframe.tooltip = "aHTMLTooltip";
 
     // Creating the tab and adding it to the tabbox
     let tab = this._panelDoc.createElementNS(XULNS, "tab");
@@ -299,17 +299,17 @@ ToolSidebar.prototype = {
     this.emit("new-tab-registered", id);
   },
 
   untitledTabsIndex: 0,
 
   /**
    * Search for existing tabs in the markup that aren't know yet and add them.
    */
-  addExistingTabs: function () {
+  addExistingTabs: function() {
     let knownTabs = [...this._tabs.values()];
 
     for (let tab of this._tabbox.tabs.querySelectorAll("tab")) {
       if (knownTabs.includes(tab)) {
         continue;
       }
 
       // Find an ID for this unknown tab
@@ -358,91 +358,91 @@ ToolSidebar.prototype = {
     this.emit("tab-unregistered", tabId);
   },
 
   /**
    * Show or hide a specific tab.
    * @param {Boolean} isVisible True to show the tab/tabpanel, False to hide it.
    * @param {String} id The ID of the tab to be hidden.
    */
-  toggleTab: function (isVisible, id) {
+  toggleTab: function(isVisible, id) {
     // Toggle the tab.
     let tab = this.getTab(id);
     if (!tab) {
       return;
     }
     tab.hidden = !isVisible;
 
     // Toggle the item in the allTabs menu.
     if (this._allTabsBtn) {
       this._allTabsBtn.querySelector("#sidebar-alltabs-item-" + id).hidden = !isVisible;
     }
   },
 
   /**
    * Select a specific tab.
    */
-  select: function (id) {
+  select: function(id) {
     let tab = this.getTab(id);
     if (tab) {
       this._tabbox.selectedTab = tab;
     }
   },
 
   /**
    * Hack required to select a tab right after it was created.
    *
    * @param  {String} id
    *         The sidebar tab id to select.
    */
-  _selectTabSoon: function (id) {
+  _selectTabSoon: function(id) {
     this._panelDoc.defaultView.setTimeout(() => {
       this.select(id);
     }, 0);
   },
 
   /**
    * Return the id of the selected tab.
    */
-  getCurrentTabID: function () {
+  getCurrentTabID: function() {
     let currentID = null;
     for (let [id, tab] of this._tabs) {
       if (this._tabbox.tabs.selectedItem == tab) {
         currentID = id;
         break;
       }
     }
     return currentID;
   },
 
   /**
    * Returns the requested tab panel based on the id.
    * @param {String} id
    * @return {DOMNode}
    */
-  getTabPanel: function (id) {
+  getTabPanel: function(id) {
     // Search with and without the ID prefix as there might have been existing
     // tabpanels by the time the sidebar got created
     return this._tabbox.tabpanels.querySelector("#" + this.TABPANEL_ID_PREFIX + id + ", #" + id);
   },
 
   /**
    * Return the tab based on the provided id, if one was registered with this id.
    * @param {String} id
    * @return {DOMNode}
    */
-  getTab: function (id) {
+  getTab: function(id) {
     // FIXME: A workaround for broken browser_net_raw_headers.js failure only in non-e10s mode
     return this._tabs && this._tabs.get(id);
   },
 
   /**
    * Event handler.
    */
-  handleEvent: function (event) {
+  handleEvent: function(event) {
     if (event.type !== "select" || this._destroyed) {
       return;
     }
 
     if (this._currentTool == this.getCurrentTabID()) {
       // Tool hasn't changed.
       return;
     }
@@ -478,31 +478,31 @@ ToolSidebar.prototype = {
       }
       tab.allTabsMenuItem.setAttribute("checked", true);
     }
   },
 
   /**
    * Toggle sidebar's visibility state.
    */
-  toggle: function () {
+  toggle: function() {
     if (this._tabbox.hasAttribute("hidden")) {
       this.show();
     } else {
       this.hide();
     }
   },
 
   /**
    * Show the sidebar.
    *
    * @param  {String} id
    *         The sidebar tab id to select.
    */
-  show: function (id) {
+  show: function(id) {
     if (this._width) {
       this._tabbox.width = this._width;
     }
     this._tabbox.removeAttribute("hidden");
 
     // If an id is given, select the corresponding sidebar tab and record the
     // tool opened.
     if (id) {
@@ -516,28 +516,28 @@ ToolSidebar.prototype = {
     }
 
     this.emit("show");
   },
 
   /**
    * Show the sidebar.
    */
-  hide: function () {
+  hide: function() {
     Services.prefs.setIntPref("devtools.toolsidebar-width." + this._uid, this._tabbox.width);
     this._tabbox.setAttribute("hidden", "true");
     this._panelDoc.activeElement.blur();
 
     this.emit("hide");
   },
 
   /**
    * Return the window containing the tab content.
    */
-  getWindowForTab: function (id) {
+  getWindowForTab: function(id) {
     if (!this._tabs.has(id)) {
       return null;
     }
 
     // Get the tabpanel and make sure it contains an iframe
     let panel = this.getTabPanel(id);
     if (!panel || !panel.firstChild || !panel.firstChild.contentWindow) {
       return;
--- a/devtools/client/framework/source-map-url-service.js
+++ b/devtools/client/framework/source-map-url-service.js
@@ -46,17 +46,17 @@ function SourceMapURLService(toolbox, so
   this._stylesheetsFront = null;
   this._loadingPromise = null;
 }
 
 /**
  * Lazy initialization.  Returns a promise that will resolve when all
  * the relevant URLs have been registered.
  */
-SourceMapURLService.prototype._getLoadingPromise = function () {
+SourceMapURLService.prototype._getLoadingPromise = function() {
   if (!this._loadingPromise) {
     let styleSheetsLoadingPromise = null;
     this._stylesheetsFront = this._toolbox.initStyleSheetsFront();
     if (this._stylesheetsFront) {
       this._stylesheetsFront.on("stylesheet-added", this._onNewStyleSheet);
       styleSheetsLoadingPromise =
           this._stylesheetsFront.getStyleSheets().then(sheets => {
             sheets.forEach(this._onNewStyleSheet);
@@ -79,43 +79,43 @@ SourceMapURLService.prototype._getLoadin
     this._loadingPromise = Promise.all([styleSheetsLoadingPromise, loadingPromise]);
   }
   return this._loadingPromise;
 };
 
 /**
  * Reset the service.  This flushes the internal cache.
  */
-SourceMapURLService.prototype.reset = function () {
+SourceMapURLService.prototype.reset = function() {
   this._sourceMapService.clearSourceMaps();
   this._urls.clear();
   this._subscriptions.clear();
   this._idMap.clear();
 };
 
 /**
  * Shut down the service, unregistering its event listeners and
  * flushing the cache.  After this call the service will no longer
  * function.
  */
-SourceMapURLService.prototype.destroy = function () {
+SourceMapURLService.prototype.destroy = function() {
   this.reset();
   this._target.off("source-updated", this._onSourceUpdated);
   this._target.off("will-navigate", this.reset);
   if (this._stylesheetsFront) {
     this._stylesheetsFront.off("stylesheet-added", this._onNewStyleSheet);
   }
   Services.prefs.removeObserver(SOURCE_MAP_PREF, this._onPrefChanged);
   this._target = this._urls = this._subscriptions = this._idMap = null;
 };
 
 /**
  * A helper function that is called when a new source is available.
  */
-SourceMapURLService.prototype._onSourceUpdated = function (sourceEvent) {
+SourceMapURLService.prototype._onSourceUpdated = function(sourceEvent) {
   // Maybe we were shut down while waiting.
   if (!this._urls) {
     return;
   }
 
   let { source } = sourceEvent;
   let { generatedUrl, url, actor: id, sourceMapURL } = source;
 
@@ -127,17 +127,17 @@ SourceMapURLService.prototype._onSourceU
 };
 
 /**
  * A helper function that is called when a new style sheet is
  * available.
  * @param {StyleSheetActor} sheet
  *        The new style sheet's actor.
  */
-SourceMapURLService.prototype._onNewStyleSheet = function (sheet) {
+SourceMapURLService.prototype._onNewStyleSheet = function(sheet) {
   // Maybe we were shut down while waiting.
   if (!this._urls) {
     return;
   }
 
   let {href, nodeHref, sourceMapURL, actorID: id} = sheet;
   let url = href || nodeHref;
   this._urls.set(url, { id, url, sourceMapURL});
@@ -149,17 +149,17 @@ SourceMapURLService.prototype._onNewStyl
  * proxy (see toolbox.js) when some tool has installed a new source
  * map.  This happens when pretty-printing a source.
  *
  * @param {String} id
  *        The actor ID (used as a cookie here as elsewhere in this file)
  * @param {String} newUrl
  *        The URL of the pretty-printed source
  */
-SourceMapURLService.prototype.sourceMapChanged = function (id, newUrl) {
+SourceMapURLService.prototype.sourceMapChanged = function(id, newUrl) {
   if (!this._urls) {
     return;
   }
 
   let urlKey = this._idMap.get(id);
   if (urlKey) {
     // The source map URL here doesn't actually matter.
     this._urls.set(urlKey, { id, url: newUrl, sourceMapURL: "" });
@@ -190,17 +190,17 @@ SourceMapURLService.prototype.sourceMapC
  *        The URL to map.
  * @param {number} line
  *        The line number to map.
  * @param {number} column
  *        The column number to map.
  * @return Promise
  *        A promise resolving either to the original location, or null.
  */
-SourceMapURLService.prototype.originalPositionFor = async function (url, line, column) {
+SourceMapURLService.prototype.originalPositionFor = async function(url, line, column) {
   // Ensure the sources are loaded before replying.
   await this._getLoadingPromise();
 
   // Maybe we were shut down while waiting.
   if (!this._urls) {
     return null;
   }
 
@@ -225,17 +225,17 @@ SourceMapURLService.prototype.originalPo
 /**
  * Helper function to call a single callback for a given subscription
  * entry.
  * @param {Object} subscriptionEntry
  *                 An entry in the _subscriptions map.
  * @param {Function} callback
  *                 The callback to call; @see subscribe
  */
-SourceMapURLService.prototype._callOneCallback = async function (subscriptionEntry,
+SourceMapURLService.prototype._callOneCallback = async function(subscriptionEntry,
                                                                  callback) {
   // If source maps are disabled, immediately call with just "false".
   if (!this._prefValue) {
     callback(false);
     return;
   }
 
   if (!subscriptionEntry.promise) {
@@ -270,17 +270,17 @@ SourceMapURLService.prototype._callOneCa
  *                 times if the source map pref changes.  It is called
  *                 as callback(enabled, url, line, column).  |enabled|
  *                 is a boolean.  If true then source maps are enabled
  *                 and the remaining arguments are the original
  *                 location.  If false, then source maps are disabled
  *                 and the generated location should be used; in this
  *                 case the remaining arguments should be ignored.
  */
-SourceMapURLService.prototype.subscribe = function (url, line, column, callback) {
+SourceMapURLService.prototype.subscribe = function(url, line, column, callback) {
   if (!this._subscriptions) {
     return;
   }
 
   let key = JSON.stringify([url, line, column]);
   let subscriptionEntry = this._subscriptions.get(key);
   if (!subscriptionEntry) {
     subscriptionEntry = {
@@ -307,17 +307,17 @@ SourceMapURLService.prototype.subscribe 
  *                 The URL of the generated location.
  * @param {Number} line
  *                 The line number of the generated location.
  * @param {Number} column
  *                 The column number of the generated location (can be undefined).
  * @param {Function} callback
  *                 The callback.
  */
-SourceMapURLService.prototype.unsubscribe = function (url, line, column, callback) {
+SourceMapURLService.prototype.unsubscribe = function(url, line, column, callback) {
   if (!this._subscriptions) {
     return;
   }
   let key = JSON.stringify([url, line, column]);
   let subscriptionEntry = this._subscriptions.get(key);
   if (subscriptionEntry) {
     let index = subscriptionEntry.callbacks.indexOf(callback);
     if (index !== -1) {
@@ -329,17 +329,17 @@ SourceMapURLService.prototype.unsubscrib
     }
   }
 };
 
 /**
  * A helper function that is called when the source map pref changes.
  * This function notifies all subscribers of the state change.
  */
-SourceMapURLService.prototype._onPrefChanged = function () {
+SourceMapURLService.prototype._onPrefChanged = function() {
   if (!this._subscriptions) {
     return;
   }
 
   this._prefValue = Services.prefs.getBoolPref(SOURCE_MAP_PREF);
   for (let [, subscriptionEntry] of this._subscriptions) {
     for (let callback of subscriptionEntry.callbacks) {
       this._callOneCallback(subscriptionEntry, callback);
--- a/devtools/client/framework/test/browser_browser_toolbox.js
+++ b/devtools/client/framework/test/browser_browser_toolbox.js
@@ -5,17 +5,17 @@
 // There are shutdown issues for which multiple rejections are left uncaught.
 // See bug 1018184 for resolving these issues.
 const { PromiseTestUtils } = scopedCuImport("resource://testing-common/PromiseTestUtils.jsm");
 PromiseTestUtils.whitelistRejectionsGlobally(/File closed/);
 
 // On debug test slave, it takes about 50s to run the test.
 requestLongerTimeout(4);
 
-add_task(async function () {
+add_task(async function() {
   await new Promise(done => {
     let options = {"set": [
       ["devtools.debugger.prompt-connection", false],
       ["devtools.debugger.remote-enabled", true],
       ["devtools.chrome.enabled", true],
       // Test-only pref to allow passing `testScript` argument to the browser
       // toolbox
       ["devtools.browser-toolbox.allow-unsafe-script", true],
@@ -33,17 +33,17 @@ add_task(async function () {
       Services.obs.removeObserver(listener, "browser-toolbox-console-works");
       done();
     }, "browser-toolbox-console-works");
   });
 
   // Be careful, this JS function is going to be executed in the addon toolbox,
   // which lives in another process. So do not try to use any scope variable!
   let env = Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment);
-  let testScript = function () {
+  let testScript = function() {
     toolbox.selectTool("webconsole")
       .then(console => {
         let { jsterm } = console.hud;
         let js = "Services.obs.notifyObservers(null, 'browser-toolbox-console-works', null);";
         return jsterm.execute(js);
       })
       .then(() => toolbox.destroy());
   };
--- a/devtools/client/framework/test/browser_browser_toolbox_debugger.js
+++ b/devtools/client/framework/test/browser_browser_toolbox_debugger.js
@@ -43,32 +43,32 @@ add_task(async function runTest() {
   // destroyed and so the debugger would display only one file but not necessarily
   // connected to the latest sandbox.
   let id = new Date().getTime();
 
   // Pass a fake URL to evalInSandbox. If we just pass a filename,
   // Debugger is going to fail and only display root folder (`/`) listing.
   // But it won't try to fetch this url and use sandbox content as expected.
   let testUrl = `http://mozilla.org/browser-toolbox-test-${id}.js`;
-  Cu.evalInSandbox("(" + function () {
+  Cu.evalInSandbox("(" + function() {
     this.plop = function plop() {
       return 1;
     };
   } + ").call(this)", s, "1.8", testUrl, 0);
 
   // Execute the function every second in order to trigger the breakpoint
   let interval = setInterval(s.plop, 1000);
 
   // Be careful, this JS function is going to be executed in the browser toolbox,
   // which lives in another process. So do not try to use any scope variable!
   let env = Cc["@mozilla.org/process/environment;1"]
               .getService(Ci.nsIEnvironment);
   // First inject a very minimal head, with simplest assertion methods
   // and very common globals
-  let testHead = (function () {
+  let testHead = (function() {
     const info = msg => dump(msg + "\n");
     const is = (a, b, description) => {
       let msg = "'" + JSON.stringify(a) + "' is equal to '" + JSON.stringify(b) + "'";
       if (description) {
         msg += " - " + description;
       }
       if (a !== b) {
         msg = "FAILURE: " + msg;
@@ -103,17 +103,17 @@ add_task(async function runTest() {
     // test_browser_toolbox_debugger.js uses waitForPaused, which relies on waitUntil
     // which is normally provided by shared-head.js
     const { setTimeout } = ChromeUtils.import("resource://gre/modules/Timer.jsm", {});
     function waitUntil(predicate, interval = 10) {
       if (predicate()) {
         return Promise.resolve(true);
       }
       return new Promise(resolve => {
-        setTimeout(function () {
+        setTimeout(function() {
           waitUntil(predicate, interval).then(() => resolve(true));
         }, interval);
       });
     }
   }).toSource().replace(/^\(function \(\) \{|\}\)$/g, "");
   // Stringify testHead's function and remove `(function {` prefix and `})` suffix
   // to ensure inner symbols gets exposed to next pieces of code
 
@@ -123,17 +123,17 @@ add_task(async function runTest() {
   // We remove its import of shared-head, which isn't available in browser toolbox process
   // And isn't needed thanks to testHead's symbols
   debuggerHead = debuggerHead.replace(/Services.scriptloader.loadSubScript[^\)]*\);/, "");
 
   // Finally, fetch the debugger test script that is going to be execute in the browser
   // toolbox process
   let testScript = (await fetch(testScriptURL)).content;
   let source =
-    "try { let testUrl = \""+testUrl+"\";" + testHead + debuggerHead + testScript + "} catch (e) {" +
+    "try { let testUrl = \"" + testUrl + "\";" + testHead + debuggerHead + testScript + "} catch (e) {" +
     "  dump('Exception: '+ e + ' at ' + e.fileName + ':' + " +
     "       e.lineNumber + '\\nStack: ' + e.stack + '\\n');" +
     "}";
   env.set("MOZ_TOOLBOX_TEST_SCRIPT", source);
   registerCleanupFunction(() => {
     env.set("MOZ_TOOLBOX_TEST_SCRIPT", "");
   });
 
--- a/devtools/client/framework/test/browser_devtools_api.js
+++ b/devtools/client/framework/test/browser_devtools_api.js
@@ -17,17 +17,17 @@ function test() {
 // Test scenario 1: the tool definition build method returns a promise.
 function runTests1(tab) {
   let toolDefinition = {
     id: toolId1,
     isTargetSupported: () => true,
     visibilityswitch: "devtools.test-tool.enabled",
     url: "about:blank",
     label: "someLabel",
-    build: function (iframeWindow, toolbox) {
+    build: function(iframeWindow, toolbox) {
       let panel = createTestPanel(iframeWindow, toolbox);
       return panel.open();
     },
   };
 
   ok(gDevTools, "gDevTools exists");
   ok(!gDevTools.getToolDefinitionMap().has(toolId1),
     "The tool is not registered");
@@ -54,17 +54,17 @@ function runTests1(tab) {
     ok(panel, "panel argument available");
 
     toolbox.once(toolId1 + "-ready", innerPanel => {
       ok(innerPanel, "innerPanel argument available");
       events.ready = true;
     });
   });
 
-  gDevTools.showToolbox(target, toolId1).then(function (toolbox) {
+  gDevTools.showToolbox(target, toolId1).then(function(toolbox) {
     is(toolbox.target, target, "toolbox target is correct");
     is(toolbox.target.tab, gBrowser.selectedTab, "targeted tab is correct");
 
     ok(events.init, "init event fired");
     ok(events.ready, "ready event fired");
 
     gDevTools.unregisterTool(toolId1);
 
@@ -78,17 +78,17 @@ function runTests1(tab) {
 // Test scenario 2: the tool definition build method returns panel instance.
 function runTests2() {
   let toolDefinition = {
     id: toolId2,
     isTargetSupported: () => true,
     visibilityswitch: "devtools.test-tool.enabled",
     url: "about:blank",
     label: "someLabel",
-    build: function (iframeWindow, toolbox) {
+    build: function(iframeWindow, toolbox) {
       return createTestPanel(iframeWindow, toolbox);
     },
   };
 
   ok(!gDevTools.getToolDefinitionMap().has(toolId2),
     "The tool is not registered");
 
   gDevTools.registerTool(toolDefinition);
@@ -122,29 +122,29 @@ function runTests2() {
     ok(panel, "panel argument available");
 
     toolbox.once(toolId2 + "-ready", innerPanel => {
       ok(innerPanel, "innerPanel argument available");
       events.ready = true;
     });
   });
 
-  gDevTools.showToolbox(target, toolId2).then(function (toolbox) {
+  gDevTools.showToolbox(target, toolId2).then(function(toolbox) {
     is(toolbox.target, target, "toolbox target is correct");
     is(toolbox.target.tab, gBrowser.selectedTab, "targeted tab is correct");
 
     ok(events.init, "init event fired");
     ok(events.build, "build event fired");
     ok(events.ready, "ready event fired");
 
     continueTests(toolbox);
   });
 }
 
-var continueTests = async function (toolbox, panel) {
+var continueTests = async function(toolbox, panel) {
   ok(toolbox.getCurrentPanel(), "panel value is correct");
   is(toolbox.currentToolId, toolId2, "toolbox _currentToolId is correct");
 
   let toolDefinitions = gDevTools.getToolDefinitionMap();
   ok(toolDefinitions.has(toolId2), "The tool is in gDevTools");
 
   let toolDefinition = toolDefinitions.get(toolId2);
   is(toolDefinition.id, toolId2, "toolDefinition id is correct");
@@ -178,17 +178,17 @@ var continueTests = async function (tool
   info("Unregistering tool");
   gDevTools.unregisterTool(toolId2);
 
   info("Destroying toolbox");
   destroyToolbox(toolbox);
 };
 
 function destroyToolbox(toolbox) {
-  toolbox.destroy().then(function () {
+  toolbox.destroy().then(function() {
     let target = TargetFactory.forTab(gBrowser.selectedTab);
     ok(gDevTools._toolboxes.get(target) == null, "gDevTools doesn't know about target");
     ok(toolbox.target == null, "toolbox doesn't know about target.");
     finishUp();
   });
 }
 
 function finishUp() {
--- a/devtools/client/framework/test/browser_devtools_api_destroy.js
+++ b/devtools/client/framework/test/browser_devtools_api_destroy.js
@@ -11,36 +11,36 @@ function test() {
 
 function runTests(aTab) {
   let toolDefinition = {
     id: "testTool",
     visibilityswitch: "devtools.testTool.enabled",
     isTargetSupported: () => true,
     url: "about:blank",
     label: "someLabel",
-    build: function (iframeWindow, toolbox) {
+    build: function(iframeWindow, toolbox) {
       let deferred = defer();
       executeSoon(() => {
         deferred.resolve({
           target: toolbox.target,
           toolbox: toolbox,
           isReady: true,
-          destroy: function () {},
+          destroy: function() {},
         });
       });
       return deferred.promise;
     },
   };
 
   gDevTools.registerTool(toolDefinition);
 
   let collectedEvents = [];
 
   let target = TargetFactory.forTab(aTab);
-  gDevTools.showToolbox(target, toolDefinition.id).then(function (toolbox) {
+  gDevTools.showToolbox(target, toolDefinition.id).then(function(toolbox) {
     let panel = toolbox.getPanel(toolDefinition.id);
     ok(panel, "Tool open");
 
     gDevTools.once("toolbox-destroy", (toolbox, iframe) => {
       collectedEvents.push("toolbox-destroy");
     });
 
     gDevTools.once(toolDefinition.id + "-destroy", (toolbox, iframe) => {
@@ -50,22 +50,22 @@ function runTests(aTab) {
     toolbox.once("destroy", () => {
       collectedEvents.push("destroy");
     });
 
     toolbox.once(toolDefinition.id + "-destroy", () => {
       collectedEvents.push("toolbox-" + toolDefinition.id + "-destroy");
     });
 
-    toolbox.destroy().then(function () {
+    toolbox.destroy().then(function() {
       is(collectedEvents.join(":"),
         "toolbox-destroy:destroy:gDevTools-testTool-destroy:toolbox-testTool-destroy",
         "Found the right amount of collected events.");
 
       gDevTools.unregisterTool(toolDefinition.id);
       gBrowser.removeCurrentTab();
 
-      executeSoon(function () {
+      executeSoon(function() {
         finish();
       });
     });
   });
 }
--- a/devtools/client/framework/test/browser_ignore_toolbox_network_requests.js
+++ b/devtools/client/framework/test/browser_ignore_toolbox_network_requests.js
@@ -3,17 +3,17 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Test that network requests originating from the toolbox don't get recorded in
 // the network panel.
 
-add_task(async function () {
+add_task(async function() {
   // TODO: This test tries to verify the normal behavior of the netmonitor and
   // therefore needs to avoid the explicit check for tests. Bug 1167188 will
   // allow us to remove this workaround.
   let isTesting = flags.testing;
   flags.testing = false;
 
   let tab = await addTab(URL_ROOT + "doc_viewsource.html");
   let target = TargetFactory.forTab(tab);
--- a/devtools/client/framework/test/browser_keybindings_01.js
+++ b/devtools/client/framework/test/browser_keybindings_01.js
@@ -4,55 +4,55 @@
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Tests that the keybindings for opening and closing the inspector work as expected
 // Can probably make this a shared test that tests all of the tools global keybindings
 const TEST_URL = "data:text/html,<html><head><title>Test for the " +
                  "highlighter keybindings</title></head><body>" +
-                 "<h1>Keybindings!</h1></body></html>"
+                 "<h1>Keybindings!</h1></body></html>";
 
 const {gDevToolsBrowser} = require("devtools/client/framework/devtools-browser");
 let keysetMap = { };
 
 function buildDevtoolsKeysetMap(keyset) {
   [].forEach.call(
     keyset.querySelectorAll("key"),
-    function (key) {
+    function(key) {
       if (!key.getAttribute("key")) {
         return;
       }
 
       let modifiers = key.getAttribute("modifiers");
 
       keysetMap[key.id.split("_")[1]] = {
         key: key.getAttribute("key"),
         modifiers: modifiers,
         modifierOpt: {
           shiftKey: modifiers.match("shift"),
           ctrlKey: modifiers.match("ctrl"),
           altKey: modifiers.match("alt"),
           metaKey: modifiers.match("meta"),
           accelKey: modifiers.match("accel")
         },
-        synthesizeKey: function () {
+        synthesizeKey: function() {
           EventUtils.synthesizeKey(this.key, this.modifierOpt);
         }
       };
     });
 }
 
 function setupKeyBindingsTest() {
   for (let win of gDevToolsBrowser._trackedBrowserWindows) {
     buildDevtoolsKeysetMap(win.document.getElementById("devtoolsKeyset"));
   }
 }
 
-add_task(async function () {
+add_task(async function() {
   // Use the new debugger frontend because the old one swallows the netmonitor shortcut:
   // https://bugzilla.mozilla.org/show_bug.cgi?id=1370442#c7
   await SpecialPowers.pushPrefEnv({set: [
     ["devtools.debugger.new-debugger-frontend", true]
   ]});
 
   await addTab(TEST_URL);
   await new Promise(done => waitForFocus(done));
--- a/devtools/client/framework/test/browser_keybindings_02.js
+++ b/devtools/client/framework/test/browser_keybindings_02.js
@@ -13,17 +13,17 @@ var {Toolbox} = require("devtools/client
 
 const {LocalizationHelper} = require("devtools/shared/l10n");
 const L10N = new LocalizationHelper("devtools/client/locales/toolbox.properties");
 
 function getZoomValue() {
   return parseFloat(Services.prefs.getCharPref("devtools.toolbox.zoomValue"));
 }
 
-add_task(async function () {
+add_task(async function() {
   info("Create a test tab and open the toolbox");
   let tab = await addTab(URL);
   let target = TargetFactory.forTab(tab);
   let toolbox = await gDevTools.showToolbox(target, "webconsole");
 
   let {SIDE, BOTTOM} = Toolbox.HostType;
   for (let type of [SIDE, BOTTOM, SIDE]) {
     info("Switch to host type " + type);
--- a/devtools/client/framework/test/browser_keybindings_03.js
+++ b/devtools/client/framework/test/browser_keybindings_03.js
@@ -10,17 +10,17 @@
 
 const URL = "data:text/html;charset=utf8,test page for toolbox switching";
 
 var {Toolbox} = require("devtools/client/framework/toolbox");
 
 const {LocalizationHelper} = require("devtools/shared/l10n");
 const L10N = new LocalizationHelper("devtools/client/locales/toolbox.properties");
 
-add_task(async function () {
+add_task(async function() {
   info("Create a test tab and open the toolbox");
   let tab = await addTab(URL);
   let target = TargetFactory.forTab(tab);
   let toolbox = await gDevTools.showToolbox(target, "webconsole");
 
   let shortcut = L10N.getStr("toolbox.toggleHost.key");
 
   let {SIDE, BOTTOM, WINDOW} = Toolbox.HostType;
--- a/devtools/client/framework/test/browser_menu_api.js
+++ b/devtools/client/framework/test/browser_menu_api.js
@@ -6,17 +6,17 @@
 "use strict";
 
 // Test that the Menu API works
 
 const URL = "data:text/html;charset=utf8,test page for menu api";
 const Menu = require("devtools/client/framework/menu");
 const MenuItem = require("devtools/client/framework/menu-item");
 
-add_task(async function () {
+add_task(async function() {
   info("Create a test tab and open the toolbox");
   let tab = await addTab(URL);
   let target = TargetFactory.forTab(tab);
   let toolbox = await gDevTools.showToolbox(target, "webconsole");
 
   await testMenuItems();
   await testMenuPopup(toolbox);
   await testSubmenu(toolbox);
--- a/devtools/client/framework/test/browser_new_activation_workflow.js
+++ b/devtools/client/framework/test/browser_new_activation_workflow.js
@@ -5,66 +5,66 @@
 
 // Tests devtools API
 
 var toolbox, target;
 
 var tempScope = {};
 
 function test() {
-  addTab("about:blank").then(function (aTab) {
+  addTab("about:blank").then(function(aTab) {
     target = TargetFactory.forTab(gBrowser.selectedTab);
-    loadWebConsole(aTab).then(function () {
+    loadWebConsole(aTab).then(function() {
       console.log("loaded");
     });
   });
 }
 
 function loadWebConsole(aTab) {
   ok(gDevTools, "gDevTools exists");
 
-  return gDevTools.showToolbox(target, "webconsole").then(function (aToolbox) {
+  return gDevTools.showToolbox(target, "webconsole").then(function(aToolbox) {
     toolbox = aToolbox;
     checkToolLoading();
   });
 }
 
 function checkToolLoading() {
   is(toolbox.currentToolId, "webconsole", "The web console is selected");
   ok(toolbox.isReady, "toolbox is ready");
 
-  selectAndCheckById("jsdebugger").then(function () {
-    selectAndCheckById("styleeditor").then(function () {
+  selectAndCheckById("jsdebugger").then(function() {
+    selectAndCheckById("styleeditor").then(function() {
       testToggle();
     });
   });
 }
 
 function selectAndCheckById(id) {
-  return toolbox.selectTool(id).then(function () {
+  return toolbox.selectTool(id).then(function() {
     let tab = toolbox.doc.getElementById("toolbox-tab-" + id);
     is(tab.classList.contains("selected"), true, "The " + id + " tab is selected");
     is(tab.getAttribute("aria-pressed"), "true", "The " + id + " tab is pressed");
   });
 }
 
 function testToggle() {
   toolbox.once("destroyed", () => {
     // Cannot reuse a target after it's destroyed.
     target = TargetFactory.forTab(gBrowser.selectedTab);
-    gDevTools.showToolbox(target, "styleeditor").then(function (aToolbox) {
+    gDevTools.showToolbox(target, "styleeditor").then(function(aToolbox) {
       toolbox = aToolbox;
       is(toolbox.currentToolId, "styleeditor", "The style editor is selected");
       finishUp();
     });
   });
 
   toolbox.destroy();
 }
 
 function finishUp() {
-  toolbox.destroy().then(function () {
+  toolbox.destroy().then(function() {
     toolbox = null;
     target = null;
     gBrowser.removeCurrentTab();
     finish();
   });
 }
--- a/devtools/client/framework/test/browser_source_map-01.js
+++ b/devtools/client/framework/test/browser_source_map-01.js
@@ -15,17 +15,17 @@ const { PromiseTestUtils } = scopedCuImp
 PromiseTestUtils.whitelistRejectionsGlobally(/this\.worker is null/);
 PromiseTestUtils.whitelistRejectionsGlobally(/Component not initialized/);
 
 // Empty page
 const PAGE_URL = `${URL_ROOT}doc_empty-tab-01.html`;
 const JS_URL = `${URL_ROOT}code_binary_search.js`;
 const COFFEE_URL = `${URL_ROOT}code_binary_search.coffee`;
 
-add_task(async function () {
+add_task(async function() {
   await pushPref("devtools.debugger.new-debugger-frontend", true);
 
   const toolbox = await openNewTabAndToolbox(PAGE_URL, "jsdebugger");
   const service = toolbox.sourceMapURLService;
 
   // Inject JS script
   let sourceSeen = waitForSourceLoad(toolbox, JS_URL);
   await createScript(JS_URL);
--- a/devtools/client/framework/test/browser_source_map-absolute.js
+++ b/devtools/client/framework/test/browser_source_map-absolute.js
@@ -10,17 +10,17 @@
 const { PromiseTestUtils } = scopedCuImport("resource://testing-common/PromiseTestUtils.jsm");
 PromiseTestUtils.whitelistRejectionsGlobally(/this\.worker is null/);
 
 // Empty page
 const PAGE_URL = `${URL_ROOT}doc_empty-tab-01.html`;
 const JS_URL = `${URL_ROOT}code_binary_search_absolute.js`;
 const ORIGINAL_URL = `${URL_ROOT}code_binary_search.coffee`;
 
-add_task(async function () {
+add_task(async function() {
   await pushPref("devtools.debugger.new-debugger-frontend", true);
 
   const toolbox = await openNewTabAndToolbox(PAGE_URL, "jsdebugger");
   const service = toolbox.sourceMapURLService;
 
   // Inject JS script
   let sourceSeen = waitForSourceLoad(toolbox, JS_URL);
   await createScript(JS_URL);
--- a/devtools/client/framework/test/browser_source_map-cross-domain.js
+++ b/devtools/client/framework/test/browser_source_map-cross-domain.js
@@ -23,17 +23,17 @@ const PAGE_URL = `data:text/html,
 
 </html>`;
 
 const ORIGINAL_URL = "webpack:///code_cross_domain.js";
 
 const GENERATED_LINE = 82;
 const ORIGINAL_LINE = 12;
 
-add_task(async function () {
+add_task(async function() {
   const toolbox = await openNewTabAndToolbox(PAGE_URL, "webconsole");
   const service = toolbox.sourceMapURLService;
 
   info(`checking original location for ${JS_URL}:${GENERATED_LINE}`);
   let newLoc = await service.originalPositionFor(JS_URL, GENERATED_LINE);
   is(newLoc.sourceUrl, ORIGINAL_URL, "check mapped URL");
   is(newLoc.line, ORIGINAL_LINE, "check mapped line number");
 });
--- a/devtools/client/framework/test/browser_source_map-init.js
+++ b/devtools/client/framework/test/browser_source_map-init.js
@@ -23,17 +23,17 @@ const PAGE_URL = `data:text/html,
 
 </html>`;
 
 const ORIGINAL_URL = "webpack:///code_no_race.js";
 
 const GENERATED_LINE = 84;
 const ORIGINAL_LINE = 11;
 
-add_task(async function () {
+add_task(async function() {
   // Opening the debugger causes the source actors to be created.
   const toolbox = await openNewTabAndToolbox(PAGE_URL, "jsdebugger");
   // In bug 1391768, when the sourceMapURLService was created, it was
   // ignoring any source actors that already existed, leading to
   // source-mapping failures for those.
   const service = toolbox.sourceMapURLService;
 
   info(`checking original location for ${JS_URL}:${GENERATED_LINE}`);
--- a/devtools/client/framework/test/browser_source_map-inline.js
+++ b/devtools/client/framework/test/browser_source_map-inline.js
@@ -12,17 +12,17 @@ PromiseTestUtils.whitelistRejectionsGlob
 PromiseTestUtils.whitelistRejectionsGlobally(/Component not initialized/);
 
 const TEST_ROOT = "http://example.com/browser/devtools/client/framework/test/";
 // Empty page
 const PAGE_URL = `${TEST_ROOT}doc_empty-tab-01.html`;
 const JS_URL = `${TEST_ROOT}code_inline_bundle.js`;
 const ORIGINAL_URL = "webpack:///code_inline_original.js";
 
-add_task(async function () {
+add_task(async function() {
   await pushPref("devtools.debugger.new-debugger-frontend", true);
 
   const toolbox = await openNewTabAndToolbox(PAGE_URL, "jsdebugger");
   const service = toolbox.sourceMapURLService;
 
   // Inject JS script
   let sourceSeen = waitForSourceLoad(toolbox, JS_URL);
   await createScript(JS_URL);
--- a/devtools/client/framework/test/browser_source_map-no-race.js
+++ b/devtools/client/framework/test/browser_source_map-no-race.js
@@ -23,17 +23,17 @@ const PAGE_URL = `data:text/html,
 
 </html>`;
 
 const ORIGINAL_URL = "webpack:///code_no_race.js";
 
 const GENERATED_LINE = 84;
 const ORIGINAL_LINE = 11;
 
-add_task(async function () {
+add_task(async function() {
   // Start with the empty page, then navigate, so that we can properly
   // listen for new sources arriving.
   const toolbox = await openNewTabAndToolbox(PAGE_URL, "webconsole");
   const service = toolbox.sourceMapURLService;
 
   info(`checking original location for ${JS_URL}:${GENERATED_LINE}`);
   let newLoc = await service.originalPositionFor(JS_URL, GENERATED_LINE);
   is(newLoc.sourceUrl, ORIGINAL_URL, "check mapped URL");
--- a/devtools/client/framework/test/browser_source_map-reload.js
+++ b/devtools/client/framework/test/browser_source_map-reload.js
@@ -10,17 +10,17 @@ const PAGE_URL = URL_ROOT + "doc_reload.
 const JS_URL = URL_ROOT + "sjs_code_reload.sjs";
 
 const ORIGINAL_URL_1 = "webpack:///code_reload_1.js";
 const ORIGINAL_URL_2 = "webpack:///code_reload_2.js";
 
 const GENERATED_LINE = 86;
 const ORIGINAL_LINE = 13;
 
-add_task(async function () {
+add_task(async function() {
   await pushPref("devtools.debugger.new-debugger-frontend", true);
 
   // Start with the empty page, then navigate, so that we can properly
   // listen for new sources arriving.
   const toolbox = await openNewTabAndToolbox(INITIAL_URL, "webconsole");
   const service = toolbox.sourceMapURLService;
   const tab = toolbox.target.tab;
 
--- a/devtools/client/framework/test/browser_target_events.js
+++ b/devtools/client/framework/test/browser_target_events.js
@@ -1,17 +1,16 @@
 /* -*- 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/ */
 
 var target;
 
-function test()
-{
+function test() {
   waitForExplicitFinish();
 
   gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
   BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser).then(onLoad);
 }
 
 function onLoad() {
   target = TargetFactory.forTab(gBrowser.selectedTab);
--- a/devtools/client/framework/test/browser_target_from_url.js
+++ b/devtools/client/framework/test/browser_target_from_url.js
@@ -18,17 +18,17 @@ SimpleTest.registerCleanupFunction(() =>
 function assertIsTabTarget(target, url, chrome = false) {
   is(target.url, url);
   is(target.isLocalTab, false);
   is(target.chrome, chrome);
   is(target.isTabActor, true);
   is(target.isRemote, true);
 }
 
-add_task(async function () {
+add_task(async function() {
   let tab = await addTab(TEST_URI);
   let browser = tab.linkedBrowser;
   let target;
 
   info("Test invalid type");
   try {
     await targetFromURL(new URL("http://foo?type=x"));
     ok(false, "Shouldn't pass");
--- a/devtools/client/framework/test/browser_target_support.js
+++ b/devtools/client/framework/test/browser_target_support.js
@@ -16,17 +16,17 @@ async function testTarget(client, target
   is(target.hasActor("webaudio"), true, "target.hasActor() true when actor exists.");
   is(target.hasActor("notreal"), false, "target.hasActor() false when actor does not exist.");
   // Create a front to ensure the actor is loaded
   let front = new WebAudioFront(target.client, target.form);
 
   let desc = await target.getActorDescription("webaudio");
   is(desc.typeName, "webaudio",
     "target.getActorDescription() returns definition data for corresponding actor");
-  is(desc.events["start-context"]["type"], "startContext",
+  is(desc.events["start-context"].type, "startContext",
     "target.getActorDescription() returns event data for corresponding actor");
 
   desc = await target.getActorDescription("nope");
   is(desc, undefined, "target.getActorDescription() returns undefined for non-existing actor");
   desc = await target.getActorDescription();
   is(desc, undefined, "target.getActorDescription() returns undefined for undefined actor");
 
   let hasMethod = await target.actorHasMethod("audionode", "getType");
--- a/devtools/client/framework/test/browser_toolbox_custom_host.js
+++ b/devtools/client/framework/test/browser_toolbox_custom_host.js
@@ -10,26 +10,26 @@ function test() {
 
   let toolbox, iframe, target;
 
   window.addEventListener("message", onMessage);
 
   iframe = document.createElement("iframe");
   document.documentElement.appendChild(iframe);
 
-  addTab(TEST_URL).then(function (tab) {
+  addTab(TEST_URL).then(function(tab) {
     target = TargetFactory.forTab(tab);
     let options = {customIframe: iframe};
     gDevTools.showToolbox(target, null, Toolbox.HostType.CUSTOM, options)
              .then(testCustomHost, console.error)
              .catch(console.error);
   });
 
   function onMessage(event) {
-    if (typeof(event.data) !== "string") {
+    if (typeof (event.data) !== "string") {
       return;
     }
     info("onMessage: " + event.data);
     let json = JSON.parse(event.data);
     if (json.name == "toolbox-close") {
       ok("Got the `toolbox-close` message");
       window.removeEventListener("message", onMessage);
       cleanup();
--- a/devtools/client/framework/test/browser_toolbox_dynamic_registration.js
+++ b/devtools/client/framework/test/browser_toolbox_dynamic_registration.js
@@ -2,40 +2,37 @@
 /* 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/ */
 
 const TEST_URL = "data:text/html,test for dynamically registering and unregistering tools";
 
 var toolbox;
 
-function test()
-{
+function test() {
   addTab(TEST_URL).then(tab => {
     let target = TargetFactory.forTab(tab);
     gDevTools.showToolbox(target).then(testRegister);
   });
 }
 
-function testRegister(aToolbox)
-{
+function testRegister(aToolbox) {
   toolbox = aToolbox;
   gDevTools.once("tool-registered", toolRegistered);
 
   gDevTools.registerTool({
     id: "test-tool",
     label: "Test Tool",
     inMenu: true,
     isTargetSupported: () => true,
-    build: function () {},
+    build: function() {},
   });
 }
 
-function toolRegistered(toolId)
-{
+function toolRegistered(toolId) {
   is(toolId, "test-tool", "tool-registered event handler sent tool id");
 
   ok(gDevTools.getToolDefinitionMap().has(toolId), "tool added to map");
 
   // test that it appeared in the UI
   let doc = toolbox.doc;
   let tab = doc.getElementById("toolbox-tab-" + toolId);
   ok(tab, "new tool's tab exists in toolbox UI");
@@ -56,25 +53,23 @@ function getAllBrowserWindows() {
   let wins = [];
   let enumerator = Services.wm.getEnumerator("navigator:browser");
   while (enumerator.hasMoreElements()) {
     wins.push(enumerator.getNext());
   }
   return wins;
 }
 
-function testUnregister()
-{
+function testUnregister() {
   gDevTools.once("tool-unregistered", toolUnregistered);
 
   gDevTools.unregisterTool("test-tool");
 }
 
-function toolUnregistered(toolId)
-{
+function toolUnregistered(toolId) {
   is(toolId, "test-tool", "tool-unregistered event handler sent tool id");
 
   ok(!gDevTools.getToolDefinitionMap().has(toolId), "tool removed from map");
 
   // test that it disappeared from the UI
   let doc = toolbox.doc;
   let tab = doc.getElementById("toolbox-tab-" + toolId);
   ok(!tab, "tool's tab was removed from the toolbox UI");
@@ -85,16 +80,15 @@ function toolUnregistered(toolId)
   for (let win of getAllBrowserWindows()) {
     let menuitem = win.document.getElementById("menuitem_" + toolId);
     ok(!menuitem, "menu item removed from every browser window");
   }
 
   cleanup();
 }
 
-function cleanup()
-{
-  toolbox.destroy().then(() => {;
+function cleanup() {
+  toolbox.destroy().then(() => {
     toolbox = null;
     gBrowser.removeCurrentTab();
     finish();
-  })
+  });
 }
--- a/devtools/client/framework/test/browser_toolbox_getpanelwhenready.js
+++ b/devtools/client/framework/test/browser_toolbox_getpanelwhenready.js
@@ -5,17 +5,17 @@
 
 // Tests that getPanelWhenReady returns the correct panel in promise
 // resolutions regardless of whether it has opened first.
 
 var toolbox = null;
 
 const URL = "data:text/html;charset=utf8,test for getPanelWhenReady";
 
-add_task(async function () {
+add_task(async function() {
   let tab = await addTab(URL);
   let target = TargetFactory.forTab(tab);
   toolbox = await gDevTools.showToolbox(target);
 
   let debuggerPanelPromise = toolbox.getPanelWhenReady("jsdebugger");
   await toolbox.selectTool("jsdebugger");
   let debuggerPanel = await debuggerPanelPromise;
 
--- a/devtools/client/framework/test/browser_toolbox_highlight.js
+++ b/devtools/client/framework/test/browser_toolbox_highlight.js
@@ -5,17 +5,17 @@
 
 "use strict";
 
 var {Toolbox} = require("devtools/client/framework/toolbox");
 
 var toolbox = null;
 
 function test() {
-  (async function () {
+  (async function() {
     const URL = "data:text/plain;charset=UTF-8,Nothing to see here, move along";
 
     const TOOL_ID_1 = "jsdebugger";
     const TOOL_ID_2 = "webconsole";
     await addTab(URL);
 
     const target = TargetFactory.forTab(gBrowser.selectedTab);
     toolbox = await gDevTools.showToolbox(target, TOOL_ID_1, Toolbox.HostType.BOTTOM);
--- a/devtools/client/framework/test/browser_toolbox_hosts_size.js
+++ b/devtools/client/framework/test/browser_toolbox_hosts_size.js
@@ -5,17 +5,17 @@
 
 // Tests that getPanelWhenReady returns the correct panel in promise
 // resolutions regardless of whether it has opened first.
 
 const URL = "data:text/html;charset=utf8,test for host sizes";
 
 var {Toolbox} = require("devtools/client/framework/toolbox");
 
-add_task(async function () {
+add_task(async function() {
   // Set size prefs to make the hosts way too big, so that the size has
   // to be clamped to fit into the browser window.
   Services.prefs.setIntPref("devtools.toolbox.footer.height", 10000);
   Services.prefs.setIntPref("devtools.toolbox.sidebar.width", 10000);
 
   let tab = await addTab(URL);
   let nbox = gBrowser.getNotificationBox();
   let {clientHeight: nboxHeight, clientWidth: nboxWidth} = nbox;
@@ -30,17 +30,17 @@ add_task(async function () {
   await toolbox.switchHost(Toolbox.HostType.SIDE);
   iframe = document.getAnonymousElementByAttribute(nbox, "class", "devtools-toolbox-side-iframe");
   iframe.style.minWidth = "1px"; // Disable the min width set in css
   is(iframe.clientWidth, nboxWidth - 25, "The iframe fits within the available space");
 
   await cleanup(toolbox);
 });
 
-add_task(async function () {
+add_task(async function() {
   // Set size prefs to something reasonable, so we can check to make sure
   // they are being set properly.
   Services.prefs.setIntPref("devtools.toolbox.footer.height", 100);
   Services.prefs.setIntPref("devtools.toolbox.sidebar.width", 100);
 
   let tab = await addTab(URL);
   let nbox = gBrowser.getNotificationBox();
   let {clientHeight: nboxHeight, clientWidth: nboxWidth} = nbox;
--- a/devtools/client/framework/test/browser_toolbox_hosts_telemetry.js
+++ b/devtools/client/framework/test/browser_toolbox_hosts_telemetry.js
@@ -7,17 +7,17 @@ const {Toolbox} = require("devtools/clie
 const {SIDE, BOTTOM, WINDOW} = Toolbox.HostType;
 
 const URL = "data:text/html;charset=utf8,browser_toolbox_hosts_telemetry.js";
 
 function getHostHistogram() {
   return Services.telemetry.getHistogramById("DEVTOOLS_TOOLBOX_HOST");
 }
 
-add_task(async function () {
+add_task(async function() {
   // Reset it to make counting easier
   getHostHistogram().clear();
 
   info("Create a test tab and open the toolbox");
   let tab = await addTab(URL);
   let target = TargetFactory.forTab(tab);
   let toolbox = await gDevTools.showToolbox(target, "webconsole");
 
--- a/devtools/client/framework/test/browser_toolbox_keyboard_navigation.js
+++ b/devtools/client/framework/test/browser_toolbox_keyboard_navigation.js
@@ -8,23 +8,25 @@
 // Tests keyboard navigation of devtools tabbar.
 
 const TEST_URL =
   "data:text/html;charset=utf8,test page for toolbar keyboard navigation";
 
 function containsFocus(aDoc, aElm) {
   let elm = aDoc.activeElement;
   while (elm) {
-    if (elm === aElm) { return true; }
+    if (elm === aElm) {
+      return true;
+    }
     elm = elm.parentNode;
   }
   return false;
 }
 
-add_task(async function () {
+add_task(async function() {
   info("Create a test tab and open the toolbox");
   let toolbox = await openNewTabAndToolbox(TEST_URL, "webconsole");
   let doc = toolbox.doc;
 
   let toolbar = doc.querySelector(".devtools-tabbar");
   let toolbarControls = [...toolbar.querySelectorAll(
     ".devtools-tab, button")].filter(elm =>
       !elm.hidden && doc.defaultView.getComputedStyle(elm).getPropertyValue(
@@ -78,17 +80,17 @@ add_task(async function () {
 
   // Move the focus back to the toolbar, ensure we land on the last active
   // descendant control.
   EventUtils.synthesizeKey("KEY_Tab", {shiftKey: true});
   is(doc.activeElement.id, expectedFocusedControl.id, "New control is focused");
 });
 
 // Test that moving the focus of tab button and selecting it.
-add_task(async function () {
+add_task(async function() {
   info("Create a test tab and open the toolbox");
   let toolbox = await openNewTabAndToolbox(TEST_URL, "inspector");
   let doc = toolbox.doc;
 
   let toolbar = doc.querySelector(".toolbox-tabs");
   let tabButtons = toolbar.querySelectorAll(".devtools-tab, button");
   let win = tabButtons[0].ownerDocument.defaultView;
 
--- a/devtools/client/framework/test/browser_toolbox_options.js
+++ b/devtools/client/framework/test/browser_toolbox_options.js
@@ -8,17 +8,17 @@
 // Tests that changing preferences in the options panel updates the prefs
 // and toggles appropriate things in the toolbox.
 
 var doc = null, toolbox = null, panelWin = null, modifiedPrefs = [];
 const {LocalizationHelper} = require("devtools/shared/l10n");
 const L10N = new LocalizationHelper("devtools/client/locales/toolbox.properties");
 const {PrefObserver} = require("devtools/client/shared/prefs");
 
-add_task(async function () {
+add_task(async function() {
   const URL = "data:text/html;charset=utf8,test for dynamically registering " +
               "and unregistering tools";
   registerNewTool();
   let tab = await addTab(URL);
   let target = TargetFactory.forTab(tab);
   toolbox = await gDevTools.showToolbox(target);
   doc = toolbox.doc;
   await registerNewPerToolboxTool();
@@ -175,17 +175,17 @@ async function testMouseClick(node, pref
     is(GetPref(pref), !prefValue, "New value is correct for " + pref);
     deferred.resolve();
   });
 
   node.scrollIntoView();
 
   // We use executeSoon here to ensure that the element is in view and
   // clickable.
-  executeSoon(function () {
+  executeSoon(function() {
     info("Click event synthesized for pref " + pref);
     EventUtils.synthesizeMouseAtCenter(node, {}, panelWin);
   });
 
   await deferred.promise;
 
   ok(changeSeen, "Correct pref was changed");
   observer.destroy();
@@ -199,17 +199,16 @@ async function testToggleTools() {
 
   let toggleableTools = gDevTools.getDefaultTools()
                                  .filter(tool => {
                                    return tool.visibilityswitch;
                                  })
                                  .concat(gDevTools.getAdditionalTools())
                                  .concat(toolbox.getAdditionalTools());
 
-
   for (let node of toolNodes) {
     let id = node.getAttribute("id");
     ok(toggleableTools.some(tool => tool.id === id),
       "There should be a toggle checkbox for: " + id);
   }
 
   // Store modified pref names so that they can be cleared on error.
   for (let tool of toggleableTools) {
--- a/devtools/client/framework/test/browser_toolbox_options_disable_buttons.js
+++ b/devtools/client/framework/test/browser_toolbox_options_disable_buttons.js
@@ -142,17 +142,17 @@ function testToggleToolboxButtons() {
   return promise.resolve();
 }
 
 function getBoolPref(key) {
   return Services.prefs.getBoolPref(key);
 }
 
 function cleanup() {
-  toolbox.destroy().then(function () {
+  toolbox.destroy().then(function() {
     gBrowser.removeCurrentTab();
     for (let pref of modifiedPrefs) {
       Services.prefs.clearUserPref(pref);
     }
     toolbox = doc = panelWin = modifiedPrefs = null;
     finish();
   });
 }
--- a/devtools/client/framework/test/browser_toolbox_options_disable_cache-01.js
+++ b/devtools/client/framework/test/browser_toolbox_options_disable_cache-01.js
@@ -6,17 +6,17 @@
 "use strict";
 
 requestLongerTimeout(2);
 
 // Tests that disabling the cache for a tab works as it should when toolboxes
 // are not toggled.
 loadHelperScript("helper_disable_cache.js");
 
-add_task(async function () {
+add_task(async function() {
   // Disable rcwn to make cache behavior deterministic.
   await pushPref("network.http.rcwn.enabled", false);
 
   // Ensure that the setting is cleared after the test.
   registerCleanupFunction(() => {
     info("Resetting devtools.cache.disabled to false.");
     Services.prefs.setBoolPref("devtools.cache.disabled", false);
   });
--- a/devtools/client/framework/test/browser_toolbox_options_disable_cache-02.js
+++ b/devtools/client/framework/test/browser_toolbox_options_disable_cache-02.js
@@ -6,17 +6,17 @@
 "use strict";
 
 requestLongerTimeout(2);
 
 // Tests that disabling the cache for a tab works as it should when toolboxes
 // are toggled.
 loadHelperScript("helper_disable_cache.js");
 
-add_task(async function () {
+add_task(async function() {
   // Disable rcwn to make cache behavior deterministic.
   await pushPref("network.http.rcwn.enabled", false);
 
   // Ensure that the setting is cleared after the test.
   registerCleanupFunction(() => {
     info("Resetting devtools.cache.disabled to false.");
     Services.prefs.setBoolPref("devtools.cache.disabled", false);
   });
--- a/devtools/client/framework/test/browser_toolbox_options_disable_js.js
+++ b/devtools/client/framework/test/browser_toolbox_options_disable_js.js
@@ -14,17 +14,17 @@ function test() {
   });
 }
 
 function testSelectTool(toolbox) {
   toolbox.once("options-selected", () => testToggleJS(toolbox));
   toolbox.selectTool("options");
 }
 
-let testToggleJS = async function (toolbox) {
+let testToggleJS = async function(toolbox) {
   ok(true, "Toolbox selected via selectTool method");
 
   await testJSEnabled();
   await testJSEnabledIframe();
 
   // Disable JS.
   await toggleJS(toolbox);
 
@@ -42,28 +42,28 @@ let testToggleJS = async function (toolb
 
 async function testJSEnabled() {
   info("Testing that JS is enabled");
 
   // We use waitForTick here because switching docShell.allowJavascript to true
   // takes a while to become live.
   await waitForTick();
 
-  await ContentTask.spawn(gBrowser.selectedBrowser, {}, function () {
+  await ContentTask.spawn(gBrowser.selectedBrowser, {}, function() {
     let doc = content.document;
     let output = doc.getElementById("output");
     doc.querySelector("#logJSEnabled").click();
     is(output.textContent, "JavaScript Enabled", 'Output is "JavaScript Enabled"');
   });
 }
 
 async function testJSEnabledIframe() {
   info("Testing that JS is enabled in the iframe");
 
-  await ContentTask.spawn(gBrowser.selectedBrowser, {}, function () {
+  await ContentTask.spawn(gBrowser.selectedBrowser, {}, function() {
     let doc = content.document;
     let iframe = doc.querySelector("iframe");
     let iframeDoc = iframe.contentDocument;
     let output = iframeDoc.getElementById("output");
     iframeDoc.querySelector("#logJSEnabled").click();
     is(output.textContent, "JavaScript Enabled",
                             'Output is "JavaScript Enabled" in iframe');
   });
@@ -82,38 +82,38 @@ async function toggleJS(toolbox) {
   let browserLoaded = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
   cbx.click();
   await browserLoaded;
 }
 
 async function testJSDisabled() {
   info("Testing that JS is disabled");
 
-  await ContentTask.spawn(gBrowser.selectedBrowser, {}, function () {
+  await ContentTask.spawn(gBrowser.selectedBrowser, {}, function() {
     let doc = content.document;
     let output = doc.getElementById("output");
     doc.querySelector("#logJSDisabled").click();
 
     ok(output.textContent !== "JavaScript Disabled",
        'output is not "JavaScript Disabled"');
   });
 }
 
 async function testJSDisabledIframe() {
   info("Testing that JS is disabled in the iframe");
 
-  await ContentTask.spawn(gBrowser.selectedBrowser, {}, function () {
+  await ContentTask.spawn(gBrowser.selectedBrowser, {}, function() {
     let doc = content.document;
     let iframe = doc.querySelector("iframe");
     let iframeDoc = iframe.contentDocument;
     let output = iframeDoc.getElementById("output");
     iframeDoc.querySelector("#logJSDisabled").click();
     ok(output.textContent !== "JavaScript Disabled",
        'output is not "JavaScript Disabled" in iframe');
   });
 }
 
 function finishUp(toolbox) {
-  toolbox.destroy().then(function () {
+  toolbox.destroy().then(function() {
     gBrowser.removeCurrentTab();
     finish();
   });
 }
--- a/devtools/client/framework/test/browser_toolbox_options_enable_serviceworkers_testing.js
+++ b/devtools/client/framework/test/browser_toolbox_options_enable_serviceworkers_testing.js
@@ -102,17 +102,17 @@ function start() {
     .then(unregister)
     .then(registerAndUnregisterInFrame)
     .then(testRegisterSuccesses)
     // Workers should be turned back off when we closes the toolbox
     .then(toolbox.destroy.bind(toolbox))
     .then(reload)
     .then(register)
     .then(testRegisterFails)
-    .catch(function (e) {
+    .catch(function(e) {
       ok(false, "Some test failed with error " + e);
     }).then(finishUp);
 }
 
 function finishUp() {
   gBrowser.removeCurrentTab();
   toolbox = null;
   finish();
--- a/devtools/client/framework/test/browser_toolbox_options_enable_serviceworkers_testing_frame_script.js
+++ b/devtools/client/framework/test/browser_toolbox_options_enable_serviceworkers_testing_frame_script.js
@@ -2,37 +2,37 @@
 /* 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/ */
 
 // A helper frame-script for devtools/client/framework service worker tests.
 
 "use strict";
 
-addMessageListener("devtools:sw-test:register", function (msg) {
+addMessageListener("devtools:sw-test:register", function(msg) {
   content.navigator.serviceWorker.register("serviceworker.js")
     .then(swr => {
       sendAsyncMessage("devtools:sw-test:register", {success: true});
     }, error => {
       sendAsyncMessage("devtools:sw-test:register", {success: false});
     });
 });
 
-addMessageListener("devtools:sw-test:unregister", function (msg) {
+addMessageListener("devtools:sw-test:unregister", function(msg) {
   content.navigator.serviceWorker.getRegistration().then(swr => {
     swr.unregister().then(result => {
       sendAsyncMessage("devtools:sw-test:unregister",
-                       {success: result ? true : false});
+                       {success: !!result});
     });
   });
 });
 
-addMessageListener("devtools:sw-test:iframe:register-and-unregister", function (msg) {
+addMessageListener("devtools:sw-test:iframe:register-and-unregister", function(msg) {
   var frame = content.document.createElement("iframe");
-  frame.addEventListener("load", function () {
+  frame.addEventListener("load", function() {
     frame.contentWindow.navigator.serviceWorker.register("serviceworker.js")
       .then(swr => {
         return swr.unregister();
       }).then(_ => {
         frame.remove();
         sendAsyncMessage("devtools:sw-test:iframe:register-and-unregister",
                          {success: true});
       }).catch(error => {
--- a/devtools/client/framework/test/browser_toolbox_races.js
+++ b/devtools/client/framework/test/browser_toolbox_races.js
@@ -8,17 +8,17 @@
 // Toggling the toolbox three time can take more than 45s on slow test machine
 requestLongerTimeout(2);
 
 // Test toggling the toolbox quickly and see if there is any race breaking it.
 
 const URL = "data:text/html;charset=utf-8,Toggling devtools quickly";
 const {gDevToolsBrowser} = require("devtools/client/framework/devtools-browser");
 
-add_task(async function () {
+add_task(async function() {
   // Make sure this test starts with the selectedTool pref cleared. Previous
   // tests select various tools, and that sets this pref.
   Services.prefs.clearUserPref("devtools.toolbox.selectedTool");
 
   let tab = await addTab(URL);
 
   let created = 0, ready = 0, destroy = 0, destroyed = 0;
   let onCreated = () => {
--- a/devtools/client/framework/test/browser_toolbox_raise.js
+++ b/devtools/client/framework/test/browser_toolbox_raise.js
@@ -19,20 +19,20 @@ function test() {
   });
 }
 
 function testBottomHost(aToolbox) {
   toolbox = aToolbox;
 
   // switch to another tab and test toolbox.raise()
   gBrowser.selectedTab = tab2;
-  executeSoon(function () {
+  executeSoon(function() {
     is(gBrowser.selectedTab, tab2, "Correct tab is selected before calling raise");
     toolbox.raise();
-    executeSoon(function () {
+    executeSoon(function() {
       is(gBrowser.selectedTab, tab1, "Correct tab was selected after calling raise");
 
       toolbox.switchHost(Toolbox.HostType.WINDOW).then(testWindowHost).catch(console.error);
     });
   });
 }
 
 function testWindowHost() {
@@ -64,15 +64,15 @@ function onFocus() {
 
   // Now raise toolbox.
   toolbox.raise();
 }
 
 function cleanup() {
   Services.prefs.setCharPref("devtools.toolbox.host", Toolbox.HostType.BOTTOM);
 
-  toolbox.destroy().then(function () {
+  toolbox.destroy().then(function() {
     toolbox = null;
     gBrowser.removeCurrentTab();
     gBrowser.removeCurrentTab();
     finish();
   });
 }
--- a/devtools/client/framework/test/browser_toolbox_ready.js
+++ b/devtools/client/framework/test/browser_toolbox_ready.js
@@ -1,16 +1,16 @@
 /* -*- 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/ */
 
 const TEST_URL = "data:text/html,test for toolbox being ready";
 
-add_task(async function () {
+add_task(async function() {
   let tab = await addTab(TEST_URL);
   let target = TargetFactory.forTab(tab);
 
   const toolbox = await gDevTools.showToolbox(target, "webconsole");
   ok(toolbox.isReady, "toolbox isReady is set");
   ok(toolbox.threadClient, "toolbox has a thread client");
 
   const toolbox2 = await gDevTools.showToolbox(toolbox.target, toolbox.toolId);
--- a/devtools/client/framework/test/browser_toolbox_remoteness_change.js
+++ b/devtools/client/framework/test/browser_toolbox_remoteness_change.js
@@ -2,17 +2,17 @@
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 var {Toolbox} = require("devtools/client/framework/toolbox");
 
 const URL_1 = "about:robots";
 const URL_2 = "data:text/html;charset=UTF-8," +
   encodeURIComponent("<div id=\"remote-page\">foo</div>");
 
-add_task(async function () {
+add_task(async function() {
   info("Open a tab on a URL supporting only running in parent process");
   let tab = await addTab(URL_1);
   is(tab.linkedBrowser.currentURI.spec, URL_1, "We really are on the expected document");
   is(tab.linkedBrowser.getAttribute("remote"), "", "And running in parent process");
 
   let toolbox = await openToolboxForTab(tab);
 
   let onToolboxDestroyed = toolbox.once("destroyed");
--- a/devtools/client/framework/test/browser_toolbox_select_event.js
+++ b/devtools/client/framework/test/browser_toolbox_select_event.js
@@ -4,17 +4,17 @@
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 const PAGE_URL = "data:text/html;charset=utf-8,test select events";
 
 requestLongerTimeout(2);
 
-add_task(async function () {
+add_task(async function() {
   let tab = await addTab(PAGE_URL);
 
   let toolbox = await openToolboxForTab(tab, "webconsole", "bottom");
   await testSelectEvent("inspector");
   await testSelectEvent("webconsole");
   await testSelectEvent("styleeditor");
   await testSelectEvent("inspector");
   await testSelectEvent("webconsole");
@@ -77,17 +77,17 @@ add_task(async function () {
     let onSelect = (event, id) => {
       if (selected) {
         ok(false, "Got more than one 'select' event");
       } else {
         selected = true;
       }
     };
     toolbox.once("select", onSelect);
-    let p1 = toolbox.selectTool("inspector")
+    let p1 = toolbox.selectTool("inspector");
     let p2 = toolbox.selectTool("inspector");
     // Check that both promises don't resolve too early
     let checkSelectToolResolution = panel => {
       ok(selected, "selectTool resolves only after 'select' event is fired");
       let inspector = toolbox.getPanel("inspector");
       is(panel, inspector, "selecTool resolves to the panel instance");
     };
     p1.then(checkSelectToolResolution);
--- a/devtools/client/framework/test/browser_toolbox_selected_tool_unavailable.js
+++ b/devtools/client/framework/test/browser_toolbox_selected_tool_unavailable.js
@@ -10,27 +10,27 @@
 
 const testToolDefinition = {
   id: "test-tool",
   isTargetSupported: () => true,
   visibilityswitch: "devtools.test-tool.enabled",
   url: "about:blank",
   label: "someLabel",
   build: (iframeWindow, toolbox) => {
-      return {
+    return {
         target: toolbox.target,
         toolbox: toolbox,
         isReady: true,
         destroy: () => {},
         panelDoc: iframeWindow.document
-      };
-    }
+    };
+  }
 };
 
-add_task(async function () {
+add_task(async function() {
   gDevTools.registerTool(testToolDefinition);
   let tab = await addTab("about:blank");
   let target = TargetFactory.forTab(tab);
 
   let toolbox = await gDevTools.showToolbox(target, testToolDefinition.id);
   is(toolbox.currentToolId, "test-tool", "test-tool was selected");
   await gDevTools.closeToolbox(target);
 
--- a/devtools/client/framework/test/browser_toolbox_selectionchanged_event.js
+++ b/devtools/client/framework/test/browser_toolbox_selectionchanged_event.js
@@ -2,17 +2,17 @@
 /* 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/ */
 
 "use strict";
 
 const PAGE_URL = "data:text/html;charset=utf-8,<body><div></div></body>";
 
-add_task(async function () {
+add_task(async function() {
   let tab = await addTab(PAGE_URL);
   let toolbox = await openToolboxForTab(tab, "inspector", "bottom");
   let inspector = toolbox.getCurrentPanel();
 
   let root = await inspector.walker.getRootNode();
   let body = await inspector.walker.querySelector(root, "body");
   let node = await inspector.walker.querySelector(root, "div");
 
--- a/devtools/client/framework/test/browser_toolbox_sidebar.js
+++ b/devtools/client/framework/test/browser_toolbox_sidebar.js
@@ -16,66 +16,66 @@ function test() {
   let readyTabs = {};
 
   let toolDefinition = {
     id: "fakeTool4242",
     visibilityswitch: "devtools.fakeTool4242.enabled",
     url: CHROME_URL_ROOT + "browser_toolbox_sidebar_toolURL.xul",
     label: "FAKE TOOL!!!",
     isTargetSupported: () => true,
-    build: function (iframeWindow, toolbox) {
+    build: function(iframeWindow, toolbox) {
       let deferred = defer();
       executeSoon(() => {
         deferred.resolve({
           target: toolbox.target,
           toolbox: toolbox,
           isReady: true,
-          destroy: function () {},
+          destroy: function() {},
           panelDoc: iframeWindow.document,
         });
       });
       return deferred.promise;
     },
   };
 
   gDevTools.registerTool(toolDefinition);
 
-  addTab("about:blank").then(function (aTab) {
+  addTab("about:blank").then(function(aTab) {
     let target = TargetFactory.forTab(aTab);
-    gDevTools.showToolbox(target, toolDefinition.id).then(function (toolbox) {
+    gDevTools.showToolbox(target, toolDefinition.id).then(function(toolbox) {
       let panel = toolbox.getPanel(toolDefinition.id);
       panel.toolbox = toolbox;
       ok(true, "Tool open");
 
       let tabbox = panel.panelDoc.getElementById("sidebar");
       panel.sidebar = new ToolSidebar(tabbox, panel, "testbug865688", true);
 
-      panel.sidebar.on("new-tab-registered", function (id) {
+      panel.sidebar.on("new-tab-registered", function(id) {
         registeredTabs[id] = true;
       });
 
-      panel.sidebar.once("tab1-ready", function () {
+      panel.sidebar.once("tab1-ready", function() {
         info("tab1-ready");
         readyTabs.tab1 = true;
         allTabsReady(panel);
       });
 
-      panel.sidebar.once("tab2-ready", function () {
+      panel.sidebar.once("tab2-ready", function() {
         info("tab2-ready");
         readyTabs.tab2 = true;
         allTabsReady(panel);
       });
 
-      panel.sidebar.once("tab3-ready", function () {
+      panel.sidebar.once("tab3-ready", function() {
         info("tab3-ready");
         readyTabs.tab3 = true;
         allTabsReady(panel);
       });
 
-      panel.sidebar.once("tab1-selected", function () {
+      panel.sidebar.once("tab1-selected", function() {
         info("tab1-selected");
         tab1Selected = true;
         allTabsReady(panel);
       });
 
       panel.sidebar.addTab("tab1", tab1URL, {selected: true});
       panel.sidebar.addTab("tab2", tab2URL);
       panel.sidebar.addTab("tab3", tab3URL);
@@ -102,19 +102,19 @@ function test() {
     for (let tab of tabs) {
       is(tab.getAttribute("label"), label++, "Tab has the right title");
     }
 
     is(label, 4, "Found the right amount of tabs.");
     is(panel.sidebar._tabbox.selectedPanel, panels[0], "First tab is selected");
     is(panel.sidebar.getCurrentTabID(), "tab1", "getCurrentTabID() is correct");
 
-    panel.sidebar.once("tab1-unselected", function () {
+    panel.sidebar.once("tab1-unselected", function() {
       ok(true, "received 'unselected' event");
-      panel.sidebar.once("tab2-selected", function () {
+      panel.sidebar.once("tab2-selected", function() {
         ok(true, "received 'selected' event");
         tabs[1].focus();
         is(panel.sidebar._panelDoc.activeElement, tabs[1],
           "Focus is set to second tab");
         panel.sidebar.hide();
         isnot(panel.sidebar._panelDoc.activeElement, tabs[1],
           "Focus is reset for sidebar");
         is(panel.sidebar._tabbox.getAttribute("hidden"), "true", "Sidebar hidden");
@@ -122,17 +122,17 @@ function test() {
         testRemoval(panel);
       });
     });
 
     panel.sidebar.select("tab2");
   }
 
   function testRemoval(panel) {
-    panel.sidebar.once("tab-unregistered", function (id) {
+    panel.sidebar.once("tab-unregistered", function(id) {
       info("tab-unregistered");
       registeredTabs[id] = false;
 
       is(id, "tab3", "The right tab must be removed");
 
       let tabs = panel.sidebar._tabbox.querySelectorAll("tab");
       let panels = panel.sidebar._tabbox.querySelectorAll("tabpanel");
 
@@ -143,31 +143,31 @@ function test() {
     });
 
     panel.sidebar.removeTab("tab3");
   }
 
   function testWidth(panel) {
     let tabbox = panel.panelDoc.getElementById("sidebar");
     tabbox.width = 420;
-    panel.sidebar.destroy().then(function () {
+    panel.sidebar.destroy().then(function() {
       tabbox.width = 0;
       panel.sidebar = new ToolSidebar(tabbox, panel, "testbug865688", true);
       panel.sidebar.show();
       is(panel.panelDoc.getElementById("sidebar").width, 420, "Width restored");
 
       finishUp(panel);
     });
   }
 
   function finishUp(panel) {
     panel.sidebar.destroy();
-    panel.toolbox.destroy().then(function () {
+    panel.toolbox.destroy().then(function() {
       gDevTools.unregisterTool(toolDefinition.id);
 
       gBrowser.removeCurrentTab();
 
-      executeSoon(function () {
+      executeSoon(function() {
         finish();
       });
     });
   }
 }
--- a/devtools/client/framework/test/browser_toolbox_sidebar_events.js
+++ b/devtools/client/framework/test/browser_toolbox_sidebar_events.js
@@ -11,55 +11,55 @@ function test() {
   let collectedEvents = [];
 
   let toolDefinition = {
     id: "testTool1072208",
     visibilityswitch: "devtools.testTool1072208.enabled",
     url: CHROME_URL_ROOT + "browser_toolbox_sidebar_events.xul",
     label: "Test tool",
     isTargetSupported: () => true,
-    build: function (iframeWindow, toolbox) {
+    build: function(iframeWindow, toolbox) {
       let deferred = defer();
       executeSoon(() => {
         deferred.resolve({
           target: toolbox.target,
           toolbox: toolbox,
           isReady: true,
-          destroy: function () {},
+          destroy: function() {},
           panelDoc: iframeWindow.document,
         });
       });
       return deferred.promise;
     },
   };
 
   gDevTools.registerTool(toolDefinition);
 
-  addTab("about:blank").then(function (aTab) {
+  addTab("about:blank").then(function(aTab) {
     let target = TargetFactory.forTab(aTab);
-    gDevTools.showToolbox(target, toolDefinition.id).then(function (toolbox) {
+    gDevTools.showToolbox(target, toolDefinition.id).then(function(toolbox) {
       let panel = toolbox.getPanel(toolDefinition.id);
       ok(true, "Tool open");
 
-      panel.once("sidebar-created", function () {
+      panel.once("sidebar-created", function() {
         collectedEvents.push("sidebar-created");
       });
 
-      panel.once("sidebar-destroyed", function () {
+      panel.once("sidebar-destroyed", function() {
         collectedEvents.push("sidebar-destroyed");
       });
 
       let tabbox = panel.panelDoc.getElementById("sidebar");
       panel.sidebar = new ToolSidebar(tabbox, panel, "testbug1072208", true);
 
-      panel.sidebar.once("show", function () {
+      panel.sidebar.once("show", function() {
         collectedEvents.push("show");
       });
 
-      panel.sidebar.once("hide", function () {
+      panel.sidebar.once("hide", function() {
         collectedEvents.push("hide");
       });
 
       panel.sidebar.once("tab1-selected", () => finishUp(panel));
       panel.sidebar.addTab("tab1", tab1URL, {selected: true});
       panel.sidebar.show();
     }).catch(console.error);
   });
@@ -67,19 +67,19 @@ function test() {
   function finishUp(panel) {
     panel.sidebar.hide();
     panel.sidebar.destroy();
 
     let events = collectedEvents.join(":");
     is(events, "sidebar-created:show:hide:sidebar-destroyed",
       "Found the right amount of collected events.");
 
-    panel.toolbox.destroy().then(function () {
+    panel.toolbox.destroy().then(function() {
       gDevTools.unregisterTool(toolDefinition.id);
       gBrowser.removeCurrentTab();
 
-      executeSoon(function () {
+      executeSoon(function() {
         finish();
       });
     });
   }
 }
 
--- a/devtools/client/framework/test/browser_toolbox_sidebar_existing_tabs.js
+++ b/devtools/client/framework/test/browser_toolbox_sidebar_existing_tabs.js
@@ -20,17 +20,17 @@ const testToolDefinition = {
       toolbox: toolbox,
       isReady: true,
       destroy: () => {},
       panelDoc: iframeWindow.document,
     });
   }
 };
 
-add_task(async function () {
+add_task(async function() {
   let tab = await addTab("about:blank");
 
   let target = TargetFactory.forTab(tab);
 
   gDevTools.registerTool(testToolDefinition);
   let toolbox = await gDevTools.showToolbox(target, testToolDefinition.id);
 
   let toolPanel = toolbox.getPanel(testToolDefinition.id);
--- a/devtools/client/framework/test/browser_toolbox_sidebar_overflow_menu.js
+++ b/devtools/client/framework/test/browser_toolbox_sidebar_overflow_menu.js
@@ -21,17 +21,17 @@ const testToolDefinition = {
       toolbox: toolbox,
       isReady: true,
       destroy: () => {},
       panelDoc: iframeWindow.document,
     };
   }
 };
 
-add_task(async function () {
+add_task(async function() {
   let tab = await addTab("about:blank");
   let target = TargetFactory.forTab(tab);
 
   gDevTools.registerTool(testToolDefinition);
   let toolbox = await gDevTools.showToolbox(target, testToolDefinition.id);
 
   let toolPanel = toolbox.getPanel(testToolDefinition.id);
   let tabbox = toolPanel.panelDoc.getElementById("sidebar");
--- a/devtools/client/framework/test/browser_toolbox_split_console.js
+++ b/devtools/client/framework/test/browser_toolbox_split_console.js
@@ -15,17 +15,17 @@ let panelWin = null;
 const URL = "data:text/html;charset=utf8,test split console key delegation";
 
 // Force the old debugger UI since it's directly used (see Bug 1301705)
 Services.prefs.setBoolPref("devtools.debugger.new-debugger-frontend", false);
 registerCleanupFunction(function() {
   Services.prefs.clearUserPref("devtools.debugger.new-debugger-frontend");
 });
 
-add_task(async function () {
+add_task(async function() {
   let tab = await addTab(URL);
   let target = TargetFactory.forTab(tab);
   gToolbox = await gDevTools.showToolbox(target, "jsdebugger");
   panelWin = gToolbox.getPanel("jsdebugger").panelWin;
 
   await gToolbox.openSplitConsole();
   await testIsSplitConsoleFocused();
   await testUseKeyWithSplitConsole();
--- a/devtools/client/framework/test/browser_toolbox_tabsswitch_shortcuts.js
+++ b/devtools/client/framework/test/browser_toolbox_tabsswitch_shortcuts.js
@@ -7,17 +7,17 @@
 
 requestLongerTimeout(2);
 
 var {Toolbox} = require("devtools/client/framework/toolbox");
 
 const {LocalizationHelper} = require("devtools/shared/l10n");
 const L10N = new LocalizationHelper("devtools/client/locales/toolbox.properties");
 
-add_task(async function () {
+add_task(async function() {
   let tab = await addTab("about:blank");
   let target = TargetFactory.forTab(tab);
   await target.makeRemote();
 
   let toolIDs = gDevTools.getToolDefinitionArray()
                          .filter(def => def.isTargetSupported(target))
                          .map(def => def.id);
 
--- a/devtools/client/framework/test/browser_toolbox_target.js
+++ b/devtools/client/framework/test/browser_toolbox_target.js
@@ -2,17 +2,17 @@
 /* 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 about:devtools-toolbox?target which allows opening a toolbox in an
 // iframe while defining which document to debug by setting a `target`
 // attribute refering to the document to debug.
 
-add_task(async function () {
+add_task(async function() {
   // iframe loads the document to debug
   let iframe = document.createElement("browser");
   iframe.setAttribute("type", "content");
   document.documentElement.appendChild(iframe);
 
   let onLoad = once(iframe, "load", true);
   iframe.setAttribute("src", "data:text/html,document to debug");
   await onLoad;
--- a/devtools/client/framework/test/browser_toolbox_textbox_context_menu.js
+++ b/devtools/client/framework/test/browser_toolbox_textbox_context_menu.js
@@ -58,17 +58,17 @@ add_task(async function checkMenuEntrySt
 add_task(async function automaticallyBindTexbox() {
   info("Registering a tool with an input field and making sure the context menu works");
   gDevTools.registerTool({
     id: textboxToolId,
     isTargetSupported: () => true,
     url: `data:text/html;charset=utf8,<input /><input type='text' />
             <input type='search' /><textarea></textarea><input type='radio' />`,
     label: "Context menu works without tool intervention",
-    build: function (iframeWindow, toolbox) {
+    build: function(iframeWindow, toolbox) {
       this.panel = createTestPanel(iframeWindow, toolbox);
       return this.panel.open();
     },
   });
 
   let toolbox = await openNewTabAndToolbox(URL, textboxToolId);
   is(toolbox.currentToolId, textboxToolId, "The custom tool has been opened");
 
--- a/devtools/client/framework/test/browser_toolbox_toggle.js
+++ b/devtools/client/framework/test/browser_toolbox_toggle.js
@@ -7,17 +7,17 @@
 
 // Test toggling the toolbox with ACCEL+SHIFT+I / ACCEL+ALT+I and F12 in docked
 // and detached (window) modes.
 
 const URL = "data:text/html;charset=utf-8,Toggling devtools using shortcuts";
 
 var {Toolbox} = require("devtools/client/framework/toolbox");
 
-add_task(async function () {
+add_task(async function() {
   // Make sure this test starts with the selectedTool pref cleared. Previous
   // tests select various tools, and that sets this pref.
   Services.prefs.clearUserPref("devtools.toolbox.selectedTool");
 
   // Test with ACCEL+SHIFT+I / ACCEL+ALT+I (MacOSX) ; modifiers should match :
   // - toolbox-key-toggle in devtools/client/framework/toolbox-window.xul
   // - key_devToolboxMenuItem in browser/base/content/browser.xul
   info("Test toggle using CTRL+SHIFT+I/CMD+ALT+I");
--- a/devtools/client/framework/test/browser_toolbox_tool_ready.js
+++ b/devtools/client/framework/test/browser_toolbox_tool_ready.js
@@ -3,17 +3,17 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 requestLongerTimeout(5);
 
 function performChecks(target) {
-  return (async function () {
+  return (async function() {
     let toolIds = gDevTools.getToolDefinitionArray()
                            .filter(def => def.isTargetSupported(target))
                            .map(def => def.id);
 
     let toolbox;
     for (let index = 0; index < toolIds.length; index++) {
       let toolId = toolIds[index];
 
@@ -26,17 +26,17 @@ function performChecks(target) {
       ok(panel.isReady, toolId + " panel should be ready");
     }
 
     await toolbox.destroy();
   })();
 }
 
 function test() {
-  Task.spawn(async function () {
+  Task.spawn(async function() {
     toggleAllTools(true);
     let tab = await addTab("about:blank");
     let target = TargetFactory.forTab(tab);
     await target.makeRemote();
     await performChecks(target);
     gBrowser.removeCurrentTab();
     toggleAllTools(false);
     finish();
--- a/devtools/client/framework/test/browser_toolbox_tool_remote_reopen.js
+++ b/devtools/client/framework/test/browser_toolbox_tool_remote_reopen.js
@@ -33,17 +33,17 @@ requestLongerTimeout(2);
  *
  * In WebIDE, we do not destroy the DebuggerClient on toolbox close because it
  * is still used for other purposes like managing apps, etc. that aren't part of
  * a toolbox.  Thus, the same client gets reused across multiple toolboxes,
  * which leads to the tools failing if they don't destroy their fronts.
  */
 
 function runTools(target) {
-  return (async function () {
+  return (async function() {
     let toolIds = gDevTools.getToolDefinitionArray()
                            .filter(def => def.isTargetSupported(target))
                            .map(def => def.id);
 
     let toolbox;
     for (let index = 0; index < toolIds.length; index++) {
       let toolId = toolIds[index];
 
@@ -83,17 +83,17 @@ function getTarget(client) {
     });
     deferred.resolve(target);
   });
 
   return deferred.promise;
 }
 
 function test() {
-  Task.spawn(async function () {
+  Task.spawn(async function() {
     toggleAllTools(true);
     await addTab("about:blank");
 
     let client = await getClient();
     let target = await getTarget(client);
     await runTools(target);
 
     // Actor fronts should be destroyed now that the toolbox has closed, but
--- a/devtools/client/framework/test/browser_toolbox_toolbar_overflow.js
+++ b/devtools/client/framework/test/browser_toolbox_toolbar_overflow.js
@@ -4,17 +4,17 @@
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 // Test that a button to access tools hidden by toolbar overflow is displayed when the
 // toolbar starts to present an overflow.
 let { Toolbox } = require("devtools/client/framework/toolbox");
 
-add_task(async function () {
+add_task(async function() {
   let tab = await addTab("about:blank");
 
   info("Open devtools on the Inspector in a separate window");
   let toolbox = await openToolboxForTab(tab, "inspector", Toolbox.HostType.WINDOW);
 
   let hostWindow = toolbox.win.parent;
   let originalWidth = hostWindow.outerWidth;
   let originalHeight = hostWindow.outerHeight;
--- a/devtools/client/framework/test/browser_toolbox_tools_per_toolbox_registration.js
+++ b/devtools/client/framework/test/browser_toolbox_tools_per_toolbox_registration.js
@@ -48,17 +48,17 @@ function toolboxRegister(aToolbox) {
 
   info("add per-toolbox tool in the opened toolbox.");
 
   toolbox.addAdditionalTool({
     id: TOOL_ID,
     label: "per-toolbox Test Tool",
     inMenu: true,
     isTargetSupported: () => true,
-    build: function () {
+    build: function() {
       info("per-toolbox tool has been built.");
       resolveToolInstanceBuild();
 
       return {
         destroy: () => {
           info("per-toolbox tool has been destroyed.");
           resolveToolInstanceDestroyed();
         },
@@ -127,14 +127,14 @@ function toolboxToolUnregistered() {
 
   let panel = doc.getElementById("toolbox-panel-" + TOOL_ID);
   ok(!panel, "tool's panel was removed from toolbox UI");
 
   cleanup();
 }
 
 function cleanup() {
-  toolbox.destroy().then(() => {;
+  toolbox.destroy().then(() => {
     toolbox = null;
     gBrowser.removeCurrentTab();
     finish();
   });
 }
--- a/devtools/client/framework/test/browser_toolbox_transport_events.js
+++ b/devtools/client/framework/test/browser_toolbox_transport_events.js
@@ -7,37 +7,37 @@
 
 const { on, off } = require("devtools/shared/event-emitter");
 const { DebuggerClient } = require("devtools/shared/client/debugger-client");
 
 function test() {
   gDevTools.on("toolbox-created", onToolboxCreated);
   on(DebuggerClient, "connect", onDebuggerClientConnect);
 
-  addTab("about:blank").then(function () {
+  addTab("about:blank").then(function() {
     let target = TargetFactory.forTab(gBrowser.selectedTab);
     gDevTools.showToolbox(target, "webconsole").then(testResults);
   });
 }
 
 function testResults(toolbox) {
   testPackets(sent1, received1);
   testPackets(sent2, received2);
 
   cleanUp(toolbox);
 }
 
 function cleanUp(toolbox) {
   gDevTools.off("toolbox-created", onToolboxCreated);
   off(DebuggerClient, "connect", onDebuggerClientConnect);
 
-  toolbox.destroy().then(function () {
+  toolbox.destroy().then(function() {
     setTimeout(() => {
       gBrowser.removeCurrentTab();
-      executeSoon(function () {
+      executeSoon(function() {
         finish();
       });
     }, 1000);
   });
 }
 
 function testPackets(sent, received) {
   ok(sent.length > 0, "There must be at least one sent packet");
--- a/devtools/client/framework/test/browser_toolbox_window_shortcuts.js
+++ b/devtools/client/framework/test/browser_toolbox_window_shortcuts.js
@@ -7,17 +7,17 @@
 
 var Startup = Cc["@mozilla.org/devtools/startup-clh;1"].getService(Ci.nsISupports)
   .wrappedJSObject;
 var {Toolbox} = require("devtools/client/framework/toolbox");
 
 var toolbox, toolIDs, toolShortcuts = [], idIndex, modifiedPrefs = [];
 
 function test() {
-  addTab("about:blank").then(function () {
+  addTab("about:blank").then(function() {
     toolIDs = [];
     for (let [id, definition] of gDevTools._tools) {
       let shortcut = Startup.KeyShortcuts.filter(s => s.toolId == id)[0];
       if (!shortcut) {
         continue;
       }
       toolIDs.push(id);
       toolShortcuts.push(shortcut);
@@ -73,17 +73,17 @@ function selectCB(id) {
 
   is(toolIDs.indexOf(id), idIndex,
      "Correct tool is selected on pressing the shortcut for " + id);
 
   testShortcuts(toolbox, idIndex + 1);
 }
 
 function tidyUp() {
-  toolbox.destroy().then(function () {
+  toolbox.destroy().then(function() {
     gBrowser.removeCurrentTab();
 
     for (let pref of modifiedPrefs) {
       Services.prefs.clearUserPref(pref);
     }
     toolbox = toolIDs = idIndex = modifiedPrefs = Toolbox = null;
     finish();
   });
--- a/devtools/client/framework/test/browser_toolbox_window_title_changes.js
+++ b/devtools/client/framework/test/browser_toolbox_window_title_changes.js
@@ -16,20 +16,22 @@ function test() {
   const TOOL_ID_2 = "jsdebugger";
 
   const NAME_1 = "";
   const NAME_2 = "";
   const NAME_3 = "Toolbox test for title update";
 
   let toolbox;
 
-  addTab(URL_1).then(function () {
+  addTab(URL_1).then(function() {
     let target = TargetFactory.forTab(gBrowser.selectedTab);
     gDevTools.showToolbox(target, null, Toolbox.HostType.BOTTOM)
-      .then(function (aToolbox) { toolbox = aToolbox; })
+      .then(function(aToolbox) {
+        toolbox = aToolbox;
+      })
       .then(() => toolbox.selectTool(TOOL_ID_1))
 
     // undock toolbox and check title
       .then(() => {
         // We have to first switch the host in order to spawn the new top level window
         // on which we are going to listen from title change event
         return toolbox.switchHost(Toolbox.HostType.WINDOW)
           .then(() => waitForTitleChange(toolbox));
@@ -40,55 +42,57 @@ function test() {
       .then(() => {
         let onTitleChanged = waitForTitleChange(toolbox);
         toolbox.selectTool(TOOL_ID_2);
         return onTitleChanged;
       })
       .then(checkTitle.bind(null, NAME_1, URL_1, "tool changed"))
 
     // navigate to different local url and check title
-      .then(function () {
+      .then(function() {
         let onTitleChanged = waitForTitleChange(toolbox);
         gBrowser.loadURI(URL_2);
         return onTitleChanged;
       })
       .then(checkTitle.bind(null, NAME_2, URL_2, "url changed"))
 
     // navigate to a real url and check title
       .then(() => {
         let onTitleChanged = waitForTitleChange(toolbox);
         gBrowser.loadURI(URL_3);
         return onTitleChanged;
       })
       .then(checkTitle.bind(null, NAME_3, URL_3, "url changed"))
 
     // destroy toolbox, create new one hosted in a window (with a
     // different tool id), and check title
-      .then(function () {
+      .then(function() {
         // Give the tools a chance to handle the navigation event before
         // destroying the toolbox.
-        executeSoon(function () {
+        executeSoon(function() {
           toolbox.destroy()
-            .then(function () {
+            .then(function() {
               // After destroying the toolbox, a fresh target is required.
               target = TargetFactory.forTab(gBrowser.selectedTab);
               return gDevTools.showToolbox(target, null, Toolbox.HostType.WINDOW);
             })
-            .then(function (aToolbox) { toolbox = aToolbox; })
+            .then(function(aToolbox) {
+              toolbox = aToolbox;
+            })
             .then(() => {
               let onTitleChanged = waitForTitleChange(toolbox);
               toolbox.selectTool(TOOL_ID_1);
               return onTitleChanged;
             })
             .then(checkTitle.bind(null, NAME_3, URL_3,
                                   "toolbox destroyed and recreated"))
 
             // clean up
             .then(() => toolbox.destroy())
-            .then(function () {
+            .then(function() {
               toolbox = null;
               gBrowser.removeCurrentTab();
               Services.prefs.clearUserPref("devtools.toolbox.host");
               Services.prefs.clearUserPref("devtools.toolbox.selectedTool");
               Services.prefs.clearUserPref("devtools.toolbox.sideEnabled");
               finish();
             });
         });
--- a/devtools/client/framework/test/browser_toolbox_window_title_frame_select.js
+++ b/devtools/client/framework/test/browser_toolbox_window_title_frame_select.js
@@ -12,17 +12,17 @@
  */
 
 var {Toolbox} = require("devtools/client/framework/toolbox");
 const URL = URL_ROOT + "browser_toolbox_window_title_frame_select_page.html";
 const IFRAME_URL = URL_ROOT + "browser_toolbox_window_title_changes_page.html";
 const {LocalizationHelper} = require("devtools/shared/l10n");
 const L10N = new LocalizationHelper("devtools/client/locales/toolbox.properties");
 
-add_task(async function () {
+add_task(async function() {
   Services.prefs.setBoolPref("devtools.command-button-frames.enabled", true);
 
   await addTab(URL);
   let target = TargetFactory.forTab(gBrowser.selectedTab);
   let toolbox = await gDevTools.showToolbox(target, null,
     Toolbox.HostType.BOTTOM);
 
   let onTitleChanged = waitForTitleChange(toolbox);
--- a/devtools/client/framework/test/browser_toolbox_zoom.js
+++ b/devtools/client/framework/test/browser_toolbox_zoom.js
@@ -53,15 +53,15 @@ function sendZoomKey(shortcut, times) {
 
 function getCurrentZoom() {
   let windowUtils = toolbox.win.QueryInterface(Ci.nsIInterfaceRequestor)
     .getInterface(Ci.nsIDOMWindowUtils);
   return windowUtils.fullZoom;
 }
 
 function tidyUp() {
-  toolbox.destroy().then(function () {
+  toolbox.destroy().then(function() {
     gBrowser.removeCurrentTab();
 
     toolbox = null;
     finish();
   });
 }
--- a/devtools/client/framework/test/browser_two_tabs.js
+++ b/devtools/client/framework/test/browser_two_tabs.js
@@ -97,33 +97,32 @@ function checkGetTabFailures() {
     .then(
       response => ok(false, "getTab unexpectedly succeed with a wrong outerWindowID"),
       response => {
         is(response.error, "noTab");
         is(response.message, "Unable to find tab with outerWindowID '-999'");
       }
     )
     .then(checkSelectedTabActor);
-
 }
 
 function checkSelectedTabActor() {
   // Send a naive request to the second tab actor
   // to check if it works
   gClient.request({ to: gTabActor2.consoleActor, type: "startListeners", listeners: [] }, aResponse => {
     ok("startedListeners" in aResponse, "Actor from the selected tab should respond to the request.");
 
     closeSecondTab();
   });
 }
 
 function closeSecondTab() {
   // Close the second tab, currently selected
   let container = gBrowser.tabContainer;
-  container.addEventListener("TabClose", function () {
+  container.addEventListener("TabClose", function() {
     checkFirstTabActor();
   }, {once: true});
   gBrowser.removeTab(gTab2);
 }
 
 function checkFirstTabActor() {
   // then send a request to the first tab actor
   // to check if it still works
@@ -131,13 +130,13 @@ function checkFirstTabActor() {
     ok("startedListeners" in aResponse, "Actor from the first tab should still respond.");
 
     cleanup();
   });
 }
 
 function cleanup() {
   let container = gBrowser.tabContainer;
-  container.addEventListener("TabClose", function () {
+  container.addEventListener("TabClose", function() {
     gClient.close().then(finish);
   }, {once: true});
   gBrowser.removeTab(gTab1);
 }
--- a/devtools/client/framework/test/head.js
+++ b/devtools/client/framework/test/head.js
@@ -18,18 +18,17 @@ function toggleAllTools(state) {
     if (state) {
       Services.prefs.setBoolPref(tool.visibilityswitch, true);
     } else {
       Services.prefs.clearUserPref(tool.visibilityswitch);
     }
   }
 }
 
-function getChromeActors(callback)
-{
+function getChromeActors(callback) {
   let { DebuggerServer } = require("devtools/server/main");
   let { DebuggerClient } = require("devtools/shared/client/debugger-client");
 
   DebuggerServer.init();
   DebuggerServer.registerAllActors();
   DebuggerServer.allowChromeProcess = true;
 
   let client = new DebuggerClient(DebuggerServer.connectPipe());
@@ -57,17 +56,17 @@ function getSourceActor(aSources, aURL) 
  */
 async function openScratchpadWindow() {
   let { promise: p, resolve } = defer();
   let win = ScratchpadManager.openScratchpad();
 
   await once(win, "load");
 
   win.Scratchpad.addObserver({
-    onReady: function () {
+    onReady: function() {
       win.Scratchpad.removeObserver(this);
       resolve(win);
     }
   });
   return p;
 }
 
 /**
@@ -104,19 +103,18 @@ function waitForContentMessage(name) {
  */
 function executeInContent(name, data = {}, objects = {}, expectResponse = true) {
   info("Sending message " + name + " to content");
   let mm = gBrowser.selectedBrowser.messageManager;
 
   mm.sendAsyncMessage(name, data, objects);
   if (expectResponse) {
     return waitForContentMessage(name);
-  } else {
-    return promise.resolve();
   }
+  return promise.resolve();
 }
 
 /**
  * Synthesize a keypress from a <key> element, taking into account
  * any modifiers.
  * @param {Element} el the <key> element to synthesize
  */
 function synthesizeKeyElement(el) {
@@ -202,17 +200,17 @@ function waitForSourceLoad(toolbox, url)
 function DevToolPanel(iframeWindow, toolbox) {
   EventEmitter.decorate(this);
 
   this._toolbox = toolbox;
   this._window = iframeWindow;
 }
 
 DevToolPanel.prototype = {
-  open: function () {
+  open: function() {
     let deferred = defer();
 
     executeSoon(() => {
       this._isReady = true;
       this.emit("ready");
       deferred.resolve(this);
     });
 
@@ -232,17 +230,17 @@ DevToolPanel.prototype = {
   },
 
   get isReady() {
     return this._isReady;
   },
 
   _isReady: false,
 
-  destroy: function () {
+  destroy: function() {
     return defer(null);
   },
 };
 
 /**
  * Create a simple devtools test panel that implements the minimum API needed to be
  * registered and opened in the toolbox.
  */
--- a/devtools/client/framework/test/helper_disable_cache.js
+++ b/devtools/client/framework/test/helper_disable_cache.js
@@ -45,25 +45,25 @@ async function checkCacheStateForAllTabs
   }
 }
 
 async function checkCacheEnabled(tabX, expected) {
   gBrowser.selectedTab = tabX.tab;
 
   await reloadTab(tabX);
 
-  let oldGuid = await ContentTask.spawn(gBrowser.selectedBrowser, {}, function () {
+  let oldGuid = await ContentTask.spawn(gBrowser.selectedBrowser, {}, function() {
     let doc = content.document;
     let h1 = doc.querySelector("h1");
     return h1.textContent;
   });
 
   await reloadTab(tabX);
 
-  let guid = await ContentTask.spawn(gBrowser.selectedBrowser, {}, function () {
+  let guid = await ContentTask.spawn(gBrowser.selectedBrowser, {}, function() {
     let doc = content.document;
     let h1 = doc.querySelector("h1");
     return h1.textContent;
   });
 
   if (expected) {
     is(guid, oldGuid, tabX.title + " cache is enabled");
   } else {
@@ -86,17 +86,17 @@ async function setDisableCacheCheckboxCh
     await waitForTick();
   }
 }
 
 function reloadTab(tabX) {
   let def = defer();
   let browser = gBrowser.selectedBrowser;
 
-  BrowserTestUtils.browserLoaded(browser).then(function () {
+  BrowserTestUtils.browserLoaded(browser).then(function() {
     info("Reloaded tab " + tabX.title);
     def.resolve();
   });
 
   info("Reloading tab " + tabX.title);
   let mm = loadFrameScriptUtils();
   mm.sendAsyncMessage("devtools:test:reload");
 
--- a/devtools/client/framework/test/test_browser_toolbox_debugger.js
+++ b/devtools/client/framework/test/test_browser_toolbox_debugger.js
@@ -1,15 +1,15 @@
 /* global toolbox */
 
 info(`START: ${new Error().lineNumber}`);
 
-(async function () {
-  Services.prefs.clearUserPref("devtools.debugger.tabs")
-  Services.prefs.clearUserPref("devtools.debugger.pending-selected-location")
+(async function() {
+  Services.prefs.clearUserPref("devtools.debugger.tabs");
+  Services.prefs.clearUserPref("devtools.debugger.pending-selected-location");
 
   info("Waiting for debugger load");
   await toolbox.selectTool("jsdebugger");
   let dbg = createDebuggerContext(toolbox);
   let window = dbg.win;
   let document = window.document;
 
   await waitForSources(dbg, testUrl);