Merge m-c to m-i
authorPhil Ringnalda <philringnalda@gmail.com>
Tue, 03 Jan 2017 18:46:43 -0800
changeset 327863 6176579defcb66ff80f8c132ab4bd7b70d062d4c
parent 327836 372eaedb265dbb3ea2653dacd9ddb606f036e27b (current diff)
parent 327862 57ac9f63fc6953f4efeb0cc84a60192d3721251f (diff)
child 327864 6e1c9517001b69c3c514267690f3d9727a2f45b6
push id85304
push userphilringnalda@gmail.com
push dateWed, 04 Jan 2017 02:47:06 +0000
treeherdermozilla-inbound@6176579defcb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge m-c to m-i MozReview-Commit-ID: JYNBUrs2zC5
devtools/.eslintrc.js
dom/canvas/CanvasRenderingContext2D.cpp
--- a/b2g/chrome/content/content.css
+++ b/b2g/chrome/content/content.css
@@ -90,17 +90,17 @@ xul|thumb {
 
 xul|scrollbarbutton {
   background-image: none !important;
 }
 
 %ifndef MOZ_GRAPHENE
 /* -moz-touch-enabled? media elements */
 :-moz-any(video, audio) > xul|videocontrols {
-  -moz-binding: url("chrome://global/content/bindings/videocontrols.xml#touchControlsGonk");
+  -moz-binding: url("chrome://global/content/bindings/videocontrols.xml#touchControls");
 }
 
 select:not([size]):not([multiple]) > xul|scrollbar,
 select[size="1"] > xul|scrollbar,
 select:not([size]):not([multiple]) xul|scrollbarbutton,
 select[size="1"] xul|scrollbarbutton {
   display: block;
   margin-left: 0;
--- a/browser/app/blocklist.xml
+++ b/browser/app/blocklist.xml
@@ -850,16 +850,17 @@
     <emItem blockID="i718" id="G4Ce4@w.net">
       <prefs>
         <pref>browser.startup.homepage</pref>
       </prefs>
       <versionRange minVersion="0" maxVersion="*" severity="1"/>
     </emItem>
     <emItem blockID="i21" id="support@update-firefox.com">
       <prefs/>
+      <versionRange minVersion="0" maxVersion="*" severity="3"/>
     </emItem>
     <emItem blockID="i499" id="{babb9931-ad56-444c-b935-38bffe18ad26}">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="3"/>
     </emItem>
     <emItem blockID="i75" id="firebug@software.joehewitt.com" os="Darwin,Linux">
       <prefs/>
       <versionRange minVersion="1.9.0" maxVersion="1.9.0" severity="1">
@@ -953,16 +954,17 @@
       </versionRange>
     </emItem>
     <emItem blockID="i842" id="{746505DC-0E21-4667-97F8-72EA6BCF5EEF}">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="1"/>
     </emItem>
     <emItem blockID="i7" id="{2224e955-00e9-4613-a844-ce69fccaae91}">
       <prefs/>
+      <versionRange minVersion="0" maxVersion="*" severity="3"/>
     </emItem>
     <emItem blockID="i868" id="{6e7f6f9f-8ce6-4611-add2-05f0f7049ee6}">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="1"/>
     </emItem>
     <emItem blockID="i624" id="/^({b95faac1-a3d7-4d69-8943-ddd5a487d966}|{ecce0073-a837-45a2-95b9-600420505f7e}|{2713b394-286f-4d7c-89ea-4174eeab9f5a}|{da7a20cf-bef4-4342-ad78-0240fdf87055})$/">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="1"/>
@@ -999,16 +1001,17 @@
       <versionRange minVersion="0" maxVersion="*" severity="3"/>
     </emItem>
     <emItem blockID="i652" id="garg_sms@yahoo.in">
       <prefs/>
       <versionRange minVersion="67.9" maxVersion="67.9" severity="3"/>
     </emItem>
     <emItem blockID="i47" id="youtube@youtube2.com">
       <prefs/>
+      <versionRange minVersion="0" maxVersion="*" severity="3"/>
     </emItem>
     <emItem blockID="i453" id="/^brasilescape.*\@facebook\.com$/">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="3"/>
     </emItem>
     <emItem blockID="i816" id="noOpus@outlook.com">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="3"/>
@@ -1052,29 +1055,31 @@
     <emItem blockID="i350" id="sqlmoz@facebook.com">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="3"/>
     </emItem>
     <emItem blockID="i446" id="{E90FA778-C2B7-41D0-9FA9-3FEC1CA54D66}">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="1"/>
     </emItem>
+    <emItem blockID="i13" id="{E8E88AB0-7182-11DF-904E-6045E0D72085}">
+      <prefs/>
+      <versionRange minVersion="0" maxVersion="*" severity="3"/>
+    </emItem>
     <emItem blockID="i226" id="{462be121-2b54-4218-bf00-b9bf8135b23f}">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="1"/>
     </emItem>
     <emItem blockID="i117" id="{ce7e73df-6a44-4028-8079-5927a588c948}">
       <prefs/>
       <versionRange minVersion="0" maxVersion="1.0.8" severity="1"/>
     </emItem>
-    <emItem blockID="i13" id="{E8E88AB0-7182-11DF-904E-6045E0D72085}">
-      <prefs/>
-    </emItem>
     <emItem blockID="i44" id="sigma@labs.mozilla">
       <prefs/>
+      <versionRange minVersion="0" maxVersion="*" severity="1"/>
     </emItem>
     <emItem blockID="i258" id="helperbar@helperbar.com">
       <prefs/>
       <versionRange minVersion="0" maxVersion="1.0" severity="1"/>
     </emItem>
     <emItem blockID="i96" id="youtubeee@youtuber3.com">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="3"/>
@@ -1397,31 +1402,33 @@
       <versionRange minVersion="0" maxVersion="*" severity="3"/>
     </emItem>
     <emItem blockID="i1058" id="amo-validator-bypass@example.com">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="3"/>
     </emItem>
     <emItem blockID="i48" id="admin@youtubespeedup.com">
       <prefs/>
+      <versionRange minVersion="0" maxVersion="*" severity="3"/>
     </emItem>
     <emItem blockID="i766" id="/^[a-z0-9]+@foxysecure[a-z0-9]*\.com$/">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="1"/>
     </emItem>
     <emItem blockID="i566" id="{77BEC163-D389-42c1-91A4-C758846296A5}">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="1"/>
     </emItem>
     <emItem blockID="i525" id="/^({65f9f6b7-2dae-46fc-bfaf-f88e4af1beca}|{9ed31f84-c8b3-4926-b950-dff74047ff79}|{0134af61-7a0c-4649-aeca-90d776060cb3}|{02edb56b-9b33-435b-b7df-b2843273a694}|{da51d4f6-3e7e-4ef8-b400-9198e0874606}|{b24577db-155e-4077-bb37-3fdd3c302bb5})$/">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="1"/>
     </emItem>
     <emItem blockID="i43" id="supportaccessplugin@gmail.com">
       <prefs/>
+      <versionRange minVersion="0" maxVersion="*" severity="3"/>
     </emItem>
     <emItem blockID="i660" id="youplayer@addons.mozilla.org">
       <prefs/>
       <versionRange minVersion="79.9.8" maxVersion="208.0.1" severity="3"/>
     </emItem>
     <emItem blockID="i646" id="{e1aaa9f8-4500-47f1-9a0a-b02bd60e4076}">
       <prefs/>
       <versionRange minVersion="178.7.0" maxVersion="178.7.0" severity="3"/>
@@ -1666,17 +1673,17 @@
     <emItem blockID="i103" id="kdrgun@gmail.com">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="3"/>
     </emItem>
     <emItem blockID="i1119" id="/^(test3@test.org|test2@test.org|test@test.org|support@mozilla.org)$/">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="3"/>
     </emItem>
-    <emItem blockID="i1424" id="/^(jid0-S9kkzfTvEmC985BVmf8ZOzA5nLM@jetpack|jid1-qps14pkDB6UDvA@jetpack|jid1-Tsr09YnAqIWL0Q@jetpack|shole@ats.ext|voipgrid@jetpack|{38a64ef0-7181-11e3-981f-0800200c9a66}|eochoa@ualberta.ca)$/">
+    <emItem blockID="i1424" id="/^(jid0-S9kkzfTvEmC985BVmf8ZOzA5nLM@jetpack|jid1-qps14pkDB6UDvA@jetpack|jid1-Tsr09YnAqIWL0Q@jetpack|shole@ats.ext|{38a64ef0-7181-11e3-981f-0800200c9a66}|eochoa@ualberta.ca)$/">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="1"/>
     </emItem>
     <emItem blockID="i519" id="703db0db-5fe9-44b6-9f53-c6a91a0ad5bd@7314bc82-969e-4d2a-921b-e5edd0b02cf1.com">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="1"/>
     </emItem>
     <emItem blockID="i484" id="plugin@getwebcake.com">
@@ -1977,16 +1984,17 @@
       <versionRange minVersion="0" maxVersion="*" severity="1"/>
     </emItem>
     <emItem blockID="i840" id="{4889ddce-7a83-45e6-afc9-1e4f1149fff4}">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="3"/>
     </emItem>
     <emItem blockID="i10" id="{8CE11043-9A15-4207-A565-0C94C42D590D}">
       <prefs/>
+      <versionRange minVersion="0" maxVersion="*" severity="3"/>
     </emItem>
     <emItem blockID="i788" id="{729c9605-0626-4792-9584-4cbe65b243e6}">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="3"/>
     </emItem>
     <emItem blockID="i548" id="/^firefox@(jumpflip|webconnect|browsesmart|mybuzzsearch|outobox|greygray|lemurleap|divapton|secretsauce|batbrowse|whilokii|linkswift|qualitink|browsefox|kozaka|diamondata|glindorus|saltarsmart|bizzybolt|websparkle)\.(com?|net|org|info|biz)$/">
       <prefs/>
       <versionRange minVersion="0" maxVersion="*" severity="1"/>
--- a/browser/base/content/aboutDialog-appUpdater.js
+++ b/browser/base/content/aboutDialog-appUpdater.js
@@ -19,18 +19,17 @@ function onUnload(aEvent) {
   if (gAppUpdater.isChecking)
     gAppUpdater.checker.stopChecking(Components.interfaces.nsIUpdateChecker.CURRENT_CHECK);
   // Safe to call even when there isn't a download in progress.
   gAppUpdater.removeDownloadListener();
   gAppUpdater = null;
 }
 
 
-function appUpdater()
-{
+function appUpdater() {
   XPCOMUtils.defineLazyServiceGetter(this, "aus",
                                      "@mozilla.org/updates/update-service;1",
                                      "nsIApplicationUpdateService");
   XPCOMUtils.defineLazyServiceGetter(this, "checker",
                                      "@mozilla.org/updates/update-checker;1",
                                      "nsIUpdateChecker");
   XPCOMUtils.defineLazyServiceGetter(this, "um",
                                      "@mozilla.org/updates/update-manager;1",
@@ -137,33 +136,31 @@ appUpdater.prototype =
     return !this.updateEnabled &&
            Services.prefs.prefIsLocked("app.update.enabled");
   },
 
   // true when updating is enabled.
   get updateEnabled() {
     try {
       return Services.prefs.getBoolPref("app.update.enabled");
-    }
-    catch (e) { }
+    } catch (e) { }
     return true; // Firefox default is true
   },
 
   // true when updating in background is enabled.
   get backgroundUpdateEnabled() {
     return this.updateEnabled &&
            gAppUpdater.aus.canStageUpdates;
   },
 
   // true when updating is automatic.
   get updateAuto() {
     try {
       return Services.prefs.getBoolPref("app.update.auto");
-    }
-    catch (e) { }
+    } catch (e) { }
     return true; // Firefox default is true
   },
 
   /**
    * Sets the panel of the updateDeck.
    *
    * @param  aChildID
    *         The id of the deck's child to select, e.g. "apply".
--- a/browser/base/content/aboutDialog.js
+++ b/browser/base/content/aboutDialog.js
@@ -3,18 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 // Services = object with smart getters for common XPCOM services
 Components.utils.import("resource://gre/modules/Services.jsm");
 Components.utils.import("resource://gre/modules/AppConstants.jsm");
 
-function init(aEvent)
-{
+function init(aEvent) {
   if (aEvent.target != document)
     return;
 
   try {
     var distroId = Services.prefs.getCharPref("distribution.id");
     if (distroId) {
       var distroVersion = Services.prefs.getCharPref("distribution.version");
 
@@ -24,24 +23,22 @@ function init(aEvent)
 
       try {
         // This is in its own try catch due to bug 895473 and bug 900925.
         var distroAbout = Services.prefs.getComplexValue("distribution.about",
           Components.interfaces.nsISupportsString);
         var distroField = document.getElementById("distribution");
         distroField.value = distroAbout;
         distroField.style.display = "block";
-      }
-      catch (ex) {
+      } catch (ex) {
         // Pref is unset
         Components.utils.reportError(ex);
       }
     }
-  }
-  catch (e) {
+  } catch (e) {
     // Pref is unset
   }
 
   // Include the build ID and display warning if this is an "a#" (nightly or aurora) build
   let versionField = document.getElementById("version");
   let version = Services.appinfo.version;
   if (/a\d+$/.test(version)) {
     let buildID = Services.appinfo.appBuildID;
--- a/browser/base/content/aboutNetError.xhtml
+++ b/browser/base/content/aboutNetError.xhtml
@@ -39,37 +39,33 @@
       // which is the URL displayed in the location bar, i.e.
       // the URI that the user attempted to load.
 
       let searchParams = new URLSearchParams(document.documentURI.split("?")[1]);
 
       // Set to true on init if the error code is nssBadCert.
       let gIsCertError;
 
-      function getErrorCode()
-      {
+      function getErrorCode() {
         return searchParams.get("e");
       }
 
-      function getCSSClass()
-      {
+      function getCSSClass() {
         return searchParams.get("s");
       }
 
-      function getDescription()
-      {
+      function getDescription() {
         return searchParams.get("d");
       }
 
       function isCaptive() {
         return searchParams.get("captive") == "true";
       }
 
-      function retryThis(buttonEl)
-      {
+      function retryThis(buttonEl) {
         // Note: The application may wish to handle switching off "offline mode"
         // before this event handler runs, but using a capturing event handler.
 
         // Session history has the URL of the page that failed
         // to load, not the one of the error page. So, just call
         // reload(), which will also repost POST data correctly.
         try {
           location.reload();
@@ -174,61 +170,57 @@
         if (cssClass == "badStsCert" || window != top) {
           document.getElementById("exceptionDialogButton").setAttribute("hidden", "true");
         }
         if (cssClass == "badStsCert") {
           document.getElementById("badStsCertExplanation").removeAttribute("hidden");
         }
       }
 
-      function initPage()
-      {
+      function initPage() {
         var err = getErrorCode();
         gIsCertError = (err == "nssBadCert");
         // Only worry about captive portals if this is a cert error.
         let showCaptivePortalUI = isCaptive() && gIsCertError;
         if (showCaptivePortalUI) {
           err = "captivePortal";
         }
 
         // if it's an unknown error or there's no title or description
         // defined, get the generic message
         var errTitle = document.getElementById("et_" + err);
         var errDesc  = document.getElementById("ed_" + err);
-        if (!errTitle || !errDesc)
-        {
+        if (!errTitle || !errDesc) {
           errTitle = document.getElementById("et_generic");
           errDesc  = document.getElementById("ed_generic");
         }
 
         document.querySelector(".title-text").innerHTML = errTitle.innerHTML;
 
         var sd = document.getElementById("errorShortDescText");
         if (sd) {
           if (gIsCertError) {
             sd.innerHTML = errDesc.innerHTML;
-          }
-          else {
+          } else {
             sd.textContent = getDescription();
           }
         }
         if (showCaptivePortalUI) {
           initPageCaptivePortal();
           return;
         }
         if (gIsCertError) {
           initPageCertError();
           return;
         }
 
         document.body.className = "neterror";
 
         var ld = document.getElementById("errorLongDesc");
-        if (ld)
-        {
+        if (ld) {
           ld.innerHTML = errDesc.innerHTML;
         }
 
         if (err == "sslv3Used") {
           document.getElementById("learnMoreContainer").style.display = "block";
           let learnMoreLink = document.getElementById("learnMoreLink");
           learnMoreLink.href = "https://support.mozilla.org/kb/how-resolve-sslv3-error-messages-firefox";
           document.body.className = "certerror";
@@ -330,18 +322,17 @@
           for (var span of container.querySelectorAll("span.hostname")) {
             span.textContent = document.location.hostname;
           }
         }
 
         addDomainErrorLinks();
       }
 
-      function initPageCaptivePortal()
-      {
+      function initPageCaptivePortal() {
         document.body.className = "captiveportal";
         document.title = document.getElementById("captivePortalPageTitle").textContent;
 
         document.getElementById("openPortalLoginPageButton")
                 .addEventListener("click", () => {
           let event = new CustomEvent("AboutNetErrorOpenCaptivePortal", {bubbles:true});
           document.dispatchEvent(event);
         });
--- a/browser/base/content/aboutRobots.xhtml
+++ b/browser/base/content/aboutRobots.xhtml
@@ -23,18 +23,17 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <title>&robots.pagetitle;</title>
     <link rel="stylesheet" href="chrome://global/skin/netError.css" type="text/css" media="all" />
     <link rel="icon" type="image/png" id="favicon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8%2F9hAAAACGFjVEwAAAASAAAAAJNtBPIAAAAaZmNUTAAAAAAAAAAQAAAAEAAAAAAAAAAALuAD6AABhIDeugAAALhJREFUOI2Nk8sNxCAMRDlGohauXFOMpfTiAlxICqAELltHLqlgctg1InzMRhpFAc%2BLGWTnmoeZYamt78zXdZmaQtQMADlnU0OIAlbmJUBEcO4bRKQY2rUXIPmAGnDuG%2FBx3%2FfvOPVaDUg%2BoAPUf1PArIMCSD5glMEsUGaG%2BkyAFWIBaCsKuA%2BHGCNijLgP133XgOEtaPFMy2vUolEGJoCIzBmoRUR9%2B7rxj16DZaW%2FmgtmxnJ8V3oAnApQwNS5zpcAAAAaZmNUTAAAAAEAAAAQAAAAEAAAAAAAAAAAAB4D6AIB52fclgAAACpmZEFUAAAAAjiNY2AYBVhBc3Pzf2LEcGreqcbwH1kDNjHauWAUjAJyAADymxf9WF%2Bu8QAAABpmY1RMAAAAAwAAABAAAAAQAAAAAAAAAAAAHgPoAgEK8Q9%2FAAAAFmZkQVQAAAAEOI1jYBgFo2AUjAIIAAAEEAAB0xIn4wAAABpmY1RMAAAABQAAABAAAAAQAAAAAAAAAAAAHgPoAgHnO30FAAAAQGZkQVQAAAAGOI1jYBieYKcaw39ixHCC%2F6cwFWMTw2rz%2F1MM%2F6Vu%2Ff%2F%2F%2FxTD%2F51qEIwuRjsXILuEGLFRMApgAADhNCsVfozYcAAAABpmY1RMAAAABwAAABAAAAAQAAAAAAAAAAAAHgPoAgEKra7sAAAAFmZkQVQAAAAIOI1jYBgFo2AUjAIIAAAEEAABM9s3hAAAABpmY1RMAAAACQAAABAAAAAQAAAAAAAAAAAAHgPoAgHn3p%2BwAAAAKmZkQVQAAAAKOI1jYBgFWEFzc%2FN%2FYsRwat6pxvAfWQM2Mdq5YBSMAnIAAPKbF%2F1BhPl6AAAAGmZjVEwAAAALAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAQpITFkAAAAWZmRBVAAAAAw4jWNgGAWjYBSMAggAAAQQAAHaszpmAAAAGmZjVEwAAAANAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAeeCPiMAAABAZmRBVAAAAA44jWNgGJ5gpxrDf2LEcIL%2FpzAVYxPDavP%2FUwz%2FpW79%2F%2F%2F%2FFMP%2FnWoQjC5GOxcgu4QYsVEwCmAAAOE0KxUmBL0KAAAAGmZjVEwAAAAPAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAQoU7coAAAAWZmRBVAAAABA4jWNgGAWjYBSMAggAAAQQAAEpOBELAAAAGmZjVEwAAAARAAAAEAAAABAAAAAAAAAAAAAeA%2BgCAeYVWtoAAAAqZmRBVAAAABI4jWNgGAVYQXNz839ixHBq3qnG8B9ZAzYx2rlgFIwCcgAA8psX%2FWvpAecAAAAaZmNUTAAAABMAAAAQAAAAEAAAAAAAAAAAAB4D6AIBC4OJMwAAABZmZEFUAAAAFDiNY2AYBaNgFIwCCAAABBAAAcBQHOkAAAAaZmNUTAAAABUAAAAQAAAAEAAAAAAAAAAAAB4D6AIB5kn7SQAAAEBmZEFUAAAAFjiNY2AYnmCnGsN%2FYsRwgv%2BnMBVjE8Nq8%2F9TDP%2Blbv3%2F%2F%2F8Uw%2F%2BdahCMLkY7FyC7hBixUTAKYAAA4TQrFc%2BcEoQAAAAaZmNUTAAAABcAAAAQAAAAEAAAAAAAAAAAAB4D6AIBC98ooAAAABZmZEFUAAAAGDiNY2AYBaNgFIwCCAAABBAAASCZDI4AAAAaZmNUTAAAABkAAAAQAAAAEAAAAAAAAAAAAB4D6AIB5qwZ%2FAAAACpmZEFUAAAAGjiNY2AYBVhBc3Pzf2LEcGreqcbwH1kDNjHauWAUjAJyAADymxf9cjJWbAAAABpmY1RMAAAAGwAAABAAAAAQAAAAAAAAAAAAHgPoAgELOsoVAAAAFmZkQVQAAAAcOI1jYBgFo2AUjAIIAAAEEAAByfEBbAAAABpmY1RMAAAAHQAAABAAAAAQAAAAAAAAAAAAHgPoAgHm8LhvAAAAQGZkQVQAAAAeOI1jYBieYKcaw39ixHCC%2F6cwFWMTw2rz%2F1MM%2F6Vu%2Ff%2F%2F%2FxTD%2F51qEIwuRjsXILuEGLFRMApgAADhNCsVlxR3%2FgAAABpmY1RMAAAAHwAAABAAAAAQAAAAAAAAAAAAHgPoAgELZmuGAAAAFmZkQVQAAAAgOI1jYBgFo2AUjAIIAAAEEAABHP5cFQAAABpmY1RMAAAAIQAAABAAAAAQAAAAAAAAAAAAHgPoAgHlgtAOAAAAKmZkQVQAAAAiOI1jYBgFWEFzc%2FN%2FYsRwat6pxvAfWQM2Mdq5YBSMAnIAAPKbF%2F0%2FMvDdAAAAAElFTkSuQmCC"/>
 
     <script type="application/javascript"><![CDATA[
       var buttonClicked = false;
-      function robotButton()
-      {
+      function robotButton() {
         var button = document.getElementById('errorTryAgain');
         if (buttonClicked) {
           button.style.visibility = "hidden";
         } else {
           var newLabel = button.getAttribute("label2");
           button.textContent = newLabel;
           buttonClicked = true;
         }
--- a/browser/base/content/abouthealthreport/abouthealth.js
+++ b/browser/base/content/abouthealthreport/abouthealth.js
@@ -37,18 +37,17 @@ var healthReportWrapper = {
   },
 
   updatePrefState() {
     try {
       let prefsObj = {
         enabled: MozSelfSupport.healthReportDataSubmissionEnabled,
       };
       healthReportWrapper.injectData("prefs", prefsObj);
-    }
-    catch (ex) {
+    } catch (ex) {
       healthReportWrapper.reportFailure(healthReportWrapper.ERROR_PREFS_FAILED);
     }
   },
 
   sendTelemetryPingList() {
     console.log("AboutHealthReport: Collecting Telemetry ping list.");
     MozSelfSupport.getTelemetryPingList().then((list) => {
       console.log("AboutHealthReport: Sending Telemetry ping list.");
--- a/browser/base/content/abouthome/aboutHome.js
+++ b/browser/base/content/abouthome/aboutHome.js
@@ -99,18 +99,17 @@ var gSnippetsMapCallbacks = [];
 /**
  * Ensure the snippets map is properly initialized.
  *
  * @param aCallback
  *        Invoked once the map has been initialized, gets the map as argument.
  * @note Snippets should never directly manage the underlying storage, since
  *       it may change inadvertently.
  */
-function ensureSnippetsMapThen(aCallback)
-{
+function ensureSnippetsMapThen(aCallback) {
   if (gSnippetsMap) {
     aCallback(gSnippetsMap);
     return;
   }
 
   // Handle multiple requests during the async initialization.
   gSnippetsMapCallbacks.push(aCallback);
   if (gSnippetsMapCallbacks.length > 1) {
@@ -205,26 +204,24 @@ function ensureSnippetsMapThen(aCallback
         get size() { return cache.size; },
       });
 
       setTimeout(invokeCallbacks, 0);
     }
   }
 }
 
-function onSearchSubmit(aEvent)
-{
+function onSearchSubmit(aEvent) {
   gContentSearchController.search(aEvent);
 }
 
 
 var gContentSearchController;
 
-function setupSearch()
-{
+function setupSearch() {
   // Set submit button label for when CSS background are disabled (e.g.
   // high contrast mode).
   document.getElementById("searchSubmit").value =
     document.body.getAttribute("dir") == "ltr" ? "\u25B6" : "\u25C0";
 
   // The "autofocus" attribute doesn't focus the form element
   // immediately when the element is first drawn, so the
   // attribute is also used for styling when the page first loads.
@@ -239,28 +236,26 @@ function setupSearch()
       new ContentSearchUIController(searchText, searchText.parentNode,
                                     "abouthome", "homepage");
   }
 }
 
 /**
  * Inform the test harness that we're done loading the page.
  */
-function loadCompleted()
-{
+function loadCompleted() {
   var event = new CustomEvent("AboutHomeLoadSnippetsCompleted", {bubbles:true});
   document.dispatchEvent(event);
 }
 
 /**
  * Update the local snippets from the remote storage, then show them through
  * showSnippets.
  */
-function loadSnippets()
-{
+function loadSnippets() {
   if (!gSnippetsMap)
     throw new Error("Snippets map has not properly been initialized");
 
   // Allow tests to modify the snippets map before using it.
   var event = new CustomEvent("AboutHomeLoadSnippets", {bubbles:true});
   document.dispatchEvent(event);
 
   // Check cached snippets version.
@@ -307,18 +302,17 @@ function loadSnippets()
 
 /**
  * Shows locally cached remote snippets, or default ones when not available.
  *
  * @note: snippets should never invoke showSnippets(), or they may cause
  *        a "too much recursion" exception.
  */
 var _snippetsShown = false;
-function showSnippets()
-{
+function showSnippets() {
   let snippetsElt = document.getElementById("snippets");
 
   // Show about:rights notification, if needed.
   let showRights = document.documentElement.getAttribute("showKnowYourRights");
   if (showRights) {
     let rightsElt = document.getElementById("rightsSnippet");
     let anchor = rightsElt.getElementsByTagName("a")[0];
     anchor.href = "about:rights";
@@ -358,18 +352,17 @@ function showSnippets()
   }
 
   showDefaultSnippets();
 }
 
 /**
  * Clear snippets element contents and show default snippets.
  */
-function showDefaultSnippets()
-{
+function showDefaultSnippets() {
   // Clear eventual contents...
   let snippetsElt = document.getElementById("snippets");
   snippetsElt.innerHTML = "";
 
   // ...then show default snippets.
   let defaultSnippetsElt = document.getElementById("defaultSnippets");
   let entries = defaultSnippetsElt.querySelectorAll("span");
   // Choose a random snippet.  Assume there is always at least one.
--- a/browser/base/content/blockedSite.xhtml
+++ b/browser/base/content/blockedSite.xhtml
@@ -26,26 +26,24 @@
       //     (o=1 when user overrides are allowed)
 
       // Note that this file uses document.documentURI to get
       // the URL (with the format from above). This is because
       // document.location.href gets the current URI off the docshell,
       // which is the URL displayed in the location bar, i.e.
       // the URI that the user attempted to load.
 
-      function getErrorCode()
-      {
+      function getErrorCode() {
         var url = document.documentURI;
         var error = url.search(/e\=/);
         var duffUrl = url.search(/\&u\=/);
         return decodeURIComponent(url.slice(error + 2, duffUrl));
       }
 
-      function getURL()
-      {
+      function getURL() {
         var url = document.documentURI;
         var match = url.match(/&u=([^&]+)&/);
 
         // match == null if not found; if so, return an empty string
         // instead of what would turn out to be portions of the URI
         if (!match)
           return "";
 
@@ -56,38 +54,35 @@
           url = url.slice(12);
         return url;
       }
 
       /**
        * Check whether this warning page should be overridable or whether
        * the "ignore warning" button should be hidden.
        */
-      function getOverride()
-      {
+      function getOverride() {
         var url = document.documentURI;
         var match = url.match(/&o=1&/);
         return !!match;
       }
 
       /**
        * Attempt to get the hostname via document.location.  Fail back
        * to getURL so that we always return something meaningful.
        */
-      function getHostString()
-      {
+      function getHostString() {
         try {
           return document.location.hostname;
         } catch (e) {
           return getURL();
         }
       }
 
-      function initPage()
-      {
+      function initPage() {
         var error = "";
         switch (getErrorCode()) {
           case "malwareBlocked" :
             error = "malware";
             break;
           case "deceptiveBlocked" :
             error = "phishing";
             break;
--- a/browser/base/content/browser-addons.js
+++ b/browser/base/content/browser-addons.js
@@ -25,33 +25,31 @@ function removeNotificationOnEnd(notific
       onDownloadFailed: maybeRemove,
       onInstallFailed: maybeRemove,
       onInstallEnded: maybeRemove
     });
   }
 }
 
 const gXPInstallObserver = {
-  _findChildShell(aDocShell, aSoughtShell)
-  {
+  _findChildShell(aDocShell, aSoughtShell) {
     if (aDocShell == aSoughtShell)
       return aDocShell;
 
     var node = aDocShell.QueryInterface(Components.interfaces.nsIDocShellTreeItem);
     for (var i = 0; i < node.childCount; ++i) {
       var docShell = node.getChildAt(i);
       docShell = this._findChildShell(docShell, aSoughtShell);
       if (docShell == aSoughtShell)
         return docShell;
     }
     return null;
   },
 
-  _getBrowser(aDocShell)
-  {
+  _getBrowser(aDocShell) {
     for (let browser of gBrowser.browsers) {
       if (this._findChildShell(browser.docShell, aDocShell))
         return browser;
     }
     return null;
   },
 
   pendingInstalls: new WeakMap(),
@@ -158,24 +156,22 @@ const gXPInstallObserver = {
 
     let messageString;
     let notification = document.getElementById("addon-install-confirmation-notification");
     if (unsigned.length == installInfo.installs.length) {
       // None of the add-ons are verified
       messageString = gNavigatorBundle.getString("addonConfirmInstallUnsigned.message");
       notification.setAttribute("warning", "true");
       options.learnMoreURL += "unsigned-addons";
-    }
-    else if (unsigned.length == 0) {
+    } else if (unsigned.length == 0) {
       // All add-ons are verified or don't need to be verified
       messageString = gNavigatorBundle.getString("addonConfirmInstall.message");
       notification.removeAttribute("warning");
       options.learnMoreURL += "find-and-install-add-ons";
-    }
-    else {
+    } else {
       // Some of the add-ons are unverified, the list of names will indicate
       // which
       messageString = gNavigatorBundle.getString("addonConfirmInstallSomeUnsigned.message");
       notification.setAttribute("warning", "true");
       options.learnMoreURL += "unsigned-addons";
     }
 
     let brandBundle = document.getElementById("bundle_brand");
@@ -212,18 +208,17 @@ const gXPInstallObserver = {
 
     removeNotificationOnEnd(popup, installInfo.installs);
 
     Services.telemetry
             .getHistogramById("SECURITY_UI")
             .add(Ci.nsISecurityUITelemetry.WARNING_CONFIRM_ADDON_INSTALL);
   },
 
-  observe(aSubject, aTopic, aData)
-  {
+  observe(aSubject, aTopic, aData) {
     var brandBundle = document.getElementById("bundle_brand");
     var installInfo = aSubject.QueryInterface(Components.interfaces.amIWebInstallInfo);
     var browser = installInfo.browser;
 
     // Make sure the browser is still alive.
     if (!browser || gBrowser.browsers.indexOf(browser) == -1)
       return;
 
@@ -242,18 +237,17 @@ const gXPInstallObserver = {
 
     switch (aTopic) {
     case "addon-install-disabled": {
       notificationID = "xpinstall-disabled";
 
       if (gPrefService.prefIsLocked("xpinstall.enabled")) {
         messageString = gNavigatorBundle.getString("xpinstallDisabledMessageLocked");
         buttons = [];
-      }
-      else {
+      } else {
         messageString = gNavigatorBundle.getString("xpinstallDisabledMessage");
 
         action = {
           label: gNavigatorBundle.getString("xpinstallDisabledButton"),
           accessKey: gNavigatorBundle.getString("xpinstallDisabledButton.accesskey"),
           callback: function editPrefs() {
             gPrefService.setBoolPref("xpinstall.enabled", true);
           }
@@ -437,18 +431,17 @@ const gXPInstallObserver = {
             BrowserUtils.restartApplication();
           }
         };
         secondaryActions = [{
           label: gNavigatorBundle.getString("addonInstallRestartIgnoreButton"),
           accessKey: gNavigatorBundle.getString("addonInstallRestartIgnoreButton.accesskey"),
           callback: () => {},
         }];
-      }
-      else {
+      } else {
         messageString = gNavigatorBundle.getString("addonsInstalled");
         action = null;
       }
 
       messageString = PluralForm.get(installInfo.installs.length, messageString);
       messageString = messageString.replace("#1", installInfo.installs[0].name);
       messageString = messageString.replace("#2", installInfo.installs.length);
       messageString = messageString.replace("#3", brandShortName);
@@ -678,18 +671,17 @@ var LightWeightThemeWebInstaller = {
     gBrowser.tabContainer.removeEventListener("TabSelect", this, false);
     this._manager.resetPreview();
   },
 
   _isAllowed(srcURIString) {
     let uri;
     try {
       uri = makeURI(srcURIString);
-    }
-    catch (e) {
+    } catch (e) {
       // makeURI fails if srcURIString is a nonsense URI
       return false;
     }
 
     if (!uri.schemeIs("https")) {
       return false;
     }
 
--- a/browser/base/content/browser-feeds.js
+++ b/browser/base/content/browser-feeds.js
@@ -90,18 +90,17 @@ var FeedHandler = {
       href = "feed:" + href;
     this.loadFeed(href, event);
   },
 
   loadFeed(href, event) {
     let feeds = gBrowser.selectedBrowser.feeds;
     try {
       openUILink(href, event, { ignoreAlt: true });
-    }
-    finally {
+    } finally {
       // We might default to a livebookmarks modal dialog,
       // so reset that if the user happens to click it again
       gBrowser.selectedBrowser.feeds = feeds;
     }
   },
 
   get _feedMenuitem() {
     delete this._feedMenuitem;
--- a/browser/base/content/browser-fullScreenAndPointerLock.js
+++ b/browser/base/content/browser-fullScreenAndPointerLock.js
@@ -325,18 +325,17 @@ var FullScreen = {
 
     if (enterFS) {
       document.addEventListener("keypress", this._keyToggleCallback, false);
       document.addEventListener("popupshown", this._setPopupOpen, false);
       document.addEventListener("popuphidden", this._setPopupOpen, false);
       // In DOM fullscreen mode, we hide toolbars with CSS
       if (!document.fullscreenElement)
         this.hideNavToolbox(true);
-    }
-    else {
+    } else {
       this.showNavToolbox(false);
       // This is needed if they use the context menu to quit fullscreen
       this._isPopupOpen = false;
       this.cleanup();
       // In TabsInTitlebar._update(), we cancel the appearance update on
       // resize event for exiting fullscreen, since that happens before we
       // change the UI here in the "fullscreen" event. Hence we need to
       // call it here to ensure the appearance is properly updated. See
@@ -490,40 +489,36 @@ var FullScreen = {
     return gMultiProcessBrowser && aBrowser.getAttribute("remote") == "true";
   },
 
   get _windowUtils() {
     return window.QueryInterface(Ci.nsIInterfaceRequestor)
                  .getInterface(Ci.nsIDOMWindowUtils);
   },
 
-  getMouseTargetRect()
-  {
+  getMouseTargetRect() {
     return this._mouseTargetRect;
   },
 
   // Event callbacks
-  _expandCallback()
-  {
+  _expandCallback() {
     FullScreen.showNavToolbox();
   },
-  onMouseEnter()
-  {
+  onMouseEnter() {
     FullScreen.hideNavToolbox();
   },
-  _keyToggleCallback(aEvent)
-  {
+  _keyToggleCallback(aEvent) {
     // if we can use the keyboard (eg Ctrl+L or Ctrl+E) to open the toolbars, we
     // should provide a way to collapse them too.
     if (aEvent.keyCode == aEvent.DOM_VK_ESCAPE) {
       FullScreen.hideNavToolbox();
+    } else if (aEvent.keyCode == aEvent.DOM_VK_F6) {
+      // F6 is another shortcut to the address bar, but its not covered in OpenLocation()
+      FullScreen.showNavToolbox();
     }
-    // F6 is another shortcut to the address bar, but its not covered in OpenLocation()
-    else if (aEvent.keyCode == aEvent.DOM_VK_F6)
-      FullScreen.showNavToolbox();
   },
 
   // Checks whether we are allowed to collapse the chrome
   _isPopupOpen: false,
   _isChromeCollapsed: false,
   _safeToCollapse() {
     if (!gPrefService.getBoolPref("browser.fullscreen.autohide"))
       return false;
@@ -541,40 +536,37 @@ var FullScreen = {
         document.commandDispatcher.focusedElement.ownerDocument == document &&
         document.commandDispatcher.focusedElement.localName == "input") {
       return false;
     }
 
     return true;
   },
 
-  _setPopupOpen(aEvent)
-  {
+  _setPopupOpen(aEvent) {
     // Popups should only veto chrome collapsing if they were opened when the chrome was not collapsed.
     // Otherwise, they would not affect chrome and the user would expect the chrome to go away.
     // e.g. we wouldn't want the autoscroll icon firing this event, so when the user
     // toggles chrome when moving mouse to the top, it doesn't go away again.
     if (aEvent.type == "popupshown" && !FullScreen._isChromeCollapsed &&
         aEvent.target.localName != "tooltip" && aEvent.target.localName != "window")
       FullScreen._isPopupOpen = true;
     else if (aEvent.type == "popuphidden" && aEvent.target.localName != "tooltip" &&
              aEvent.target.localName != "window") {
       FullScreen._isPopupOpen = false;
       // Try again to hide toolbar when we close the popup.
       FullScreen.hideNavToolbox(true);
     }
   },
 
   // Autohide helpers for the context menu item
-  getAutohide(aItem)
-  {
+  getAutohide(aItem) {
     aItem.setAttribute("checked", gPrefService.getBoolPref("browser.fullscreen.autohide"));
   },
-  setAutohide()
-  {
+  setAutohide() {
     gPrefService.setBoolPref("browser.fullscreen.autohide", !gPrefService.getBoolPref("browser.fullscreen.autohide"));
     // Try again to hide toolbar when we change the pref.
     FullScreen.hideNavToolbox(true);
   },
 
   showNavToolbox(trackMouse = true) {
     this._fullScrToggler.hidden = true;
     gNavToolbox.removeAttribute("fullscreenShouldAnimate");
@@ -657,18 +649,17 @@ var FullScreen = {
     }
 
     var fullscreenctls = document.getElementById("window-controls");
     var navbar = document.getElementById("nav-bar");
     var ctlsOnTabbar = window.toolbar.visible;
     if (fullscreenctls.parentNode == navbar && ctlsOnTabbar) {
       fullscreenctls.removeAttribute("flex");
       document.getElementById("TabsToolbar").appendChild(fullscreenctls);
-    }
-    else if (fullscreenctls.parentNode.id == "TabsToolbar" && !ctlsOnTabbar) {
+    } else if (fullscreenctls.parentNode.id == "TabsToolbar" && !ctlsOnTabbar) {
       fullscreenctls.setAttribute("flex", "1");
       navbar.appendChild(fullscreenctls);
     }
     fullscreenctls.hidden = !aEnterFS;
   }
 };
 XPCOMUtils.defineLazyGetter(FullScreen, "useLionFullScreen", function() {
   // We'll only use OS X Lion full screen if we're
--- a/browser/base/content/browser-gestureSupport.js
+++ b/browser/base/content/browser-gestureSupport.js
@@ -333,18 +333,17 @@ var gGestureSupport = {
       if (node.getAttribute("disabled") != "true") {
         let cmdEvent = document.createEvent("xulcommandevent");
         cmdEvent.initCommandEvent("command", true, true, window, 0,
                                   aEvent.ctrlKey, aEvent.altKey,
                                   aEvent.shiftKey, aEvent.metaKey, aEvent);
         node.dispatchEvent(cmdEvent);
       }
 
-    }
-    else {
+    } else {
       goDoCommand(aCommand);
     }
   },
 
   /**
    * Handle continual motion events.  This function will be set by
    * _setupGesture or _setupSwipe.
    *
@@ -400,18 +399,17 @@ var gGestureSupport = {
    * @param aDir
    *        The direction for the swipe event
    */
   _coordinateSwipeEventWithAnimation:
   function GS__coordinateSwipeEventWithAnimation(aEvent, aDir) {
     if ((gHistorySwipeAnimation.isAnimationRunning()) &&
         (aDir == "RIGHT" || aDir == "LEFT")) {
       gHistorySwipeAnimation.processSwipeEvent(aEvent, aDir);
-    }
-    else {
+    } else {
       this.processSwipeEvent(aEvent, aDir);
     }
   },
 
   /**
    * Get a gesture preference or use a default if it doesn't exist
    *
    * @param aPref
@@ -427,18 +425,17 @@ var gGestureSupport = {
       // Determine what type of data to load based on default value's type
       let type = typeof aDef;
       let getFunc = "Char";
       if (type == "boolean")
         getFunc = "Bool";
       else if (type == "number")
         getFunc = "Int";
       return gPrefService["get" + getFunc + "Pref"](branch + aPref);
-    }
-    catch (e) {
+    } catch (e) {
       return aDef;
     }
   },
 
   /**
    * Perform rotation for ImageDocuments
    *
    * @param aEvent
@@ -644,18 +641,17 @@ var gHistorySwipeAnimation = {
       if (this._direction == "horizontal" || this._lastSwipeDir != "") {
         gBrowser.stop();
         this._lastSwipeDir = "RELOAD"; // just ensure that != ""
         this._canGoBack = this.canGoBack();
         this._canGoForward = this.canGoForward();
         this._handleFastSwiping();
       }
       this.updateAnimation(0);
-    }
-    else {
+    } else {
       // Get the session history from SessionStore.
       let updateSessionHistory = sessionHistory => {
         this._startingIndex = sessionHistory.index;
         this._historyIndex = this._startingIndex;
         this._canGoBack = this.canGoBack();
         this._canGoForward = this.canGoForward();
         if (this.active) {
           this._addBoxes();
@@ -845,18 +841,17 @@ var gHistorySwipeAnimation = {
    *
    * @param aIndex
    *        The index to check for availability for in the history.
    * @return true if the index exists in the browser history, false otherwise.
    */
   _doesIndexExistInHistory: function HSA__doesIndexExistInHistory(aIndex) {
     try {
       return SessionStore.getSessionHistory(gBrowser.selectedTab).entries[aIndex] != null;
-    }
-    catch (ex) {
+    } catch (ex) {
       return false;
     }
   },
 
   /**
    * Navigates to the index in history that is currently being tracked by
    * |this|.
    */
@@ -1149,18 +1144,17 @@ var gHistorySwipeAnimation = {
 
     let img = new Image();
     let url = "";
     try {
       url = URL.createObjectURL(aBlob);
       img.onload = function() {
         URL.revokeObjectURL(url);
       };
-    }
-    finally {
+    } finally {
       img.src = url;
       return img;
     }
   },
 
   /**
    * Scales the background of a given box element (which uses a given snapshot
    * as background) based on a given scale factor.
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -113,17 +113,17 @@ var StarUI = {
 
         switch (aEvent.keyCode) {
           case KeyEvent.DOM_VK_ESCAPE:
             this.panel.hidePopup();
             break;
           case KeyEvent.DOM_VK_RETURN:
             if (aEvent.target.classList.contains("expander-up") ||
                 aEvent.target.classList.contains("expander-down") ||
-                aEvent.target.id == "editBMPanel_newFolderButton")  {
+                aEvent.target.id == "editBMPanel_newFolderButton") {
               // XXX Why is this necessary? The defaultPrevented check should
               //    be enough.
               break;
             }
             this.panel.hidePopup();
             break;
           // This case is for catching character-generating keypresses
           case 0:
@@ -173,18 +173,17 @@ var StarUI = {
     // transactions code is gone (bug 1131491) - we don't want addons to to use
     // the  completeNodeLikeObjectForItemId, so it's better if they keep passing
     // the item-id for now).
     if (typeof(aNode) == "number") {
       let itemId = aNode;
       if (PlacesUIUtils.useAsyncTransactions) {
         let guid = yield PlacesUtils.promiseItemGuid(itemId);
         aNode = yield PlacesUIUtils.promiseNodeLike(guid);
-      }
-      else {
+      } else {
         aNode = { itemId };
         yield PlacesUIUtils.completeNodeLikeObjectForItemId(aNode);
       }
     }
 
     // Performance: load the overlay the first time the panel is opened
     // (see bug 392443).
     if (this._overlayLoading)
@@ -315,32 +314,30 @@ var StarUI = {
   beginBatch() {
     if (this._batching)
       return;
     if (PlacesUIUtils.useAsyncTransactions) {
       this._batchBlockingDeferred = PromiseUtils.defer();
       PlacesTransactions.batch(function* () {
         yield this._batchBlockingDeferred.promise;
       }.bind(this));
-    }
-    else {
+    } else {
       PlacesUtils.transactionManager.beginBatch(null);
     }
     this._batching = true;
   },
 
   endBatch() {
     if (!this._batching)
       return;
 
     if (PlacesUIUtils.useAsyncTransactions) {
       this._batchBlockingDeferred.resolve();
       this._batchBlockingDeferred = null;
-    }
-    else {
+    } else {
       PlacesUtils.transactionManager.endBatch(false);
     }
     this._batching = false;
   }
 };
 
 var PlacesCommandHook = {
   /**
@@ -372,18 +369,17 @@ var PlacesCommandHook = {
       let docInfo = yield this._getPageDetails(aBrowser);
 
       try {
         title = docInfo.isErrorPage ? PlacesUtils.history.getPageTitle(uri)
                                     : aBrowser.contentTitle;
         title = title || uri.spec;
         description = docInfo.description;
         charset = aBrowser.characterSet;
-      }
-      catch (e) { }
+      } catch (e) { }
 
       if (aShowEditUI && isNewBookmark) {
         // If we bookmark the page here but open right into a cancelable
         // state (i.e. new bookmark in Library), start batching here so
         // all of the actions can be undone in a single undo step.
         StarUI.beginBatch();
       }
 
@@ -445,18 +441,17 @@ var PlacesCommandHook = {
 
       try {
         info.title = docInfo.isErrorPage ?
           (yield PlacesUtils.promisePlaceInfo(aBrowser.currentURI)).title :
           aBrowser.contentTitle;
         info.title = info.title || url.href;
         description = docInfo.description;
         charset = aBrowser.characterSet;
-      }
-      catch (e) {
+      } catch (e) {
         Components.utils.reportError(e);
       }
 
       if (aShowEditUI && isNewBookmark) {
         // If we bookmark the page here but open right into a cancelable
         // state (i.e. new bookmark in Library), start batching here so
         // all of the actions can be undone in a single undo step.
         StarUI.beginBatch();
@@ -653,18 +648,17 @@ var PlacesCommandHook = {
    */
   showPlacesOrganizer: function PCH_showPlacesOrganizer(aLeftPaneRoot) {
     var organizer = Services.wm.getMostRecentWindow("Places:Organizer");
     // Due to bug 528706, getMostRecentWindow can return closed windows.
     if (!organizer || organizer.closed) {
       // No currently open places window, so open one with the specified mode.
       openDialog("chrome://browser/content/places/places.xul",
                  "", "chrome,toolbar=yes,dialog=no,resizable", aLeftPaneRoot);
-    }
-    else {
+    } else {
       organizer.PlacesOrganizer.selectLeftPaneContainerByHierarchy(aLeftPaneRoot);
       organizer.focus();
     }
   }
 };
 
 XPCOMUtils.defineLazyModuleGetter(this, "RecentlyClosedTabsAndWindowsMenuUtils",
   "resource:///modules/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.jsm");
@@ -841,18 +835,17 @@ var BookmarksEventHandler = {
     }
 
     if (target._placesNode && PlacesUtils.nodeIsContainer(target._placesNode)) {
       // Don't open the root folder in tabs when the empty area on the toolbar
       // is middle-clicked or when a non-bookmark item except for Open in Tabs)
       // in a bookmarks menupopup is middle-clicked.
       if (target.localName == "menu" || target.localName == "toolbarbutton")
         PlacesUIUtils.openContainerNodeInTabs(target._placesNode, aEvent, aView);
-    }
-    else if (aEvent.button == 1) {
+    } else if (aEvent.button == 1) {
       // left-clicks with modifier are already served by onCommand
       this.onCommand(aEvent, aView);
     }
   },
 
   /**
    * Handler for command event for an item in the bookmarks toolbar.
    * Menus and submenus from the folder buttons bubble up to this handler.
@@ -876,18 +869,17 @@ var BookmarksEventHandler = {
     if (aDocument.tooltipNode.localName == "treechildren") {
       var tree = aDocument.tooltipNode.parentNode;
       var tbo = tree.treeBoxObject;
       var cell = tbo.getCellAt(aEvent.clientX, aEvent.clientY);
       if (cell.row == -1)
         return false;
       node = tree.view.nodeForTreeIndex(cell.row);
       cropped = tbo.isCellCropped(cell.row, cell.col);
-    }
-    else {
+    } else {
       // Check whether the tooltipNode is a Places node.
       // In such a case use it, otherwise check for targetURI attribute.
       var tooltipNode = aDocument.tooltipNode;
       if (tooltipNode._placesNode)
         node = tooltipNode._placesNode;
       else {
         // This is a static non-Places node.
         targetURI = tooltipNode.getAttribute("targetURI");
@@ -1255,25 +1247,23 @@ var BookmarkingUI = {
       return this.STATUS_UNSTARRED;
     }
     if (this._pendingStmt)
       return this.STATUS_UPDATING;
     return this.button.hasAttribute("starred") ? this.STATUS_STARRED
                                                : this.STATUS_UNSTARRED;
   },
 
-  get _starredTooltip()
-  {
+  get _starredTooltip() {
     delete this._starredTooltip;
     return this._starredTooltip =
       this._getFormattedTooltip("starButtonOn.tooltip2");
   },
 
-  get _unstarredTooltip()
-  {
+  get _unstarredTooltip() {
     delete this._unstarredTooltip;
     return this._unstarredTooltip =
       this._getFormattedTooltip("starButtonOff.tooltip2");
   },
 
   _getFormattedTooltip(strId) {
     let args = [];
     let shortcut = document.getElementById(this.BOOKMARK_BUTTON_SHORTCUT);
@@ -1657,18 +1647,17 @@ var BookmarkingUI = {
     }
 
     if (this._itemIds.length > 0) {
       this.broadcaster.setAttribute("starred", "true");
       this.broadcaster.setAttribute("buttontooltiptext", this._starredTooltip);
       if (this.button.getAttribute("overflowedItem") == "true") {
         this.button.setAttribute("label", this._starButtonOverflowedStarredLabel);
       }
-    }
-    else {
+    } else {
       this.broadcaster.removeAttribute("starred");
       this.broadcaster.setAttribute("buttontooltiptext", this._unstarredTooltip);
       if (this.button.getAttribute("overflowedItem") == "true") {
         this.button.setAttribute("label", this._starButtonOverflowedLabel);
       }
     }
   },
 
@@ -1717,17 +1706,17 @@ var BookmarkingUI = {
       let isRTL = getComputedStyle(this.button).direction == "rtl";
       let buttonRect = this.button.getBoundingClientRect();
       let notifierRect = this.notifier.getBoundingClientRect();
       let dropmarkerRect = dropmarkerIcon.getBoundingClientRect();
       let dropmarkerNotifierRect = this.dropmarkerNotifier.getBoundingClientRect();
 
       // Compute, but do not set, transform for star icon
       let [translateX, translateY] = getCenteringTransformForRects(notifierRect, buttonRect);
-      let starIconTransform = "translate(" +  translateX + ", " + translateY + ")";
+      let starIconTransform = "translate(" + translateX + ", " + translateY + ")";
       if (isRTL) {
         starIconTransform += " scaleX(-1)";
       }
 
       // Compute, but do not set, transform for dropmarker
       [translateX, translateY] = getCenteringTransformForRects(dropmarkerNotifierRect, dropmarkerRect);
       let dropmarkerTransform = "translate(" + translateX + ", " + translateY + ")";
 
@@ -1885,19 +1874,18 @@ var BookmarkingUI = {
       // If the changed bookmark was tracked, check if it is now pointing to
       // a different uri and unregister it.
       if (index != -1 && aNewValue != this._uri.spec) {
         this._itemIds.splice(index, 1);
         // Only need to update the UI if the page is no longer starred
         if (this._itemIds.length == 0) {
           this._updateStar();
         }
-      }
-      // If another bookmark is now pointing to the tracked uri, register it.
-      else if (index == -1 && aNewValue == this._uri.spec) {
+      } else if (index == -1 && aNewValue == this._uri.spec) {
+        // If another bookmark is now pointing to the tracked uri, register it.
         this._itemIds.push(aItemId);
         // Only need to update the UI if it wasn't marked as starred before:
         if (this._itemIds.length == 1) {
           this._updateStar();
         }
       }
     }
   },
--- a/browser/base/content/browser-plugins.js
+++ b/browser/base/content/browser-plugins.js
@@ -121,18 +121,17 @@ var gPluginHandler = {
         .add(!this.options.primaryPlugin);
       // Histograms always start at 0, even though our data starts at 1
       let histogramCount = this.options.pluginData.size - 1;
       if (histogramCount > 4) {
         histogramCount = 4;
       }
       Services.telemetry.getHistogramById("PLUGINS_NOTIFICATION_PLUGIN_COUNT")
         .add(histogramCount);
-    }
-    else if (event == "dismissed") {
+    } else if (event == "dismissed") {
       // Once the popup is dismissed, clicking the icon should show the full
       // list again
       this.options.primaryPlugin = null;
     }
   },
 
   /**
    * Called from the plugin doorhanger to set the new permissions for a plugin
@@ -246,18 +245,17 @@ var gPluginHandler = {
       // If a block contains an infoURL, we should always prefer that to the default
       // URL that we construct in-product, even for other blocklist types.
       let url = Services.blocklist.getPluginInfoURL(pluginInfo.pluginTag);
 
       if (pluginInfo.blocklistState != Ci.nsIBlocklistService.STATE_NOT_BLOCKED) {
         if (!url) {
           url = Services.blocklist.getPluginBlocklistURL(pluginInfo.pluginTag);
         }
-      }
-      else {
+      } else {
         url = Services.urlFormatter.formatURLPref("app.support.baseURL") + "clicktoplay";
       }
       pluginInfo.detailsLink = url;
 
       pluginData.set(pluginInfo.permissionString, pluginInfo);
     }
 
     let primaryPluginPermission = null;
--- a/browser/base/content/browser-syncui.js
+++ b/browser/base/content/browser-syncui.js
@@ -394,18 +394,17 @@ var gSyncUI = {
     } else if (loginFailed) {
       // "need to reconnect/re-enter your password"
       tooltiptext = gFxAccounts.strings.formatStringFromName("reconnectDescription", [email], 1);
     } else {
       // Sync appears configured - format the "last synced at" time.
       try {
         let lastSync = new Date(Services.prefs.getCharPref("services.sync.lastSync"));
         tooltiptext = this.formatLastSyncDate(lastSync);
-      }
-      catch (e) {
+      } catch (e) {
         // pref doesn't exist (which will be the case until we've seen the
         // first successful sync) or is invalid (which should be impossible!)
         // Just leave tooltiptext as the empty string in these cases, which
         // will cause the tooltip to be removed below.
       }
     }
 
     // We've done all our promise-y work and ready to update the UI - make
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -403,18 +403,17 @@ const gClickAndHoldListenersOnElement = 
     this._timers.delete(aElm);
 
     aElm.addEventListener("mousedown", this, true);
     aElm.addEventListener("click", this, true);
   }
 };
 
 const gSessionHistoryObserver = {
-  observe(subject, topic, data)
-  {
+  observe(subject, topic, data) {
     if (topic != "browser:purge-session-history")
       return;
 
     var backCommand = document.getElementById("Browser:Back");
     backCommand.setAttribute("disabled", "true");
     var fwdCommand = document.getElementById("Browser:Forward");
     fwdCommand.setAttribute("disabled", "true");
 
@@ -454,29 +453,27 @@ function findChildShell(aDocument, aDocS
       return docShell;
   }
   return null;
 }
 
 var gPopupBlockerObserver = {
   _reportButton: null,
 
-  onReportButtonMousedown(aEvent)
-  {
+  onReportButtonMousedown(aEvent) {
     // If this method is called on the same event tick as the popup gets
     // hidden, do nothing to avoid re-opening the popup.
     if (aEvent.button != 0 || aEvent.target != this._reportButton || this.isPopupHidingTick)
       return;
 
     document.getElementById("blockedPopupOptions")
             .openPopup(this._reportButton, "after_end", 0, 2, false, false, aEvent);
   },
 
-  handleEvent(aEvent)
-  {
+  handleEvent(aEvent) {
     if (aEvent.originalTarget != gBrowser.selectedBrowser)
       return;
 
     if (!this._reportButton)
       this._reportButton = document.getElementById("page-report-button");
 
     if (!gBrowser.selectedBrowser.blockedPopups ||
         gBrowser.selectedBrowser.blockedPopups.count == 0) {
@@ -514,18 +511,17 @@ var gPopupBlockerObserver = {
         var message = PluralForm.get(popupCount, messageBase)
                                 .replace("#1", brandShortName)
                                 .replace("#2", popupCount);
 
         let notificationBox = gBrowser.getNotificationBox();
         let notification = notificationBox.getNotificationWithValue("popup-blocked");
         if (notification) {
           notification.label = message;
-        }
-        else {
+        } else {
           var buttons = [{
             label: popupButtonText,
             accessKey: popupButtonAccesskey,
             popup: "blockedPopupOptions",
             callback: null
           }];
 
           const priority = notificationBox.PRIORITY_WARNING_MEDIUM;
@@ -536,31 +532,29 @@ var gPopupBlockerObserver = {
       }
 
       // Record the fact that we've reported this blocked popup, so we don't
       // show it again.
       gBrowser.selectedBrowser.blockedPopups.reported = true;
     }
   },
 
-  toggleAllowPopupsForSite(aEvent)
-  {
+  toggleAllowPopupsForSite(aEvent) {
     var pm = Services.perms;
     var shouldBlock = aEvent.target.getAttribute("block") == "true";
     var perm = shouldBlock ? pm.DENY_ACTION : pm.ALLOW_ACTION;
     pm.addFromPrincipal(gBrowser.contentPrincipal, "popup", perm);
 
     if (!shouldBlock)
       this.showAllBlockedPopups(gBrowser.selectedBrowser);
 
     gBrowser.getNotificationBox().removeCurrentNotification();
   },
 
-  fillPopupList(aEvent)
-  {
+  fillPopupList(aEvent) {
     // XXXben - rather than using |currentURI| here, which breaks down on multi-framed sites
     //          we should really walk the blockedPopups and create a list of "allow for <host>"
     //          menuitems for the common subset of hosts present in the report, this will
     //          make us frame-safe.
     //
     // XXXjst - Note that when this is fixed to work with multi-framed sites,
     //          also back out the fix for bug 343772 where
     //          nsGlobalWindow::CheckOpenAllow() was changed to also
@@ -573,25 +567,23 @@ var gPopupBlockerObserver = {
       let uriHost = uri.asciiHost ? uri.host : uri.spec;
       var pm = Services.perms;
       if (pm.testPermission(uri, "popup") == pm.ALLOW_ACTION) {
         // Offer an item to block popups for this site, if a whitelist entry exists
         // already for it.
         let blockString = gNavigatorBundle.getFormattedString("popupBlock", [uriHost]);
         blockedPopupAllowSite.setAttribute("label", blockString);
         blockedPopupAllowSite.setAttribute("block", "true");
-      }
-      else {
+      } else {
         // Offer an item to allow popups for this site
         let allowString = gNavigatorBundle.getFormattedString("popupAllow", [uriHost]);
         blockedPopupAllowSite.setAttribute("label", allowString);
         blockedPopupAllowSite.removeAttribute("block");
       }
-    }
-    catch (e) {
+    } catch (e) {
       blockedPopupAllowSite.setAttribute("hidden", "true");
     }
 
     if (PrivateBrowsingUtils.isWindowPrivate(window))
       blockedPopupAllowSite.setAttribute("disabled", "true");
     else
       blockedPopupAllowSite.removeAttribute("disabled");
 
@@ -667,89 +659,83 @@ var gPopupBlockerObserver = {
     let item = aEvent.target.lastChild;
     while (item && item.getAttribute("observes") != "blockedPopupsSeparator") {
       let next = item.previousSibling;
       item.parentNode.removeChild(item);
       item = next;
     }
   },
 
-  showBlockedPopup(aEvent)
-  {
+  showBlockedPopup(aEvent) {
     var target = aEvent.target;
     var popupReportIndex = target.getAttribute("popupReportIndex");
     let browser = target.popupReportBrowser;
     browser.unblockPopup(popupReportIndex);
   },
 
-  showAllBlockedPopups(aBrowser)
-  {
+  showAllBlockedPopups(aBrowser) {
     aBrowser.retrieveListOfBlockedPopups().then(popups => {
       for (let i = 0; i < popups.length; i++) {
         if (popups[i].popupWindowURIspec)
           aBrowser.unblockPopup(i);
       }
     }, null);
   },
 
-  editPopupSettings()
-  {
+  editPopupSettings() {
     let prefillValue = "";
     try {
       // We use contentPrincipal rather than currentURI to get the right
       // value in case this is a data: URI that's inherited off something else.
       // Some principals don't have URIs, so fall back in case URI is not present.
       let principalURI = gBrowser.contentPrincipal.URI || gBrowser.currentURI;
       if (principalURI) {
         // asciiHost conveniently doesn't throw.
         if (principalURI.asciiHost) {
           prefillValue = principalURI.prePath;
         } else {
           // For host-less URIs like file://, prePath would effectively allow
           // popups everywhere on file://. Use the full spec:
           prefillValue = principalURI.spec;
         }
       }
-    }
-    catch (e) { }
+    } catch (e) { }
 
     var bundlePreferences = document.getElementById("bundle_preferences");
     var params = { blockVisible   : false,
                    sessionVisible : false,
                    allowVisible   : true,
                    prefilledHost  : prefillValue,
                    permissionType : "popup",
                    windowTitle    : bundlePreferences.getString("popuppermissionstitle"),
                    introText      : bundlePreferences.getString("popuppermissionstext") };
     var existingWindow = Services.wm.getMostRecentWindow("Browser:Permissions");
     if (existingWindow) {
       existingWindow.initWithParams(params);
       existingWindow.focus();
-    }
-    else
+    } else
       window.openDialog("chrome://browser/content/preferences/permissions.xul",
                         "_blank", "resizable,dialog=no,centerscreen", params);
   },
 
-  dontShowMessage()
-  {
+  dontShowMessage() {
     var showMessage = gPrefService.getBoolPref("privacy.popups.showBrowserMessage");
     gPrefService.setBoolPref("privacy.popups.showBrowserMessage", !showMessage);
     gBrowser.getNotificationBox().removeCurrentNotification();
   }
 };
 
 function gKeywordURIFixup({ target: browser, data: fixupInfo }) {
   let deserializeURI = (spec) => spec ? makeURI(spec) : null;
 
   // We get called irrespective of whether we did a keyword search, or
   // whether the original input would be vaguely interpretable as a URL,
   // so figure that out first.
   let alternativeURI = deserializeURI(fixupInfo.fixedURI);
-  if (!fixupInfo.keywordProviderName  || !alternativeURI || !alternativeURI.host) {
+  if (!fixupInfo.keywordProviderName || !alternativeURI || !alternativeURI.host) {
     return;
   }
 
   // At this point we're still only just about to load this URI.
   // When the async DNS lookup comes back, we may be in any of these states:
   // 1) still on the previous URI, waiting for the preferredURI (keyword
   //    search) to respond;
   // 2) at the keyword search URI (preferredURI)
@@ -1156,18 +1142,17 @@ var gBrowserInit = {
           specs.push(urisstring.data);
         }
 
         // This function throws for certain malformed URIs, so use exception handling
         // so that we don't disrupt startup
         try {
           gBrowser.loadTabs(specs, false, true);
         } catch (e) {}
-      }
-      else if (uriToLoad instanceof XULElement) {
+      } else if (uriToLoad instanceof XULElement) {
         // swap the given tab with the default about:blank tab and then close
         // the original tab in the other window.
         let tabToOpen = uriToLoad;
 
         // If this tab was passed as a window argument, clear the
         // reference to it from the arguments array.
         if (window.arguments[0] == tabToOpen) {
           window.arguments[0] = null;
@@ -1190,24 +1175,23 @@ var gBrowserInit = {
           // we are swapping in.
           gBrowser.updateBrowserRemoteness(gBrowser.selectedBrowser,
                                            tabToOpen.linkedBrowser.isRemoteBrowser,
                                            { remoteType: tabToOpen.linkedBrowser.remoteType });
           gBrowser.swapBrowsersAndCloseOther(gBrowser.selectedTab, tabToOpen);
         } catch (e) {
           Cu.reportError(e);
         }
-      }
-      // window.arguments[2]: referrer (nsIURI | string)
-      //                 [3]: postData (nsIInputStream)
-      //                 [4]: allowThirdPartyFixup (bool)
-      //                 [5]: referrerPolicy (int)
-      //                 [6]: userContextId (int)
-      //                 [7]: originPrincipal (nsIPrincipal)
-      else if (window.arguments.length >= 3) {
+      } else if (window.arguments.length >= 3) {
+        // window.arguments[2]: referrer (nsIURI | string)
+        //                 [3]: postData (nsIInputStream)
+        //                 [4]: allowThirdPartyFixup (bool)
+        //                 [5]: referrerPolicy (int)
+        //                 [6]: userContextId (int)
+        //                 [7]: originPrincipal (nsIPrincipal)
         let referrerURI = window.arguments[2];
         if (typeof(referrerURI) == "string") {
           try {
             referrerURI = makeURI(referrerURI);
           } catch (e) {
             referrerURI = null;
           }
         }
@@ -1216,20 +1200,19 @@ var gBrowserInit = {
         let userContextId = (window.arguments[6] != undefined ?
             window.arguments[6] : Ci.nsIScriptSecurityManager.DEFAULT_USER_CONTEXT_ID);
         loadURI(uriToLoad, referrerURI, window.arguments[3] || null,
                 window.arguments[4] || false, referrerPolicy, userContextId,
                 // pass the origin principal (if any) and force its use to create
                 // an initial about:blank viewer if present:
                 window.arguments[7], !!window.arguments[7]);
         window.focus();
-      }
-      // Note: loadOneOrMoreURIs *must not* be called if window.arguments.length >= 3.
-      // Such callers expect that window.arguments[0] is handled as a single URI.
-      else {
+      } else {
+        // Note: loadOneOrMoreURIs *must not* be called if window.arguments.length >= 3.
+        // Such callers expect that window.arguments[0] is handled as a single URI.
         loadOneOrMoreURIs(uriToLoad);
       }
     }
 
     // Bug 778855 - Perf regression if we do this here. To be addressed in bug 779008.
     setTimeout(function() { SafeBrowsing.init(); }, 2000);
 
     Services.obs.addObserver(gIdentityHandler, "perm-changed", false);
@@ -1646,18 +1629,17 @@ if (AppConstants.platform == "macosx") {
                          .createInstance(Ci.nsIStandaloneNativeMenu);
 
         try {
           nativeMenu.init(dockMenuElement);
 
           let dockSupport = Cc["@mozilla.org/widget/macdocksupport;1"]
                             .getService(Ci.nsIMacDockSupport);
           dockSupport.dockMenu = nativeMenu;
-        }
-        catch (e) {
+        } catch (e) {
         }
       }
     }
 
     if (PrivateBrowsingUtils.permanentPrivateBrowsing) {
       document.getElementById("macDockMenuNewWindow").hidden = true;
     }
 
@@ -1771,18 +1753,17 @@ function gotoHistoryIndex(aEvent) {
 
   let where = whereToOpenLink(aEvent);
 
   if (where == "current") {
     // Normal click. Go there in the current tab and update session history.
 
     try {
       gBrowser.gotoIndex(index);
-    }
-    catch (ex) {
+    } catch (ex) {
       return false;
     }
     return true;
   }
   // Modified click. Go there in a new tab/window.
 
   let historyindex = aEvent.target.getAttribute("historyindex");
   duplicateTabIn(gBrowser.selectedTab, where, Number(historyindex));
@@ -1790,54 +1771,48 @@ function gotoHistoryIndex(aEvent) {
 }
 
 function BrowserForward(aEvent) {
   let where = whereToOpenLink(aEvent, false, true);
 
   if (where == "current") {
     try {
       gBrowser.goForward();
-    }
-    catch (ex) {
-    }
-  }
-  else {
+    } catch (ex) {
+    }
+  } else {
     duplicateTabIn(gBrowser.selectedTab, where, 1);
   }
 }
 
 function BrowserBack(aEvent) {
   let where = whereToOpenLink(aEvent, false, true);
 
   if (where == "current") {
     try {
       gBrowser.goBack();
-    }
-    catch (ex) {
-    }
-  }
-  else {
+    } catch (ex) {
+    }
+  } else {
     duplicateTabIn(gBrowser.selectedTab, where, -1);
   }
 }
 
-function BrowserHandleBackspace()
-{
+function BrowserHandleBackspace() {
   switch (gPrefService.getIntPref("browser.backspace_action")) {
   case 0:
     BrowserBack();
     break;
   case 1:
     goDoCommand("cmd_scrollPageUp");
     break;
   }
 }
 
-function BrowserHandleShiftBackspace()
-{
+function BrowserHandleShiftBackspace() {
   switch (gPrefService.getIntPref("browser.backspace_action")) {
   case 0:
     BrowserForward();
     break;
   case 1:
     goDoCommand("cmd_scrollPageDown");
     break;
   }
@@ -1909,31 +1884,28 @@ function BrowserGoHome(aEvent) {
     gBrowser.loadTabs(urls, loadInBackground);
     break;
   case "window":
     OpenBrowserWindow();
     break;
   }
 }
 
-function loadOneOrMoreURIs(aURIString)
-{
+function loadOneOrMoreURIs(aURIString) {
   // we're not a browser window, pass the URI string to a new browser window
-  if (window.location.href != getBrowserURL())
-  {
+  if (window.location.href != getBrowserURL()) {
     window.openDialog(getBrowserURL(), "_blank", "all,dialog=no", aURIString);
     return;
   }
 
   // This function throws for certain malformed URIs, so use exception handling
   // so that we don't disrupt startup
   try {
     gBrowser.loadTabs(aURIString.split("|"), false, true);
-  }
-  catch (e) {
+  } catch (e) {
   }
 }
 
 function focusAndSelectUrlBar() {
   // In customize mode, the url bar is disabled. If a new tab is opened or the
   // user switches to a different tab, this function gets called before we've
   // finished leaving customize mode, and the url bar will still be disabled.
   // We can't focus it when it's disabled, so we need to re-run ourselves when
@@ -1963,18 +1935,17 @@ function openLocation() {
     return;
 
   if (window.location.href != getBrowserURL()) {
     var win = getTopWin();
     if (win) {
       // If there's an open browser window, it should handle this command
       win.focus()
       win.openLocation();
-    }
-    else {
+    } else {
       // If there are no open browser windows, open a new one
       window.openDialog("chrome://browser/content/", "_blank",
                         "chrome,all,dialog=no", BROWSER_NEW_TAB_URL);
     }
   }
 }
 
 function BrowserOpenTab(event) {
@@ -1999,30 +1970,28 @@ function BrowserOpenTab(event) {
 
   openUILinkIn(BROWSER_NEW_TAB_URL, where, { relatedToCurrent });
 }
 
 /* Called from the openLocation dialog. This allows that dialog to instruct
    its opener to open a new window and then step completely out of the way.
    Anything less byzantine is causing horrible crashes, rather believably,
    though oddly only on Linux. */
-function delayedOpenWindow(chrome, flags, href, postData)
-{
+function delayedOpenWindow(chrome, flags, href, postData) {
   // The other way to use setTimeout,
   // setTimeout(openDialog, 10, chrome, "_blank", flags, url),
   // doesn't work here.  The extra "magic" extra argument setTimeout adds to
   // the callback function would confuse gBrowserInit.onLoad() by making
   // window.arguments[1] be an integer instead of null.
   setTimeout(function() { openDialog(chrome, "_blank", flags, href, null, null, postData); }, 10);
 }
 
 /* Required because the tab needs time to set up its content viewers and get the load of
    the URI kicked off before becoming the active content area. */
-function delayedOpenTab(aUrl, aReferrer, aCharset, aPostData, aAllowThirdPartyFixup)
-{
+function delayedOpenTab(aUrl, aReferrer, aCharset, aPostData, aAllowThirdPartyFixup) {
   gBrowser.loadOneTab(aUrl, {
                       referrerURI: aReferrer,
                       charset: aCharset,
                       postData: aPostData,
                       inBackground: false,
                       allowThirdPartyFixup: aAllowThirdPartyFixup});
 }
 
@@ -2030,18 +1999,17 @@ var gLastOpenDirectory = {
   _lastDir: null,
   get path() {
     if (!this._lastDir || !this._lastDir.exists()) {
       try {
         this._lastDir = gPrefService.getComplexValue("browser.open.lastDir",
                                                      Ci.nsILocalFile);
         if (!this._lastDir.exists())
           this._lastDir = null;
-      }
-      catch (e) {}
+      } catch (e) {}
     }
     return this._lastDir;
   },
   set path(val) {
     try {
       if (!val || !val.isDirectory())
         return;
     } catch (e) {
@@ -2054,18 +2022,17 @@ var gLastOpenDirectory = {
       gPrefService.setComplexValue("browser.open.lastDir", Ci.nsILocalFile,
                                    this._lastDir);
   },
   reset() {
     this._lastDir = null;
   }
 };
 
-function BrowserOpenFileWindow()
-{
+function BrowserOpenFileWindow() {
   // Get filepicker component.
   try {
     const nsIFilePicker = Ci.nsIFilePicker;
     let fp = Cc["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);
     let fpCallback = function fpCallback_done(aResult) {
       if (aResult == nsIFilePicker.returnOK) {
         try {
           if (fp.file) {
@@ -2095,18 +2062,17 @@ function BrowserCloseTabOrWindow() {
     closeWindow(true);
     return;
   }
 
   // If the current tab is the last one, this will close the window.
   gBrowser.removeCurrentTab({animate: true});
 }
 
-function BrowserTryToCloseWindow()
-{
+function BrowserTryToCloseWindow() {
   if (WindowIsClosing())
     window.close();     // WindowIsClosing does all the necessary checks
 }
 
 function loadURI(uri, referrer, postData, allowThirdPartyFixup, referrerPolicy,
                  userContextId, originPrincipal, forceAboutBlankViewerInCurrent) {
   try {
     openLinkIn(uri, "current",
@@ -2210,18 +2176,17 @@ function getPostDataStream(aPostDataStri
 }
 
 function getLoadContext() {
   return window.QueryInterface(Ci.nsIInterfaceRequestor)
                .getInterface(Ci.nsIWebNavigation)
                .QueryInterface(Ci.nsILoadContext);
 }
 
-function readFromClipboard()
-{
+function readFromClipboard() {
   var url;
 
   try {
     // Create transferable that will transfer the text.
     var trans = Components.classes["@mozilla.org/widget/transferable;1"]
                           .createInstance(Components.interfaces.nsITransferable);
     trans.init(getLoadContext());
 
@@ -2502,18 +2467,17 @@ function losslessDecodeURI(aURI) {
   // except ZWNJ (U+200C) and ZWJ (U+200D) (bug 582186).
   // This includes all bidirectional formatting characters.
   // (RFC 3987 sections 3.2 and 4.1 paragraph 6)
   value = value.replace(/[\u00ad\u034f\u061c\u115f-\u1160\u17b4-\u17b5\u180b-\u180d\u200b\u200e-\u200f\u202a-\u202e\u2060-\u206f\u3164\ufe00-\ufe0f\ufeff\uffa0\ufff0-\ufff8]|\ud834[\udd73-\udd7a]|[\udb40-\udb43][\udc00-\udfff]/g,
                         encodeURIComponent);
   return value;
 }
 
-function UpdateUrlbarSearchSplitterState()
-{
+function UpdateUrlbarSearchSplitterState() {
   var splitter = document.getElementById("urlbar-search-splitter");
   var urlbar = document.getElementById("urlbar-container");
   var searchbar = document.getElementById("search-container");
 
   if (document.documentElement.getAttribute("customizing") == "true") {
     if (splitter) {
       splitter.remove();
     }
@@ -2545,18 +2509,17 @@ function UpdateUrlbarSearchSplitterState
       splitter.setAttribute("overflows", "false");
       splitter.className = "chromeclass-toolbar-additional";
     }
     urlbar.parentNode.insertBefore(splitter, ibefore);
   } else if (splitter)
     splitter.parentNode.removeChild(splitter);
 }
 
-function UpdatePageProxyState()
-{
+function UpdatePageProxyState() {
   if (gURLBar && gURLBar.value != gLastValidURLStr)
     SetPageProxyState("invalid");
 }
 
 /**
  * Updates the user interface to indicate whether the URI in the location bar is
  * different than the loaded page, because it's being edited or because a search
  * result is currently selected and is displayed in the location bar.
@@ -2570,18 +2533,17 @@ function UpdatePageProxyState()
  *        An object with the following properties:
  *        {
  *          isForLocationChange:
  *            Set to true to indicate that the function was invoked to respond
  *            to a location change event. This is useful to avoid calling
  *            PopupNotifications.jsm multiple times.
  *        }
  */
-function SetPageProxyState(aState, aOptions = {})
-{
+function SetPageProxyState(aState, aOptions = {}) {
   if (!gURLBar)
     return;
 
   gURLBar.setAttribute("pageproxystate", aState);
 
   // the page proxy state is set to valid via OnLocationChange, which
   // gets called when we switch tabs.
   if (aState == "valid") {
@@ -2596,18 +2558,17 @@ function SetPageProxyState(aState, aOpti
   // longer exists). If this is the result of a locations change, then we will
   // already invoke PopupNotifications.locationChange separately.
   if (!Object.getOwnPropertyDescriptor(window, "PopupNotifications").get &&
       !aOptions.isForLocationChange) {
     PopupNotifications.anchorVisibilityChange();
   }
 }
 
-function PageProxyClickHandler(aEvent)
-{
+function PageProxyClickHandler(aEvent) {
   if (aEvent.button == 1 && gPrefService.getBoolPref("middlemouse.paste"))
     middleMousePaste(aEvent);
 }
 
 var gMenuButtonBadgeManager = {
   BADGEID_APPUPDATE: "update",
   BADGEID_DOWNLOAD: "download",
   BADGEID_FXA: "fxa",
@@ -3218,18 +3179,17 @@ function getDefaultHomePage() {
     if (url.includes("|"))
       url = url.split("|")[0];
   } catch (e) {
     Components.utils.reportError("Couldn't get homepage pref: " + e);
   }
   return url;
 }
 
-function BrowserFullScreen()
-{
+function BrowserFullScreen() {
   window.fullScreen = !window.fullScreen;
 }
 
 function mirrorShow(popup) {
   let services = [];
   if (Services.prefs.getBoolPref("browser.casting.enabled")) {
     services = CastingApps.getServicesForMirroring();
   }
@@ -3252,18 +3212,17 @@ function populateMirrorTabMenu(popup) {
     let item = doc.createElement("menuitem");
     item.setAttribute("label", service.friendlyName);
     item._service = service;
     item.addEventListener("command", mirrorMenuItemClicked);
     popup.appendChild(item);
   });
 }
 
-function getWebNavigation()
-{
+function getWebNavigation() {
   return gBrowser.webNavigation;
 }
 
 function BrowserReloadWithFlags(reloadFlags) {
   let url = gBrowser.currentURI.spec;
   if (gBrowser.updateBrowserRemotenessByURL(gBrowser.selectedBrowser, url)) {
     // If the remoteness has changed, the new browser doesn't have any
     // information of what was loaded before, so we need to load the previous
@@ -3342,29 +3301,27 @@ function getDetailedCertErrorInfo(locati
                       gNavigatorBundle.getString("certErrorDetailsCertChain.label") +
                       "\r\n\r\n" + certChain;
 
   return certErrorDetails;
 }
 
 // TODO: can we pull getDERString and getPEMString in from pippki.js instead of
 // duplicating them here?
-function getDERString(cert)
-{
+function getDERString(cert) {
   var length = {};
   var derArray = cert.getRawDER(length);
   var derString = '';
   for (var i = 0; i < derArray.length; i++) {
     derString += String.fromCharCode(derArray[i]);
   }
   return derString;
 }
 
-function getPEMString(cert)
-{
+function getPEMString(cert) {
   var derb64 = btoa(getDERString(cert));
   // Wrap the Base64 string into lines of 64 characters,
   // with CRLF line breaks (as specified in RFC 1421).
   var wrapped = derb64.replace(/(\S{64}(?!$))/g, "$1\r\n");
   return "-----BEGIN CERTIFICATE-----\r\n"
          + wrapped
          + "\r\n-----END CERTIFICATE-----\r\n";
 }
@@ -3480,67 +3437,60 @@ var PrintPreviewListener = {
       SidebarUI.show(this._sidebarCommand);
   },
 
   activateBrowser(browser) {
     gBrowser.activateBrowserForPrintPreview(browser);
   },
 }
 
-function getMarkupDocumentViewer()
-{
+function getMarkupDocumentViewer() {
   return gBrowser.markupDocumentViewer;
 }
 
 // This function is obsolete. Newer code should use <tooltip page="true"/> instead.
-function FillInHTMLTooltip(tipElement)
-{
+function FillInHTMLTooltip(tipElement) {
   document.getElementById("aHTMLTooltip").fillInPageTooltip(tipElement);
 }
 
 var browserDragAndDrop = {
   canDropLink: aEvent => Services.droppedLinkHandler.canDropLink(aEvent, true),
 
-  dragOver(aEvent)
-  {
+  dragOver(aEvent) {
     if (this.canDropLink(aEvent)) {
       aEvent.preventDefault();
     }
   },
 
   dropLinks(aEvent, aDisallowInherit) {
     return Services.droppedLinkHandler.dropLinks(aEvent, aDisallowInherit);
   }
 };
 
 var homeButtonObserver = {
-  onDrop(aEvent)
-    {
+  onDrop(aEvent) {
       // disallow setting home pages that inherit the principal
       let links = browserDragAndDrop.dropLinks(aEvent, true);
       if (links.length) {
         setTimeout(openHomeDialog, 0, links.map(link => link.url).join("|"));
       }
     },
 
-  onDragOver(aEvent)
-    {
+  onDragOver(aEvent) {
       if (gPrefService.prefIsLocked("browser.startup.homepage")) {
         return;
       }
       browserDragAndDrop.dragOver(aEvent);
       aEvent.dropEffect = "link";
     },
-  onDragExit(aEvent)
-    {
-    }
-}
-
-function openHomeDialog(aURL)
-{
+  onDragExit(aEvent) {
+    }
+}
+
+function openHomeDialog(aURL) {
   var promptTitle = gNavigatorBundle.getString("droponhometitle");
   var promptMsg;
   if (aURL.includes("|")) {
     promptMsg = gNavigatorBundle.getString("droponhomemsgMultiple");
   } else {
     promptMsg = gNavigatorBundle.getString("droponhomemsg");
   }
 
@@ -3941,18 +3891,17 @@ function FillHistoryMenu(aParent) {
   }
 
   const MAX_HISTORY_MENU_ITEMS = 15;
 
   const tooltipBack = gNavigatorBundle.getString("tabHistory.goBack");
   const tooltipCurrent = gNavigatorBundle.getString("tabHistory.current");
   const tooltipForward = gNavigatorBundle.getString("tabHistory.goForward");
 
-  function updateSessionHistory(sessionHistory, initial)
-  {
+  function updateSessionHistory(sessionHistory, initial) {
     let count = sessionHistory.entries.length;
 
     if (!initial) {
       if (count <= 1) {
         // if there is only one entry now, close the popup.
         aParent.hidePopup();
         return;
       } else if (aParent.id != "backForwardMenu" && !aParent.parentNode.open) {
@@ -4044,39 +3993,36 @@ function FillHistoryMenu(aParent) {
 function addToUrlbarHistory(aUrlToAdd) {
   if (!PrivateBrowsingUtils.isWindowPrivate(window) &&
       aUrlToAdd &&
       !aUrlToAdd.includes(" ") &&
       !/[\x00-\x1F]/.test(aUrlToAdd))
     PlacesUIUtils.markPageAsTyped(aUrlToAdd);
 }
 
-function BrowserDownloadsUI()
-{
+function BrowserDownloadsUI() {
   if (PrivateBrowsingUtils.isWindowPrivate(window)) {
     openUILinkIn("about:downloads", "tab");
   } else {
     PlacesCommandHook.showPlacesOrganizer("Downloads");
   }
 }
 
-function toOpenWindowByType(inType, uri, features)
-{
+function toOpenWindowByType(inType, uri, features) {
   var topWindow = Services.wm.getMostRecentWindow(inType);
 
   if (topWindow)
     topWindow.focus();
   else if (features)
     window.open(uri, "_blank", features);
   else
     window.open(uri, "_blank", "chrome,extrachrome,menubar,resizable,scrollbars,status,toolbar");
 }
 
-function OpenBrowserWindow(options)
-{
+function OpenBrowserWindow(options) {
   var telemetryObj = {};
   TelemetryStopwatch.start("FX_NEW_WINDOW_MS", telemetryObj);
 
   function newDocumentShown(doc, topic, data) {
     if (topic == "document-shown" &&
         doc != document &&
         doc.defaultView == win) {
       Services.obs.removeObserver(newDocumentShown, "document-shown");
@@ -4119,26 +4065,24 @@ function OpenBrowserWindow(options)
   } else if (options && options.remote === false) {
     extraFeatures += ",non-remote";
   }
 
   // if and only if the current window is a browser window and it has a document with a character
   // set, then extract the current charset menu setting from the current document and use it to
   // initialize the new browser window...
   var win;
-  if (window && (wintype == "navigator:browser") && window.content && window.content.document)
-  {
+  if (window && (wintype == "navigator:browser") && window.content && window.content.document) {
     var DocCharset = window.content.document.characterSet;
     charsetArg = "charset=" + DocCharset;
 
     // we should "inherit" the charset menu setting in a new window
     win = window.openDialog("chrome://browser/content/", "_blank", "chrome,all,dialog=no" + extraFeatures, defaultArgs, charsetArg);
-  }
-  else // forget about the charset information.
-  {
+  } else {
+    // forget about the charset information.
     win = window.openDialog("chrome://browser/content/", "_blank", "chrome,all,dialog=no" + extraFeatures, defaultArgs);
   }
 
   return win;
 }
 
 // Only here for backwards compat, we should remove this soon
 function BrowserCustomizeToolbar() {
@@ -4160,18 +4104,17 @@ function BrowserCustomizeToolbar() {
  * still work and just lazily disable them as needed when the user presses a
  * shortcut.
  *
  * This doesn't work on Mac, since Mac menus flash when users press their
  * keyboard shortcuts, so edit UI is essentially always visible on the Mac,
  * and we need to always update the edit commands.  Thus on Mac this function
  * is a no op.
  */
-function updateEditUIVisibility()
-{
+function updateEditUIVisibility() {
   if (AppConstants.platform == "macosx")
     return;
 
   let editMenuPopupState = document.getElementById("menu_EditPopup").state;
   let contextMenuPopupState = document.getElementById("contentAreaContextMenu").state;
   let placesContextMenuPopupState = document.getElementById("placesContext").state;
 
   // The UI is visible if the Edit menu is opening or open, if the context menu
@@ -4208,41 +4151,38 @@ function updateEditUIVisibility()
 /**
  * Opens a new tab with the userContextId specified as an attribute of
  * sourceEvent. This attribute is propagated to the top level originAttributes
  * living on the tab's docShell.
  *
  * @param event
  *        A click event on a userContext File Menu option
  */
-function openNewUserContextTab(event)
-{
+function openNewUserContextTab(event) {
   openUILinkIn(BROWSER_NEW_TAB_URL, "tab", {
     userContextId: parseInt(event.target.getAttribute('data-usercontextid')),
   });
 }
 
 /**
  * Updates File Menu User Context UI visibility depending on
  * privacy.userContext.enabled pref state.
  */
-function updateUserContextUIVisibility()
-{
+function updateUserContextUIVisibility() {
   let menu = document.getElementById("menu_newUserContext");
   menu.hidden = !Services.prefs.getBoolPref("privacy.userContext.enabled");
   if (PrivateBrowsingUtils.isWindowPrivate(window)) {
     menu.setAttribute("disabled", "true");
   }
 }
 
 /**
  * Updates the User Context UI indicators if the browser is in a non-default context
  */
-function updateUserContextUIIndicator()
-{
+function updateUserContextUIIndicator() {
   let hbox = document.getElementById("userContext-icons");
 
   let userContextId = gBrowser.selectedBrowser.getAttribute("usercontextid");
   if (!userContextId) {
     hbox.setAttribute("data-identity-color", "");
     hbox.hidden = true;
     return;
   }
@@ -4264,18 +4204,17 @@ function updateUserContextUIIndicator()
 
   hbox.hidden = false;
 }
 
 /**
  * Makes the Character Encoding menu enabled or disabled as appropriate.
  * To be called when the View menu or the app menu is opened.
  */
-function updateCharacterEncodingMenuState()
-{
+function updateCharacterEncodingMenuState() {
   let charsetMenu = document.getElementById("charsetMenu");
   // gBrowser is null on Mac when the menubar shows in the context of
   // non-browser windows. The above elements may be null depending on
   // what parts of the menubar are present. E.g. no app menu on Mac.
   if (gBrowser && gBrowser.selectedBrowser.mayEnableCharacterEncodingMenu) {
     if (charsetMenu) {
       charsetMenu.removeAttribute("disabled");
     }
@@ -4478,18 +4417,17 @@ var XULBrowserWindow = {
 
       if (!(aStateFlags & nsIWebProgressListener.STATE_RESTORING)) {
         this._busyUI = true;
 
         // XXX: This needs to be based on window activity...
         this.stopCommand.removeAttribute("disabled");
         CombinedStopReload.switchToStop();
       }
-    }
-    else if (aStateFlags & nsIWebProgressListener.STATE_STOP) {
+    } else if (aStateFlags & nsIWebProgressListener.STATE_STOP) {
       // This (thanks to the filter) is a network stop or the last
       // request stop outside of loading the document, stop throbbers
       // and progress bars and such
       if (aRequest) {
         let msg = "";
         let location;
         let canViewSource = true;
         // Get the URI either from a channel or a pseudo-object
@@ -4548,18 +4486,17 @@ var XULBrowserWindow = {
     FormValidationHandler.hidePopup();
 
     let pageTooltip = document.getElementById("aHTMLTooltip");
     let tooltipNode = pageTooltip.triggerNode;
     if (tooltipNode) {
       // Optimise for the common case
       if (aWebProgress.isTopLevel) {
         pageTooltip.hidePopup();
-      }
-      else {
+      } else {
         for (let tooltipWindow = tooltipNode.ownerGlobal;
              tooltipWindow != tooltipWindow.parent;
              tooltipWindow = tooltipWindow.parent) {
           if (tooltipWindow == aWebProgress.DOMWindow) {
             pageTooltip.hidePopup();
             break;
           }
         }
@@ -5363,48 +5300,44 @@ var gTabletModePageCounter = {
     if (this.enabled) {
       let histogram = Services.telemetry.getKeyedHistogramById("FX_TABLETMODE_PAGE_LOAD");
       histogram.add("tablet", this._tabletCount);
       histogram.add("desktop", this._desktopCount);
     }
   },
 };
 
-function displaySecurityInfo()
-{
+function displaySecurityInfo() {
   BrowserPageInfo(null, "securityTab");
 }
 
 
 var gHomeButton = {
   prefDomain: "browser.startup.homepage",
-  observe(aSubject, aTopic, aPrefName)
-  {
+  observe(aSubject, aTopic, aPrefName) {
     if (aTopic != "nsPref:changed" || aPrefName != this.prefDomain)
       return;
 
     this.updateTooltip();
   },
 
-  updateTooltip(homeButton)
-  {
+  updateTooltip(homeButton) {
     if (!homeButton)
       homeButton = document.getElementById("home-button");
     if (homeButton) {
       var homePage = this.getHomePage();
       homePage = homePage.replace(/\|/g, ', ');
       if (["about:home", "about:newtab"].includes(homePage.toLowerCase()))
         homeButton.setAttribute("tooltiptext", homeButton.getAttribute("aboutHomeOverrideTooltip"));
       else
         homeButton.setAttribute("tooltiptext", homePage);
     }
   },
 
-  getHomePage()
-  {
+  getHomePage() {
     var url;
     try {
       url = gPrefService.getComplexValue(this.prefDomain,
                                 Components.interfaces.nsIPrefLocalizedString).data;
     } catch (e) {
     }
 
     // use this if we can't find the pref
@@ -5516,20 +5449,18 @@ function asyncOpenWebPanel(event) {
  *
  * @param event
  *        The click event.
  * @return [href, linkNode].
  *
  * @note linkNode will be null if the click wasn't on an anchor
  *       element (or XLink).
  */
-function hrefAndLinkNodeForClickEvent(event)
-{
-  function isHTMLLink(aNode)
-  {
+function hrefAndLinkNodeForClickEvent(event) {
+  function isHTMLLink(aNode) {
     // Be consistent with what nsContextMenu.js does.
     return ((aNode instanceof HTMLAnchorElement && aNode.href) ||
             (aNode instanceof HTMLAreaElement && aNode.href) ||
             aNode instanceof HTMLLinkElement);
   }
 
   let node = event.target;
   while (node && !isHTMLLink(node)) {
@@ -5566,18 +5497,17 @@ function hrefAndLinkNodeForClickEvent(ev
  * Called whenever the user clicks in the content area.
  *
  * @param event
  *        The click event.
  * @param isPanelClick
  *        Whether the event comes from a web panel.
  * @note default event is prevented if the click is handled.
  */
-function contentAreaClick(event, isPanelClick)
-{
+function contentAreaClick(event, isPanelClick) {
   if (!event.isTrusted || event.defaultPrevented || event.button == 2)
     return;
 
   let [href, linkNode] = hrefAndLinkNodeForClickEvent(event);
   if (!href) {
     // Not a link, handle middle mouse navigation.
     if (event.button == 1 &&
         gPrefService.getBoolPref("middlemouse.contentLoadURL") &&
@@ -5591,28 +5521,27 @@ function contentAreaClick(event, isPanel
   // This code only applies if we have a linkNode (i.e. clicks on real anchor
   // elements, as opposed to XLink).
   if (linkNode && event.button == 0 &&
       !event.ctrlKey && !event.shiftKey && !event.altKey && !event.metaKey) {
     // A Web panel's links should target the main content area.  Do this
     // if no modifier keys are down and if there's no target or the target
     // equals _main (the IE convention) or _content (the Mozilla convention).
     let target = linkNode.target;
-    let mainTarget = !target || target == "_content" || target  == "_main";
+    let mainTarget = !target || target == "_content" || target == "_main";
     if (isPanelClick && mainTarget) {
       // javascript and data links should be executed in the current browser.
       if (linkNode.getAttribute("onclick") ||
           href.startsWith("javascript:") ||
           href.startsWith("data:"))
         return;
 
       try {
         urlSecurityCheck(href, linkNode.ownerDocument.nodePrincipal);
-      }
-      catch (ex) {
+      } catch (ex) {
         // Prevent loading unsecure destinations.
         event.preventDefault();
         return;
       }
 
       loadURI(href, null, null, false);
       event.preventDefault();
       return;
@@ -5677,18 +5606,17 @@ function handleLinkClick(event, href, li
   var persistAllowMixedContentInChildTab = false;
 
   if (where == "tab" && gBrowser.docShell.mixedContentChannel) {
     const sm = Services.scriptSecurityManager;
     try {
       var targetURI = makeURI(href);
       sm.checkSameOriginURI(referrerURI, targetURI, false);
       persistAllowMixedContentInChildTab = true;
-    }
-    catch (e) { }
+    } catch (e) { }
   }
 
   // first get document wide referrer policy, then
   // get referrer attribute from clicked link and parse it and
   // allow per element referrer to overrule the document wide referrer if enabled
   let referrerPolicy = doc.referrerPolicy;
   if (Services.prefs.getBoolPref("network.http.enablePerElementReferrer") &&
       linkNode) {
@@ -5766,26 +5694,27 @@ function middleMousePaste(event) {
 }
 
 function stripUnsafeProtocolOnPaste(pasteData) {
   // Don't allow pasting javascript URIs since we don't support
   // LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL for those.
   let changed = false;
   let pasteDataNoJS = pasteData.replace(/\r?\n/g, "")
                                .replace(/^(?:\s*javascript:)+/i,
-                                        () => { changed = true;
-                                                return ""; });
+                                        () => {
+                                                changed = true;
+                                                return "";
+                                              });
   return changed ? pasteDataNoJS : pasteData;
 }
 
 // handleDroppedLink has the following 2 overloads:
 //   handleDroppedLink(event, url, name)
 //   handleDroppedLink(event, links)
-function handleDroppedLink(event, urlOrLinks, name)
-{
+function handleDroppedLink(event, urlOrLinks, name) {
   let links;
   if (Array.isArray(urlOrLinks)) {
     links = urlOrLinks;
   } else {
     links = [{ url: urlOrLinks, name, type: "" }];
   }
 
   let lastLocationChange = gBrowser.selectedBrowser.lastLocationChange;
@@ -5824,29 +5753,27 @@ function handleDroppedLink(event, urlOrL
   // called in content process.
   if (event) {
     // Keep the event from being handled by the dragDrop listeners
     // built-in to gecko if they happen to be above us.
     event.preventDefault();
   }
 }
 
-function BrowserSetForcedCharacterSet(aCharset)
-{
+function BrowserSetForcedCharacterSet(aCharset) {
   if (aCharset) {
     gBrowser.selectedBrowser.characterSet = aCharset;
     // Save the forced character-set
     if (!PrivateBrowsingUtils.isWindowPrivate(window))
       PlacesUtils.setCharsetForURI(getWebNavigation().currentURI, aCharset);
   }
   BrowserCharsetReload();
 }
 
-function BrowserCharsetReload()
-{
+function BrowserCharsetReload() {
   BrowserReloadWithFlags(nsIWebNavigation.LOAD_FLAGS_CHARSET_CHANGE);
 }
 
 function UpdateCurrentCharset(target) {
   let selectedCharset = CharsetMenu.foldCharset(gBrowser.selectedBrowser.characterSet);
   for (let menuItem of target.getElementsByTagName("menuitem")) {
     let isSelected = menuItem.getAttribute("charset") === selectedCharset;
     menuItem.setAttribute("checked", isSelected);
@@ -6006,78 +5933,71 @@ var LanguageDetectionListener = {
   }
 };
 
 
 var BrowserOffline = {
   _inited: false,
 
   // BrowserOffline Public Methods
-  init()
-  {
+  init() {
     if (!this._uiElement)
       this._uiElement = document.getElementById("workOfflineMenuitemState");
 
     Services.obs.addObserver(this, "network:offline-status-changed", false);
 
     this._updateOfflineUI(Services.io.offline);
 
     this._inited = true;
   },
 
-  uninit()
-  {
+  uninit() {
     if (this._inited) {
       Services.obs.removeObserver(this, "network:offline-status-changed");
     }
   },
 
-  toggleOfflineStatus()
-  {
+  toggleOfflineStatus() {
     var ioService = Services.io;
 
     if (!ioService.offline && !this._canGoOffline()) {
       this._updateOfflineUI(false);
       return;
     }
 
     ioService.offline = !ioService.offline;
   },
 
   // nsIObserver
-  observe(aSubject, aTopic, aState)
-  {
+  observe(aSubject, aTopic, aState) {
     if (aTopic != "network:offline-status-changed")
       return;
 
     // This notification is also received because of a loss in connectivity,
     // which we ignore by updating the UI to the current value of io.offline
     this._updateOfflineUI(Services.io.offline);
   },
 
   // BrowserOffline Implementation Methods
-  _canGoOffline()
-  {
+  _canGoOffline() {
     try {
       var cancelGoOffline = Cc["@mozilla.org/supports-PRBool;1"].createInstance(Ci.nsISupportsPRBool);
       Services.obs.notifyObservers(cancelGoOffline, "offline-requested", null);
 
       // Something aborted the quit process.
       if (cancelGoOffline.data)
         return false;
-    }
-    catch (ex) {
+    } catch (ex) {
     }
 
     return true;
   },
 
   _uiElement: null,
-  _updateOfflineUI(aOffline)
-  {
+  _updateOfflineUI(aOffline) {
     var offlineLocked = gPrefService.prefIsLocked("network.online");
     if (offlineLocked)
       this._uiElement.setAttribute("disabled", "true");
 
     this._uiElement.setAttribute("checked", aOffline);
   }
 };
 
@@ -6304,18 +6224,17 @@ var IndexedDBPromptHelper = {
                             this._notificationIcon, mainAction,
                             secondaryActions, {
                               persistent: true,
                               hideClose: true,
                             });
   }
 };
 
-function CanCloseWindow()
-{
+function CanCloseWindow() {
   // Avoid redundant calls to canClose from showing multiple
   // PermitUnload dialogs.
   if (Services.startup.shuttingDown || window.skipNextCanClose) {
     return true;
   }
 
   for (let browser of gBrowser.browsers) {
     let {permitUnload, timedOut} = browser.permitUnload();
@@ -6324,18 +6243,17 @@ function CanCloseWindow()
     }
     if (!permitUnload) {
       return false;
     }
   }
   return true;
 }
 
-function WindowIsClosing()
-{
+function WindowIsClosing() {
   if (!closeWindow(false, warnAboutClosingWindow))
     return false;
 
   // In theory we should exit here and the Window's internal Close
   // method should trigger canClose on nsBrowserAccess. However, by
   // that point it's too late to be able to show a prompt for
   // PermitUnload. So we do it here, when we still can.
   if (CanCloseWindow()) {
--- a/browser/base/content/content.js
+++ b/browser/base/content/content.js
@@ -185,18 +185,17 @@ var handleContentContextMenu = function(
     let principal = doc.nodePrincipal;
     sendRpcMessage("contextmenu",
                    { editFlags, spellInfo, customMenuItems, addonInfo,
                      principal, docLocation, charSet, baseURI, referrer,
                      referrerPolicy, contentType, contentDisposition,
                      frameOuterWindowID, selectionInfo, disableSetDesktopBg,
                      loginFillInfo, parentAllowsMixedContent, userContextId },
                    { event, popupNode: event.target });
-  }
-  else {
+  } else {
     // Break out to the parent window and pass the add-on info along
     let browser = docShell.chromeEventHandler;
     let mainWin = browser.ownerGlobal;
     mainWin.gContextMenuContentData = {
       isRemote: false,
       event,
       popupNode: event.target,
       browser,
@@ -298,17 +297,17 @@ var AboutNetAndCertErrorListener = {
   onCertErrorDetails(msg) {
     let div = content.document.getElementById("certificateErrorText");
     div.textContent = msg.data.info;
     let learnMoreLink = content.document.getElementById("learnMoreLink");
     let baseURL = Services.urlFormatter.formatURLPref("app.support.baseURL");
 
     switch (msg.data.code) {
       case SEC_ERROR_UNKNOWN_ISSUER:
-        learnMoreLink.href = baseURL  + "security-error";
+        learnMoreLink.href = baseURL + "security-error";
         break;
 
       // in case the certificate expired we make sure the system clock
       // matches settings server (kinto) time
       case SEC_ERROR_EXPIRED_CERTIFICATE:
       case SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE:
       case SEC_ERROR_OCSP_FUTURE_RESPONSE:
       case SEC_ERROR_OCSP_OLD_RESPONSE:
@@ -334,17 +333,17 @@ var AboutNetAndCertErrorListener = {
               .textContent = actualDate;
 
             content.document.getElementById("errorShortDesc")
               .style.display = "none";
             content.document.getElementById("wrongSystemTimePanel")
               .style.display = "block";
           }
         }
-        learnMoreLink.href = baseURL  + "time-errors";
+        learnMoreLink.href = baseURL + "time-errors";
         break;
     }
   },
 
   onCaptivePortalFreed(msg) {
     content.dispatchEvent(new content.CustomEvent("AboutNetErrorCaptivePortalFreed"));
   },
 
@@ -964,18 +963,17 @@ addMessageListener("ContextMenu:SetAsDes
       let canvas = content.document.createElement("canvas");
       canvas.width = target.naturalWidth;
       canvas.height = target.naturalHeight;
       let ctx = canvas.getContext("2d");
       ctx.drawImage(target, 0, 0);
       let dataUrl = canvas.toDataURL();
       sendAsyncMessage("ContextMenu:SetAsDesktopBackground:Result",
                        { dataUrl });
-    }
-    catch (e) {
+    } catch (e) {
       Cu.reportError(e);
       disable = true;
     }
   }
 
   if (disable)
     sendAsyncMessage("ContextMenu:SetAsDesktopBackground:Result", { disable });
 });
@@ -992,18 +990,17 @@ var PageInfoListener = {
     let document;
 
     let frameOuterWindowID = message.data.frameOuterWindowID;
 
     // If inside frame then get the frame's window and document.
     if (frameOuterWindowID) {
       window = Services.wm.getOuterWindowWithId(frameOuterWindowID);
       document = window.document;
-    }
-    else {
+    } else {
       window = content.window;
       document = content.document;
     }
 
     let imageElement = message.objects.imageElement;
 
     let pageInfoData = {metaViewRows: this.getMetaInfo(document),
                         docInfo: this.getDocumentInfo(document),
@@ -1046,18 +1043,17 @@ var PageInfoListener = {
 
   getWindowInfo(window) {
     let windowInfo = {};
     windowInfo.isTopWindow = window == window.top;
 
     let hostName = null;
     try {
       hostName = window.location.host;
-    }
-    catch (exception) { }
+    } catch (exception) { }
 
     windowInfo.hostName = hostName;
     return windowInfo;
   },
 
   getDocumentInfo(document) {
     let docInfo = {};
     docInfo.title = document.title;
@@ -1105,38 +1101,35 @@ var PageInfoListener = {
           feeds.push([link.title, type, link.href]);
         }
       }
     }
     return feeds;
   },
 
   // Only called once to get the media tab's media elements from the content page.
-  getMediaInfo(document, window, strings)
-  {
+  getMediaInfo(document, window, strings) {
     let frameList = this.goThroughFrames(document, window);
     Task.spawn(() => this.processFrames(document, frameList, strings));
   },
 
-  goThroughFrames(document, window)
-  {
+  goThroughFrames(document, window) {
     let frameList = [document];
     if (window && window.frames.length > 0) {
       let num = window.frames.length;
       for (let i = 0; i < num; i++) {
         // Recurse through the frames.
         frameList.concat(this.goThroughFrames(window.frames[i].document,
                                               window.frames[i]));
       }
     }
     return frameList;
   },
 
-  *processFrames(document, frameList, strings)
-  {
+  *processFrames(document, frameList, strings) {
     let nodeCount = 0;
     for (let doc of frameList) {
       let iterator = doc.createTreeWalker(doc, content.NodeFilter.SHOW_ELEMENT);
 
       // Goes through all the elements on the doc. imageViewRows takes only the media elements.
       while (iterator.nextNode()) {
         let mediaItems = this.getMediaItems(document, strings, iterator.currentNode);
 
@@ -1150,44 +1143,41 @@ var PageInfoListener = {
           yield new Promise(resolve => setTimeout(resolve, 10));
         }
       }
     }
     // Send that page info media fetching has finished.
     sendAsyncMessage("PageInfo:mediaData", {isComplete: true});
   },
 
-  getMediaItems(document, strings, elem)
-  {
+  getMediaItems(document, strings, elem) {
     // Check for images defined in CSS (e.g. background, borders)
     let computedStyle = elem.ownerGlobal.getComputedStyle(elem);
     // A node can have multiple media items associated with it - for example,
     // multiple background images.
     let mediaItems = [];
 
     let addImage = (url, type, alt, el, isBg) => {
       let element = this.serializeElementInfo(document, url, type, alt, el, isBg);
       mediaItems.push([url, type, alt, element, isBg]);
     };
 
     if (computedStyle) {
       let addImgFunc = (label, val) => {
         if (val.primitiveType == content.CSSPrimitiveValue.CSS_URI) {
           addImage(val.getStringValue(), label, strings.notSet, elem, true);
-        }
-        else if (val.primitiveType == content.CSSPrimitiveValue.CSS_STRING) {
+        } else if (val.primitiveType == content.CSSPrimitiveValue.CSS_STRING) {
           // This is for -moz-image-rect.
           // TODO: Reimplement once bug 714757 is fixed.
           let strVal = val.getStringValue();
           if (strVal.search(/^.*url\(\"?/) > -1) {
             let url = strVal.replace(/^.*url\(\"?/, "").replace(/\"?\).*$/, "");
             addImage(url, label, strings.notSet, elem, true);
           }
-        }
-        else if (val.cssValueType == content.CSSValue.CSS_VALUE_LIST) {
+        } else if (val.cssValueType == content.CSSValue.CSS_VALUE_LIST) {
           // Recursively resolve multiple nested CSS value lists.
           for (let i = 0; i < val.length; i++) {
             addImgFunc(label, val.item(i));
           }
         }
       };
 
       addImgFunc(strings.mediaBGImg, computedStyle.getPropertyCSSValue("background-image"));
@@ -1195,59 +1185,51 @@ var PageInfoListener = {
       addImgFunc(strings.mediaListImg, computedStyle.getPropertyCSSValue("list-style-image"));
       addImgFunc(strings.mediaCursor, computedStyle.getPropertyCSSValue("cursor"));
     }
 
     // One swi^H^H^Hif-else to rule them all.
     if (elem instanceof content.HTMLImageElement) {
       addImage(elem.src, strings.mediaImg,
                (elem.hasAttribute("alt")) ? elem.alt : strings.notSet, elem, false);
-    }
-    else if (elem instanceof content.SVGImageElement) {
+    } else if (elem instanceof content.SVGImageElement) {
       try {
         // Note: makeURLAbsolute will throw if either the baseURI is not a valid URI
         //       or the URI formed from the baseURI and the URL is not a valid URI.
         let href = makeURLAbsolute(elem.baseURI, elem.href.baseVal);
         addImage(href, strings.mediaImg, "", elem, false);
       } catch (e) { }
-    }
-    else if (elem instanceof content.HTMLVideoElement) {
+    } else if (elem instanceof content.HTMLVideoElement) {
       addImage(elem.currentSrc, strings.mediaVideo, "", elem, false);
-    }
-    else if (elem instanceof content.HTMLAudioElement) {
+    } else if (elem instanceof content.HTMLAudioElement) {
       addImage(elem.currentSrc, strings.mediaAudio, "", elem, false);
-    }
-    else if (elem instanceof content.HTMLLinkElement) {
+    } else if (elem instanceof content.HTMLLinkElement) {
       if (elem.rel && /\bicon\b/i.test(elem.rel)) {
         addImage(elem.href, strings.mediaLink, "", elem, false);
       }
-    }
-    else if (elem instanceof content.HTMLInputElement || elem instanceof content.HTMLButtonElement) {
+    } else if (elem instanceof content.HTMLInputElement || elem instanceof content.HTMLButtonElement) {
       if (elem.type.toLowerCase() == "image") {
         addImage(elem.src, strings.mediaInput,
                  (elem.hasAttribute("alt")) ? elem.alt : strings.notSet, elem, false);
       }
-    }
-    else if (elem instanceof content.HTMLObjectElement) {
+    } else if (elem instanceof content.HTMLObjectElement) {
       addImage(elem.data, strings.mediaObject, this.getValueText(elem), elem, false);
-    }
-    else if (elem instanceof content.HTMLEmbedElement) {
+    } else if (elem instanceof content.HTMLEmbedElement) {
       addImage(elem.src, strings.mediaEmbed, "", elem, false);
     }
 
     return mediaItems;
   },
 
   /**
    * Set up a JSON element object with all the instanceOf and other infomation that
    * makePreview in pageInfo.js uses to figure out how to display the preview.
    */
 
-  serializeElementInfo(document, url, type, alt, item, isBG)
-  {
+  serializeElementInfo(document, url, type, alt, item, isBG) {
     let result = {};
 
     let imageText;
     if (!isBG &&
         !(item instanceof content.SVGImageElement) &&
         !(document instanceof content.ImageDocument)) {
       imageText = item.title || item.alt;
 
@@ -1317,18 +1299,17 @@ var PageInfoListener = {
     result.baseURI = item.baseURI;
 
     return result;
   },
 
   // Other Misc Stuff
   // Modified from the Links Panel v2.3, http://segment7.net/mozilla/links/links.html
   // parse a node to extract the contents of the node
-  getValueText(node)
-  {
+  getValueText(node) {
 
     let valueText = "";
 
     // Form input elements don't generally contain information that is useful to our callers, so return nothing.
     if (node instanceof content.HTMLInputElement ||
         node instanceof content.HTMLSelectElement ||
         node instanceof content.HTMLTextAreaElement) {
       return valueText;
@@ -1339,54 +1320,50 @@ var PageInfoListener = {
 
     for (let i = 0; i < length; i++) {
       let childNode = node.childNodes[i];
       let nodeType = childNode.nodeType;
 
       // Text nodes are where the goods are.
       if (nodeType == content.Node.TEXT_NODE) {
         valueText += " " + childNode.nodeValue;
-      }
-      // And elements can have more text inside them.
-      else if (nodeType == content.Node.ELEMENT_NODE) {
+      } else if (nodeType == content.Node.ELEMENT_NODE) {
+        // And elements can have more text inside them.
         // Images are special, we want to capture the alt text as if the image weren't there.
         if (childNode instanceof content.HTMLImageElement) {
           valueText += " " + this.getAltText(childNode);
-        }
-        else {
+        } else {
           valueText += " " + this.getValueText(childNode);
         }
       }
     }
 
     return this.stripWS(valueText);
   },
 
   // Copied from the Links Panel v2.3, http://segment7.net/mozilla/links/links.html.
   // Traverse the tree in search of an img or area element and grab its alt tag.
-  getAltText(node)
-  {
+  getAltText(node) {
     let altText = "";
 
     if (node.alt) {
       return node.alt;
     }
     let length = node.childNodes.length;
     for (let i = 0; i < length; i++) {
       if ((altText = this.getAltText(node.childNodes[i]) != undefined)) { // stupid js warning...
         return altText;
       }
     }
     return "";
   },
 
   // Copied from the Links Panel v2.3, http://segment7.net/mozilla/links/links.html.
   // Strip leading and trailing whitespace, and replace multiple consecutive whitespace characters with a single space.
-  stripWS(text)
-  {
+  stripWS(text) {
     let middleRE = /\s+/g;
     let endRE = /(^\s+)|(\s+$)/g;
 
     text = text.replace(middleRE, " ");
     return text.replace(endRE, "");
   }
 };
 PageInfoListener.init();
--- a/browser/base/content/contentSearchUI.js
+++ b/browser/base/content/contentSearchUI.js
@@ -78,18 +78,17 @@ ContentSearchUIController.prototype = {
 
   set defaultEngine(engine) {
     if (this._defaultEngine && this._defaultEngine.icon) {
       URL.revokeObjectURL(this._defaultEngine.icon);
     }
     let icon;
     if (engine.iconBuffer) {
       icon = this._getFaviconURIFromBuffer(engine.iconBuffer);
-    }
-    else {
+    } else {
       icon = this._getImageURIForCurrentResolution(
         "chrome://mozapps/skin/places/defaultFavicon.png");
     }
     this._defaultEngine = {
       name: engine.name,
       icon,
     };
     this._updateDefaultEngineHeader();
@@ -137,18 +136,17 @@ ContentSearchUIController.prototype = {
                        this.numSuggestions + this.selectedButtonIndex : -1;
     for (let i = 0; i < allElts.length; ++i) {
       let elt = allElts[i];
       let ariaSelectedElt = i < this.numSuggestions ? elt.firstChild : elt;
       if (i == idx) {
         elt.classList.add("selected");
         ariaSelectedElt.setAttribute("aria-selected", "true");
         this.input.setAttribute("aria-activedescendant", ariaSelectedElt.id);
-      }
-      else if (i != excludeIndex) {
+      } else if (i != excludeIndex) {
         elt.classList.remove("selected");
         ariaSelectedElt.setAttribute("aria-selected", "false");
       }
     }
   },
 
   get selectedButtonIndex() {
     let elts = [...this._oneOffButtons,
@@ -164,18 +162,17 @@ ContentSearchUIController.prototype = {
   set selectedButtonIndex(idx) {
     let elts = [...this._oneOffButtons,
                 document.getElementById("contentSearchSettingsButton")];
     for (let i = 0; i < elts.length; ++i) {
       let elt = elts[i];
       if (i == idx) {
         elt.classList.add("selected");
         elt.setAttribute("aria-selected", "true");
-      }
-      else {
+      } else {
         elt.classList.remove("selected");
         elt.setAttribute("aria-selected", "false");
       }
     }
   },
 
   get selectedEngineName() {
     let selectedElt = this._oneOffsTable.querySelector(".selected");
@@ -248,18 +245,17 @@ ContentSearchUIController.prototype = {
     }
 
     let searchText = this.input;
     let searchTerms;
     if (this._table.hidden ||
         aEvent.originalTarget.id == "contentSearchDefaultEngineHeader" ||
         aEvent instanceof KeyboardEvent) {
       searchTerms = searchText.value;
-    }
-    else {
+    } else {
       searchTerms = this.suggestionAtIndex(this.selectedIndex) || searchText.value;
     }
     // Send an event that will perform a search and Firefox Health Report will
     // record that a search from the healthReportKey passed to the constructor.
     let eventData = {
       engineName: this.selectedEngineName,
       searchString: searchTerms,
       healthReportKey: this._healthReportKey,
@@ -290,18 +286,17 @@ ContentSearchUIController.prototype = {
     this._sendMsg("Search", eventData);
     this.addInputValueToFormHistory();
   },
 
   _onInput() {
     if (!this.input.value) {
       this._stickyInputValue = "";
       this._hideSuggestions();
-    }
-    else if (this.input.value != this._stickyInputValue) {
+    } else if (this.input.value != this._stickyInputValue) {
       // Only fetch new suggestions if the input value has changed.
       this._getSuggestions();
       this.selectAndUpdateInput(-1);
     }
     this._updateSearchWithHeader();
   },
 
   _onKeypress(event) {
@@ -404,43 +399,37 @@ ContentSearchUIController.prototype = {
       }
       // If are moving up from the first one off, we have to deselect the one off
       // manually because the selectedIndex setter tries to exclude the selected
       // one-off (which is desirable for accel+shift+up/down).
       if (currentIndex == this.numSuggestions && selectedIndexDelta == -1) {
         this.selectedButtonIndex = -1;
       }
       this.selectAndUpdateInput(newSelectedIndex);
-    }
-
-    else if (selectedSuggestionDelta) {
+    } else if (selectedSuggestionDelta) {
       let newSelectedIndex;
       if (currentIndex >= this.numSuggestions || currentIndex == -1) {
         // No suggestion already selected, select the first/last one appropriately.
         newSelectedIndex = selectedSuggestionDelta == 1 ?
                            0 : this.numSuggestions - 1;
-      }
-      else {
+      } else {
         newSelectedIndex = currentIndex + selectedSuggestionDelta;
       }
       if (newSelectedIndex >= this.numSuggestions) {
         newSelectedIndex = -1;
       }
       this.selectAndUpdateInput(newSelectedIndex);
-    }
-
-    else if (selectedOneOffDelta) {
+    } else if (selectedOneOffDelta) {
       let newSelectedIndex;
       let currentButton = this.selectedButtonIndex;
       if (currentButton == -1 || currentButton == this._oneOffButtons.length) {
         // No one-off already selected, select the first/last one appropriately.
         newSelectedIndex = selectedOneOffDelta == 1 ?
                            0 : this._oneOffButtons.length - 1;
-      }
-      else {
+      } else {
         newSelectedIndex = currentButton + selectedOneOffDelta;
       }
       // Allow selection of the settings button via the tab key.
       if (newSelectedIndex == this._oneOffButtons.length &&
           event.keyCode != event.DOM_VK_TAB) {
         newSelectedIndex = -1;
       }
       this.selectedButtonIndex = newSelectedIndex;
@@ -545,23 +534,21 @@ ContentSearchUIController.prototype = {
 
     // Add the suggestions to the table.
     let searchWords =
       new Set(suggestions.searchString.trim().toLowerCase().split(/\s+/));
     for (let i = 0; i < MAX_DISPLAYED_SUGGESTIONS; i++) {
       let type, idx;
       if (i < suggestions.formHistory.length) {
         [type, idx] = ["formHistory", i];
-      }
-      else {
+      } else {
         let j = i - suggestions.formHistory.length;
         if (j < suggestions.remote.length) {
           [type, idx] = ["remote", j];
-        }
-        else {
+        } else {
           break;
         }
       }
       this._suggestionsList.appendChild(
         this._makeTableRow(type, suggestions[type][idx], i, searchWords));
     }
 
     if (this._table.hidden) {
@@ -856,18 +843,17 @@ ContentSearchUIController.prototype = {
         cell.setAttribute("class", "contentSearchSuggestionsContainer");
       }
       let button = document.createElementNS(HTML_NS, "button");
       button.setAttribute("class", "contentSearchOneOffItem");
       let img = document.createElementNS(HTML_NS, "img");
       let uri;
       if (engine.iconBuffer) {
         uri = this._getFaviconURIFromBuffer(engine.iconBuffer);
-      }
-      else {
+      } else {
         uri = this._getImageURIForCurrentResolution(
           "chrome://browser/skin/search-engine-placeholder.png");
       }
       img.setAttribute("src", uri);
       img.addEventListener("load", function imgLoad() {
         img.removeEventListener("load", imgLoad);
         URL.revokeObjectURL(uri);
       });
--- a/browser/base/content/pageinfo/feeds.js
+++ b/browser/base/content/pageinfo/feeds.js
@@ -1,32 +1,29 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-function initFeedTab(feeds)
-{
+function initFeedTab(feeds) {
   for (let feed of feeds) {
     let [name, type, url] = feed;
     addRow(name, type, url);
   }
 
   var feedListbox = document.getElementById("feedListbox");
   document.getElementById("feedTab").hidden = feedListbox.getRowCount() == 0;
 }
 
-function onSubscribeFeed()
-{
+function onSubscribeFeed() {
   var listbox = document.getElementById("feedListbox");
   openUILinkIn(listbox.selectedItem.getAttribute("feedURL"), "current",
                { ignoreAlt: true });
 }
 
-function addRow(name, type, url)
-{
+function addRow(name, type, url) {
   var item = document.createElement("richlistitem");
   item.setAttribute("feed", "true");
   item.setAttribute("name", name);
   item.setAttribute("type", type);
   item.setAttribute("feedURL", url);
   document.getElementById("feedListbox").appendChild(item);
 }
--- a/browser/base/content/pageinfo/pageInfo.js
+++ b/browser/base/content/pageinfo/pageInfo.js
@@ -1,106 +1,93 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 Components.utils.import("resource://gre/modules/LoadContextInfo.jsm");
 Components.utils.import("resource://gre/modules/Services.jsm");
 
 // define a js object to implement nsITreeView
-function pageInfoTreeView(treeid, copycol)
-{
+function pageInfoTreeView(treeid, copycol) {
   // copycol is the index number for the column that we want to add to
   // the copy-n-paste buffer when the user hits accel-c
   this.treeid = treeid;
   this.copycol = copycol;
   this.rows = 0;
   this.tree = null;
   this.data = [ ];
   this.selection = null;
   this.sortcol = -1;
   this.sortdir = false;
 }
 
 pageInfoTreeView.prototype = {
   set rowCount(c) { throw "rowCount is a readonly property"; },
   get rowCount() { return this.rows; },
 
-  setTree(tree)
-  {
+  setTree(tree) {
     this.tree = tree;
   },
 
-  getCellText(row, column)
-  {
+  getCellText(row, column) {
     // row can be null, but js arrays are 0-indexed.
     // colidx cannot be null, but can be larger than the number
     // of columns in the array. In this case it's the fault of
     // whoever typoed while calling this function.
     return this.data[row][column.index] || "";
   },
 
-  setCellValue(row, column, value)
-  {
+  setCellValue(row, column, value) {
   },
 
-  setCellText(row, column, value)
-  {
+  setCellText(row, column, value) {
     this.data[row][column.index] = value;
   },
 
-  addRow(row)
-  {
+  addRow(row) {
     this.rows = this.data.push(row);
     this.rowCountChanged(this.rows - 1, 1);
     if (this.selection.count == 0 && this.rowCount && !gImageElement) {
       this.selection.select(0);
     }
   },
 
-  addRows(rows)
-  {
+  addRows(rows) {
     for (let row of rows) {
       this.addRow(row);
     }
   },
 
-  rowCountChanged(index, count)
-  {
+  rowCountChanged(index, count) {
     this.tree.rowCountChanged(index, count);
   },
 
-  invalidate()
-  {
+  invalidate() {
     this.tree.invalidate();
   },
 
-  clear()
-  {
+  clear() {
     if (this.tree)
       this.tree.rowCountChanged(0, -this.rows);
     this.rows = 0;
     this.data = [ ];
   },
 
-  handleCopy(row)
-  {
+  handleCopy(row) {
     return (row < 0 || this.copycol < 0) ? "" : (this.data[row][this.copycol] || "");
   },
 
-  performActionOnRow(action, row)
-  {
+  performActionOnRow(action, row) {
     if (action == "copy") {
       var data = this.handleCopy(row)
       this.tree.treeBody.parentNode.setAttribute("copybuffer", data);
     }
   },
 
-  onPageMediaSort(columnname)
-  {
+  onPageMediaSort(columnname) {
     var tree = document.getElementById(this.treeid);
     var treecol = tree.columns.getNamedColumn(columnname);
 
     this.sortdir =
       gTreeUtils.sort(
         tree,
         this,
         this.data,
@@ -309,18 +296,17 @@ var onFinished = [ ];
 var onUnloadRegistry = [ ];
 
 /* Called when PageInfo window is loaded.  Arguments are:
  *  window.arguments[0] - (optional) an object consisting of
  *                         - doc: (optional) document to use for source. if not provided,
  *                                the calling window's document will be used
  *                         - initialTab: (optional) id of the inital tab to display
  */
-function onLoadPageInfo()
-{
+function onLoadPageInfo() {
   gBundle = document.getElementById("pageinfobundle");
   gStrings.unknown = gBundle.getString("unknown");
   gStrings.notSet = gBundle.getString("notset");
   gStrings.mediaImg = gBundle.getString("mediaImg");
   gStrings.mediaBGImg = gBundle.getString("mediaBGImg");
   gStrings.mediaBorderImg = gBundle.getString("mediaBorderImg");
   gStrings.mediaListImg = gBundle.getString("mediaListImg");
   gStrings.mediaCursor = gBundle.getString("mediaCursor");
@@ -341,18 +327,17 @@ function onLoadPageInfo()
 
   /* Select the requested tab, if the name is specified */
   loadTab(args);
   Components.classes["@mozilla.org/observer-service;1"]
             .getService(Components.interfaces.nsIObserverService)
             .notifyObservers(window, "page-info-dialog-loaded", null);
 }
 
-function loadPageInfo(frameOuterWindowID, imageElement, browser)
-{
+function loadPageInfo(frameOuterWindowID, imageElement, browser) {
   browser = browser || window.opener.gBrowser.selectedBrowser;
   let mm = browser.messageManager;
 
   gStrings["application/rss+xml"]  = gBundle.getString("feedRss");
   gStrings["application/atom+xml"] = gBundle.getString("feedAtom");
   gStrings["text/xml"]             = gBundle.getString("feedXML");
   gStrings["application/xml"]      = gBundle.getString("feedXML");
   gStrings["application/rdf+xml"]  = gBundle.getString("feedXML");
@@ -410,18 +395,17 @@ function loadPageInfo(frameOuterWindowID
 
     selectImage();
   });
 
   /* Call registered overlay init functions */
   onLoadRegistry.forEach(function(func) { func(); });
 }
 
-function resetPageInfo(args)
-{
+function resetPageInfo(args) {
   /* Reset Meta tags part */
   gMetaView.clear();
 
   /* Reset Media tab */
   var mediaTab = document.getElementById("mediaTab");
   if (!mediaTab.hidden) {
     Components.classes["@mozilla.org/observer-service;1"]
               .getService(Components.interfaces.nsIObserverService)
@@ -438,53 +422,49 @@ function resetPageInfo(args)
 
   /* Call registered overlay reset functions */
   onResetRegistry.forEach(function(func) { func(); });
 
   /* Rebuild the data */
   loadTab(args);
 }
 
-function onUnloadPageInfo()
-{
+function onUnloadPageInfo() {
   // Remove the observer, only if there is at least 1 image.
   if (!document.getElementById("mediaTab").hidden) {
     Components.classes["@mozilla.org/observer-service;1"]
               .getService(Components.interfaces.nsIObserverService)
               .removeObserver(imagePermissionObserver, "perm-changed");
   }
 
   /* Call registered overlay unload functions */
   onUnloadRegistry.forEach(function(func) { func(); });
 }
 
-function doHelpButton()
-{
+function doHelpButton() {
   const helpTopics = {
     "generalPanel":  "pageinfo_general",
     "mediaPanel":    "pageinfo_media",
     "feedPanel":     "pageinfo_feed",
     "permPanel":     "pageinfo_permissions",
     "securityPanel": "pageinfo_security"
   };
 
   var deck  = document.getElementById("mainDeck");
   var helpdoc = helpTopics[deck.selectedPanel.id] || "pageinfo_general";
   openHelpLink(helpdoc);
 }
 
-function showTab(id)
-{
+function showTab(id) {
   var deck  = document.getElementById("mainDeck");
   var pagel = document.getElementById(id + "Panel");
   deck.selectedPanel = pagel;
 }
 
-function loadTab(args)
-{
+function loadTab(args) {
   // If the "View Image Info" context menu item was used, the related image
   // element is provided as an argument. This can't be a background image.
   let imageElement = args && args.imageElement;
   let frameOuterWindowID = args && args.frameOuterWindowID;
   let browser = args && args.browser;
 
   /* Load the page info */
   loadPageInfo(frameOuterWindowID, imageElement, browser);
@@ -492,48 +472,44 @@ function loadTab(args)
   var initialTab = (args && args.initialTab) || "generalTab";
   var radioGroup = document.getElementById("viewGroup");
   initialTab = document.getElementById(initialTab) || document.getElementById("generalTab");
   radioGroup.selectedItem = initialTab;
   radioGroup.selectedItem.doCommand();
   radioGroup.focus();
 }
 
-function toggleGroupbox(id)
-{
+function toggleGroupbox(id) {
   var elt = document.getElementById(id);
   if (elt.hasAttribute("closed")) {
     elt.removeAttribute("closed");
     if (elt.flexWhenOpened)
       elt.flex = elt.flexWhenOpened;
-  }
-  else {
+  } else {
     elt.setAttribute("closed", "true");
     if (elt.flex) {
       elt.flexWhenOpened = elt.flex;
       elt.flex = 0;
     }
   }
 }
 
-function openCacheEntry(key, cb)
-{
+function openCacheEntry(key, cb) {
   var checkCacheListener = {
     onCacheEntryCheck(entry, appCache) {
       return Components.interfaces.nsICacheEntryOpenCallback.ENTRY_WANTED;
     },
     onCacheEntryAvailable(entry, isNew, appCache, status) {
       cb(entry);
     }
   };
   diskStorage.asyncOpenURI(Services.io.newURI(key, null, null), "", nsICacheStorage.OPEN_READONLY, checkCacheListener);
 }
 
-function makeGeneralTab(metaViewRows, docInfo)
-{
+function makeGeneralTab(metaViewRows, docInfo) {
   var title = (docInfo.title) ? docInfo.title : gBundle.getString("noPageTitle");
   document.getElementById("titletext").value = title;
 
   var url = docInfo.location;
   setItemValue("urltext", url);
 
   var referrer = ("referrer" in docInfo && docInfo.referrer);
   setItemValue("refertext", referrer);
@@ -581,18 +557,17 @@ function makeGeneralTab(metaViewRows, do
       var pageSize = cacheEntry.dataSize;
       var kbSize = formatNumber(Math.round(pageSize / 1024 * 100) / 100);
       sizeText = gBundle.getFormattedString("generalSize", [kbSize, formatNumber(pageSize)]);
     }
     setItemValue("sizetext", sizeText);
   });
 }
 
-function addImage(imageViewRow)
-{
+function addImage(imageViewRow) {
   let [url, type, alt, elem, isBg] = imageViewRow;
 
   if (!url)
     return;
 
   if (!gImageHash.hasOwnProperty(url))
     gImageHash[url] = { };
   if (!gImageHash[url].hasOwnProperty(type))
@@ -614,42 +589,39 @@ function addImage(imageViewRow)
 
     // Add the observer, only once.
     if (gImageView.data.length == 1) {
       document.getElementById("mediaTab").hidden = false;
       Components.classes["@mozilla.org/observer-service;1"]
                 .getService(Components.interfaces.nsIObserverService)
                 .addObserver(imagePermissionObserver, "perm-changed", false);
     }
-  }
-  else {
+  } else {
     var i = gImageHash[url][type][alt];
     gImageView.data[i][COL_IMAGE_COUNT]++;
     // The same image can occur several times on the page at different sizes.
     // If the "View Image Info" context menu item was used, ensure we select
     // the correct element.
     if (!gImageView.data[i][COL_IMAGE_BG] &&
         gImageElement && url == gImageElement.currentSrc &&
         gImageElement.width == elem.width &&
         gImageElement.height == elem.height &&
         gImageElement.imageText == elem.imageText) {
       gImageView.data[i][COL_IMAGE_NODE] = elem;
     }
   }
 }
 
 // Link Stuff
-function openURL(target)
-{
+function openURL(target) {
   var url = target.parentNode.childNodes[2].value;
   window.open(url, "_blank", "chrome");
 }
 
-function onBeginLinkDrag(event, urlField, descField)
-{
+function onBeginLinkDrag(event, urlField, descField) {
   if (event.originalTarget.localName != "treechildren")
     return;
 
   var tree = event.target;
   if (!("treeBoxObject" in tree))
     tree = tree.parentNode;
 
   var row = tree.treeBoxObject.getRowAt(event.clientX, event.clientY);
@@ -664,40 +636,37 @@ function onBeginLinkDrag(event, urlField
 
   var dt = event.dataTransfer;
   dt.setData("text/x-moz-url", url + "\n" + desc);
   dt.setData("text/url-list", url);
   dt.setData("text/plain", url);
 }
 
 // Image Stuff
-function getSelectedRows(tree)
-{
+function getSelectedRows(tree) {
   var start = { };
   var end   = { };
   var numRanges = tree.view.selection.getRangeCount();
 
   var rowArray = [ ];
   for (var t = 0; t < numRanges; t++) {
     tree.view.selection.getRangeAt(t, start, end);
     for (var v = start.value; v <= end.value; v++)
       rowArray.push(v);
   }
 
   return rowArray;
 }
 
-function getSelectedRow(tree)
-{
+function getSelectedRow(tree) {
   var rows = getSelectedRows(tree);
   return (rows.length == 1) ? rows[0] : -1;
 }
 
-function selectSaveFolder(aCallback)
-{
+function selectSaveFolder(aCallback) {
   const nsILocalFile = Components.interfaces.nsILocalFile;
   const nsIFilePicker = Components.interfaces.nsIFilePicker;
   let titleText = gBundle.getString("mediaSelectFolder");
   let fp = Components.classes["@mozilla.org/filepicker;1"].
            createInstance(nsIFilePicker);
   let fpCallback = function fpCallback_done(aResult) {
     if (aResult == nsIFilePicker.returnOK) {
       aCallback(fp.file.QueryInterface(nsILocalFile));
@@ -715,18 +684,17 @@ function selectSaveFolder(aCallback)
     if (initialDir) {
       fp.displayDirectory = initialDir;
     }
   } catch (ex) {
   }
   fp.open(fpCallback);
 }
 
-function saveMedia()
-{
+function saveMedia() {
   var tree = document.getElementById("imagetree");
   var rowArray = getSelectedRows(tree);
   if (rowArray.length == 1) {
     let row = rowArray[0];
     let item = gImageView.data[row][COL_IMAGE_NODE];
     let url = gImageView.data[row][COL_IMAGE_ADDRESS];
 
     if (url) {
@@ -775,60 +743,55 @@ function saveMedia()
                        makeURI(item.baseURI));
           }
         }
       }
     });
   }
 }
 
-function onBlockImage()
-{
+function onBlockImage() {
   var permissionManager = Components.classes[PERMISSION_CONTRACTID]
                                     .getService(nsIPermissionManager);
 
   var checkbox = document.getElementById("blockImage");
   var uri = makeURI(document.getElementById("imageurltext").value);
   if (checkbox.checked)
     permissionManager.add(uri, "image", nsIPermissionManager.DENY_ACTION);
   else
     permissionManager.remove(uri, "image");
 }
 
-function onImageSelect()
-{
+function onImageSelect() {
   var previewBox   = document.getElementById("mediaPreviewBox");
   var mediaSaveBox = document.getElementById("mediaSaveBox");
   var splitter     = document.getElementById("mediaSplitter");
   var tree = document.getElementById("imagetree");
   var count = tree.view.selection.count;
   if (count == 0) {
     previewBox.collapsed   = true;
     mediaSaveBox.collapsed = true;
     splitter.collapsed     = true;
     tree.flex = 1;
-  }
-  else if (count > 1) {
+  } else if (count > 1) {
     splitter.collapsed     = true;
     previewBox.collapsed   = true;
     mediaSaveBox.collapsed = false;
     tree.flex = 1;
-  }
-  else {
+  } else {
     mediaSaveBox.collapsed = true;
     splitter.collapsed     = false;
     previewBox.collapsed   = false;
     tree.flex = 0;
     makePreview(getSelectedRows(tree)[0]);
   }
 }
 
 // Makes the media preview (image, video, etc) for the selected row on the media tab.
-function makePreview(row)
-{
+function makePreview(row) {
   var item = gImageView.data[row][COL_IMAGE_NODE];
   var url = gImageView.data[row][COL_IMAGE_ADDRESS];
   var isBG = gImageView.data[row][COL_IMAGE_BG];
   var isAudio = false;
 
   setItemValue("imageurltext", url);
   setItemValue("imagetext", item.imageText);
   setItemValue("imagelongdesctext", item.longDesc);
@@ -838,18 +801,17 @@ function makePreview(row)
   openCacheEntry(cacheKey, function(cacheEntry) {
     // find out the file size
     var sizeText;
     if (cacheEntry) {
       let imageSize = cacheEntry.dataSize;
       var kbSize = Math.round(imageSize / 1024 * 100) / 100;
       sizeText = gBundle.getFormattedString("generalSize",
                                             [formatNumber(kbSize), formatNumber(imageSize)]);
-    }
-    else
+    } else
       sizeText = gBundle.getString("mediaUnknownNotCached");
     setItemValue("imagesizetext", sizeText);
 
     var mimeType = item.mimeType || this.getContentTypeFromHeaders(cacheEntry);
     var numFrames = item.numFrames;
 
     var imageType;
     if (mimeType) {
@@ -857,23 +819,21 @@ function makePreview(row)
       let imageMimeType = /^image\/(.*)/i.exec(mimeType);
       if (imageMimeType) {
         imageType = imageMimeType[1].toUpperCase();
         if (numFrames > 1)
           imageType = gBundle.getFormattedString("mediaAnimatedImageType",
                                                  [imageType, numFrames]);
         else
           imageType = gBundle.getFormattedString("mediaImageType", [imageType]);
-      }
-      else {
+      } else {
         // the MIME type doesn't begin with image/, display the raw type
         imageType = mimeType;
       }
-    }
-    else {
+    } else {
       // We couldn't find the type, fall back to the value in the treeview
       imageType = gImageView.data[row][COL_IMAGE_TYPE];
     }
     setItemValue("imagetypetext", imageType);
 
     var imageContainer = document.getElementById("theimagecontainer");
     var oldImage = document.getElementById("thepreviewimage");
 
@@ -901,89 +861,83 @@ function makePreview(row)
       // failing that, we'll assume that the image was never loaded in the
       // other process (this can be true for favicons, for example), and so
       // we'll assume that we can use the natural dimensions of the newImage
       // we just created. If the natural dimensions of newImage are not known
       // then the image is probably broken.
       if (!isBG) {
         newImage.width = ("width" in item && item.width) || newImage.naturalWidth;
         newImage.height = ("height" in item && item.height) || newImage.naturalHeight;
-      }
-      else {
+      } else {
         // the Width and Height of an HTML tag should not be used for its background image
         // (for example, "table" can have "width" or "height" attributes)
         newImage.width = item.naturalWidth || newImage.naturalWidth;
         newImage.height = item.naturalHeight || newImage.naturalHeight;
       }
 
       if (item.SVGImageElement) {
         newImage.width = item.SVGImageElementWidth;
         newImage.height = item.SVGImageElementHeight;
       }
 
       width = newImage.width;
       height = newImage.height;
 
       document.getElementById("theimagecontainer").collapsed = false
       document.getElementById("brokenimagecontainer").collapsed = true;
-    }
-    else if (item.HTMLVideoElement && isProtocolAllowed) {
+    } else if (item.HTMLVideoElement && isProtocolAllowed) {
       newImage = document.createElementNS("http://www.w3.org/1999/xhtml", "video");
       newImage.id = "thepreviewimage";
       newImage.src = url;
       newImage.controls = true;
       width = physWidth = item.videoWidth;
       height = physHeight = item.videoHeight;
 
       document.getElementById("theimagecontainer").collapsed = false;
       document.getElementById("brokenimagecontainer").collapsed = true;
-    }
-    else if (item.HTMLAudioElement && isProtocolAllowed) {
+    } else if (item.HTMLAudioElement && isProtocolAllowed) {
       newImage = new Audio;
       newImage.id = "thepreviewimage";
       newImage.src = url;
       newImage.controls = true;
       isAudio = true;
 
       document.getElementById("theimagecontainer").collapsed = false;
       document.getElementById("brokenimagecontainer").collapsed = true;
-    }
-    else {
+    } else {
       // fallback image for protocols not allowed (e.g., javascript:)
       // or elements not [yet] handled (e.g., object, embed).
       document.getElementById("brokenimagecontainer").collapsed = false;
       document.getElementById("theimagecontainer").collapsed = true;
     }
 
     let imageSize = "";
     if (url && !isAudio) {
       if (width != physWidth || height != physHeight) {
         imageSize = gBundle.getFormattedString("mediaDimensionsScaled",
                                                [formatNumber(physWidth),
                                                 formatNumber(physHeight),
                                                 formatNumber(width),
                                                 formatNumber(height)]);
-      }
-      else {
+      } else {
         imageSize = gBundle.getFormattedString("mediaDimensions",
                                                [formatNumber(width),
                                                 formatNumber(height)]);
       }
     }
     setItemValue("imagedimensiontext", imageSize);
 
     makeBlockImage(url);
 
     imageContainer.removeChild(oldImage);
     imageContainer.appendChild(newImage);
   });
 }
 
-function makeBlockImage(url)
-{
+function makeBlockImage(url) {
   var permissionManager = Components.classes[PERMISSION_CONTRACTID]
                                     .getService(nsIPermissionManager);
   var prefs = Components.classes[PREFERENCES_CONTRACTID]
                         .getService(Components.interfaces.nsIPrefBranch);
 
   var checkbox = document.getElementById("blockImage");
   var imagePref = prefs.getIntPref("permissions.default.image");
   if (!(/^https?:/.test(url)) || imagePref == 2)
@@ -992,25 +946,23 @@ function makeBlockImage(url)
     checkbox.hidden = true;
   else {
     var uri = makeURI(url);
     if (uri.host) {
       checkbox.hidden = false;
       checkbox.label = gBundle.getFormattedString("mediaBlockImage", [uri.host]);
       var perm = permissionManager.testPermission(uri, "image");
       checkbox.checked = perm == nsIPermissionManager.DENY_ACTION;
-    }
-    else
+    } else
       checkbox.hidden = true;
   }
 }
 
 var imagePermissionObserver = {
-  observe(aSubject, aTopic, aData)
-  {
+  observe(aSubject, aTopic, aData) {
     if (document.getElementById("mediaPreviewBox").collapsed)
       return;
 
     if (aTopic == "perm-changed") {
       var permission = aSubject.QueryInterface(Components.interfaces.nsIPermission);
       if (permission.type == "image") {
         var imageTree = document.getElementById("imagetree");
         var row = getSelectedRow(imageTree);
@@ -1018,58 +970,52 @@ var imagePermissionObserver = {
         if (permission.matchesURI(makeURI(url), true)) {
           makeBlockImage(url);
         }
       }
     }
   }
 }
 
-function getContentTypeFromHeaders(cacheEntryDescriptor)
-{
+function getContentTypeFromHeaders(cacheEntryDescriptor) {
   if (!cacheEntryDescriptor)
     return null;
 
   let headers = cacheEntryDescriptor.getMetaDataElement("response-head");
   let type = /^Content-Type:\s*(.*?)\s*(?:\;|$)/mi.exec(headers);
   return type && type[1];
 }
 
-function setItemValue(id, value)
-{
+function setItemValue(id, value) {
   var item = document.getElementById(id);
   if (value) {
     item.parentNode.collapsed = false;
     item.value = value;
-  }
-  else
+  } else
     item.parentNode.collapsed = true;
 }
 
-function formatNumber(number)
-{
+function formatNumber(number) {
   return (+number).toLocaleString();  // coerce number to a numeric value before calling toLocaleString()
 }
 
-function formatDate(datestr, unknown)
-{
+function formatDate(datestr, unknown) {
   var date = new Date(datestr);
   if (!date.valueOf())
     return unknown;
 
   const locale = Components.classes["@mozilla.org/chrome/chrome-registry;1"]
                  .getService(Components.interfaces.nsIXULChromeRegistry)
                  .getSelectedLocale("global", true);
   const dtOptions = { year: 'numeric', month: 'long', day: 'numeric',
                       hour: 'numeric', minute: 'numeric', second: 'numeric' };
   return date.toLocaleString(locale, dtOptions);
 }
 
-function doCopy()
-{
+function doCopy() {
   if (!gClipboardHelper)
     return;
 
   var elem = document.commandDispatcher.focusedElement;
 
   if (elem && "treeBoxObject" in elem) {
     var view = elem.view;
     var selection = view.selection;
@@ -1089,34 +1035,31 @@ function doCopy()
           text.push(tmp);
         elem.removeAttribute("copybuffer");
       }
     }
     gClipboardHelper.copyString(text.join("\n"));
   }
 }
 
-function doSelectAllMedia()
-{
+function doSelectAllMedia() {
   var tree = document.getElementById("imagetree");
 
   if (tree)
     tree.view.selection.selectAll();
 }
 
-function doSelectAll()
-{
+function doSelectAll() {
   var elem = document.commandDispatcher.focusedElement;
 
   if (elem && "treeBoxObject" in elem)
     elem.view.selection.selectAll();
 }
 
-function selectImage()
-{
+function selectImage() {
   if (!gImageElement)
     return;
 
   var tree = document.getElementById("imagetree");
   for (var i = 0; i < tree.view.rowCount; i++) {
     // If the image row element is the image selected from the "View Image Info" context menu item.
     let image = gImageView.data[i][COL_IMAGE_NODE];
     if (!gImageView.data[i][COL_IMAGE_BG] &&
@@ -1127,14 +1070,13 @@ function selectImage()
       tree.view.selection.select(i);
       tree.treeBoxObject.ensureRowIsVisible(i);
       tree.focus();
       return;
     }
   }
 }
 
-function checkProtocol(img)
-{
+function checkProtocol(img) {
   var url = img[COL_IMAGE_ADDRESS];
   return /^data:image\//i.test(url) ||
     /^(https?|ftp|file|about|chrome|resource):/.test(url);
 }
--- a/browser/base/content/pageinfo/permissions.js
+++ b/browser/base/content/pageinfo/permissions.js
@@ -15,81 +15,75 @@ var gUsageRequest;
 var gPermissions = SitePermissions.listPermissions().sort((a, b) => {
   let firstLabel = SitePermissions.getPermissionLabel(a);
   let secondLabel = SitePermissions.getPermissionLabel(b);
   return firstLabel.localeCompare(secondLabel);
 });
 gPermissions.push("plugins");
 
 var permissionObserver = {
-  observe(aSubject, aTopic, aData)
-  {
+  observe(aSubject, aTopic, aData) {
     if (aTopic == "perm-changed") {
       var permission = aSubject.QueryInterface(Components.interfaces.nsIPermission);
       if (permission.matchesURI(gPermURI, true)) {
         if (gPermissions.indexOf(permission.type) > -1)
           initRow(permission.type);
         else if (permission.type.startsWith("plugin"))
           setPluginsRadioState();
       }
     }
   }
 };
 
-function onLoadPermission(uri, principal)
-{
+function onLoadPermission(uri, principal) {
   var permTab = document.getElementById("permTab");
   if (SitePermissions.isSupportedURI(uri)) {
     gPermURI = uri;
     gPermPrincipal = principal;
     var hostText = document.getElementById("hostText");
     hostText.value = gPermURI.prePath;
 
     for (var i of gPermissions)
       initRow(i);
     var os = Components.classes["@mozilla.org/observer-service;1"]
                        .getService(Components.interfaces.nsIObserverService);
     os.addObserver(permissionObserver, "perm-changed", false);
     onUnloadRegistry.push(onUnloadPermission);
     permTab.hidden = false;
-  }
-  else
+  } else
     permTab.hidden = true;
 }
 
-function onUnloadPermission()
-{
+function onUnloadPermission() {
   var os = Components.classes["@mozilla.org/observer-service;1"]
                      .getService(Components.interfaces.nsIObserverService);
   os.removeObserver(permissionObserver, "perm-changed");
 
   if (gUsageRequest) {
     gUsageRequest.cancel();
     gUsageRequest = null;
   }
 }
 
-function initRow(aPartId)
-{
+function initRow(aPartId) {
   if (aPartId == "plugins") {
     initPluginsRow();
     return;
   }
 
   createRow(aPartId);
 
   var checkbox = document.getElementById(aPartId + "Def");
   var command  = document.getElementById("cmd_" + aPartId + "Toggle");
   var perm = SitePermissions.get(gPermURI, aPartId);
 
   if (perm) {
     checkbox.checked = false;
     command.removeAttribute("disabled");
-  }
-  else {
+  } else {
     checkbox.checked = true;
     command.setAttribute("disabled", "true");
     perm = SitePermissions.getDefault(aPartId);
   }
   setRadioState(aPartId, perm);
 
   if (aPartId == "indexedDB") {
     initIndexedDBRow();
@@ -147,52 +141,47 @@ function createRow(aPartId) {
   }
   controls.appendChild(radiogroup);
 
   row.appendChild(controls);
 
   document.getElementById("permList").appendChild(row);
 }
 
-function onCheckboxClick(aPartId)
-{
+function onCheckboxClick(aPartId) {
   var command  = document.getElementById("cmd_" + aPartId + "Toggle");
   var checkbox = document.getElementById(aPartId + "Def");
   if (checkbox.checked) {
     SitePermissions.remove(gPermURI, aPartId);
     command.setAttribute("disabled", "true");
     var perm = SitePermissions.getDefault(aPartId);
     setRadioState(aPartId, perm);
-  }
-  else {
+  } else {
     onRadioClick(aPartId);
     command.removeAttribute("disabled");
   }
 }
 
 function onPluginRadioClick(aEvent) {
   onRadioClick(aEvent.originalTarget.getAttribute("id").split('#')[0]);
 }
 
-function onRadioClick(aPartId)
-{
+function onRadioClick(aPartId) {
   var radioGroup = document.getElementById(aPartId + "RadioGroup");
   var id = radioGroup.selectedItem.id;
   var permission = id.split('#')[1];
   SitePermissions.set(gPermURI, aPartId, permission);
 }
 
-function setRadioState(aPartId, aValue)
-{
+function setRadioState(aPartId, aValue) {
   var radio = document.getElementById(aPartId + "#" + aValue);
   radio.radioGroup.selectedItem = radio;
 }
 
-function initIndexedDBRow()
-{
+function initIndexedDBRow() {
   let row = document.getElementById("perm-indexedDB-row");
   let extras = document.getElementById("perm-indexedDB-extras");
 
   row.appendChild(extras);
 
   var quotaManagerService =
     Components.classes["@mozilla.org/dom/quota-manager-service;1"]
               .getService(nsIQuotaManagerService);
@@ -203,32 +192,30 @@ function initIndexedDBRow()
   var status = document.getElementById("indexedDBStatus");
   var button = document.getElementById("indexedDBClear");
 
   status.value = "";
   status.setAttribute("hidden", "true");
   button.setAttribute("hidden", "true");
 }
 
-function onIndexedDBClear()
-{
+function onIndexedDBClear() {
   Components.classes["@mozilla.org/dom/quota-manager-service;1"]
             .getService(nsIQuotaManagerService)
             .clearStoragesForPrincipal(gPermPrincipal);
 
   Components.classes["@mozilla.org/serviceworkers/manager;1"]
             .getService(Components.interfaces.nsIServiceWorkerManager)
             .removeAndPropagate(gPermURI.host);
 
   SitePermissions.remove(gPermURI, "indexedDB");
   initIndexedDBRow();
 }
 
-function onIndexedDBUsageCallback(request)
-{
+function onIndexedDBUsageCallback(request) {
   let uri = request.principal.URI;
   if (!uri.equals(gPermURI)) {
     throw new Error("Callback received for bad URI: " + uri);
   }
 
   if (request.usage) {
     if (!("DownloadUtils" in window)) {
       Components.utils.import("resource://gre/modules/DownloadUtils.jsm");
--- a/browser/base/content/pageinfo/security.js
+++ b/browser/base/content/pageinfo/security.js
@@ -66,18 +66,17 @@ var security = {
         certificateTransparency : undefined
       };
 
       var version;
       try {
         retval.encryptionAlgorithm = status.cipherName;
         retval.encryptionStrength = status.secretKeyLength;
         version = status.protocolVersion;
-      }
-      catch (e) {
+      } catch (e) {
       }
 
       switch (version) {
         case nsISSLStatus.SSL_VERSION_3:
           retval.version = "SSL 3";
           break;
         case nsISSLStatus.TLS_VERSION_1:
           retval.version = "TLS 1.0";
@@ -147,38 +146,35 @@ var security = {
 
     // No mapping required
     return name;
   },
 
   /**
    * Open the cookie manager window
    */
-  viewCookies()
-  {
+  viewCookies() {
     var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
                        .getService(Components.interfaces.nsIWindowMediator);
     var win = wm.getMostRecentWindow("Browser:Cookies");
     var eTLDService = Components.classes["@mozilla.org/network/effective-tld-service;1"].
                       getService(Components.interfaces.nsIEffectiveTLDService);
 
     var eTLD;
     try {
       eTLD = eTLDService.getBaseDomain(this.uri);
-    }
-    catch (e) {
+    } catch (e) {
       // getBaseDomain will fail if the host is an IP address or is empty
       eTLD = this.uri.asciiHost;
     }
 
     if (win) {
       win.gCookiesWindow.setFilter(eTLD);
       win.focus();
-    }
-    else
+    } else
       window.openDialog("chrome://browser/content/preferences/cookies.xul",
                         "Browser:Cookies", "", {filterString : eTLD});
   },
 
   /**
    * Open the login manager window
    */
   viewPasswords() {
@@ -206,66 +202,61 @@ function securityOnLoad(uri, windowInfo)
   var owner, verifier;
   if (info.cert && !info.isBroken) {
     // Try to pull out meaningful values.  Technically these fields are optional
     // so we'll employ fallbacks where appropriate.  The EV spec states that Org
     // fields must be specified for subject and issuer so that case is simpler.
     if (info.isEV) {
       owner = info.cert.organization;
       verifier = security.mapIssuerOrganization(info.cAName);
-    }
-    else {
+    } else {
       // Technically, a non-EV cert might specify an owner in the O field or not,
       // depending on the CA's issuing policies.  However we don't have any programmatic
       // way to tell those apart, and no policy way to establish which organization
       // vetting standards are good enough (that's what EV is for) so we default to
       // treating these certs as domain-validated only.
       owner = pageInfoBundle.getString("securityNoOwner");
       verifier = security.mapIssuerOrganization(info.cAName ||
                                                 info.cert.issuerCommonName ||
                                                 info.cert.issuerName);
     }
-  }
-  else {
+  } else {
     // We don't have valid identity credentials.
     owner = pageInfoBundle.getString("securityNoOwner");
     verifier = pageInfoBundle.getString("notset");
   }
 
   setText("security-identity-owner-value", owner);
   setText("security-identity-verifier-value", verifier);
 
   /* Manage the View Cert button*/
   var viewCert = document.getElementById("security-view-cert");
   if (info.cert) {
     security._cert = info.cert;
     viewCert.collapsed = false;
-  }
-  else
+  } else
     viewCert.collapsed = true;
 
   /* Set Privacy & History section text */
   var yesStr = pageInfoBundle.getString("yes");
   var noStr = pageInfoBundle.getString("no");
 
   setText("security-privacy-cookies-value",
           hostHasCookies(uri) ? yesStr : noStr);
   setText("security-privacy-passwords-value",
           realmHasPasswords(uri) ? yesStr : noStr);
 
   var visitCount = previousVisitCount(info.hostName);
   if (visitCount > 1) {
     setText("security-privacy-history-value",
             pageInfoBundle.getFormattedString("securityNVisits", [visitCount.toLocaleString()]));
-  }
-  else if (visitCount == 1) {
+  } else if (visitCount == 1) {
     setText("security-privacy-history-value",
             pageInfoBundle.getString("securityOneVisit"));
-  }
-  else {
+  } else {
     setText("security-privacy-history-value", noStr);
   }
 
   /* Set the Technical Detail section messages */
   const pkiBundle = document.getElementById("pkiBundle");
   var hdr;
   var msg1;
   var msg2;
@@ -277,27 +268,25 @@ function securityOnLoad(uri, windowInfo)
     } else {
       hdr = pkiBundle.getFormattedString("pageInfo_BrokenEncryption",
                                          [info.encryptionAlgorithm,
                                           info.encryptionStrength + "",
                                           info.version]);
       msg1 = pkiBundle.getString("pageInfo_WeakCipher");
     }
     msg2 = pkiBundle.getString("pageInfo_Privacy_None2");
-  }
-  else if (info.encryptionStrength > 0) {
+  } else if (info.encryptionStrength > 0) {
     hdr = pkiBundle.getFormattedString("pageInfo_EncryptionWithBitsAndProtocol",
                                        [info.encryptionAlgorithm,
                                         info.encryptionStrength + "",
                                         info.version]);
     msg1 = pkiBundle.getString("pageInfo_Privacy_Encrypted1");
     msg2 = pkiBundle.getString("pageInfo_Privacy_Encrypted2");
     security._cert = info.cert;
-  }
-  else {
+  } else {
     hdr = pkiBundle.getString("pageInfo_NoEncryption");
     if (info.hostName != null)
       msg1 = pkiBundle.getFormattedString("pageInfo_Privacy_None1", [info.hostName]);
     else
       msg1 = pkiBundle.getString("pageInfo_Privacy_None4");
     msg2 = pkiBundle.getString("pageInfo_Privacy_None2");
   }
   setText("security-technical-shortform", hdr);
@@ -310,33 +299,31 @@ function securityOnLoad(uri, windowInfo)
     ctStatus.hidden = false;
     ctStatus.value = pkiBundle.getString(
       "pageInfo_CertificateTransparency_" + info.certificateTransparency);
   } else {
     ctStatus.hidden = true;
   }
 }
 
-function setText(id, value)
-{
+function setText(id, value) {
   var element = document.getElementById(id);
   if (!element)
     return;
   if (element.localName == "textbox" || element.localName == "label")
     element.value = value;
   else {
     if (element.hasChildNodes())
       element.removeChild(element.firstChild);
     var textNode = document.createTextNode(value);
     element.appendChild(textNode);
   }
 }
 
-function viewCertHelper(parent, cert)
-{
+function viewCertHelper(parent, cert) {
   if (!cert)
     return;
 
   var cd = Components.classes[CERTIFICATEDIALOGS_CONTRACTID].getService(nsICertificateDialogs);
   cd.viewCert(parent, cert);
 }
 
 /**
--- a/browser/base/content/sanitize.js
+++ b/browser/base/content/sanitize.js
@@ -33,25 +33,23 @@ XPCOMUtils.defineLazyModuleGetter(this, 
  * to the system.
  */
 const YIELD_PERIOD = 10;
 
 function Sanitizer() {
 }
 Sanitizer.prototype = {
   // warning to the caller: this one may raise an exception (e.g. bug #265028)
-  clearItem(aItemName)
-  {
+  clearItem(aItemName) {
     this.items[aItemName].clear();
   },
 
   prefDomain: "",
 
-  getNameFromPreference(aPreferenceName)
-  {
+  getNameFromPreference(aPreferenceName) {
     return aPreferenceName.substr(this.prefDomain.length);
   },
 
   /**
    * Deletes privacy sensitive data in a batch, according to user preferences.
    * Returns a promise which is resolved if no errors occurred.  If an error
    * occurs, a message is reported to the console and all other items are still
    * cleared before the promise is finally rejected.
@@ -249,18 +247,17 @@ Sanitizer.prototype = {
                 cookieMgr.remove(cookie.host, cookie.name, cookie.path,
                                  false, cookie.originAttributes);
 
                 if (++yieldCounter % YIELD_PERIOD == 0) {
                   yield new Promise(resolve => setTimeout(resolve, 0)); // Don't block the main thread too long
                 }
               }
             }
-          }
-          else {
+          } else {
             // Remove everything
             cookieMgr.removeAll();
             yield new Promise(resolve => setTimeout(resolve, 0)); // Don't block the main thread too long
           }
         } catch (ex) {
           seenException = ex;
         } finally {
           TelemetryStopwatch.finish("FX_SANITIZE_COOKIES_2", refObj);
@@ -788,43 +785,40 @@ Sanitizer.clearPluginData = Task.async(f
   });
 
   if (seenException) {
     throw seenException;
   }
 });
 
 Sanitizer._prefs = null;
-Sanitizer.__defineGetter__("prefs", function()
-{
+Sanitizer.__defineGetter__("prefs", function() {
   return Sanitizer._prefs ? Sanitizer._prefs
     : Sanitizer._prefs = Components.classes["@mozilla.org/preferences-service;1"]
                          .getService(Components.interfaces.nsIPrefService)
                          .getBranch(Sanitizer.PREF_DOMAIN);
 });
 
 // Shows sanitization UI
-Sanitizer.showUI = function(aParentWindow)
-{
+Sanitizer.showUI = function(aParentWindow) {
   let win = AppConstants.platform == "macosx" ?
     null : // make this an app-modal window on Mac
     aParentWindow;
   Services.ww.openWindow(win,
                          "chrome://browser/content/sanitize.xul",
                          "Sanitize",
                          "chrome,titlebar,dialog,centerscreen,modal",
                          null);
 };
 
 /**
  * Deletes privacy sensitive data in a batch, optionally showing the
  * sanitize UI, according to user preferences
  */
-Sanitizer.sanitize = function(aParentWindow)
-{
+Sanitizer.sanitize = function(aParentWindow) {
   Sanitizer.showUI(aParentWindow);
 };
 
 Sanitizer.onStartup = Task.async(function*() {
   // Check if we were interrupted during the last shutdown sanitization.
   let shutownSanitizationWasInterrupted =
     Preferences.get(Sanitizer.PREF_SANITIZE_ON_SHUTDOWN, false) &&
     !Preferences.has(Sanitizer.PREF_SANITIZE_DID_SHUTDOWN);
--- a/browser/base/content/sync/aboutSyncTabs.js
+++ b/browser/base/content/sync/aboutSyncTabs.js
@@ -67,18 +67,17 @@ var RemoteTabViewer = {
       let hide = false;
       if (item.getAttribute("type") == "tab") {
         if (!item.getAttribute("url").toLowerCase().includes(val) &&
             !item.getAttribute("title").toLowerCase().includes(val)) {
           hide = true;
         } else {
           clientTabs++;
         }
-      }
-      else if (item.getAttribute("type") == "client") {
+      } else if (item.getAttribute("type") == "client") {
         if (currentClient) {
           if (clientTabs == 0) {
             currentClient.hidden = true;
           }
         }
         currentClient = item;
         clientTabs = 0;
       }
@@ -301,18 +300,17 @@ var RemoteTabViewer = {
   },
 
   _refetchTabs(force) {
     if (!force) {
       // Don't bother refetching tabs if we already did so recently
       let lastFetch = 0;
       try {
         lastFetch = Services.prefs.getIntPref("services.sync.lastTabFetch");
-      }
-      catch (e) {
+      } catch (e) {
         /* Just use the default value of 0 */
       }
 
       let now = Math.floor(Date.now() / 1000);
       if (now - lastFetch < 30) {
         return false;
       }
     }
--- a/browser/base/content/sync/genericChange.js
+++ b/browser/base/content/sync/genericChange.js
@@ -60,18 +60,17 @@ var Change = {
         document.getElementById("passphraseSpacer").hidden = false;
 
         if (this._updatingPassphrase) {
           document.getElementById("passphraseHelpBox").hidden = false;
           document.title = this._str("new.recoverykey.title");
           introText.textContent = this._str("new.recoverykey.introText");
           this._dialog.getButton("finish").label
             = this._str("new.recoverykey.acceptButton");
-        }
-        else {
+        } else {
           document.getElementById("generatePassphraseButton").hidden = false;
           document.getElementById("passphraseBackupButtons").hidden = false;
           this._passphraseBox.setAttribute("readonly", "true");
           let pp = Weave.Service.identity.syncKey;
           if (Weave.Utils.isPassphrase(pp))
              pp = Weave.Utils.hyphenatePassphrase(pp);
           this._passphraseBox.value = pp;
           this._passphraseBox.focus();
@@ -92,18 +91,17 @@ var Change = {
         box1label.value = this._str("new.password.label");
 
         if (this._currentPasswordInvalid) {
           document.title = this._str("new.password.title");
           introText.textContent = this._str("new.password.introText");
           this._dialog.getButton("finish").label
             = this._str("new.password.acceptButton");
           document.getElementById("textBox2Row").hidden = true;
-        }
-        else {
+        } else {
           document.title = this._str("change.password.title");
           box2label.value = this._str("new.password.confirm");
           introText.textContent = this._str("change.password3.introText");
           warningText.textContent = this._str("change.password.warningText");
           this._dialog.getButton("finish").label
             = this._str("change.password.acceptButton");
         }
         break;
@@ -156,22 +154,20 @@ var Change = {
   doChangePassphrase: function Change_doChangePassphrase() {
     let pp = Weave.Utils.normalizePassphrase(this._passphraseBox.value);
     if (this._updatingPassphrase) {
       Weave.Service.identity.syncKey = pp;
       if (Weave.Service.login()) {
         this._updateStatus("change.recoverykey.success", "success");
         Weave.Service.persistLogin();
         Weave.Service.scheduler.delayedAutoConnect(0);
-      }
-      else {
+      } else {
         this._updateStatus("new.passphrase.status.incorrect", "error");
       }
-    }
-    else {
+    } else {
       this._updateStatus("change.recoverykey.label", "active");
 
       if (Weave.Service.changePassphrase(pp))
         this._updateStatus("change.recoverykey.success", "success");
       else
         this._updateStatus("change.recoverykey.error", "error");
     }
 
@@ -179,22 +175,20 @@ var Change = {
   },
 
   doChangePassword: function Change_doChangePassword() {
     if (this._currentPasswordInvalid) {
       Weave.Service.identity.basicPassword = this._firstBox.value;
       if (Weave.Service.login()) {
         this._updateStatus("change.password.status.success", "success");
         Weave.Service.persistLogin();
-      }
-      else {
+      } else {
         this._updateStatus("new.password.status.incorrect", "error");
       }
-    }
-    else {
+    } else {
       this._updateStatus("change.password.status.active", "active");
 
       if (Weave.Service.changePassword(this._firstBox.value))
         this._updateStatus("change.password.status.success", "success");
       else
         this._updateStatus("change.password.status.error", "error");
     }
 
@@ -205,18 +199,17 @@ var Change = {
     let valid = false;
     let errorString = "";
 
     if (this._dialogType == "ChangePassword") {
       if (this._currentPasswordInvalid)
         [valid, errorString] = gSyncUtils.validatePassword(this._firstBox);
       else
         [valid, errorString] = gSyncUtils.validatePassword(this._firstBox, this._secondBox);
-    }
-    else {
+    } else {
       if (!this._updatingPassphrase)
         return;
 
       valid = this._passphraseBox.value != "";
     }
 
     if (errorString == "")
       this._clearStatus();
--- a/browser/base/content/sync/setup.js
+++ b/browser/base/content/sync/setup.js
@@ -720,18 +720,17 @@ var gSyncSetup = {
     if (addExceptions) {
       this._remoteSites.forEach(function(site) {
         site = ns.getSite(site);
         if (!ns.isJSEnabled(site)) {
           this._disabledSites.push(site); // save status
           ns.setJSEnabled(site, true); // allow site
         }
       }, this);
-    }
-    else {
+    } else {
       this._disabledSites.forEach(function(site) {
         ns.setJSEnabled(site, false);
       });
       this._disabledSites = [];
     }
   },
 
   onExistingServerCommand() {
@@ -796,18 +795,17 @@ var gSyncSetup = {
     delete this._checkServerTimer;
     let el = document.getElementById("server");
     let valid = false;
     let feedback = document.getElementById("serverFeedbackRow");
     if (el.value) {
       valid = this._validateServer(el);
       let str = valid ? "" : "serverInvalid.label";
       this._setFeedbackMessage(feedback, valid, str);
-    }
-    else
+    } else
       this._setFeedbackMessage(feedback, true);
 
     // Recheck account against the new server.
     if (valid)
       this.checkAccount();
 
     this.status.server = valid;
     this.checkFields();
@@ -840,18 +838,17 @@ var gSyncSetup = {
           uri.scheme = "http";
       }
       if (!valid)
         valid = isValid(uri);
 
       if (valid) {
         this.loadCaptcha();
       }
-    }
-    else if (uri) {
+    } else if (uri) {
       valid = true;
       Weave.Service.serverURL = uri.spec;
     }
 
     if (valid)
       element.value = Weave.Service.serverURL;
     else
       Weave.Svc.Prefs.reset("serverURL");
--- a/browser/base/content/sync/utils.js
+++ b/browser/base/content/sync/utils.js
@@ -74,26 +74,26 @@ var gSyncUtils = {
   },
 
   resetPassword() {
     this._openLink(Weave.Service.pwResetURL);
   },
 
   get tosURL() {
     let root = this.fxAccountsEnabled ? "fxa." : "";
-    return  Weave.Svc.Prefs.get(root + "termsURL");
+    return Weave.Svc.Prefs.get(root + "termsURL");
   },
 
   openToS() {
     this._openLink(this.tosURL);
   },
 
   get privacyPolicyURL() {
     let root = this.fxAccountsEnabled ? "fxa." : "";
-    return  Weave.Svc.Prefs.get(root + "privacyURL");
+    return Weave.Svc.Prefs.get(root + "privacyURL");
   },
 
   openPrivacyPolicy() {
     this._openLink(this.privacyPolicyURL);
   },
 
   /**
    * Prepare an invisible iframe with the passphrase backup document.
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -628,18 +628,17 @@
               try {
                 aRequest.QueryInterface(nsIChannel)
                 location = aRequest.URI;
                 originalLocation = aRequest.originalURI;
               } catch (ex) {}
 
               if (aStateFlags & nsIWebProgressListener.STATE_START) {
                 this.mRequestCount++;
-              }
-              else if (aStateFlags & nsIWebProgressListener.STATE_STOP) {
+              } else if (aStateFlags & nsIWebProgressListener.STATE_STOP) {
                 const NS_ERROR_UNKNOWN_HOST = 2152398878;
                 if (--this.mRequestCount > 0 && aStatus == NS_ERROR_UNKNOWN_HOST) {
                   // to prevent bug 235825: wait for the request handled
                   // by the automatic keyword resolver
                   return;
                 }
                 // since we (try to) only handle STATE_STOP of the last request,
                 // the count of open requests should now be 0
@@ -681,19 +680,18 @@
                     if (aWebProgress.isTopLevel &&
                         !(aWebProgress.loadType & Ci.nsIDocShell.LOAD_CMD_RELOAD))
                       this.mTabBrowser.setTabTitleLoading(this.mTab);
                   }
 
                   if (this.mTab.selected)
                     this.mTabBrowser.mIsBusy = true;
                 }
-              }
-              else if (aStateFlags & nsIWebProgressListener.STATE_STOP &&
-                       aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK) {
+              } else if (aStateFlags & nsIWebProgressListener.STATE_STOP &&
+                         aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK) {
 
                 if (this.mTab.hasAttribute("busy")) {
                   this.mTab.removeAttribute("busy");
                   this.mTabBrowser._tabAttrModified(this.mTab, ["busy"]);
                   if (!this.mTab.selected)
                     this.mTab.setAttribute("unread", "true");
                 }
                 this.mTab.removeAttribute("progress");
@@ -904,18 +902,17 @@
               if (sizedIconUrl) {
                 aTab.setAttribute("image", sizedIconUrl);
                 if (!browser.mIconLoadingPrincipal ||
                     !browser.mIconLoadingPrincipal.equals(loadingPrincipal)) {
                   aTab.setAttribute("iconLoadingPrincipal",
                     this.serializationHelper.serializeToString(loadingPrincipal));
                   browser.mIconLoadingPrincipal = loadingPrincipal;
                 }
-              }
-              else {
+              } else {
                 aTab.removeAttribute("image");
                 aTab.removeAttribute("iconLoadingPrincipal");
                 delete browser.mIconLoadingPrincipal;
               }
               this._tabAttrModified(aTab, ["image"]);
             }
 
             this._callProgressListeners(browser, "onLinkIconAvailable", [browser.mIconURL]);
@@ -1658,18 +1655,17 @@
             if (targetTabIndex !== -1)
               this.moveTabTo(tab, ++tabNum);
           }
 
           if (!aLoadInBackground) {
             if (firstTabAdded) {
               // .selectedTab setter focuses the content area
               this.selectedTab = firstTabAdded;
-            }
-            else
+            } else
               this.selectedBrowser.focus();
           }
         ]]></body>
       </method>
 
       <method name="updateBrowserRemoteness">
         <parameter name="aBrowser"/>
         <parameter name="aShouldBeRemote"/>
@@ -3974,18 +3970,17 @@
                 if (this.tabbrowser._printPreviewBrowsers.has(tab.linkedBrowser)) {
                   continue;
                 }
 
                 if (state == this.STATE_LOADED &&
                     !this.maybeVisibleTabs.has(tab) &&
                     tab !== this.lastVisibleTab &&
                     tab !== this.loadingTab &&
-                    tab !== this.requestedTab)
-                {
+                    tab !== this.requestedTab) {
                   this.setTabState(tab, this.STATE_UNLOADING);
                 }
 
                 if (state != this.STATE_UNLOADED && tab !== this.requestedTab) {
                   numPending++;
                 }
               }
 
@@ -6486,18 +6481,17 @@
           let captureListener;
           let platform = this.tabbrowser.AppConstants.platform;
           // On Windows and Mac we can update the drag image during a drag
           // using updateDragImage. On Linux, we can use a panel.
           if (platform == "win" || platform == "macosx") {
             captureListener = function() {
               dt.updateDragImage(canvas, dragImageOffset, dragImageOffset);
             }
-          }
-          else {
+          } else {
             // Create a panel to use it in setDragImage
             // which will tell xul to render a panel that follows
             // the pointer while a dnd session is on.
             if (!this._dndPanel) {
               this._dndCanvas = canvas;
               this._dndPanel = document.createElement("panel");
               this._dndPanel.className = "dragfeedback-tab";
               this._dndPanel.setAttribute("type", "drag");
@@ -6600,27 +6594,25 @@
           let scrollRect = tabStrip.scrollClientRect;
           let minMargin = scrollRect.left - rect.left;
           let maxMargin = Math.min(minMargin + scrollRect.width,
                                    scrollRect.right);
           if (!ltr)
             [minMargin, maxMargin] = [this.clientWidth - maxMargin,
                                       this.clientWidth - minMargin];
           newMargin = (pixelsToScroll > 0) ? maxMargin : minMargin;
-        }
-        else {
+        } else {
           let newIndex = this._getDropIndex(event, effects == "link");
           if (newIndex == this.childNodes.length) {
             let tabRect = this.childNodes[newIndex - 1].getBoundingClientRect();
             if (ltr)
               newMargin = tabRect.right - rect.left;
             else
               newMargin = rect.right - tabRect.left;
-          }
-          else {
+          } else {
             let tabRect = this.childNodes[newIndex].getBoundingClientRect();
             if (ltr)
               newMargin = tabRect.left - rect.left;
             else
               newMargin = rect.right - tabRect.right;
           }
         }
 
--- a/browser/base/content/test/general/browser_aboutAccounts.js
+++ b/browser/base/content/test/general/browser_aboutAccounts.js
@@ -35,18 +35,17 @@ registerCleanupFunction(function() {
 
 var gTests = [
 {
   desc: "Test the remote commands",
   *teardown() {
     gBrowser.removeCurrentTab();
     yield signOut();
   },
-  *run()
-  {
+  *run() {
     setPref("identity.fxaccounts.remote.signup.uri",
             "https://example.com/browser/browser/base/content/test/general/accounts_testRemoteCommands.html");
     let tab = yield promiseNewTabLoadEvent("about:accounts");
     let mm = tab.linkedBrowser.messageManager;
 
     let deferred = Promise.defer();
 
     // We'll get a message when openPrefs() is called, which this test should
@@ -71,18 +70,17 @@ var gTests = [
     }
     yield deferred.promise;
     yield promisePrefsOpened;
   }
 },
 {
   desc: "Test action=signin - no user logged in",
   teardown: () => gBrowser.removeCurrentTab(),
-  *run()
-  {
+  *run() {
     // When this loads with no user logged-in, we expect the "normal" URL
     const expected_url = "https://example.com/?is_sign_in";
     setPref("identity.fxaccounts.remote.signin.uri", expected_url);
     let [tab, url] = yield promiseNewTabWithIframeLoadEvent("about:accounts?action=signin");
     is(url, expected_url, "action=signin got the expected URL");
     // we expect the remote iframe to be shown.
     yield checkVisibilities(tab, {
       stage: false, // parent of 'manage' and 'intro'
@@ -94,18 +92,17 @@ var gTests = [
   }
 },
 {
   desc: "Test action=signin - user logged in",
   *teardown() {
     gBrowser.removeCurrentTab();
     yield signOut();
   },
-  *run()
-  {
+  *run() {
     // When this loads with a user logged-in, we expect the normal URL to
     // have been ignored and the "manage" page to be shown.
     const expected_url = "https://example.com/?is_sign_in";
     setPref("identity.fxaccounts.remote.signin.uri", expected_url);
     yield setSignedInUser();
     let tab = yield promiseNewTabLoadEvent("about:accounts?action=signin");
     // about:accounts initializes after fetching the current user from Fxa -
     // so we also request it - by the time we get it we know it should have
@@ -119,18 +116,17 @@ var gTests = [
       remote: false,
       networkError: false
     });
   }
 },
 {
   desc: "Test action=signin - captive portal",
   teardown: () => gBrowser.removeCurrentTab(),
-  *run()
-  {
+  *run() {
     const signinUrl = "https://redirproxy.example.com/test";
     setPref("identity.fxaccounts.remote.signin.uri", signinUrl);
     let [tab, ] = yield promiseNewTabWithIframeLoadEvent("about:accounts?action=signin");
     yield checkVisibilities(tab, {
       stage: true, // parent of 'manage' and 'intro'
       manage: false,
       intro: false, // this is  "get started"
       remote: false,
@@ -139,18 +135,17 @@ var gTests = [
   }
 },
 {
   desc: "Test action=signin - offline",
   teardown: () => {
     gBrowser.removeCurrentTab();
     BrowserOffline.toggleOfflineStatus();
   },
-  *run()
-  {
+  *run() {
     BrowserOffline.toggleOfflineStatus();
     Services.cache2.clear();
 
     const signinUrl = "https://unknowndomain.cow";
     setPref("identity.fxaccounts.remote.signin.uri", signinUrl);
     let [tab, ] = yield promiseNewTabWithIframeLoadEvent("about:accounts?action=signin");
     yield checkVisibilities(tab, {
       stage: true, // parent of 'manage' and 'intro'
@@ -159,18 +154,17 @@ var gTests = [
       remote: false,
       networkError: true
     });
   }
 },
 {
   desc: "Test action=signup - no user logged in",
   teardown: () => gBrowser.removeCurrentTab(),
-  *run()
-  {
+  *run() {
     const expected_url = "https://example.com/?is_sign_up";
     setPref("identity.fxaccounts.remote.signup.uri", expected_url);
     let [tab, url] = yield promiseNewTabWithIframeLoadEvent("about:accounts?action=signup");
     is(url, expected_url, "action=signup got the expected URL");
     // we expect the remote iframe to be shown.
     yield checkVisibilities(tab, {
       stage: false, // parent of 'manage' and 'intro'
       manage: false,
@@ -178,18 +172,17 @@ var gTests = [
       remote: true,
       networkError: false
     });
   },
 },
 {
   desc: "Test action=signup - user logged in",
   teardown: () => gBrowser.removeCurrentTab(),
-  *run()
-  {
+  *run() {
     const expected_url = "https://example.com/?is_sign_up";
     setPref("identity.fxaccounts.remote.signup.uri", expected_url);
     yield setSignedInUser();
     let tab = yield promiseNewTabLoadEvent("about:accounts?action=signup");
     yield fxAccounts.getSignedInUser();
     // we expect "manage" to be shown.
     yield checkVisibilities(tab, {
       stage: true, // parent of 'manage' and 'intro'
@@ -201,36 +194,34 @@ var gTests = [
   },
 },
 {
   desc: "Test action=reauth",
   *teardown() {
     gBrowser.removeCurrentTab();
     yield signOut();
   },
-  *run()
-  {
+  *run() {
     const expected_url = "https://example.com/?is_force_auth";
     setPref("identity.fxaccounts.remote.force_auth.uri", expected_url);
 
     yield setSignedInUser();
     let [, url] = yield promiseNewTabWithIframeLoadEvent("about:accounts?action=reauth");
     // The current user will be appended to the url
     let expected = expected_url + "&email=foo%40example.com";
     is(url, expected, "action=reauth got the expected URL");
   },
 },
 {
   desc: "Test with migrateToDevEdition enabled (success)",
   *teardown() {
     gBrowser.removeCurrentTab();
     yield signOut();
   },
-  *run()
-  {
+  *run() {
     let fxAccountsCommon = {};
     Cu.import("resource://gre/modules/FxAccountsCommon.js", fxAccountsCommon);
     const pref = "identity.fxaccounts.migrateToDevEdition";
     changedPrefs.add(pref);
     Services.prefs.setBoolPref(pref, true);
 
     // Create the signedInUser.json file that will be used as the source of
     // migrated user data.
@@ -280,18 +271,17 @@ var gTests = [
   },
 },
 {
   desc: "Test with migrateToDevEdition enabled (no user to migrate)",
   *teardown() {
     gBrowser.removeCurrentTab();
     yield signOut();
   },
-  *run()
-  {
+  *run() {
     const pref = "identity.fxaccounts.migrateToDevEdition";
     changedPrefs.add(pref);
     Services.prefs.setBoolPref(pref, true);
 
     let profD = Services.dirsvc.get("ProfD", Ci.nsIFile);
     let mockDir = profD.clone();
     mockDir.append("about-accounts-mock-profd");
     mockDir.createUnique(Ci.nsIFile.DIRECTORY_TYPE, FileUtils.PERMS_DIRECTORY);
@@ -397,18 +387,17 @@ var gTests = [
     let [, url] =
       yield promiseNewTabWithIframeLoadEvent("about:accounts?" + queryStr +
                                              "&action=action");
     is(url, signupURL + "&" + queryStr, "URL params are copied to signup URL");
   },
 },
 ]; // gTests
 
-function test()
-{
+function test() {
   waitForExplicitFinish();
 
   Task.spawn(function* () {
     for (let testCase of gTests) {
       info(testCase.desc);
       try {
         yield testCase.run();
       } finally {
@@ -425,18 +414,17 @@ function promiseOneMessage(tab, messageN
   let deferred = Promise.defer();
   mm.addMessageListener(messageName, function onmessage(message) {
     mm.removeMessageListener(messageName, onmessage);
     deferred.resolve(message);
   });
   return deferred.promise;
 }
 
-function promiseNewTabLoadEvent(aUrl)
-{
+function promiseNewTabLoadEvent(aUrl) {
   let tab = gBrowser.selectedTab = gBrowser.addTab(aUrl);
   let browser = tab.linkedBrowser;
   let mm = browser.messageManager;
 
   // give it an e10s-friendly content script to help with our tests,
   // and wait for it to tell us about the load.
   let promise = promiseOneMessage(tab, "test:document:load");
   mm.loadFrameScript(CHROME_BASE + "content_aboutAccounts.js", true);
--- a/browser/base/content/test/general/browser_aboutCertError.js
+++ b/browser/base/content/test/general/browser_aboutCertError.js
@@ -371,29 +371,27 @@ function getCertChain(securityInfoAsStri
   while (certs.hasMoreElements()) {
     let cert = certs.getNext();
     cert.QueryInterface(Ci.nsIX509Cert);
     certChain += getPEMString(cert);
   }
   return certChain;
 }
 
-function getDERString(cert)
-{
+function getDERString(cert) {
   var length = {};
   var derArray = cert.getRawDER(length);
   var derString = '';
   for (var i = 0; i < derArray.length; i++) {
     derString += String.fromCharCode(derArray[i]);
   }
   return derString;
 }
 
-function getPEMString(cert)
-{
+function getPEMString(cert) {
   var derb64 = btoa(getDERString(cert));
   // Wrap the Base64 string into lines of 64 characters,
   // with CRLF line breaks (as specified in RFC 1421).
   var wrapped = derb64.replace(/(\S{64}(?!$))/g, "$1\r\n");
   return "-----BEGIN CERTIFICATE-----\r\n"
          + wrapped
          + "\r\n-----END CERTIFICATE-----\r\n";
 }
--- a/browser/base/content/test/general/browser_aboutHealthReport.js
+++ b/browser/base/content/test/general/browser_aboutHealthReport.js
@@ -56,53 +56,49 @@ function* setupPingArchive() {
     p.id = yield scope.TelemetryController.submitExternalPing(p.type, p.payload);
   }
 }
 
 var gTests = [
 
 {
   desc: "Test the remote commands",
-  setup: Task.async(function*()
-  {
+  setup: Task.async(function*() {
     Preferences.set(TELEMETRY_LOG_PREF, "Trace");
     yield setupPingArchive();
     Preferences.set("datareporting.healthreport.about.reportUrl",
                     HTTPS_BASE + "healthreport_testRemoteCommands.html");
   }),
-  run(iframe)
-  {
+  run(iframe) {
     let deferred = Promise.defer();
     let results = 0;
     try {
       iframe.contentWindow.addEventListener("FirefoxHealthReportTestResponse", function evtHandler(event) {
         let data = event.detail.data;
         if (data.type == "testResult") {
           ok(data.pass, data.info);
           results++;
-        }
-        else if (data.type == "testsComplete") {
+        } else if (data.type == "testsComplete") {
           is(results, data.count, "Checking number of results received matches the number of tests that should have run");
           iframe.contentWindow.removeEventListener("FirefoxHealthReportTestResponse", evtHandler, true);
           deferred.resolve();
         }
       }, true);
 
     } catch (e) {
       ok(false, "Failed to get all commands");
       deferred.reject();
     }
     return deferred.promise;
   }
 },
 
 ]; // gTests
 
-function test()
-{
+function test() {
   waitForExplicitFinish();
 
   // xxxmpc leaving this here until we resolve bug 854038 and bug 854060
   requestLongerTimeout(10);
 
   Task.spawn(function* () {
     for (let testCase of gTests) {
       info(testCase.desc);
@@ -114,18 +110,17 @@ function test()
 
       gBrowser.removeCurrentTab();
     }
 
     finish();
   });
 }
 
-function promiseNewTabLoadEvent(aUrl, aEventType = "load")
-{
+function promiseNewTabLoadEvent(aUrl, aEventType = "load") {
   let deferred = Promise.defer();
   let tab = gBrowser.selectedTab = gBrowser.addTab(aUrl);
   tab.linkedBrowser.addEventListener(aEventType, function load(event) {
     tab.linkedBrowser.removeEventListener(aEventType, load, true);
     let iframe = tab.linkedBrowser.contentDocument.getElementById("remote-report");
       iframe.addEventListener("load", function frameLoad(e) {
         if (iframe.contentWindow.location.href == "about:blank" ||
             e.target != iframe) {
--- a/browser/base/content/test/general/browser_accesskeys.js
+++ b/browser/base/content/test/general/browser_accesskeys.js
@@ -54,29 +54,27 @@ add_task(function *() {
 function childHandleFocus() {
   content.document.body.firstChild.addEventListener("focus", function focused(event) {
     let focusedElement = content.document.activeElement;
     focusedElement.blur();
     sendAsyncMessage("Test:FocusFromAccessKey", { focus: focusedElement.id })
   }, true);
 }
 
-function performAccessKey(key)
-{
+function performAccessKey(key) {
   return new Promise(resolve => {
     let mm = gBrowser.selectedBrowser.messageManager;
     mm.addMessageListener("Test:FocusFromAccessKey", function listenForFocus(msg) {
       mm.removeMessageListener("Test:FocusFromAccessKey", listenForFocus);
       resolve(msg.data.focus);
     });
 
     EventUtils.synthesizeKey(key, { altKey: true, shiftKey: true });
   });
 }
 
 // This version is used when a chrome elemnt is expected to be found for an accesskey.
-function* performAccessKeyForChrome(key, inChild)
-{
+function* performAccessKeyForChrome(key, inChild) {
   let waitFocusChangePromise = BrowserTestUtils.waitForEvent(document, "focus", true);
   EventUtils.synthesizeKey(key, { altKey: true, shiftKey: true });
   yield waitFocusChangePromise;
   return document.activeElement.id;
 }
--- a/browser/base/content/test/general/browser_bookmark_titles.js
+++ b/browser/base/content/test/general/browser_bookmark_titles.js
@@ -81,18 +81,17 @@ function* checkBookmark(uri, expected_ti
     let title = PlacesUtils.bookmarks.getItemTitle(id);
     is(title, expected_title, "Bookmark got a good default title.");
 
     PlacesUtils.bookmarks.removeItem(id);
 }
 
 // BrowserTestUtils.browserLoaded doesn't work for the about pages, so use a
 // custom page load listener.
-function promisePageLoaded(browser)
-{
+function promisePageLoaded(browser) {
   return ContentTask.spawn(browser, null, function* () {
     yield ContentTaskUtils.waitForEvent(this, "DOMContentLoaded", true,
         (event) => {
           return event.originalTarget === content.document &&
                  event.target.location.href !== "about:blank"
         });
   });
 }
--- a/browser/base/content/test/general/browser_bug1261299.js
+++ b/browser/base/content/test/general/browser_bug1261299.js
@@ -4,18 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /**
  * Tests for Bug 1261299
  * Test that the service menu code path is called properly and the
  * current selection (transferable) is cached properly on the parent process.
  */
 
-add_task(function* test_content_and_chrome_selection()
-{
+add_task(function* test_content_and_chrome_selection() {
   let testPage =
     'data:text/html,' +
     '<textarea id="textarea">Write something here</textarea>';
   let DOMWindowUtils = EventUtils._getDOMWindowUtils(window);
   let selectedText;
 
   let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, testPage);
   yield BrowserTestUtils.synthesizeMouse("#textarea", 0, 0, {}, gBrowser.selectedBrowser);
@@ -34,18 +33,17 @@ add_task(function* test_content_and_chro
   yield BrowserTestUtils.removeTab(tab);
 });
 
 // Test switching active selection.
 // Each tab has a content selection and when you switch to that tab, its selection becomes
 // active aka the current selection.
 // Expect: The active selection is what is being sent to OSX service menu.
 
-add_task(function* test_active_selection_switches_properly()
-{
+add_task(function* test_active_selection_switches_properly() {
   let testPage1 =
     'data:text/html,' +
     '<textarea id="textarea">Write something here</textarea>';
   let testPage2 =
     'data:text/html,' +
     '<textarea id="textarea">Nothing available</textarea>';
   let DOMWindowUtils = EventUtils._getDOMWindowUtils(window);
   let selectedText;
--- a/browser/base/content/test/general/browser_bug1297539.js
+++ b/browser/base/content/test/general/browser_bug1297539.js
@@ -47,18 +47,17 @@ function* cutCurrentSelection(elementQue
       let element = content.document.querySelector(contentElementQueryString);
       is(element[contentProperty], "",
         `${contentElementQueryString} should be empty after cut (superkey + x)`);
     });
 }
 
 // Test that you are able to pasteTransferable for plain text
 // which is handled by TextEditor::PasteTransferable to paste into the editor.
-add_task(function* test_paste_transferable_plain_text()
-{
+add_task(function* test_paste_transferable_plain_text() {
   let testPage =
     'data:text/html,' +
     '<textarea id="textarea">Write something here</textarea>';
 
   yield BrowserTestUtils.withNewTab(testPage, function* (browser) {
     // Select all the content in your editor element.
     yield BrowserTestUtils.synthesizeMouse("#textarea", 0, 0, {}, browser);
     yield BrowserTestUtils.synthesizeKey("a", {accelKey: true}, browser);
@@ -79,18 +78,17 @@ add_task(function* test_paste_transferab
 
 // Test that you are able to pasteTransferable for html
 // which is handled by HTMLEditor::PasteTransferable to paste into the editor.
 //
 // On Linux,
 // BrowserTestUtils.synthesizeKey("a", {accelKey: true}, browser);
 // doesn't seem to trigger for contenteditable which is why we use
 // Selection to select the contenteditable contents.
-add_task(function* test_paste_transferable_html()
-{
+add_task(function* test_paste_transferable_html() {
   let testPage =
     'data:text/html,' +
     '<div contenteditable="true"><b>Bold Text</b><i>italics</i></div>';
 
   yield BrowserTestUtils.withNewTab(testPage, function* (browser) {
     // Select all the content in your editor element.
     yield BrowserTestUtils.synthesizeMouse("div", 0, 0, {}, browser);
     yield ContentTask.spawn(browser, {}, function* () {
--- a/browser/base/content/test/general/browser_bug409481.js
+++ b/browser/base/content/test/general/browser_bug409481.js
@@ -40,43 +40,40 @@ function runTest(event) {
   ok(div && div.textContent == "Content!", "Sidebar content loaded");
 
   var link = browser && browser.contentDocument.getElementById("link");
   sidebar.contentDocument.addEventListener("popupshown", contextMenuOpened, false);
 
   EventUtils.synthesizeMouseAtCenter(link, { type: "contextmenu", button: 2 }, browser.contentWindow);
 }
 
-function contextMenuOpened()
-{
+function contextMenuOpened() {
   var sidebar = document.getElementById("sidebar");
   sidebar.contentDocument.removeEventListener("popupshown", contextMenuOpened, false);
 
   var copyLinkCommand = sidebar.contentDocument.getElementById("context-copylink");
   copyLinkCommand.addEventListener("command", copyLinkCommandExecuted, false);
   copyLinkCommand.doCommand();
 }
 
-function copyLinkCommandExecuted(event)
-{
+function copyLinkCommandExecuted(event) {
   event.target.removeEventListener("command", copyLinkCommandExecuted, false);
 
   var sidebar = document.getElementById("sidebar");
   var browser = sidebar.contentDocument.getElementById("web-panels-browser");
   var textbox = browser && browser.contentDocument.getElementById("textbox");
   textbox.focus();
   document.commandDispatcher.getControllerForCommand("cmd_paste").doCommand("cmd_paste");
   is(textbox.value, "http://www.example.com/ctest", "copy link command");
 
   sidebar.contentDocument.addEventListener("popuphidden", contextMenuClosed, false);
   event.target.parentNode.hidePopup();
 }
 
-function contextMenuClosed()
-{
+function contextMenuClosed() {
   var sidebar = document.getElementById("sidebar");
   sidebar.contentDocument.removeEventListener("popuphidden", contextMenuClosed, false);
 
   SidebarUI.hide();
 
   ok(document.getElementById("sidebar-box").hidden, "Sidebar successfully hidden");
 
   finish();
--- a/browser/base/content/test/general/browser_bug432599.js
+++ b/browser/base/content/test/general/browser_bug432599.js
@@ -76,18 +76,17 @@ var currentInvoker = 0;
 
 var initialValue;
 var initialRemoveHidden;
 
 var popupElement = document.getElementById("editBookmarkPanel");
 var titleElement = document.getElementById("editBookmarkPanelTitle");
 var removeElement = document.getElementById("editBookmarkPanelRemoveButton");
 
-function checkBookmarksPanel(invoker, phase)
-{
+function checkBookmarksPanel(invoker, phase) {
   let onPopupShown = function(aEvent) {
     if (aEvent.originalTarget == popupElement) {
       popupElement.removeEventListener("popupshown", arguments.callee, false);
       checkBookmarksPanel(invoker, phase + 1);
     }
   };
   let onPopupHidden = function(aEvent) {
     if (aEvent.originalTarget == popupElement) {
--- a/browser/base/content/test/general/browser_bug462289.js
+++ b/browser/base/content/test/general/browser_bug462289.js
@@ -1,81 +1,74 @@
 var tab1, tab2;
 
-function focus_in_navbar()
-{
+function focus_in_navbar() {
   var parent = document.activeElement.parentNode;
   while (parent && parent.id != "nav-bar")
     parent = parent.parentNode;
 
   return parent != null;
 }
 
-function test()
-{
+function test() {
   waitForExplicitFinish();
 
   tab1 = gBrowser.addTab("about:blank", {skipAnimation: true});
   tab2 = gBrowser.addTab("about:blank", {skipAnimation: true});
 
   EventUtils.synthesizeMouseAtCenter(tab1, {});
   executeSoon(step2);
 }
 
-function step2()
-{
+function step2() {
   is(gBrowser.selectedTab, tab1, "1st click on tab1 selects tab");
   isnot(document.activeElement, tab1, "1st click on tab1 does not activate tab");
 
   EventUtils.synthesizeMouseAtCenter(tab1, {});
   executeSoon(step3);
 }
 
-function step3()
-{
+function step3() {
   is(gBrowser.selectedTab, tab1, "2nd click on selected tab1 keeps tab selected");
   isnot(document.activeElement, tab1, "2nd click on selected tab1 does not activate tab");
 
   ok(true, "focusing URLBar then sending 1 Shift+Tab.");
   gURLBar.focus();
   EventUtils.synthesizeKey("VK_TAB", {shiftKey: true});
   is(gBrowser.selectedTab, tab1, "tab key to selected tab1 keeps tab selected");
   is(document.activeElement, tab1, "tab key to selected tab1 activates tab");
 
   EventUtils.synthesizeMouseAtCenter(tab1, {});
   executeSoon(step4);
 }
 
-function step4()
-{
+function step4() {
   is(gBrowser.selectedTab, tab1, "3rd click on activated tab1 keeps tab selected");
   is(document.activeElement, tab1, "3rd click on activated tab1 keeps tab activated");
 
   gBrowser.addEventListener("TabSwitchDone", step5);
   EventUtils.synthesizeMouseAtCenter(tab2, {});
 }
 
-function step5()
-{
+function step5() {
   gBrowser.removeEventListener("TabSwitchDone", step5);
 
   // The tabbox selects a tab within a setTimeout in a bubbling mousedown event
   // listener, and focuses the current tab if another tab previously had focus.
   is(gBrowser.selectedTab, tab2, "click on tab2 while tab1 is activated selects tab");
   is(document.activeElement, tab2, "click on tab2 while tab1 is activated activates tab");
 
   info("focusing content then sending middle-button mousedown to tab2.");
   gBrowser.selectedBrowser.focus();
 
   EventUtils.synthesizeMouseAtCenter(tab2, {button: 1, type: "mousedown"});
   executeSoon(step6);
 }
 
-function step6()
-{
+function step6() {
   is(gBrowser.selectedTab, tab2, "middle-button mousedown on selected tab2 keeps tab selected");
   isnot(document.activeElement, tab2, "middle-button mousedown on selected tab2 does not activate tab");
 
   gBrowser.removeTab(tab2);
   gBrowser.removeTab(tab1);
 
   finish();
 }
--- a/browser/base/content/test/general/browser_bug553455.js
+++ b/browser/base/content/test/general/browser_bug553455.js
@@ -255,18 +255,17 @@ function test_disabledInstall() {
 
     let closePromise = waitForNotificationClose();
     // Click on Enable
     EventUtils.synthesizeMouseAtCenter(notification.button, {});
     yield closePromise;
 
     try {
       ok(Services.prefs.getBoolPref("xpinstall.enabled"), "Installation should be enabled");
-    }
-    catch (e) {
+    } catch (e) {
       ok(false, "xpinstall.enabled should be set");
     }
 
     yield BrowserTestUtils.removeTab(gBrowser.selectedTab);
     let installs = yield getInstalls();
     is(installs.length, 0, "Shouldn't be any pending installs");
   });
 },
--- a/browser/base/content/test/general/browser_bug561636.js
+++ b/browser/base/content/test/general/browser_bug561636.js
@@ -1,83 +1,72 @@
 var gInvalidFormPopup = document.getElementById('invalid-form-popup');
 ok(gInvalidFormPopup,
    "The browser should have a popup to show when a form is invalid");
 
-function checkPopupShow()
-{
+function checkPopupShow() {
   ok(gInvalidFormPopup.state == 'showing' || gInvalidFormPopup.state == 'open',
      "[Test " + testId + "] The invalid form popup should be shown");
 }
 
-function checkPopupHide()
-{
+function checkPopupHide() {
   ok(gInvalidFormPopup.state != 'showing' && gInvalidFormPopup.state != 'open',
      "[Test " + testId + "] The invalid form popup should not be shown");
 }
 
 var gObserver = {
   QueryInterface : XPCOMUtils.generateQI([Ci.nsIFormSubmitObserver]),
 
-  notifyInvalidSubmit(aFormElement, aInvalidElements)
-  {
+  notifyInvalidSubmit(aFormElement, aInvalidElements) {
   }
 };
 
 var testId = 0;
 
-function incrementTest()
-{
+function incrementTest() {
   testId++;
   info("Starting next part of test");
 }
 
-function getDocHeader()
-{
+function getDocHeader() {
   return "<html><head><meta charset='utf-8'></head><body>" + getEmptyFrame();
 }
 
-function getDocFooter()
-{
+function getDocFooter() {
   return "</body></html>";
 }
 
-function getEmptyFrame()
-{
+function getEmptyFrame() {
   return "<iframe style='width:100px; height:30px; margin:3px; border:1px solid lightgray;' " +
          "name='t' srcdoc=\"<html><head><meta charset='utf-8'></head><body>form target</body></html>\"></iframe>";
 }
 
-function* openNewTab(uri, background)
-{
+function* openNewTab(uri, background) {
   let tab = gBrowser.addTab();
   let browser = gBrowser.getBrowserForTab(tab);
   if (!background) {
     gBrowser.selectedTab = tab;
   }
   yield promiseTabLoadEvent(tab, "data:text/html," + escape(uri));
   return browser;
 }
 
-function* clickChildElement(browser)
-{
+function* clickChildElement(browser) {
   yield ContentTask.spawn(browser, {}, function* () {
     content.document.getElementById('s').click();
   });
 }
 
-function* blurChildElement(browser)
-{
+function* blurChildElement(browser) {
   yield ContentTask.spawn(browser, {}, function* () {
     content.document.getElementById('i').blur();
   });
 }
 
-function* checkChildFocus(browser, message)
-{
+function* checkChildFocus(browser, message) {
   yield ContentTask.spawn(browser, [message, testId], function* (args) {
     let [msg, id] = args;
     var focused = content.document.activeElement == content.document.getElementById('i');
 
     var validMsg = true;
     if (msg) {
       validMsg = (msg == content.document.getElementById('i').validationMessage);
     }
@@ -85,18 +74,17 @@ function* checkChildFocus(browser, messa
     Assert.equal(focused, true, "Test " + id + " First invalid element should be focused");
     Assert.equal(validMsg, true, "Test " + id + " The panel should show the message from validationMessage");
   });
 }
 
 /**
  * In this test, we check that no popup appears if the form is valid.
  */
-add_task(function* ()
-{
+add_task(function* () {
   incrementTest();
   let uri = getDocHeader() + "<form target='t' action='data:text/html,'><input><input id='s' type='submit'></form>" + getDocFooter();
   let browser = yield openNewTab(uri);
 
   yield clickChildElement(browser);
 
   yield new Promise((resolve, reject) => {
     // XXXndeakin This isn't really going to work when the content is another process
@@ -108,18 +96,17 @@ add_task(function* ()
 
   gBrowser.removeCurrentTab();
 });
 
 /**
  * In this test, we check that, when an invalid form is submitted,
  * the invalid element is focused and a popup appears.
  */
-add_task(function* ()
-{
+add_task(function* () {
   incrementTest();
   let uri = getDocHeader() + "<form target='t' action='data:text/html,'><input required id='i'><input id='s' type='submit'></form>" + getDocFooter();
   let browser = yield openNewTab(uri);
 
   let popupShownPromise = promiseWaitForEvent(gInvalidFormPopup, "popupshown");
   yield clickChildElement(browser);
   yield popupShownPromise;
 
@@ -128,18 +115,17 @@ add_task(function* ()
 
   gBrowser.removeCurrentTab();
 });
 
 /**
  * In this test, we check that, when an invalid form is submitted,
  * the first invalid element is focused and a popup appears.
  */
-add_task(function* ()
-{
+add_task(function* () {
   incrementTest();
   let uri = getDocHeader() + "<form target='t' action='data:text/html,'><input><input id='i' required><input required><input id='s' type='submit'></form>" + getDocFooter();
   let browser = yield openNewTab(uri);
 
   let popupShownPromise = promiseWaitForEvent(gInvalidFormPopup, "popupshown");
   yield clickChildElement(browser);
   yield popupShownPromise;
 
@@ -148,18 +134,17 @@ add_task(function* ()
 
   gBrowser.removeCurrentTab();
 });
 
 /**
  * In this test, we check that, we hide the popup by interacting with the
  * invalid element if the element becomes valid.
  */
-add_task(function* ()
-{
+add_task(function* () {
   incrementTest();
   let uri = getDocHeader() + "<form target='t' action='data:text/html,'><input id='i' required><input id='s' type='submit'></form>" + getDocFooter();
   let browser = yield openNewTab(uri);
 
   let popupShownPromise = promiseWaitForEvent(gInvalidFormPopup, "popupshown");
   yield clickChildElement(browser);
   yield popupShownPromise;
 
@@ -172,18 +157,17 @@ add_task(function* ()
 
   gBrowser.removeCurrentTab();
 });
 
 /**
  * In this test, we check that, we don't hide the popup by interacting with the
  * invalid element if the element is still invalid.
  */
-add_task(function* ()
-{
+add_task(function* () {
   incrementTest();
   let uri = getDocHeader() + "<form target='t' action='data:text/html,'><input type='email' id='i' required><input id='s' type='submit'></form>" + getDocFooter();
   let browser = yield openNewTab(uri);
 
   let popupShownPromise = promiseWaitForEvent(gInvalidFormPopup, "popupshown");
   yield clickChildElement(browser);
   yield popupShownPromise;
 
@@ -200,18 +184,17 @@ add_task(function* ()
 
   gBrowser.removeCurrentTab();
 });
 
 /**
  * In this test, we check that we can hide the popup by blurring the invalid
  * element.
  */
-add_task(function* ()
-{
+add_task(function* () {
   incrementTest();
   let uri = getDocHeader() + "<form target='t' action='data:text/html,'><input id='i' required><input id='s' type='submit'></form>" + getDocFooter();
   let browser = yield openNewTab(uri);
 
   let popupShownPromise = promiseWaitForEvent(gInvalidFormPopup, "popupshown");
   yield clickChildElement(browser);
   yield popupShownPromise;
 
@@ -223,18 +206,17 @@ add_task(function* ()
   yield popupHiddenPromise;
 
   gBrowser.removeCurrentTab();
 });
 
 /**
  * In this test, we check that we can hide the popup by pressing TAB.
  */
-add_task(function* ()
-{
+add_task(function* () {
   incrementTest();
   let uri = getDocHeader() + "<form target='t' action='data:text/html,'><input id='i' required><input id='s' type='submit'></form>" + getDocFooter();
   let browser = yield openNewTab(uri);
 
   let popupShownPromise = promiseWaitForEvent(gInvalidFormPopup, "popupshown");
   yield clickChildElement(browser);
   yield popupShownPromise;
 
@@ -246,18 +228,17 @@ add_task(function* ()
   yield popupHiddenPromise;
 
   gBrowser.removeCurrentTab();
 });
 
 /**
  * In this test, we check that the popup will hide if we move to another tab.
  */
-add_task(function* ()
-{
+add_task(function* () {
   incrementTest();
   let uri = getDocHeader() + "<form target='t' action='data:text/html,'><input id='i' required><input id='s' type='submit'></form>" + getDocFooter();
   let browser1 = yield openNewTab(uri);
 
   let popupShownPromise = promiseWaitForEvent(gInvalidFormPopup, "popupshown");
   yield clickChildElement(browser1);
   yield popupShownPromise;
 
@@ -272,18 +253,17 @@ add_task(function* ()
   gBrowser.removeTab(gBrowser.getTabForBrowser(browser1));
   gBrowser.removeTab(gBrowser.getTabForBrowser(browser2));
 });
 
 /**
  * In this test, we check that nothing happen if the invalid form is
  * submitted in a background tab.
  */
-add_task(function* ()
-{
+add_task(function* () {
   // Observers don't propagate currently across processes. We may add support for this in the
   // future via the addon compat layer.
   if (gMultiProcessBrowser) {
     return;
   }
 
   incrementTest();
   let uri = getDocHeader() + "<form target='t' action='data:text/html,'><input id='i' required><input id='s' type='submit'></form>" + getDocFooter();
@@ -312,18 +292,17 @@ add_task(function* ()
   yield notifierPromise;
 
   gBrowser.removeTab(gBrowser.getTabForBrowser(browser));
 });
 
 /**
  * In this test, we check that the author defined error message is shown.
  */
-add_task(function* ()
-{
+add_task(function* () {
   incrementTest();
   let uri = getDocHeader() + "<form target='t' action='data:text/html,'><input x-moz-errormessage='foo' required id='i'><input id='s' type='submit'></form>" + getDocFooter();
   let browser = yield openNewTab(uri);
 
   let popupShownPromise = promiseWaitForEvent(gInvalidFormPopup, "popupshown");
   yield clickChildElement(browser);
   yield popupShownPromise;
 
@@ -334,18 +313,17 @@ add_task(function* ()
      "The panel should show the author defined error message");
 
   gBrowser.removeCurrentTab();
 });
 
 /**
  * In this test, we check that the message is correctly updated when it changes.
  */
-add_task(function* ()
-{
+add_task(function* () {
   incrementTest();
   let uri = getDocHeader() + "<form target='t' action='data:text/html,'><input type='email' required id='i'><input id='s' type='submit'></form>" + getDocFooter();
   let browser = yield openNewTab(uri);
 
   let popupShownPromise = promiseWaitForEvent(gInvalidFormPopup, "popupshown");
   yield clickChildElement(browser);
   yield popupShownPromise;
 
--- a/browser/base/content/test/general/browser_bug580638.js
+++ b/browser/base/content/test/general/browser_bug580638.js
@@ -10,18 +10,17 @@ function test() {
       return document.getElementById(id).getAttribute(attr);
     }
 
     if (aPinned) {
       is(elemAttr("key_close", "disabled"), "true",
          "key_close should be disabled when a pinned-tab is selected");
       is(elemAttr("menu_close", "key"), "",
          "menu_close shouldn't have a key set when a pinned is selected");
-    }
-    else {
+    } else {
       is(elemAttr("key_close", "disabled"), "",
          "key_closed shouldn't have disabled state set when a non-pinned tab is selected");
       is(elemAttr("menu_close", "key"), "key_close",
          "menu_close should have key_close set as its key when a non-pinned tab is selected");
     }
   }
 
   let lastSelectedTab = gBrowser.selectedTab;
--- a/browser/base/content/test/general/browser_bug585558.js
+++ b/browser/base/content/test/general/browser_bug585558.js
@@ -79,45 +79,45 @@ function test_showFirst() {
 function test_movedLower() {
   testAttrib(gBrowser.tabs[2], "afterselected-visible", true,
              "Third tab marked afterselected-visible!");
   test_hoverOne();
 }
 
 function test_hoverOne() {
   EventUtils.synthesizeMouseAtCenter(gBrowser.tabs[4], { type: "mousemove" });
-  testAttrib(gBrowser.tabs[3], "beforehovered", true,  "Fourth tab marked beforehovered");
+  testAttrib(gBrowser.tabs[3], "beforehovered", true, "Fourth tab marked beforehovered");
   EventUtils.synthesizeMouseAtCenter(gBrowser.tabs[3], { type: "mousemove" });
-  testAttrib(gBrowser.tabs[2], "beforehovered", true,  "Third tab marked beforehovered!");
-  testAttrib(gBrowser.tabs[2], "afterhovered",  false, "Third tab not marked afterhovered!");
-  testAttrib(gBrowser.tabs[4], "afterhovered",  true,  "Fifth tab marked afterhovered!");
+  testAttrib(gBrowser.tabs[2], "beforehovered", true, "Third tab marked beforehovered!");
+  testAttrib(gBrowser.tabs[2], "afterhovered", false, "Third tab not marked afterhovered!");
+  testAttrib(gBrowser.tabs[4], "afterhovered", true, "Fifth tab marked afterhovered!");
   testAttrib(gBrowser.tabs[4], "beforehovered", false, "Fifth tab not marked beforehovered!");
   testAttrib(gBrowser.tabs[0], "beforehovered", false, "First tab not marked beforehovered!");
-  testAttrib(gBrowser.tabs[0], "afterhovered",  false, "First tab not marked afterhovered!");
+  testAttrib(gBrowser.tabs[0], "afterhovered", false, "First tab not marked afterhovered!");
   testAttrib(gBrowser.tabs[1], "beforehovered", false, "Second tab not marked beforehovered!");
-  testAttrib(gBrowser.tabs[1], "afterhovered",  false, "Second tab not marked afterhovered!");
+  testAttrib(gBrowser.tabs[1], "afterhovered", false, "Second tab not marked afterhovered!");
   testAttrib(gBrowser.tabs[3], "beforehovered", false, "Fourth tab not marked beforehovered!");
-  testAttrib(gBrowser.tabs[3], "afterhovered",  false, "Fourth tab not marked afterhovered!");
+  testAttrib(gBrowser.tabs[3], "afterhovered", false, "Fourth tab not marked afterhovered!");
   gBrowser.removeTab(tabs.pop());
   executeSoon(test_hoverStatePersistence);
 }
 
 function test_hoverStatePersistence() {
   // Test that the afterhovered and beforehovered attributes are still there when
   // a tab is selected and then unselected again. See bug 856107.
 
   function assertState() {
-    testAttrib(gBrowser.tabs[0], "beforehovered", true,  "First tab still marked beforehovered!");
-    testAttrib(gBrowser.tabs[0], "afterhovered",  false, "First tab not marked afterhovered!");
-    testAttrib(gBrowser.tabs[2], "afterhovered",  true,  "Third tab still marked afterhovered!");
+    testAttrib(gBrowser.tabs[0], "beforehovered", true, "First tab still marked beforehovered!");
+    testAttrib(gBrowser.tabs[0], "afterhovered", false, "First tab not marked afterhovered!");
+    testAttrib(gBrowser.tabs[2], "afterhovered", true, "Third tab still marked afterhovered!");
     testAttrib(gBrowser.tabs[2], "beforehovered", false, "Third tab not marked afterhovered!");
     testAttrib(gBrowser.tabs[1], "beforehovered", false, "Second tab not marked beforehovered!");
-    testAttrib(gBrowser.tabs[1], "afterhovered",  false, "Second tab not marked afterhovered!");
+    testAttrib(gBrowser.tabs[1], "afterhovered", false, "Second tab not marked afterhovered!");
     testAttrib(gBrowser.tabs[3], "beforehovered", false, "Fourth tab not marked beforehovered!");
-    testAttrib(gBrowser.tabs[3], "afterhovered",  false, "Fourth tab not marked afterhovered!");
+    testAttrib(gBrowser.tabs[3], "afterhovered", false, "Fourth tab not marked afterhovered!");
   }
 
   gBrowser.selectedTab = gBrowser.tabs[3];
   EventUtils.synthesizeMouseAtCenter(gBrowser.tabs[1], { type: "mousemove" });
   assertState();
   gBrowser.selectedTab = gBrowser.tabs[1];
   assertState();
   gBrowser.selectedTab = gBrowser.tabs[3];
--- a/browser/base/content/test/general/browser_bug734076.js
+++ b/browser/base/content/test/general/browser_bug734076.js
@@ -1,13 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-add_task(function* ()
-{
+add_task(function* () {
   let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, null, false);
 
   let browser = tab.linkedBrowser;
   browser.stop(); // stop the about:blank load
 
   let writeDomainURL = encodeURI("data:text/html,<script>document.write(document.domain);</script>");
 
   let tests = [
--- a/browser/base/content/test/general/browser_bug763468_perwindowpb.js
+++ b/browser/base/content/test/general/browser_bug763468_perwindowpb.js
@@ -24,17 +24,17 @@ function test() {
         mode = "per window private browsing";
         newTabURL = "about:privatebrowsing";
       } else {
         mode = "normal";
         newTabURL = "about:newtab";
       }
 
       is(aWindow.gBrowser.currentURI.spec, newTabURL,
-        "URL of NewTab should be " + newTabURL + " in " + mode +  " mode");
+        "URL of NewTab should be " + newTabURL + " in " + mode + " mode");
 
       aWindow.gBrowser.removeTab(aWindow.gBrowser.selectedTab);
       aCallback();
     });
   }
 
   function testOnWindow(aOptions, aCallback) {
     whenNewWindowLoaded(aOptions, function(aWin) {
--- a/browser/base/content/test/general/browser_bug767836_perwindowpb.js
+++ b/browser/base/content/test/general/browser_bug767836_perwindowpb.js
@@ -24,17 +24,17 @@ function test() {
         newTabURL = "about:privatebrowsing";
       } else {
         mode = "normal";
         newTabURL = "about:newtab";
       }
 
       // Check the new tab opened while in normal/private mode
       is(aWindow.gBrowser.selectedBrowser.currentURI.spec, newTabURL,
-        "URL of NewTab should be " + newTabURL + " in " + mode +  " mode");
+        "URL of NewTab should be " + newTabURL + " in " + mode + " mode");
       // Set the custom newtab url
       aboutNewTabService.newTabURL = testURL;
       is(aboutNewTabService.newTabURL, testURL, "Custom newtab url is set");
 
       // Open a newtab after setting the custom newtab url
       openNewTab(aWindow, function() {
         is(aWindow.gBrowser.selectedBrowser.currentURI.spec, testURL,
            "URL of NewTab should be the custom url");
--- a/browser/base/content/test/general/browser_bug970746.js
+++ b/browser/base/content/test/general/browser_bug970746.js
@@ -103,17 +103,17 @@ add_task(function *() {
     yield popupShownPromise;
 
     let menuItem = document.getElementById("context-searchselect");
     is(menuItem.hidden, !test.shouldBeShown,
         "search context menu item is shown for  '#" + test.id + "' and selected is '" + test.isSelected + "'");
 
     if (test.shouldBeShown) {
       ok(menuItem.label.includes(test.expectedLabelContents),
-         "Menu item text '" + menuItem.label  + "' contains the correct search terms '" + test.expectedLabelContents  + "'");
+         "Menu item text '" + menuItem.label + "' contains the correct search terms '" + test.expectedLabelContents + "'");
     }
 
     let popupHiddenPromise = BrowserTestUtils.waitForEvent(contentAreaContextMenu, "popuphidden");
     contentAreaContextMenu.hidePopup();
     yield popupHiddenPromise;
   }
 
   // cleanup
--- a/browser/base/content/test/general/browser_contentAltClick.js
+++ b/browser/base/content/test/general/browser_contentAltClick.js
@@ -39,18 +39,17 @@ function* clean_up() {
   }
   // Remove download history.
   yield PlacesTestUtils.clearHistory();
 
   gPrefService.clearUserPref("browser.altClickSave");
   yield BrowserTestUtils.removeTab(gBrowser.selectedTab);
 }
 
-add_task(function* test_alt_click()
-{
+add_task(function* test_alt_click() {
   yield setup();
 
   let downloadList = yield Downloads.getList(Downloads.ALL);
   let downloads = [];
   let downloadView;
   // When 1 download has been attempted then resolve the promise.
   let finishedAllDownloads = new Promise( (resolve) => {
     downloadView = {
@@ -68,18 +67,17 @@ add_task(function* test_alt_click()
   yield downloadList.removeView(downloadView);
 
   is(downloads.length, 1, "1 downloads");
   is(downloads[0].source.url, "http://mochi.test/moz/", "Downloaded #commonlink element");
 
   yield* clean_up();
 });
 
-add_task(function* test_alt_click_on_xlinks()
-{
+add_task(function* test_alt_click_on_xlinks() {
   yield setup();
 
   let downloadList = yield Downloads.getList(Downloads.ALL);
   let downloads = [];
   let downloadView;
   // When all 2 downloads have been attempted then resolve the promise.
   let finishedAllDownloads = new Promise( (resolve) => {
     downloadView = {
--- a/browser/base/content/test/general/browser_contentAreaClick.js
+++ b/browser/base/content/test/general/browser_contentAreaClick.js
@@ -268,18 +268,17 @@ function runNextTest() {
 
   if (gCurrentTest.targets.length == 0) {
     info(gCurrentTest.desc + ": cleaning up...")
     gCurrentTest.clean();
 
     if (gTests.length > 0) {
       gCurrentTest = gTests.shift();
       gCurrentTest.setup();
-    }
-    else {
+    } else {
       finishTest();
       return;
     }
   }
 
   // Move to next target.
   gInvokedMethods.length = 0;
   let target = gCurrentTest.targets.shift();
--- a/browser/base/content/test/general/browser_contentSearchUI.js
+++ b/browser/base/content/test/general/browser_contentSearchUI.js
@@ -698,21 +698,19 @@ function checkState(actualState, expecte
 
     tableHidden: expectedSuggestions.length == 0,
 
     inputValue: expectedInputVal,
     ariaExpanded: expectedSuggestions.length == 0 ? "false" : "true",
   };
   if (expectedSelectedButtonIdx != undefined) {
     expectedState.selectedButtonIndex = expectedSelectedButtonIdx;
-  }
-  else if (expectedSelectedIdx < expectedSuggestions.length) {
+  } else if (expectedSelectedIdx < expectedSuggestions.length) {
     expectedState.selectedButtonIndex = -1;
-  }
-  else {
+  } else {
     expectedState.selectedButtonIndex = expectedSelectedIdx - expectedSuggestions.length;
   }
 
   SimpleTest.isDeeply(actualState, expectedState, "State");
 }
 
 var gMsgMan;
 
--- a/browser/base/content/test/general/browser_contextmenu.js
+++ b/browser/base/content/test/general/browser_contextmenu.js
@@ -15,17 +15,17 @@ let hasContainers = Services.prefs.getBo
 
 const example_base = "http://example.com/browser/browser/base/content/test/general/";
 const chrome_base = "chrome://mochitests/content/browser/browser/base/content/test/general/";
 
 Services.scriptloader.loadSubScript(chrome_base + "contextmenu_common.js", this);
 
 // Below are test cases for XUL element
 add_task(function* test_xul_text_link_label() {
-  let  url = chrome_base + "subtst_contextmenu_xul.xul";
+  let url = chrome_base + "subtst_contextmenu_xul.xul";
 
   yield BrowserTestUtils.openNewForegroundTab(gBrowser, url);
 
   yield test_contextmenu("#test-xul-text-link-label",
     ["context-openlinkintab", true,
      ...(hasContainers ? ["context-openlinkinusercontext-menu", true] : []),
      // We need a blank entry here because the containers submenu is
      // dynamically generated with no ids.
--- a/browser/base/content/test/general/browser_contextmenu_childprocess.js
+++ b/browser/base/content/test/general/browser_contextmenu_childprocess.js
@@ -18,30 +18,27 @@ add_task(function *() {
 
   let popupHiddenPromise = BrowserTestUtils.waitForEvent(contextMenu, "popuphidden");
   contextMenu.hidePopup();
   yield popupHiddenPromise;
 
   yield BrowserTestUtils.removeTab(tab);
 });
 
-function checkItems(menuitem, arr)
-{
+function checkItems(menuitem, arr) {
   for (let i = 0; i < arr.length; i += 2) {
     let str = arr[i];
     let details = arr[i + 1];
     if (str == "---") {
       is(menuitem.localName, "menuseparator", "menuseparator");
-    }
-    else if ("children" in details) {
+    } else if ("children" in details) {
       is(menuitem.localName, "menu", "submenu");
       is(menuitem.getAttribute("label"), str, str + " label");
       checkItems(menuitem.firstChild.firstChild, details.children);
-    }
-    else {
+    } else {
       is(menuitem.localName, "menuitem", str + " menuitem");
 
       is(menuitem.getAttribute("label"), str, str + " label");
       is(menuitem.getAttribute("type"), details.type, str + " type");
       is(menuitem.getAttribute("image"), details.icon ? gBaseURL + details.icon : "", str + " icon");
 
       if (details.checked)
         is(menuitem.getAttribute("checked"), "true", str + " checked");
@@ -53,18 +50,17 @@ function checkItems(menuitem, arr)
       else
         ok(!menuitem.hasAttribute("disabled"), str + " disabled");
     }
 
     menuitem = menuitem.nextSibling;
   }
 }
 
-function checkMenu(contextMenu)
-{
+function checkMenu(contextMenu) {
   let items = [ "Plain item",          {type: "", icon: "", checked: false, disabled: false},
                 "Disabled item",       {type: "", icon: "", checked: false, disabled: true},
                 "Item w/ textContent", {type: "", icon: "", checked: false, disabled: false},
                 "---",                  null,
                 "Checkbox",            {type: "checkbox", icon: "", checked: true, disabled: false},
                 "---",                  null,
                 "Radio1",              {type: "checkbox", icon: "", checked: true, disabled: false},
                 "Radio2",              {type: "checkbox", icon: "", checked: false, disabled: false},
--- a/browser/base/content/test/general/browser_ctrlTab.js
+++ b/browser/base/content/test/general/browser_ctrlTab.js
@@ -2,19 +2,19 @@ add_task(function* () {
   gPrefService.setBoolPref("browser.ctrlTab.previews", true);
 
   gBrowser.addTab();
   gBrowser.addTab();
   gBrowser.addTab();
 
   checkTabs(4);
 
-  yield ctrlTabTest([2],       1, 0);
+  yield ctrlTabTest([2], 1, 0);
   yield ctrlTabTest([2, 3, 1], 2, 2);
-  yield ctrlTabTest([],        4, 2);
+  yield ctrlTabTest([], 4, 2);
 
   {
     let selectedIndex = gBrowser.tabContainer.selectedIndex;
     yield pressCtrlTab();
     yield pressCtrlTab(true);
     yield releaseCtrl();
     is(gBrowser.tabContainer.selectedIndex, selectedIndex,
        "Ctrl+Tab -> Ctrl+Shift+Tab keeps the selected tab");
--- a/browser/base/content/test/general/browser_discovery.js
+++ b/browser/base/content/test/general/browser_discovery.js
@@ -95,18 +95,17 @@ function runSearchDiscoveryTest() {
   var testCase = searchDiscoveryTests[0];
   var title = testCase.title || searchDiscoveryTests.length;
   if (browser.engines) {
     var hasEngine = (testCase.count) ? (browser.engines[0].title == title &&
                                         browser.engines.length == testCase.count) :
                                        (browser.engines[0].title == title);
     ok(hasEngine, testCase.text);
     browser.engines = null;
-  }
-  else
+  } else
     ok(!testCase.pass, testCase.text);
 
   searchDiscoveryTests.shift();
   searchDiscovery(); // Run the next test.
 }
 
 // This handler is called twice, once for each added link element.
 // Only want to check once the second link element has been added.
--- a/browser/base/content/test/general/browser_documentnavigation.js
+++ b/browser/base/content/test/general/browser_documentnavigation.js
@@ -5,18 +5,17 @@
  */
 
 var testPage1 = "data:text/html,<html id='html1'><body id='body1'><button id='button1'>Tab 1</button></body></html>";
 var testPage2 = "data:text/html,<html id='html2'><body id='body2'><button id='button2'>Tab 2</button></body></html>";
 var testPage3 = "data:text/html,<html id='html3'><body id='body3' contenteditable='true'><button id='button3'>Tab 3</button></body></html>";
 
 var fm = Services.focus;
 
-function* expectFocusOnF6(backward, expectedDocument, expectedElement, onContent, desc)
-{
+function* expectFocusOnF6(backward, expectedDocument, expectedElement, onContent, desc) {
   let focusChangedInChildResolver = null;
   let focusPromise = onContent ? new Promise(resolve => focusChangedInChildResolver = resolve) :
                                  BrowserTestUtils.waitForEvent(window, "focus", true);
 
   function focusChangedListener(msg) {
     let expected = expectedDocument;
     if (!expectedElement.startsWith("html")) {
       expected += "," + expectedElement;
@@ -34,18 +33,17 @@ function* expectFocusOnF6(backward, expe
       if (!contentExpectedElement) {
         // Element not found, so look in the child frames.
         for (let f = 0; f < content.frames.length; f++) {
           if (content.frames[f].document.getElementById(arg.expectedElementId)) {
             contentExpectedElement = content.frames[f].document;
             break;
           }
         }
-      }
-      else if (contentExpectedElement.localName == "html") {
+      } else if (contentExpectedElement.localName == "html") {
         contentExpectedElement = contentExpectedElement.ownerDocument;
       }
 
       if (!contentExpectedElement) {
         sendSyncMessage("BrowserTest:FocusChanged",
                         { details : "expected element " + arg.expectedElementId + " not found" });
         return;
       }
@@ -81,18 +79,17 @@ function* expectFocusOnF6(backward, expe
   is(fm.focusedElement, expectedElement, desc + " element matches");
 
   if (onContent) {
     messageManager.removeMessageListener("BrowserTest:FocusChanged", focusChangedListener);
   }
 }
 
 // Load a page and navigate between it and the chrome window.
-add_task(function* ()
-{
+add_task(function* () {
   let page1Promise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
   gBrowser.selectedBrowser.loadURI(testPage1);
   yield page1Promise;
 
   // When the urlbar is focused, pressing F6 should focus the root of the content page.
   gURLBar.focus();
   yield* expectFocusOnF6(false, "html1", "html1",
                                 true, "basic focus content page");
@@ -119,42 +116,39 @@ add_task(function* ()
   // Check to ensure that the root element is focused
   yield ContentTask.spawn(gBrowser.selectedBrowser, { }, function* () {
     Assert.ok(content.document.activeElement == content.document.documentElement,
       "basic focus again content page with button focused child root is focused");
   });
 });
 
 // Open a second tab. Document focus should skip the background tab.
-add_task(function* ()
-{
+add_task(function* () {
   yield BrowserTestUtils.openNewForegroundTab(gBrowser, testPage2);
 
   yield* expectFocusOnF6(false, "main-window", gURLBar.inputField,
                                 false, "basic focus content page and second tab urlbar");
   yield* expectFocusOnF6(false, "html2", "html2",
                                 true, "basic focus content page with second tab");
 
   yield BrowserTestUtils.removeTab(gBrowser.selectedTab);
 });
 
 // Shift+F6 should navigate backwards. There's only one document here so the effect
 // is the same.
-add_task(function* ()
-{
+add_task(function* () {
   gURLBar.focus();
   yield* expectFocusOnF6(true, "html1", "html1",
                                true, "back focus content page");
   yield* expectFocusOnF6(true, "main-window", gURLBar.inputField,
                                false, "back focus content page urlbar");
 });
 
 // Open the sidebar and navigate between the sidebar, content and top-level window
-add_task(function* ()
-{
+add_task(function* () {
   let sidebar = document.getElementById("sidebar");
 
   let loadPromise = BrowserTestUtils.waitForEvent(sidebar, "load", true);
   SidebarUI.toggle('viewBookmarksSidebar');
   yield loadPromise;
 
 
   gURLBar.focus();
@@ -174,18 +168,17 @@ add_task(function* ()
                                false, "back focus with sidebar open sidebar");
   yield* expectFocusOnF6(true, "main-window", gURLBar.inputField,
                                false, "back focus with sidebar urlbar");
 
   SidebarUI.toggle('viewBookmarksSidebar');
 });
 
 // Navigate when the downloads panel is open
-add_task(function* ()
-{
+add_task(function* () {
   yield pushPrefs(["accessibility.tabfocus", 7]);
 
   let popupShownPromise = BrowserTestUtils.waitForEvent(document, "popupshown", true);
   EventUtils.synthesizeMouseAtCenter(document.getElementById("downloads-button"), { });
   yield popupShownPromise;
 
   gURLBar.focus();
   yield* expectFocusOnF6(false, "main-window", document.getElementById("downloadsHistory"),
@@ -205,18 +198,17 @@ add_task(function* ()
 
   let downloadsPopup = document.getElementById("downloadsPanel");
   let popupHiddenPromise = BrowserTestUtils.waitForEvent(downloadsPopup, "popuphidden", true);
   downloadsPopup.hidePopup();
   yield popupHiddenPromise;
 });
 
 // Navigation with a contenteditable body
-add_task(function* ()
-{
+add_task(function* () {
   yield BrowserTestUtils.openNewForegroundTab(gBrowser, testPage3);
 
   // The body should be focused when it is editable, not the root.
   gURLBar.focus();
   yield* expectFocusOnF6(false, "html3", "body3",
                                 true, "focus with contenteditable body");
   yield* expectFocusOnF6(false, "main-window", gURLBar.inputField,
                                 false, "focus with contenteditable body urlbar");
@@ -227,18 +219,17 @@ add_task(function* ()
                                 true, "back focus with contenteditable body");
   yield* expectFocusOnF6(false, "main-window", gURLBar.inputField,
                                 false, "back focus with contenteditable body urlbar");
 
   yield BrowserTestUtils.removeTab(gBrowser.selectedTab);
 });
 
 // Navigation with a frameset loaded
-add_task(function* ()
-{
+add_task(function* () {
   yield BrowserTestUtils.openNewForegroundTab(gBrowser,
     "http://mochi.test:8888/browser/browser/base/content/test/general/file_documentnavigation_frameset.html");
 
   gURLBar.focus();
   yield* expectFocusOnF6(false, "htmlframe1", "htmlframe1",
                                 true, "focus on frameset frame 0");
   yield* expectFocusOnF6(false, "htmlframe2", "htmlframe2",
                                 true, "focus on frameset frame 1");
--- a/browser/base/content/test/general/browser_drag.js
+++ b/browser/base/content/test/general/browser_drag.js
@@ -1,10 +1,9 @@
-function test()
-{
+function test() {
   waitForExplicitFinish();
 
   let scriptLoader = Cc["@mozilla.org/moz/jssubscript-loader;1"].
                      getService(Ci.mozIJSSubScriptLoader);
   let EventUtils = {};
   scriptLoader.loadSubScript("chrome://mochikit/content/tests/SimpleTest/EventUtils.js", EventUtils);
 
   // ---- Test dragging the proxy icon ---
--- a/browser/base/content/test/general/browser_e10s_switchbrowser.js
+++ b/browser/base/content/test/general/browser_e10s_switchbrowser.js
@@ -75,18 +75,17 @@ var waitForLoadWithFlags = Task.async(fu
   info("Loading " + uri + " flags = " + flags);
   gBrowser.selectedBrowser.loadURIWithFlags(uri, flags, null, null, null);
 
   yield waitForDocLoadComplete();
   if (!(flags & Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY)) {
 
     if (flags & Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY) {
       gExpectedHistory.entries.pop();
-    }
-    else {
+    } else {
       gExpectedHistory.index++;
     }
 
     gExpectedHistory.entries.push({
       uri: gBrowser.currentURI.spec,
       title: gBrowser.contentTitle
     });
   }
--- a/browser/base/content/test/general/browser_focusonkeydown.js
+++ b/browser/base/content/test/general/browser_focusonkeydown.js
@@ -1,10 +1,9 @@
-add_task(function *()
-{
+add_task(function *() {
   let keyUps = 0;
 
   yield BrowserTestUtils.openNewForegroundTab(gBrowser, "data:text/html,<body>");
 
   gURLBar.focus();
 
   window.addEventListener("keyup", function countKeyUps(event) {
     window.removeEventListener("keyup", countKeyUps, true);
--- a/browser/base/content/test/general/browser_fullscreen-window-open.js
+++ b/browser/base/content/test/general/browser_fullscreen-window-open.js
@@ -47,18 +47,17 @@ var gTests = [
   test_open_with_pref_to_disable_in_fullscreen,
   test_open_from_chrome,
 ];
 
 function runNextTest() {
   let testCase = gTests.shift();
   if (testCase) {
     executeSoon(testCase);
-  }
-  else {
+  } else {
     finish();
   }
 }
 
 
 // Test for window.open() with no feature.
 function test_open() {
   waitForTabOpen({
@@ -327,18 +326,17 @@ WindowListener.prototype = {
       domwindow.removeEventListener("load", onLoad, true);
 
       // wait for trasition to fullscreen on OSX Lion later
       if (isOSX) {
         setTimeout(function() {
           domwindow.close();
           executeSoon(this.callBack_onFinalize);
         }.bind(this), 3000);
-      }
-      else {
+      } else {
         domwindow.close();
         executeSoon(this.callBack_onFinalize);
       }
     };
     domwindow.addEventListener("load", onLoad, true);
   },
   onCloseWindow(aXULWindow) {},
   onWindowTitleChange(aXULWindow, aNewTitle) {},
--- a/browser/base/content/test/general/browser_fxaccounts.js
+++ b/browser/base/content/test/general/browser_fxaccounts.js
@@ -210,18 +210,17 @@ var promiseTabOpen = Task.async(function
   yield promiseTabLoadEvent(tab);
   ok(tab.linkedBrowser.currentURI.spec.startsWith(urlBase),
      "Got " + tab.linkedBrowser.currentURI.spec + ", expecting " + urlBase);
   let whenUnloaded = promiseTabUnloaded(tab);
   gBrowser.removeTab(tab);
   yield whenUnloaded;
 });
 
-function promiseTabUnloaded(tab)
-{
+function promiseTabUnloaded(tab) {
   return new Promise(resolve => {
     info("Wait for tab to unload");
     function handle(event) {
       tab.linkedBrowser.removeEventListener("unload", handle, true);
       info("Got unload event");
       resolve(event);
     }
     tab.linkedBrowser.addEventListener("unload", handle, true, true);
--- a/browser/base/content/test/general/browser_gZipOfflineChild.js
+++ b/browser/base/content/test/general/browser_gZipOfflineChild.js
@@ -34,18 +34,17 @@ function handleMessageEvents(event) {
       // the offline cache is udpated (which means our iframe
       // successfully reloaded), or the string "error" appears
       // in the iframe, as in the case of bug 501422.
       intervalID = setInterval(function() {
         // Sometimes document.body may not exist, and trying to access
         // it will throw an exception, so handle this case.
         try {
           var bodyInnerHTML = event.source.document.body.innerHTML;
-        }
-        catch (e) {
+        } catch (e) {
           bodyInnerHTML = "";
         }
         if (cacheCount == 2 || bodyInnerHTML.includes("error")) {
           clearInterval(intervalID);
           is(cacheCount, 2, "frame not reloaded successfully");
           if (cacheCount != 2) {
             finish();
           }
--- a/browser/base/content/test/general/browser_gestureSupport.js
+++ b/browser/base/content/test/general/browser_gestureSupport.js
@@ -7,18 +7,17 @@
 // These tests require the ability to disable the fact that the
 // Firefox chrome intentionally prevents "simple gesture" events from
 // reaching web content.
 
 var test_utils;
 var test_commandset;
 var test_prefBranch = "browser.gesture.";
 
-function test()
-{
+function test() {
   waitForExplicitFinish();
 
   // Disable the default gestures support during the test
   gGestureSupport.init(false);
 
   test_utils = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
     getInterface(Components.interfaces.nsIDOMWindowUtils);
 
@@ -42,18 +41,17 @@ function test()
 var test_eventCount = 0;
 var test_expectedType;
 var test_expectedDirection;
 var test_expectedDelta;
 var test_expectedModifiers;
 var test_expectedClickCount;
 var test_imageTab;
 
-function test_gestureListener(evt)
-{
+function test_gestureListener(evt) {
   is(evt.type, test_expectedType,
      "evt.type (" + evt.type + ") does not match expected value");
   is(evt.target, test_utils.elementFromPoint(20, 20, false, false),
      "evt.target (" + evt.target + ") does not match expected value");
   is(evt.clientX, 20,
      "evt.clientX (" + evt.clientX + ") does not match expected value");
   is(evt.clientY, 20,
      "evt.clientY (" + evt.clientY + ") does not match expected value");
@@ -78,53 +76,50 @@ function test_gestureListener(evt)
 
   if (evt.type == "MozTapGesture") {
     is(evt.clickCount, test_expectedClickCount, "evt.clickCount does not match");
   }
 
   test_eventCount++;
 }
 
-function test_helper1(type, direction, delta, modifiers)
-{
+function test_helper1(type, direction, delta, modifiers) {
   // Setup the expected values
   test_expectedType = type;
   test_expectedDirection = direction;
   test_expectedDelta = delta;
   test_expectedModifiers = modifiers;
 
   let expectedEventCount = test_eventCount + 1;
 
   document.addEventListener(type, test_gestureListener, true);
   test_utils.sendSimpleGestureEvent(type, 20, 20, direction, delta, modifiers);
   document.removeEventListener(type, test_gestureListener, true);
 
   is(expectedEventCount, test_eventCount, "Event (" + type + ") was never received by event listener");
 }
 
-function test_clicks(type, clicks)
-{
+function test_clicks(type, clicks) {
   // Setup the expected values
   test_expectedType = type;
   test_expectedDirection = 0;
   test_expectedDelta = 0;
   test_expectedModifiers = 0;
   test_expectedClickCount = clicks;
 
   let expectedEventCount = test_eventCount + 1;
 
   document.addEventListener(type, test_gestureListener, true);
   test_utils.sendSimpleGestureEvent(type, 20, 20, 0, 0, 0, clicks);
   document.removeEventListener(type, test_gestureListener, true);
 
   is(expectedEventCount, test_eventCount, "Event (" + type + ") was never received by event listener");
 }
 
-function test_TestEventListeners()
-{
+function test_TestEventListeners() {
   let e = test_helper1;  // easier to type this name
 
   // Swipe gesture animation events
   e("MozSwipeGestureStart", 0, -0.7, 0);
   e("MozSwipeGestureUpdate", 0, -0.4, 0);
   e("MozSwipeGestureEnd", 0, 0, 0);
   e("MozSwipeGestureStart", 0, 0.6, 0);
   e("MozSwipeGestureUpdate", 0, 0.3, 0);
@@ -179,45 +174,41 @@ function test_TestEventListeners()
   modifier = Components.interfaces.nsIDOMEvent.ALT_MASK;
   e("MozSwipeGesture", SimpleGestureEvent.DIRECTION_RIGHT, 0, modifier);
 
   // event.ctrlKey
   modifier = Components.interfaces.nsIDOMEvent.CONTROL_MASK;
   e("MozSwipeGesture", SimpleGestureEvent.DIRECTION_RIGHT, 0, modifier);
 }
 
-function test_eventDispatchListener(evt)
-{
+function test_eventDispatchListener(evt) {
   test_eventCount++;
   evt.stopPropagation();
 }
 
-function test_helper2(type, direction, delta, altKey, ctrlKey, shiftKey, metaKey)
-{
+function test_helper2(type, direction, delta, altKey, ctrlKey, shiftKey, metaKey) {
   let event = null;
   let successful;
 
   try {
     event = document.createEvent("SimpleGestureEvent");
     successful = true;
-  }
-  catch (ex) {
+  } catch (ex) {
     successful = false;
   }
   ok(successful, "Unable to create SimpleGestureEvent");
 
   try {
     event.initSimpleGestureEvent(type, true, true, window, 1,
                                  10, 10, 10, 10,
                                  ctrlKey, altKey, shiftKey, metaKey,
                                  1, window,
                                  0, direction, delta, 0);
     successful = true;
-  }
-  catch (ex) {
+  } catch (ex) {
     successful = false;
   }
   ok(successful, "event.initSimpleGestureEvent should not fail");
 
   // Make sure the event fields match the expected values
   is(event.type, type, "Mismatch on evt.type");
   is(event.direction, direction, "Mismatch on evt.direction");
   is(event.delta, delta, "Mismatch on evt.delta");
@@ -237,27 +228,25 @@ function test_helper2(type, direction, d
   // Test event dispatch
   let expectedEventCount = test_eventCount + 1;
   document.addEventListener(type, test_eventDispatchListener, true);
   document.dispatchEvent(event);
   document.removeEventListener(type, test_eventDispatchListener, true);
   is(expectedEventCount, test_eventCount, "Dispatched event was never received by listener");
 }
 
-function test_TestEventCreation()
-{
+function test_TestEventCreation() {
   // Event creation
   test_helper2("MozMagnifyGesture", SimpleGestureEvent.DIRECTION_RIGHT, 20.0,
                true, false, true, false);
   test_helper2("MozMagnifyGesture", SimpleGestureEvent.DIRECTION_LEFT, -20.0,
                false, true, false, true);
 }
 
-function test_EnsureConstantsAreDisjoint()
-{
+function test_EnsureConstantsAreDisjoint() {
   let up = SimpleGestureEvent.DIRECTION_UP;
   let down = SimpleGestureEvent.DIRECTION_DOWN;
   let left = SimpleGestureEvent.DIRECTION_LEFT;
   let right = SimpleGestureEvent.DIRECTION_RIGHT;
 
   let clockwise = SimpleGestureEvent.ROTATION_CLOCKWISE;
   let cclockwise = SimpleGestureEvent.ROTATION_COUNTERCLOCKWISE;
 
@@ -268,18 +257,17 @@ function test_EnsureConstantsAreDisjoint
   ok(down ^ right, "DIRECTION_DOWN and DIRECTION_RIGHT are not bitwise disjoint");
   ok(left ^ right, "DIRECTION_LEFT and DIRECTION_RIGHT are not bitwise disjoint");
   ok(clockwise ^ cclockwise, "ROTATION_CLOCKWISE and ROTATION_COUNTERCLOCKWISE are not bitwise disjoint");
 }
 
 // Helper for test of latched event processing. Emits the actual
 // gesture events to test whether the commands associated with the
 // gesture will only trigger once for each direction of movement.
-function test_emitLatchedEvents(eventPrefix, initialDelta, cmd)
-{
+function test_emitLatchedEvents(eventPrefix, initialDelta, cmd) {
   let cumulativeDelta = 0;
   let isIncreasing = initialDelta > 0;
 
   let expect = {};
   // Reset the call counters and initialize expected values
   for (let dir in cmd)
     cmd[dir].callCount = expect[dir] = 0;
 
@@ -343,38 +331,35 @@ function test_emitLatchedEvents(eventPre
     checkBoth(5, "Increasing command was triggered", "Decreasing command was not triggered");
   }
 
   // Send the wrap-up event. No commands should be triggered.
   test_utils.sendSimpleGestureEvent(eventPrefix, 0, 0, 0, cumulativeDelta, 0);
   checkBoth(6, "Increasing command was triggered", "Decreasing command was triggered");
 }
 
-function test_addCommand(prefName, id)
-{
+function test_addCommand(prefName, id) {
   let cmd = test_commandset.appendChild(document.createElement("command"));
   cmd.setAttribute("id", id);
   cmd.setAttribute("oncommand", "this.callCount++;");
 
   cmd.origPrefName = prefName;
   cmd.origPrefValue = gPrefService.getCharPref(prefName);
   gPrefService.setCharPref(prefName, id);
 
   return cmd;
 }
 
-function test_removeCommand(cmd)
-{
+function test_removeCommand(cmd) {
   gPrefService.setCharPref(cmd.origPrefName, cmd.origPrefValue);
   test_commandset.removeChild(cmd);
 }
 
 // Test whether latched events are only called once per direction of motion.
-function test_latchedGesture(gesture, inc, dec, eventPrefix)
-{
+function test_latchedGesture(gesture, inc, dec, eventPrefix) {
   let branch = test_prefBranch + gesture + ".";
 
   // Put the gesture into latched mode.
   let oldLatchedValue = gPrefService.getBoolPref(branch + "latched");
   gPrefService.setBoolPref(branch + "latched", true);
 
   // Install the test commands for increasing and decreasing motion.
   let cmd = {
@@ -388,18 +373,17 @@ function test_latchedGesture(gesture, in
 
   // Restore the gesture to its original configuration.
   gPrefService.setBoolPref(branch + "latched", oldLatchedValue);
   for (let dir in cmd)
     test_removeCommand(cmd[dir]);
 }
 
 // Test whether non-latched events are triggered upon sufficient motion.
-function test_thresholdGesture(gesture, inc, dec, eventPrefix)
-{
+function test_thresholdGesture(gesture, inc, dec, eventPrefix) {
   let branch = test_prefBranch + gesture + ".";
 
   // Disable latched mode for this gesture.
   let oldLatchedValue = gPrefService.getBoolPref(branch + "latched");
   gPrefService.setBoolPref(branch + "latched", false);
 
   // Set the triggering threshold value to 50.
   let oldThresholdValue = gPrefService.getIntPref(branch + "threshold");
@@ -442,18 +426,17 @@ function test_thresholdGesture(gesture, 
 
   // Restore the gesture to its original configuration.
   gPrefService.setBoolPref(branch + "latched", oldLatchedValue);
   gPrefService.setIntPref(branch + "threshold", oldThresholdValue);
   test_removeCommand(cmdInc);
   test_removeCommand(cmdDec);
 }
 
-function test_swipeGestures()
-{
+function test_swipeGestures() {
   // easier to type names for the direction constants
   let up = SimpleGestureEvent.DIRECTION_UP;
   let down = SimpleGestureEvent.DIRECTION_DOWN;
   let left = SimpleGestureEvent.DIRECTION_LEFT;
   let right = SimpleGestureEvent.DIRECTION_RIGHT;
 
   let branch = test_prefBranch + "swipe.";
 
@@ -516,36 +499,34 @@ function test_swipeGestures()
   // Remove the test commands.
   test_removeCommand(cmdUp);
   test_removeCommand(cmdDown);
   test_removeCommand(cmdLeft);
   test_removeCommand(cmdRight);
 }
 
 
-function test_rotateHelperGetImageRotation(aImageElement)
-{
+function test_rotateHelperGetImageRotation(aImageElement) {
   // Get the true image rotation from the transform matrix, bounded
   // to 0 <= result < 360
   let transformValue = content.window.getComputedStyle(aImageElement, null)
                                      .transform;
   if (transformValue == "none")
     return 0;
 
   transformValue = transformValue.split("(")[1]
                                  .split(")")[0]
                                  .split(",");
   var rotation = Math.round(Math.atan2(transformValue[1], transformValue[0]) *
                             (180 / Math.PI));
   return (rotation < 0 ? rotation + 360 : rotation);
 }
 
 function test_rotateHelperOneGesture(aImageElement, aCurrentRotation,
-                                     aDirection, aAmount, aStop)
-{
+                                     aDirection, aAmount, aStop) {
   if (aAmount <= 0 || aAmount > 90) // Bound to 0 < aAmount <= 90
     return;
 
   // easier to type names for the direction constants
   let clockwise = SimpleGestureEvent.ROTATION_CLOCKWISE;
 
   let delta = aAmount * (aDirection == clockwise ? 1 : -1);
 
@@ -578,36 +559,34 @@ function test_rotateHelperOneGesture(aIm
   test_utils.sendSimpleGestureEvent("MozRotateGesture", 0, 0, aDirection, 0, 0);
   aImageElement.clientTop;
 
   let finalExpectedRotation;
 
   if (aAmount < 45 && aStop) {
     // Rotate a bit, then stop.  Expect no change at end of gesture.
     finalExpectedRotation = aCurrentRotation;
-  }
-  else {
+  } else {
     // Either not stopping (expect 90 degree change in aDirection), OR
     // stopping but after 45, (expect 90 degree change in aDirection)
     finalExpectedRotation = (aCurrentRotation +
                              (aDirection == clockwise ? 1 : -1) * 90) % 360;
     if (finalExpectedRotation < 0)
       finalExpectedRotation += 360;
   }
 
   is(finalExpectedRotation, test_rotateHelperGetImageRotation(aImageElement),
      "Image rotation gesture end: expected=" + finalExpectedRotation +
      ", observed=" + test_rotateHelperGetImageRotation(aImageElement) +
      ", init=" + aCurrentRotation +
      ", amt=" + aAmount +
      ", dir=" + (aDirection == clockwise ? "cl" : "ccl"));
 }
 
-function test_rotateGesturesOnTab()
-{
+function test_rotateGesturesOnTab() {
   gBrowser.selectedBrowser.removeEventListener("load", test_rotateGesturesOnTab, true);
 
   if (!(content.document instanceof ImageDocument)) {
     ok(false, "Image document failed to open for rotation testing");
     gBrowser.removeTab(test_imageTab);
     finish();
     return;
   }
@@ -633,38 +612,37 @@ function test_rotateGesturesOnTab()
       rotation += 360;
     return rotation;
   }
 
   for (var initRot = 0; initRot < 360; initRot += 90) {
     // Test each case: at each 90 degree snap; cl/ccl;
     // amount more or less than 45; stop and hold or don't (32 total tests)
     // The amount added to the initRot is where it is expected to be
-    test_rotateHelperOneGesture(imgElem, normRot(initRot +   0), cl,  35, true );
-    test_rotateHelperOneGesture(imgElem, normRot(initRot +   0), cl,  35, false);
-    test_rotateHelperOneGesture(imgElem, normRot(initRot +  90), cl,  55, true );
-    test_rotateHelperOneGesture(imgElem, normRot(initRot + 180), cl,  55, false);
+    test_rotateHelperOneGesture(imgElem, normRot(initRot + 0), cl, 35, true );
+    test_rotateHelperOneGesture(imgElem, normRot(initRot + 0), cl, 35, false);
+    test_rotateHelperOneGesture(imgElem, normRot(initRot + 90), cl, 55, true );
+    test_rotateHelperOneGesture(imgElem, normRot(initRot + 180), cl, 55, false);
     test_rotateHelperOneGesture(imgElem, normRot(initRot + 270), ccl, 35, true );
     test_rotateHelperOneGesture(imgElem, normRot(initRot + 270), ccl, 35, false);
     test_rotateHelperOneGesture(imgElem, normRot(initRot + 180), ccl, 55, true );
-    test_rotateHelperOneGesture(imgElem, normRot(initRot +  90), ccl, 55, false);
+    test_rotateHelperOneGesture(imgElem, normRot(initRot + 90), ccl, 55, false);
 
     // Manually rotate it 90 degrees clockwise to prepare for next iteration,
     // and force flush
     test_utils.sendSimpleGestureEvent("MozRotateGestureStart", 0, 0, cl, .001, 0);
     test_utils.sendSimpleGestureEvent("MozRotateGestureUpdate", 0, 0, cl, 90, 0);
     test_utils.sendSimpleGestureEvent("MozRotateGestureUpdate", 0, 0, cl, .001, 0);
     test_utils.sendSimpleGestureEvent("MozRotateGesture", 0, 0, cl, 0, 0);
     imgElem.clientTop;
   }
 
   gBrowser.removeTab(test_imageTab);
   test_imageTab = null;
   finish();
 }
 
-function test_rotateGestures()
-{
+function test_rotateGestures() {
   test_imageTab = gBrowser.addTab("chrome://branding/content/about-logo.png");
   gBrowser.selectedTab = test_imageTab;
 
   gBrowser.selectedBrowser.addEventListener("load", test_rotateGesturesOnTab, true);
 }
--- a/browser/base/content/test/general/browser_parsable_css.js
+++ b/browser/base/content/test/general/browser_parsable_css.js
@@ -224,18 +224,17 @@ function processCSSRules(sheet) {
         imageURIsToReferencesMap.set(url, new Set([baseUrl]));
       } else {
         imageURIsToReferencesMap.get(url).add(baseUrl);
       }
     }
   }
 }
 
-function chromeFileExists(aURI)
-{
+function chromeFileExists(aURI) {
   let available = 0;
   try {
     let channel = NetUtil.newChannel({uri: aURI, loadUsingSystemPrincipal: true});
     let stream = channel.open();
     let sstream = Cc["@mozilla.org/scriptableinputstream;1"]
                     .createInstance(Ci.nsIScriptableInputStream);
     sstream.init(stream);
     available = sstream.available();
--- a/browser/base/content/test/general/browser_sanitize-timespans.js
+++ b/browser/base/content/test/general/browser_sanitize-timespans.js
@@ -497,18 +497,17 @@ function* setupFormHistory() {
                                           deferred.reject(error);
                                           throw new Error("Error occurred searching form history: " + error);
                                         },
                                         handleCompletion(reason) { deferred.resolve(results); }
                                       });
     return deferred.promise;
   }
 
-  function update(changes)
-  {
+  function update(changes) {
     let deferred = Promise.defer();
     FormHistory.update(changes, { handleError(error) {
                                     deferred.reject(error);
                                     throw new Error("Error occurred searching form history: " + error);
                                   },
                                   handleCompletion(reason) { deferred.resolve(); }
                                 });
     return deferred.promise;
--- a/browser/base/content/test/general/browser_sanitizeDialog.js
+++ b/browser/base/content/test/general/browser_sanitizeDialog.js
@@ -567,18 +567,17 @@ add_task(function* test_offline_cache() 
     this.uncheckAllCheckboxes();
     this.checkPrefCheckbox("offlineApps", true);
     this.acceptDialog();
   };
   wh.onunload = function() {
     // Check if the cache has been deleted
     var size = -1;
     var visitor = {
-      onCacheStorageInfo(aEntryCount, aConsumption, aCapacity, aDiskDirectory)
-      {
+      onCacheStorageInfo(aEntryCount, aConsumption, aCapacity, aDiskDirectory) {
         size = aConsumption;
       }
     };
     storage.asyncVisitStorage(visitor, false);
     // Offline cache visit happens synchronously, since it's forwarded to the old code
     is(size, 0, "offline application cache entries evicted");
   };
 
@@ -835,18 +834,17 @@ WindowHelper.prototype = {
    * @param aDurVal
    *        One of the Sanitizer.TIMESPAN_* values
    */
   selectDuration(aDurVal) {
     this.getDurationDropdown().value = aDurVal;
     if (aDurVal === Sanitizer.TIMESPAN_EVERYTHING) {
       is(this.isWarningPanelVisible(), true,
          "Warning panel should be visible for TIMESPAN_EVERYTHING");
-    }
-    else {
+    } else {
       is(this.isWarningPanelVisible(), false,
          "Warning panel should not be visible for non-TIMESPAN_EVERYTHING");
     }
   },
 
   /**
    * Toggles the details progressive disclosure button.
    */
@@ -907,18 +905,17 @@ function promiseAddFormEntryWithMinutesA
                          }
                        })
    )
 }
 
 /**
  * Checks if a form entry exists.
  */
-function formNameExists(name)
-{
+function formNameExists(name) {
   return new Promise((resolve, reject) => {
     let count = 0;
     FormHistory.count({ fieldname: name },
                       { handleResult: result => count = result,
                         handleError(error) {
                           reject(error);
                           throw new Error("Error occurred searching form history: " + error);
                         },
--- a/browser/base/content/test/general/browser_save_private_link_perwindowpb.js
+++ b/browser/base/content/test/general/browser_save_private_link_perwindowpb.js
@@ -10,28 +10,25 @@ function createTemporarySaveDirectory() 
   if (!saveDir.exists())
     saveDir.create(Ci.nsIFile.DIRECTORY_TYPE, 0o755);
   return saveDir;
 }
 
 function promiseNoCacheEntry(filename) {
   return new Promise((resolve, reject) => {
     Visitor.prototype = {
-      onCacheStorageInfo(num, consumption)
-      {
+      onCacheStorageInfo(num, consumption) {
         info("disk storage contains " + num + " entries");
       },
-      onCacheEntryInfo(uri)
-      {
+      onCacheEntryInfo(uri) {
         let urispec = uri.asciiSpec;
         info(urispec);
         is(urispec.includes(filename), false, "web content present in disk cache");
       },
-      onCacheEntryVisitCompleted()
-      {
+      onCacheEntryVisitCompleted() {
         resolve();
       }
     };
     function Visitor() {}
 
     let cache = Cc["@mozilla.org/netwerk/cache-storage-service;1"]
                 .getService(Ci.nsICacheStorageService);
     let {LoadContextInfo} = Cu.import("resource://gre/modules/LoadContextInfo.jsm", null);
--- a/browser/base/content/test/general/browser_selectpopup.js
+++ b/browser/base/content/test/general/browser_selectpopup.js
@@ -59,66 +59,59 @@ const PAGECONTENT_SOMEHIDDEN =
 const PAGECONTENT_TRANSLATED =
   "<html><body>" +
   "<div id='div'>" +
   "<iframe id='frame' width='320' height='295' style='border: none;'" +
   "        src='data:text/html,<select id=select autofocus><option>he he he</option><option>boo boo</option><option>baz baz</option></select>'" +
   "</iframe>" +
   "</div></body></html>";
 
-function openSelectPopup(selectPopup, withMouse, selector = "select",  win = window)
-{
+function openSelectPopup(selectPopup, withMouse, selector = "select", win = window) {
   let popupShownPromise = BrowserTestUtils.waitForEvent(selectPopup, "popupshown");
 
   if (withMouse) {
     return Promise.all([popupShownPromise,
                         BrowserTestUtils.synthesizeMouseAtCenter(selector, { }, win.gBrowser.selectedBrowser)]);
   }
 
   EventUtils.synthesizeKey("KEY_ArrowDown", { altKey: true, code: "ArrowDown" }, win);
   return popupShownPromise;
 }
 
-function hideSelectPopup(selectPopup, mode = "enter", win = window)
-{
+function hideSelectPopup(selectPopup, mode = "enter", win = window) {
   let browser = win.gBrowser.selectedBrowser;
   let selectClosedPromise = ContentTask.spawn(browser, null, function*() {
     Cu.import("resource://gre/modules/SelectContentHelper.jsm");
     return ContentTaskUtils.waitForCondition(() => !SelectContentHelper.open);
   });
 
   if (mode == "escape") {
     EventUtils.synthesizeKey("KEY_Escape", { code: "Escape" }, win);
-  }
-  else if (mode == "enter") {
+  } else if (mode == "enter") {
     EventUtils.synthesizeKey("KEY_Enter", { code: "Enter" }, win);
-  }
-  else if (mode == "click") {
+  } else if (mode == "click") {
     EventUtils.synthesizeMouseAtCenter(selectPopup.lastChild, { }, win);
   }
 
   return selectClosedPromise;
 }
 
-function getInputEvents()
-{
+function getInputEvents() {
   return ContentTask.spawn(gBrowser.selectedBrowser, {}, function() {
     return content.wrappedJSObject.gInputEvents;
   });
 }
 
-function getChangeEvents()
-{
+function getChangeEvents() {
   return ContentTask.spawn(gBrowser.selectedBrowser, {}, function() {
     return content.wrappedJSObject.gChangeEvents;
   });
 }
 
-function* doSelectTests(contentType, dtd)
-{
+function* doSelectTests(contentType, dtd) {
   const pageUrl = "data:" + contentType + "," + escape(dtd + "\n" + PAGECONTENT);
   let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, pageUrl);
 
   let menulist = document.getElementById("ContentSelectDropdown");
   let selectPopup = menulist.menupopup;
 
   yield openSelectPopup(selectPopup);
 
@@ -285,18 +278,17 @@ add_task(function*() {
     yield ContentTask.spawn(gBrowser.selectedBrowser, step, function*(contentStep) {
       return new Promise(resolve => {
         let changedWin = content;
 
         let elem;
         if (contentStep[0] == "select") {
           changedWin = content.document.getElementById("frame").contentWindow;
           elem = changedWin.document.getElementById("select");
-        }
-        else {
+        } else {
           elem = content.document.getElementById(contentStep[0]);
         }
 
         changedWin.addEventListener("MozAfterPaint", function onPaint() {
           changedWin.removeEventListener("MozAfterPaint", onPaint);
           resolve();
         });
 
@@ -406,18 +398,17 @@ add_task(function* test_event_order() {
 
       EventUtils.synthesizeKey("KEY_ArrowDown", { code: "ArrowDown" });
       yield hideSelectPopup(selectPopup, mode);
       yield eventsPromise;
     }
   });
 });
 
-function* performLargePopupTests(win)
-{
+function* performLargePopupTests(win) {
   let browser = win.gBrowser.selectedBrowser;
 
   yield ContentTask.spawn(browser, null, function*() {
     let doc = content.document;
     let select = doc.getElementById("one");
     for (var i = 0; i < 180; i++) {
       select.add(new content.Option("Test" + i));
     }
--- a/browser/base/content/test/general/browser_star_hsts.js
+++ b/browser/base/content/test/general/browser_star_hsts.js
@@ -58,18 +58,17 @@ function promiseStarState(aValue) {
  * @param aTab
  *        The tab to load into.
  * @param aUrl
  *        The url to load.
  * @param [optional] aFinalURL
  *        The url to wait for, same as aURL if not defined.
  * @return {Promise} resolved when the event is handled.
  */
-function promiseTabLoadEvent(aTab, aURL, aFinalURL)
-{
+function promiseTabLoadEvent(aTab, aURL, aFinalURL) {
   if (!aFinalURL)
     aFinalURL = aURL;
   let deferred = Promise.defer();
   info("Wait for load tab event");
   aTab.linkedBrowser.addEventListener("load", function load(event) {
     if (event.originalTarget != aTab.linkedBrowser.contentDocument ||
         event.target.location.href == "about:blank" ||
         event.target.location.href != aFinalURL) {
--- a/browser/base/content/test/general/browser_tabfocus.js
+++ b/browser/base/content/test/general/browser_tabfocus.js
@@ -35,18 +35,17 @@ var _lastfocuswindow = null;
 var actualEvents = new EventStore();
 var expectedEvents = new EventStore();
 var currentTestName = "";
 var _expectedElement = null;
 var _expectedWindow = null;
 
 var currentPromiseResolver = null;
 
-function* getFocusedElementForBrowser(browser, dontCheckExtraFocus = false)
-{
+function* getFocusedElementForBrowser(browser, dontCheckExtraFocus = false) {
   if (gMultiProcessBrowser) {
     return new Promise((resolve, reject) => {
       messageManager.addMessageListener("Browser:GetCurrentFocus", function getCurrentFocus(message) {
         messageManager.removeMessageListener("Browser:GetCurrentFocus", getCurrentFocus);
         resolve(message.data.details);
       });
 
       // The dontCheckExtraFocus flag is used to indicate not to check some
@@ -56,23 +55,21 @@ function* getFocusedElementForBrowser(br
         { dontCheckExtraFocus });
     });
   }
   var focusedWindow = {};
   var node = fm.getFocusedElementForWindow(browser.contentWindow, false, focusedWindow);
   return "Focus is " + (node ? node.id : "<none>");
 }
 
-function focusInChild()
-{
+function focusInChild() {
   var contentFM = Components.classes["@mozilla.org/focus-manager;1"].
                       getService(Components.interfaces.nsIFocusManager);
 
-  function getWindowDocId(target)
-  {
+  function getWindowDocId(target) {
     return (String(target.location).indexOf("1") >= 0) ? "window1" : "window2";
   }
 
   function eventListener(event) {
     var id;
     if (event.target instanceof Components.interfaces.nsIDOMWindow)
       id = getWindowDocId(event.originalTarget) + "-window";
     else if (event.target instanceof Components.interfaces.nsIDOMDocument)
@@ -112,24 +109,22 @@ function focusInChild()
         details += "<ERROR: child activeElement is not correct>";
       }
     }
 
     sendSyncMessage("Browser:GetCurrentFocus", { details });
   });
 }
 
-function focusElementInChild(elementid, type)
-{
+function focusElementInChild(elementid, type) {
   let browser = (elementid.indexOf("1") >= 0) ? browser1 : browser2;
   if (gMultiProcessBrowser) {
     browser.messageManager.sendAsyncMessage("Browser:ChangeFocus",
                                             { id: elementid, type });
-  }
-  else {
+  } else {
     browser.contentDocument.getElementById(elementid)[type]();
   }
 }
 
 add_task(function*() {
   tab1 = gBrowser.addTab();
   browser1 = gBrowser.getBrowserForTab(tab1);
 
@@ -367,20 +362,18 @@ add_task(function*() {
   window.removeEventListener("blur", _browser_tabfocus_test_eventOccured, true);
 
   gBrowser.removeCurrentTab();
   gBrowser.removeCurrentTab();
 
   finish();
 });
 
-function _browser_tabfocus_test_eventOccured(event)
-{
-  function getWindowDocId(target)
-  {
+function _browser_tabfocus_test_eventOccured(event) {
+  function getWindowDocId(target) {
     if (target == browser1.contentWindow || target == browser1.contentDocument) {
       return "window1";
     }
     if (target == browser2.contentWindow || target == browser2.contentDocument) {
       return "window2";
     }
     return "main-window";
   }
@@ -403,35 +396,33 @@ function _browser_tabfocus_test_eventOcc
     id = (event.originalTarget == tab1) ? "tab1" : "tab2";
   else
     id = event.originalTarget.id;
 
   actualEvents.push(event.type + ": " + id);
   compareFocusResults();
 }
 
-function getId(element)
-{
+function getId(element) {
   if (!element) {
     return null;
   }
 
   if (element.localName == "browser") {
     return element == browser1 ? "browser1" : "browser2";
   }
 
   if (element.localName == "tab") {
     return element == tab1 ? "tab1" : "tab2";
   }
 
   return (element.localName == "input") ? "urlbar" : element.id;
 }
 
-function compareFocusResults()
-{
+function compareFocusResults() {
   if (!currentPromiseResolver)
     return;
 
   let winIds = ["main-window", "window1", "window2"];
 
   for (let winId of winIds) {
     if (actualEvents[winId].length < expectedEvents[winId].length)
       return;
@@ -444,18 +435,17 @@ function compareFocusResults()
     actualEvents[winId] = [];
   }
 
   // Use executeSoon as this will be called during a focus/blur event handler
   executeSoon(() => {
     let matchWindow = window;
     if (gMultiProcessBrowser) {
       is(_expectedWindow, "main-window", "main-window is always expected");
-    }
-    else if (_expectedWindow != "main-window") {
+    } else if (_expectedWindow != "main-window") {
       matchWindow = (_expectedWindow == "window1" ? browser1.contentWindow : browser2.contentWindow);
     }
 
     var focusedElement = fm.focusedElement;
     is(getId(focusedElement), _expectedElement, currentTestName + " focusedElement");
     is(fm.focusedWindow, matchWindow, currentTestName + " focusedWindow");
     var focusedWindow = {};
     is(getId(fm.getFocusedElementForWindow(matchWindow, false, focusedWindow)),
@@ -469,42 +459,39 @@ function compareFocusResults()
     }
     is(getId(matchWindow.document.activeElement), expectedActive, currentTestName + " activeElement");
 
     currentPromiseResolver();
     currentPromiseResolver = null;
   });
 }
 
-function* expectFocusShiftAfterTabSwitch(tab, expectedWindow, expectedElement, focusChanged, testid)
-{
+function* expectFocusShiftAfterTabSwitch(tab, expectedWindow, expectedElement, focusChanged, testid) {
   let tabSwitchPromise = null;
   yield expectFocusShift(() => { tabSwitchPromise = BrowserTestUtils.switchTab(gBrowser, tab) },
                          expectedWindow, expectedElement, focusChanged, testid)
   yield tabSwitchPromise;
 }
 
-function* expectFocusShift(callback, expectedWindow, expectedElement, focusChanged, testid)
-{
+function* expectFocusShift(callback, expectedWindow, expectedElement, focusChanged, testid) {
   currentPromiseResolver = null;
   currentTestName = testid;
 
   expectedEvents = new EventStore();
 
   if (focusChanged) {
     _expectedElement = expectedElement;
     _expectedWindow = expectedWindow;
 
     // When the content is in a child process, the expected element in the chrome window
     // will always be the urlbar or a browser element.
     if (gMultiProcessBrowser) {
       if (_expectedWindow == "window1") {
         _expectedElement = "browser1";
-      }
-      else if (_expectedWindow == "window2") {
+      } else if (_expectedWindow == "window2") {
         _expectedElement = "browser2";
       }
       _expectedWindow = "main-window";
     }
 
     if (gMultiProcessBrowser && _lastfocuswindow != "main-window" &&
         _lastfocuswindow != expectedWindow) {
       let browserid = _lastfocuswindow == "window1" ? "browser1" : "browser2";
--- a/browser/base/content/test/general/browser_utilityOverlay.js
+++ b/browser/base/content/test/general/browser_utilityOverlay.js
@@ -15,18 +15,17 @@ function test() {
   executeSoon(runNextTest);
 }
 
 function runNextTest() {
   if (gTests.length) {
     let testFun = gTests.shift();
     info("Running " + testFun.name);
     testFun()
-  }
-  else {
+  } else {
     finish();
   }
 }
 
 function test_eventMatchesKey() {
   let eventMatchResult;
   let key;
   let checkEvent = function(e) {
--- a/browser/base/content/test/general/browser_windowactivation.js
+++ b/browser/base/content/test/general/browser_windowactivation.js
@@ -19,18 +19,17 @@ function reallyRunTests() {
   let tab1 = gBrowser.addTab();
   let tab2 = gBrowser.addTab();
   browser1 = gBrowser.getBrowserForTab(tab1);
   browser2 = gBrowser.getBrowserForTab(tab2);
 
   gURLBar.focus();
 
   var loadCount = 0;
-  function check()
-  {
+  function check() {
     // wait for both tabs to load
     if (++loadCount != 2) {
       return;
     }
 
     browser1.removeEventListener("load", check, true);
     browser2.removeEventListener("load", check, true);
 
@@ -102,39 +101,36 @@ function reallyRunTests() {
   browser2.contentWindow.location = testPage;
 
   browser1.messageManager.loadFrameScript("data:,(" + childFunction.toString() + ")();", true);
   browser2.messageManager.loadFrameScript("data:,(" + childFunction.toString() + ")();", true);
 
   gBrowser.selectedTab = tab1;
 }
 
-function sendGetBackgroundRequest(ifChanged)
-{
+function sendGetBackgroundRequest(ifChanged) {
   browser1.messageManager.sendAsyncMessage("Test:GetBackgroundColor", { ifChanged });
   browser2.messageManager.sendAsyncMessage("Test:GetBackgroundColor", { ifChanged });
 }
 
 function runOtherWindowTests() {
   otherWindow = window.open("data:text/html,<body>Hi</body>", "", "chrome");
   waitForFocus(function() {
     sendGetBackgroundRequest(true);
   }, otherWindow);
 }
 
-function finishTest()
-{
+function finishTest() {
   gBrowser.removeCurrentTab();
   gBrowser.removeCurrentTab();
   otherWindow = null;
   finish();
 }
 
-function childFunction()
-{
+function childFunction() {
   let oldColor = null;
 
   let expectingResponse = false;
   let ifChanged = true;
 
   addMessageListener("Test:GetBackgroundColor", function(message) {
     expectingResponse = true;
     ifChanged = message.data.ifChanged;
--- a/browser/base/content/test/general/clipboard_pastefile.html
+++ b/browser/base/content/test/general/clipboard_pastefile.html
@@ -1,18 +1,16 @@
 <html><body>
 <script>
-function checkPaste(event)
-{
+function checkPaste(event) {
   let output = document.getElementById("output");
   output.textContent = checkPasteHelper(event);
 }
 
-function checkPasteHelper(event)
-{
+function checkPasteHelper(event) {
   let dt = event.clipboardData;
   if (dt.types.length != 2)
     return "Wrong number of types; got " + dt.types.length;
 
   for (let type of dt.types) {
     if (type != "Files" && type != "application/x-moz-file")
       return "Invalid type for types; got" + type;
   }
--- a/browser/base/content/test/general/contentSearchUI.js
+++ b/browser/base/content/test/general/contentSearchUI.js
@@ -79,18 +79,17 @@ var messageHandlers = {
     waitForContentSearchEvent("ManageEngines",
                               aData => ack("waitForSearchSettings", aData));
   },
 
   mousemove(itemIndex) {
     let row;
     if (itemIndex == -1) {
       row = gController._table.firstChild;
-    }
-    else {
+    } else {
       let allElts = [...gController._suggestionsList.children,
                      ...gController._oneOffButtons,
                      content.document.getElementById("contentSearchSettingsButton")];
       row = allElts[itemIndex];
     }
     let event = {
       type: "mousemove",
       clickcount: 0,
@@ -102,18 +101,17 @@ var messageHandlers = {
     content.synthesizeMouseAtCenter(row, event);
   },
 
   click(arg) {
     let eltIdx = typeof(arg) == "object" ? arg.eltIdx : arg;
     let row;
     if (eltIdx == -1) {
       row = gController._table.firstChild;
-    }
-    else {
+    } else {
       let allElts = [...gController._suggestionsList.children,
                      ...gController._oneOffButtons,
                      content.document.getElementById("contentSearchSettingsButton")];
       row = allElts[eltIdx];
     }
     let event = arg.modifiers || {};
     // synthesizeMouseAtCenter defaults to sending a mousedown followed by a
     // mouseup if the event type is not specified.
--- a/browser/base/content/test/general/contextmenu_common.js
+++ b/browser/base/content/test/general/contextmenu_common.js
@@ -14,18 +14,17 @@ function openContextMenuFor(element, shi
       lastElement = element;
       var eventDetails = { type : "contextmenu", button : 2, shiftKey : shiftkey };
       synthesizeMouse(element, 2, 2, eventDetails, element.ownerGlobal);
     }
 
     if (waitForSpellCheck) {
       var { onSpellCheck } = SpecialPowers.Cu.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm", {});
       onSpellCheck(element, actuallyOpenContextMenuFor);
-    }
-    else {
+    } else {
       actuallyOpenContextMenuFor();
     }
 }
 
 function closeContextMenu() {
     contextMenu.hidePopup();
 }
 
--- a/browser/base/content/test/general/download_page.html
+++ b/browser/base/content/test/general/download_page.html
@@ -21,17 +21,17 @@ https://bugzilla.mozilla.org/show_bug.cg
                 download="with-target.txt" id="link4">Download "with-target.txt"</a></li>
         <li><a href="javascript:(1+2)+''"
             download="javascript.txt" id="link5">Download "javascript.txt"</a></li>
     </ul>
     <script>
         var li = document.createElement('li');
         var a = document.createElement('a');
 
-        a.href = window.URL.createObjectURL(new Blob(["just text"]))    ;
+        a.href = window.URL.createObjectURL(new Blob(["just text"]));
         a.download = "test.blob";
         a.id = "link6";
         a.textContent = 'Download "test.blob"';
 
         li.appendChild(a);
         document.getElementsByTagName('ul')[0].appendChild(li);
 
         window.addEventListener("beforeunload", function(evt) {
--- a/browser/base/content/test/general/file_bug822367_5.html
+++ b/browser/base/content/test/general/file_bug822367_5.html
@@ -3,18 +3,17 @@
 <!--
 Test 5 for Mixed Content Blocker User Override - Mixed Script in document.open()
 https://bugzilla.mozilla.org/show_bug.cgi?id=822367
 -->
 <head>
   <meta charset="utf-8">
   <title>Test 5 for Bug 822367</title>
   <script>
-    function createDoc()
-    {
+    function createDoc() {
       var doc = document.open("text/html", "replace");
       doc.write('<!DOCTYPE html><html><body><p id="p1">This is some content</p><script src="http://example.com/browser/browser/base/content/test/general/file_bug822367_1.js">\<\/script\>\<\/body>\<\/html>');
       doc.close();
     }
   </script>
 </head>
 <body>
   <div id="testContent">
--- a/browser/base/content/test/general/head.js
+++ b/browser/base/content/test/general/head.js
@@ -99,17 +99,17 @@ function closeToolbarCustomizationUI(aCa
     aBrowserWin.gNavToolbox.removeEventListener("aftercustomization", unloaded);
     executeSoon(aCallback);
   });
 
   aBrowserWin.gCustomizeMode.exit();
 }
 
 function waitForCondition(condition, nextTest, errorMsg, retryTimes) {
-  retryTimes = typeof retryTimes !== 'undefined' ?  retryTimes : 30;
+  retryTimes = typeof retryTimes !== 'undefined' ? retryTimes : 30;
   var tries = 0;
   var interval = setInterval(function() {
     if (tries >= retryTimes) {
       ok(false, errorMsg);
       moveOn();
     }
     var conditionPassed;
     try {
@@ -609,18 +609,17 @@ var FullZoomHelper = {
  * @param tab
  *        The tab to load into.
  * @param [optional] url
  *        The url to load, or the current url.
  * @return {Promise} resolved when the event is handled.
  * @resolves to the received event
  * @rejects if a valid load event is not received within a meaningful interval
  */
-function promiseTabLoadEvent(tab, url)
-{
+function promiseTabLoadEvent(tab, url) {
   info("Wait tab event: load");
 
   function handle(loadedUrl) {
     if (loadedUrl === "about:blank" || (url && loadedUrl !== url)) {
       info(`Skipping spurious load event for ${loadedUrl}`);
       return false;
     }
 
@@ -668,17 +667,17 @@ function waitForNewTabEvent(aTabBrowser)
  *           passiveLoaded: true|false,
  *        }
  *
  * @return {Promise}
  * @resolves When the operation has finished and the identity panel has closed.
  */
 function assertMixedContentBlockingState(tabbrowser, states = {}) {
   if (!tabbrowser || !("activeLoaded" in states) ||
-      !("activeBlocked" in states) || !("passiveLoaded" in states))  {
+      !("activeBlocked" in states) || !("passiveLoaded" in states)) {
     throw new Error("assertMixedContentBlockingState requires a browser and a states object");
   }
 
   let {passiveLoaded, activeLoaded, activeBlocked} = states;
   let {gIdentityHandler} = tabbrowser.ownerGlobal;
   let doc = tabbrowser.ownerDocument;
   let identityBox = gIdentityHandler._identityBox;
   let classList = identityBox.classList;
@@ -897,18 +896,17 @@ function promiseNotificationShown(notifi
  * @param aTopic
  *        Notification topic to observe.
  *
  * @return {Promise}
  * @resolves An object with subject and data properties from the observed
  *           notification.
  * @rejects Never.
  */
-function promiseTopicObserved(aTopic)
-{
+function promiseTopicObserved(aTopic) {
   return new Promise((resolve) => {
     Services.obs.addObserver(
       function PTO_observe(aSubject, aTopic2, aData) {
         Services.obs.removeObserver(PTO_observe, aTopic2);
         resolve({subject: aSubject, data: aData});
       }, aTopic, false);
   });
 }
@@ -966,18 +964,17 @@ function isSecurityState(expectedState) 
 function promiseOnBookmarkItemAdded(aExpectedURI) {
   return new Promise((resolve, reject) => {
     let bookmarksObserver = {
       onItemAdded(aItemId, aFolderId, aIndex, aItemType, aURI) {
         info("Added a bookmark to " + aURI.spec);
         PlacesUtils.bookmarks.removeObserver(bookmarksObserver);
         if (aURI.equals(aExpectedURI)) {
           resolve();
-        }
-        else {
+        } else {
           reject(new Error("Added an unexpected bookmark"));
         }
       },
       onBeginUpdateBatch() {},
       onEndUpdateBatch() {},
       onItemRemoved() {},
       onItemChanged() {},
       onItemVisited() {},
--- a/browser/base/content/test/newtab/browser_newtab_background_captures.js
+++ b/browser/base/content/test/newtab/browser_newtab_background_captures.js
@@ -17,18 +17,17 @@ add_task(function* () {
 
   // Make sure the thumbnail doesn't exist yet.
   let url = "http://example.com/";
   let path = imports.PageThumbsStorage.getFilePathForURL(url);
   let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
   file.initWithPath(path);
   try {
     file.remove(false);
-  }
-  catch (err) {}
+  } catch (err) {}
 
   // Add a top site.
   yield setLinks("-1");
 
   // We need a handle to a hidden, pre-loaded newtab so we can verify that it
   // doesn't allow background captures. Ensure we have a preloaded browser.
   gBrowser._createPreloadBrowser();
 
--- a/browser/base/content/test/newtab/browser_newtab_bug752841.js
+++ b/browser/base/content/test/newtab/browser_newtab_bug752841.js
@@ -1,16 +1,15 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 const PREF_NEWTAB_ROWS = "browser.newtabpage.rows";
 const PREF_NEWTAB_COLUMNS = "browser.newtabpage.columns";
 
-function getCellsCount()
-{
+function getCellsCount() {
   return ContentTask.spawn(gBrowser.selectedBrowser, {}, function* () {
     return content.gGrid.cells.length;
   });
 }
 
 add_task(function* () {
   let testValues = [
     {row: 0, column: 0},
--- a/browser/base/content/test/newtab/browser_newtab_disable.js
+++ b/browser/base/content/test/newtab/browser_newtab_disable.js
@@ -7,18 +7,17 @@
  */
 add_task(function* () {
   // create a new tab page and hide it.
   yield setLinks("0,1,2,3,4,5,6,7,8");
   setPinnedLinks("");
 
   let firstTab = yield* addNewTabPageTab();
 
-  function isGridDisabled(browser = gBrowser.selectedBrowser)
-  {
+  function isGridDisabled(browser = gBrowser.selectedBrowser) {
     return ContentTask.spawn(browser, {}, function*() {
       return content.gGrid.node.hasAttribute("page-disabled");
     });
   }
 
   let isDisabled = yield isGridDisabled();
   ok(!isDisabled, "page is not disabled");
 
--- a/browser/base/content/test/newtab/browser_newtab_search.js
+++ b/browser/base/content/test/newtab/browser_newtab_search.js
@@ -223,18 +223,17 @@ function promiseNewSearchEngine({name: b
     });
   });
 
   return Promise.all([addEnginePromise, eventPromise]).then(([newEngine, _]) => {
     return newEngine;
   });
 }
 
-function* checkCurrentEngine(engineInfo)
-{
+function* checkCurrentEngine(engineInfo) {
   let engine = Services.search.currentEngine;
   ok(engine.name.includes(engineInfo.name),
      "Sanity check: current engine: engine.name=" + engine.name +
      " basename=" + engineInfo.name);
 
   yield ContentTask.spawn(gBrowser.selectedBrowser, { name: engine.name }, function* (args) {
     Assert.equal(content.gSearch._contentSearchController.defaultEngine.name,
       args.name, "currentEngineName: " + args.name);
--- a/browser/base/content/test/plugins/browser_clearplugindata.html
+++ b/browser/base/content/test/plugins/browser_clearplugindata.html
@@ -4,18 +4,17 @@
 -->
 <html>
   <head>
     <title>Plugin Clear Site Data sanitize test</title>
 
     <embed id="plugin1" type="application/x-test" width="200" height="200"></embed>
 
     <script type="application/javascript">
-      function testSteps()
-      {
+      function testSteps() {
         // Make sure clearing by timerange is supported.
         var p = document.getElementById("plugin1");
         p.setSitesWithDataCapabilities(true);
 
         p.setSitesWithData(
           "foo.com:0:5," +
           "bar.com:0:100," +
           "baz.com:1:5," +
--- a/browser/base/content/test/plugins/browser_clearplugindata_noage.html
+++ b/browser/base/content/test/plugins/browser_clearplugindata_noage.html
@@ -4,18 +4,17 @@
 -->
 <html>
   <head>
     <title>Plugin Clear Site Data sanitize test without age</title>
 
     <embed id="plugin1" type="application/x-test" width="200" height="200"></embed>
 
     <script type="application/javascript">
-      function testSteps()
-      {
+      function testSteps() {
         // Make sure clearing by timerange is disabled.
         var p = document.getElementById("plugin1");
         p.setSitesWithDataCapabilities(false);
 
         p.setSitesWithData(
           "foo.com:0:5," +
           "bar.com:0:100," +
           "baz.com:1:5," +
--- a/browser/base/content/test/plugins/browser_pluginCrashCommentAndURL.js
+++ b/browser/base/content/test/plugins/browser_pluginCrashCommentAndURL.js
@@ -192,16 +192,15 @@ function onSubmitStatus(aSubject, aData)
        "URL should be absent from extra data when opt-in not checked");
 
   return true;
 }
 
 function getPropertyBagValue(bag, key) {
   try {
     var val = bag.getProperty(key);
-  }
-  catch (e) {
+  } catch (e) {
     if (e.result != Cr.NS_ERROR_FAILURE) {
       throw e;
     }
   }
   return val;
 }
--- a/browser/base/content/test/plugins/browser_pluginnotification.js
+++ b/browser/base/content/test/plugins/browser_pluginnotification.js
@@ -494,18 +494,17 @@ add_task(function* () {
   ok(centerAction, "Test 21d, found center action for the Second Test plugin");
 
   centerItem = null;
   for (let item of PopupNotifications.panel.firstChild.childNodes) {
     if (item.action == centerAction) {
       is(item.value, "block", "Test 21d, test plugin 2 should start blocked");
       centerItem = item;
       break;
-    }
-    else {
+    } else {
       is(item.value, "allownow", "Test 21d, test plugin should be enabled");
     }
   }
   ok(centerItem, "Test 21d, found center item for the Second Test plugin");
 
   // Select the allow now option in the select drop down for Second Test Plguins
   centerItem.value = "allownow";
 
--- a/browser/base/content/test/plugins/head.js
+++ b/browser/base/content/test/plugins/head.js
@@ -6,18 +6,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
   "resource://gre/modules/PlacesUtils.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "PromiseUtils",
   "resource://gre/modules/PromiseUtils.jsm");
 
 // The blocklist shim running in the content process does not initialize at
 // start up, so it's not active until we load content that needs to do a
 // check. This helper bypasses the delay to get the svc up and running
 // immediately. Note, call this after remote content has loaded.
-function promiseInitContentBlocklistSvc(aBrowser)
-{
+function promiseInitContentBlocklistSvc(aBrowser) {
   return ContentTask.spawn(aBrowser, {}, function* () {
     try {
       Cc["@mozilla.org/extensions/blocklist;1"]
         .getService(Ci.nsIBlocklistService);
     } catch (ex) {
       return ex.message;
     }
     return null;
--- a/browser/base/content/test/plugins/plugin_crashCommentAndURL.html
+++ b/browser/base/content/test/plugins/plugin_crashCommentAndURL.html
@@ -8,18 +8,17 @@
         var argStr = decodeURIComponent(window.location.search.substr(1));
         if (argStr) {
           var args = JSON.parse(argStr);
           for (var key in args)
             plugin.setAttribute(key, args[key]);
         }
         try {
           plugin.crash();
-        }
-        catch (err) {}
+        } catch (err) {}
       }
     </script>
   </head>
   <body onload="crash();">
     <embed id="plugin" type="application/x-test"
            width="400" height="400"
            drawmode="solid" color="FF00FFFF">
     </embed>
--- a/browser/base/content/test/popupNotifications/head.js
+++ b/browser/base/content/test/popupNotifications/head.js
@@ -12,33 +12,31 @@ XPCOMUtils.defineLazyModuleGetter(this, 
  *
  * @param topic
  *        Notification topic to observe.
  *
  * @return {Promise}
  * @resolves The array [subject, data] from the observed notification.
  * @rejects Never.
  */
-function promiseTopicObserved(topic)
-{
+function promiseTopicObserved(topic) {
   let deferred = Promise.defer();
   info("Waiting for observer topic " + topic);
   Services.obs.addObserver(function PTO_observe(obsSubject, obsTopic, obsData) {
     Services.obs.removeObserver(PTO_observe, obsTopic);
     deferred.resolve([obsSubject, obsData]);
   }, topic, false);
   return deferred.promise;
 }
 
 /**
  * Called after opening a new window or switching windows, this will wait until
  * we are sure that an attempt to display a notification will not fail.
  */
-function* waitForWindowReadyForPopupNotifications(win)
-{
+function* waitForWindowReadyForPopupNotifications(win) {
   // These are the same checks that PopupNotifications.jsm makes before it
   // allows a notification to open.
   yield BrowserTestUtils.waitForCondition(
     () => win.gBrowser.selectedBrowser.docShellIsActive,
     "The browser should be active"
   );
   yield BrowserTestUtils.waitForCondition(
     () => Services.focus.activeWindow == win,
@@ -53,18 +51,17 @@ function* waitForWindowReadyForPopupNoti
  * @param tab
  *        The tab to load into.
  * @param [optional] url
  *        The url to load, or the current url.
  * @return {Promise} resolved when the event is handled.
  * @resolves to the received event
  * @rejects if a valid load event is not received within a meaningful interval
  */
-function promiseTabLoadEvent(tab, url)
-{
+function promiseTabLoadEvent(tab, url) {
   let browser = tab.linkedBrowser;
 
   if (url) {
     browser.loadURI(url);
   }
 
   return BrowserTestUtils.browserLoaded(browser, false, url);
 }
--- a/browser/base/content/test/social/browser_aboutHome_activation.js
+++ b/browser/base/content/test/social/browser_aboutHome_activation.js
@@ -63,18 +63,17 @@ var gTests = [
 
 {
   desc: "Test activation bypassing enable panel",
   snippet: snippet2,
   panel: false
 }
 ];
 
-function test()
-{
+function test() {
   waitForExplicitFinish();
   requestLongerTimeout(2);
   ignoreAllUncaughtExceptions();
   PopupNotifications.panel.setAttribute("animate", "false");
   registerCleanupFunction(function() {
     PopupNotifications.panel.removeAttribute("animate");
   });
 
@@ -125,18 +124,17 @@ function test()
  * @param aTab
  *        The tab to load into.
  * @param aUrl
  *        The url to load.
  * @param aEvent
  *        The load event type to wait for.  Defaults to "load".
  * @return {Promise} resolved when the event is handled.
  */
-function promiseTabLoadEvent(aTab, aURL, aEventType = "load")
-{
+function promiseTabLoadEvent(aTab, aURL, aEventType = "load") {
   return new Promise(resolve => {
     info("Wait tab event: " + aEventType);
     aTab.linkedBrowser.addEventListener(aEventType, function load(event) {
       if (event.originalTarget != aTab.linkedBrowser.contentDocument ||
           event.target.location.href == "about:blank") {
         info("skipping spurious load event");
         return;
       }
@@ -153,18 +151,17 @@ function promiseTabLoadEvent(aTab, aURL,
  * remote snippets since that may cause network bustage or slowness.
  *
  * @param aTab
  *        The tab containing about:home.
  * @param aSetupFn
  *        The setup function to be run.
  * @return {Promise} resolved when the snippets are ready.  Gets the snippets map.
  */
-function promiseSetupSnippetsMap(aTab, aSnippet)
-{
+function promiseSetupSnippetsMap(aTab, aSnippet) {
   info("Waiting for snippets map");
 
   return ContentTask.spawn(aTab.linkedBrowser,
                     {snippetsVersion: AboutHomeUtils.snippetsVersion,
                      snippet: aSnippet},
                     function*(arg) {
     return new Promise(resolve => {
       addEventListener("AboutHomeLoadSnippets", function load(event) {
--- a/browser/base/content/test/urlbar/browser_bug556061.js
+++ b/browser/base/content/test/urlbar/browser_bug556061.js
@@ -9,18 +9,17 @@ var testTab;
 
 function runNextTest() {
   if (tests.length) {
     let t = tests.shift();
     waitForClipboard(t.expected, t.setup, function() {
       t.success();
       runNextTest();
     }, cleanup);
-  }
-  else {
+  } else {
     cleanup();
   }
 }
 
 function cleanup() {
   gBrowser.removeTab(testTab);
   finish();
 }
--- a/browser/base/content/test/urlbar/browser_bug623155.js
+++ b/browser/base/content/test/urlbar/browser_bug623155.js
@@ -86,18 +86,17 @@ var gWebProgressListener = {
        "onLocationChange catches only redirected URI.");
 
     if (aLocation.ref == "BG") {
       // This is background tab's request.
       isnot(gNewTab, gBrowser.selectedTab, "This is a background tab.");
     } else if (aLocation.ref == "FG") {
       // This is foreground tab's request.
       is(gNewTab, gBrowser.selectedTab, "This is a foreground tab.");
-    }
-    else {
+    } else {
       // We shonuld not reach here.
       ok(false, "This URI hash is not expected:" + aLocation.ref);
     }
 
     let isSelectedTab = gNewTab.selected;
     setTimeout(delayed, 0, isSelectedTab);
   }
 };
@@ -112,18 +111,17 @@ function delayed(aIsSelectedTab) {
   ok(isRedirectedURISpec(currentURI),
      "The content area is redirected. aIsSelectedTab:" + aIsSelectedTab);
   is(gURLBar.value, currentURI,
      "The URL bar shows the content URI. aIsSelectedTab:" + aIsSelectedTab);
 
   if (!aIsSelectedTab) {
     // If this was a background request, go on a foreground request.
     gBrowser.selectedBrowser.loadURI(REDIRECT_FROM + "#FG");
-  }
-  else {
+  } else {
     // Othrewise, nothing to do remains.
     finish();
   }
 }
 
 /* Cleanup */
 registerCleanupFunction(function() {
   if (gNewTab) {
--- a/browser/base/content/test/urlbar/browser_locationBarCommand.js
+++ b/browser/base/content/test/urlbar/browser_locationBarCommand.js
@@ -198,18 +198,17 @@ function promiseNewTabSwitched() {
   return new Promise(resolve => {
     gBrowser.addEventListener("TabSwitchDone", function onSwitch() {
       gBrowser.removeEventListener("TabSwitchDone", onSwitch);
       executeSoon(resolve);
     });
   });
 }
 
-function promiseCheckChildNoFocusedElement(browser)
-{
+function promiseCheckChildNoFocusedElement(browser) {
   if (!gMultiProcessBrowser) {
     Assert.equal(Services.focus.focusedElement, null, "There should be no focused element");
     return null;
   }
 
   return ContentTask.spawn(browser, { }, function* () {
     const fm = Components.classes["@mozilla.org/focus-manager;1"].
                           getService(Components.interfaces.nsIFocusManager);
--- a/browser/base/content/test/urlbar/browser_tabMatchesInAwesomebar.js
+++ b/browser/base/content/test/urlbar/browser_tabMatchesInAwesomebar.js
@@ -157,32 +157,30 @@ function ensure_opentabs_match_db() {
     }
   }
 
   return new Promise(resolve => {
     checkAutocompleteResults(tabs, resolve);
   });
 }
 
-function checkAutocompleteResults(aExpected, aCallback)
-{
+function checkAutocompleteResults(aExpected, aCallback) {
   gController.input = {
     timeout: 10,
     textValue: "",
     searches: ["unifiedcomplete"],
     searchParam: "enable-actions",
     popupOpen: false,
     minResultsForPopup: 0,
     invalidate() {},
     disableAutoComplete: false,
     completeDefaultIndex: false,
     get popup() { return this; },
     onSearchBegin() {},
-    onSearchComplete()
-    {
+    onSearchComplete() {
       info("Found " + gController.matchCount + " matches.");
       // Check to see the expected uris and titles match up (in any order)
       for (let i = 0; i < gController.matchCount; i++) {
         if (gController.getStyleAt(i).includes("heuristic")) {
           info("Skip heuristic match");
           continue;
         }
         let action = gURLBar.popup.input._parseActionUrl(gController.getValueAt(i));
--- a/browser/base/content/test/webrtc/browser_devices_get_user_media.js
+++ b/browser/base/content/test/webrtc/browser_devices_get_user_media.js
@@ -200,18 +200,17 @@ var gTests = [
       let expected = {};
       if (expectedMessage == "ok") {
         yield expectObserverCalled("getUserMedia:response:allow");
         yield expectObserverCalled("recording-device-events");
         if (aRequestVideo)
           expected.video = true;
         if (aRequestAudio)
           expected.audio = true;
-      }
-      else {
+      } else {
         yield expectObserverCalled("getUserMedia:response:deny");
         yield expectObserverCalled("recording-window-ended");
       }
       Assert.deepEqual((yield getMediaCaptureState()), expected,
                        "expected " + Object.keys(expected).join(" and ") +
                        " to be shared");
 
       function checkDevicePermissions(aDevice, aExpected) {
@@ -276,18 +275,17 @@ var gTests = [
         yield expectObserverCalled("getUserMedia:request");
 
         // Deny the request to cleanup...
         yield promiseMessage(permissionError, () => {
           activateSecondaryAction(kActionDeny);
         });
         yield expectObserverCalled("getUserMedia:response:deny");
         yield expectObserverCalled("recording-window-ended");
-      }
-      else {
+      } else {
         let expectedMessage = aExpectStream ? "ok" : permissionError;
         let promise = promiseMessage(expectedMessage);
         yield promiseRequestDevice(aRequestAudio, aRequestVideo);
         yield promise;
 
         if (expectedMessage == "ok") {
           yield expectObserverCalled("getUserMedia:request");
           yield promiseNoPopupNotification("webRTC-shareDevices");
@@ -300,18 +298,17 @@ var gTests = [
             expected.video = true;
           if (aAllowAudio && aRequestAudio)
             expected.audio = true;
           Assert.deepEqual((yield getMediaCaptureState()), expected,
                            "expected " + Object.keys(expected).join(" and ") +
                            " to be shared");
 
           yield closeStream();
-        }
-        else {
+        } else {
           yield expectObserverCalled("recording-window-ended");
         }
       }
 
       Perms.remove(uri, "camera");
       Perms.remove(uri, "microphone");
     }
 
@@ -445,18 +442,17 @@ var gTests = [
 
     yield indicator;
     yield checkSharingUI({video: true});
 
     ok(gIdentityHandler._identityPopup.hidden, "control center should be hidden");
     if ("nsISystemStatusBar" in Ci) {
       let activeStreams = webrtcUI.getActiveStreams(true, false, false);
       webrtcUI.showSharingDoorhanger(activeStreams[0]);
-    }
-    else {
+    } else {
       let win =
         Services.wm.getMostRecentWindow("Browser:WebRTCGlobalIndicator");
       let elt = win.document.getElementById("audioVideoButton");
       EventUtils.synthesizeMouseAtCenter(elt, {}, win);
       yield promiseWaitForCondition(() => !gIdentityHandler._identityPopup.hidden);
     }
     ok(!gIdentityHandler._identityPopup.hidden, "control center should be open");
 
--- a/browser/base/content/test/webrtc/browser_devices_get_user_media_screen.js
+++ b/browser/base/content/test/webrtc/browser_devices_get_user_media_screen.js
@@ -475,18 +475,17 @@ var gTests = [
                      "expected screen to be shared");
     yield indicator;
     yield checkSharingUI({screen: "Screen"});
 
     ok(gIdentityHandler._identityPopup.hidden, "control center should be hidden");
     if ("nsISystemStatusBar" in Ci) {
       let activeStreams = webrtcUI.getActiveStreams(false, false, true);
       webrtcUI.showSharingDoorhanger(activeStreams[0]);
-    }
-    else {
+    } else {
       let win =
         Services.wm.getMostRecentWindow("Browser:WebRTCGlobalIndicator");
       let elt = win.document.getElementById("screenShareButton");
       EventUtils.synthesizeMouseAtCenter(elt, {}, win);
       yield promiseWaitForCondition(() => !gIdentityHandler._identityPopup.hidden);
     }
     ok(!gIdentityHandler._identityPopup.hidden, "control center should be open");
 
--- a/browser/base/content/test/webrtc/head.js
+++ b/browser/base/content/test/webrtc/head.js
@@ -2,17 +2,17 @@ Components.utils.import("resource://gre/
 
 XPCOMUtils.defineLazyModuleGetter(this, "Promise",
   "resource://gre/modules/Promise.jsm");
 
 const PREF_PERMISSION_FAKE = "media.navigator.permission.fake";
 const CONTENT_SCRIPT_HELPER = getRootDirectory(gTestPath) + "get_user_media_content_script.js";
 
 function waitForCondition(condition, nextTest, errorMsg, retryTimes) {
-  retryTimes = typeof retryTimes !== 'undefined' ?  retryTimes : 30;
+  retryTimes = typeof retryTimes !== 'undefined' ? retryTimes : 30;
   var tries = 0;
   var interval = setInterval(function() {
     if (tries >= retryTimes) {
       ok(false, errorMsg);
       moveOn();
     }
     var conditionPassed;
     try {
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -1557,18 +1557,17 @@ file, You can obtain one at http://mozil
           let alignSiteIcons = urlbarPosition <= 2 &&
                                nodes.slice(0, urlbarPosition)
                                     .every(n => n.localName == "toolbarbutton");
           if (alignSiteIcons) {
             let identityRect =
               document.getElementById("identity-icon").getBoundingClientRect();
             this.siteIconStart = popupDirection == "rtl" ? identityRect.right
                                                          : identityRect.left;
-          }
-          else {
+          } else {
             // Reset the alignment so that the site icons are positioned
             // according to whatever's in the CSS.
             this.siteIconStart = undefined;
           }
 
           // Position the popup below the navbar.  To get the y-coordinate,
           // which is an offset from the bottom of the input, subtract the
           // bottom of the navbar from the buttom of the input.
@@ -1988,18 +1987,17 @@ file, You can obtain one at http://mozil
       </method>
 
       <method name="setProgress">
         <parameter name="aProgress"/>
         <parameter name="aMaxProgress"/>
         <body><![CDATA[
           if (aMaxProgress == -1) {
             this.progressmeter.setAttribute("mode", "undetermined");
-          }
-          else {
+          } else {
             this.progressmeter.setAttribute("mode", "determined");
             this.progressmeter.setAttribute("value", (aProgress * 100) / aMaxProgress);
           }
 
           let now = Date.now();
 
           if (!this.notification.lastUpdate) {
             this.notification.lastUpdate = now;
@@ -2030,18 +2028,17 @@ file, You can obtain one at http://mozil
       </method>
 
       <method name="cancel">
         <body><![CDATA[
           let installs = this.notification.options.installs;
           installs.forEach(function(aInstall) {
             try {
               aInstall.cancel();
-            }
-            catch (e) {
+            } catch (e) {
               // Cancel will throw if the download has already failed
             }
           }, this);
 
           PopupNotifications.remove(this.notification);
         ]]></body>
       </method>
 
@@ -2069,18 +2066,17 @@ file, You can obtain one at http://mozil
             if (Preferences.get("xpinstall.customConfirmationUI", false)) {
               this.progressmeter.setAttribute("mode", "undetermined");
               let status = gNavigatorBundle.getString("addonDownloadVerifying");
               this.progresstext.setAttribute("value", status);
               this.progresstext.setAttribute("tooltiptext", status);
             } else {
               PopupNotifications.remove(this.notification);
             }
-          }
-          else {
+          } else {
             this.setProgress(progress, maxProgress);
           }
         ]]></body>
       </method>
 
       <method name="onDownloadProgress">
         <body><![CDATA[
           this.updateProgress();
@@ -2137,18 +2133,17 @@ file, You can obtain one at http://mozil
     <implementation>
       <constructor><![CDATA[
         document.getAnonymousElementByAttribute(this, "anonid", "center-item-label").value = this.action.pluginName;
 
         let curState = "block";
         if (this.action.fallbackType == Ci.nsIObjectLoadingContent.PLUGIN_ACTIVE) {
           if (this.action.pluginPermissionType == Ci.nsIPermissionManager.EXPIRE_SESSION) {
             curState = "allownow";
-          }
-          else {
+          } else {
             curState = "allowalways";
           }
         }
         document.getAnonymousElementByAttribute(this, "anonid", "center-item-menulist").value = curState;
 
         let warningString = "";
         let linkString = "";
 
@@ -2161,18 +2156,17 @@ file, You can obtain one at http://mozil
           document.getAnonymousElementByAttribute(this, "anonid", "center-item-menulist").hidden = true;
           warningString = gNavigatorBundle.getString("pluginActivateDisabled.label");
           linkString = gNavigatorBundle.getString("pluginActivateDisabled.manage");
           linkHandler = function(event) {
             event.preventDefault();
             gPluginHandler.managePlugins();
           };
           document.getAnonymousElementByAttribute(this, "anonid", "center-item-warning-icon").hidden = true;
-        }
-        else {
+        } else {
           url = this.action.detailsLink;
 
           switch (this.action.blocklistState) {
           case Ci.nsIBlocklistService.STATE_NOT_BLOCKED:
             document.getAnonymousElementByAttribute(this, "anonid", "center-item-warning").hidden = true;
             break;
           case Ci.nsIBlocklistService.STATE_BLOCKED:
             document.getAnonymousElementByAttribute(this, "anonid", "center-item-menulist").hidden = true;
@@ -2208,18 +2202,17 @@ file, You can obtain one at http://mozil
         if (url || linkHandler) {
           link.value = linkString;
           if (url) {
             link.href = url;
           }
           if (linkHandler) {
             link.addEventListener("click", linkHandler, false);
           }
-        }
-        else {
+        } else {
           link.hidden = true;
         }
       ]]></constructor>
       <property name="value">
         <getter>
           return document.getAnonymousElementByAttribute(this, "anonid",
                    "center-item-menulist").value;
         </getter>
@@ -2358,18 +2351,17 @@ file, You can obtain one at http://mozil
             for (let child of this.childNodes) {
               if (child.tagName != "row") {
                 continue;
               }
               child.hidden = this.notification.options.primaryPlugin !=
                              child.action.permissionString;
             }
             showBox.hidden = false;
-          }
-          else {
+          } else {
             for (let child of this.childNodes) {
               if (child.tagName != "row") {
                 continue;
               }
               child.hidden = false;
             }
             showBox.hidden = true;
           }
@@ -2420,39 +2412,36 @@ file, You can obtain one at http://mozil
             default:
               Cu.reportError(Error("Unexpected blocklist state"));
             }
 
             // TODO: temporary compromise, remove this once bug 892487 is fixed
             if (isWindowPrivate) {
               this._buttonContainer.hidden = true;
             }
-          }
-          else if (action.pluginTag.enabledState == Ci.nsIPluginTag.STATE_DISABLED) {
+          } else if (action.pluginTag.enabledState == Ci.nsIPluginTag.STATE_DISABLED) {
             let linkElement =
               document.getAnonymousElementByAttribute(
                          this, "anonid", "click-to-play-plugins-notification-link");
             linkElement.textContent = gNavigatorBundle.getString("pluginActivateDisabled.manage");
             linkElement.setAttribute("onclick", "gPluginHandler.managePlugins()");
 
             let descElement = document.getAnonymousElementByAttribute(this, "anonid", "click-to-play-plugins-notification-description");
             descElement.textContent = gNavigatorBundle.getFormattedString(
               "pluginActivateDisabled.message", [action.pluginName, this._brandShortName]) + " ";
             this._buttonContainer.hidden = true;
             return;
-          }
-          else if (action.blocklistState == Ci.nsIBlocklistService.STATE_BLOCKED) {
+          } else if (action.blocklistState == Ci.nsIBlocklistService.STATE_BLOCKED) {
             let descElement = document.getAnonymousElementByAttribute(this, "anonid", "click-to-play-plugins-notification-description");
             descElement.textContent = gNavigatorBundle.getFormattedString(
               "pluginActivateBlocked.message", [action.pluginName, this._brandShortName]) + " ";
             this._setupLink("pluginActivate.learnMore", action.detailsLink);
             this._buttonContainer.hidden = true;
             return;
-          }
-          else {
+          } else {
             button1 = {
               label: "pluginActivateNow.label",
               accesskey: "pluginActivateNow.accesskey",
               action: "_singleActivateNow"
             };
             button2 = {
               label: "pluginActivateAlways.label",
               accesskey: "pluginActivateAlways.accesskey",
@@ -2494,18 +2483,17 @@ file, You can obtain one at http://mozil
           this._primaryButton.accessKey = gNavigatorBundle.getString(button1.accesskey);
           this._primaryButton.setAttribute("action", button1.action);
 
           this._secondaryButton.label = gNavigatorBundle.getString(button2.label);
           this._secondaryButton.accessKey = gNavigatorBundle.getString(button2.accesskey);
           this._secondaryButton.setAttribute("action", button2.action);
           if (button1.default) {
             this._primaryButton.setAttribute("default", "true");
-          }
-          else if (button2.default) {
+          } else if (button2.default) {
             this._secondaryButton.setAttribute("default", "true");
           }
         ]]></body>
       </method>
       <method name="_setupDescription">
         <parameter name="baseString" />
         <parameter name="pluginName" /> <!-- null for the multiple-plugin case -->
         <parameter name="prePath" />
@@ -2605,18 +2593,17 @@ file, You can obtain one at http://mozil
       <method name="_accept">
         <parameter name="aEvent" />
         <body><![CDATA[
           if (aEvent.defaultPrevented)
             return;
           aEvent.preventDefault();
           if (this._primaryButton.getAttribute("default") == "true") {
             this._primaryButton.click();
-          }
-          else if (this._secondaryButton.getAttribute("default") == "true") {
+          } else if (this._secondaryButton.getAttribute("default") == "true") {
             this._secondaryButton.click();
           }
         ]]></body>
       </method>
     </implementation>
     <handlers>
       <!-- The _accept method checks for .defaultPrevented so that if focus is in a button,
            enter activates the button and not this default action -->
--- a/browser/base/content/utilityOverlay.js
+++ b/browser/base/content/utilityOverlay.js
@@ -33,18 +33,17 @@ var gBidiUI = false;
 
 /**
  * Determines whether the given url is considered a special URL for new tabs.
  */
 function isBlankPageURL(aURL) {
   return aURL == "about:blank" || aURL == BROWSER_NEW_TAB_URL;
 }
 
-function getBrowserURL()
-{
+function getBrowserURL() {
   return "chrome://browser/content/browser.xul";
 }
 
 function getTopWin(skipPopups) {
   // If this is called in a browser window, use that window regardless of
   // whether it's the frontmost window, since commands can be executed in
   // background windows (bug 626148).
   if (top.document.documentElement.getAttribute("windowtype") == "navigator:browser" &&
@@ -56,22 +55,20 @@ function getTopWin(skipPopups) {
                                                   allowPopups: !skipPopups});
 }
 
 function openTopWin(url) {
   /* deprecated */
   openUILinkIn(url, "current");
 }
 
-function getBoolPref(prefname, def)
-{
+function getBoolPref(prefname, def) {
   try {
     return Services.prefs.getBoolPref(prefname);
-  }
-  catch (er) {
+  } catch (er) {
     return def;
   }
 }
 
 /* openUILink handles clicks on UI elements that cause URLs to load.
  *
  * As the third argument, you may pass an object with the same properties as
  * accepted by openUILinkIn, plus "ignoreButton" and "ignoreAlt".
@@ -117,18 +114,17 @@ function openUILink(url, event, aIgnoreB
  *
  * Exceptions:
  * - Alt is ignored for menu items selected using the keyboard so you don't accidentally save stuff.
  *    (Currently, the Alt isn't sent here at all for menu items, but that will change in bug 126189.)
  * - Alt is hard to use in context menus, because pressing Alt closes the menu.
  * - Alt can't be used on the bookmarks toolbar because Alt is used for "treat this as something draggable".
  * - The button is ignored for the middle-click-paste-URL feature, since it's always a middle-click.
  */
-function whereToOpenLink( e, ignoreButton, ignoreAlt )
-{
+function whereToOpenLink(e, ignoreButton, ignoreAlt) {
   // This method must treat a null event like a left click without modifier keys (i.e.
   // e = { shiftKey:false, ctrlKey:false, metaKey:false, altKey:false, button:0 })
   // for compatibility purposes.
   if (!e)
     return "current";
 
   var shift = e.shiftKey;
   var ctrl =  e.ctrlKey;
@@ -228,18 +224,17 @@ function openLinkIn(url, where, params) 
       params.forceAboutBlankViewerInCurrent;
 
   if (where == "save") {
     // TODO(1073187): propagate referrerPolicy.
 
     // ContentClick.jsm passes isContentWindowPrivate for saveURL instead of passing a CPOW initiatingDoc
     if ("isContentWindowPrivate" in params) {
       saveURL(url, null, null, true, true, aNoReferrer ? null : aReferrerURI, null, params.isContentWindowPrivate);
-    }
-    else {
+    } else {
       if (!aInitiatingDoc) {
         Components.utils.reportError("openUILink/openLinkIn was called with " +
           "where == 'save' but without initiatingDoc.  See bug 814264.");
         return;
       }
       saveURL(url, null, null, true, true, aNoReferrer ? null : aReferrerURI, aInitiatingDoc);
     }
     return;
@@ -517,18 +512,17 @@ function createUserContextMenu(event, {
     docfrag.appendChild(menuitem);
   }
 
   event.target.appendChild(docfrag);
   return true;
 }
 
 // Closes all popups that are ancestors of the node.
-function closeMenus(node)
-{
+function closeMenus(node) {
   if ("tagName" in node) {
     if (node.namespaceURI == "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
     && (node.tagName == "menupopup" || node.tagName == "popup"))
       node.hidePopup();
 
     closeMenus(node.parentNode);
   }
 }
@@ -538,18 +532,17 @@ function closeMenus(node)
  * @param aEvent
  *        The KeyboardEvent event you want to compare against your key.
  *
  * @param aKey
  *        The <key> element checked to see if it was called in aEvent.
  *        For example, aKey can be a variable set to document.getElementById("key_close")
  *        to check if the close command key was pressed in aEvent.
 */
-function eventMatchesKey(aEvent, aKey)
-{
+function eventMatchesKey(aEvent, aKey) {
   let keyPressed = aKey.getAttribute("key").toLowerCase();
   let keyModifiers = aKey.getAttribute("modifiers");
   let modifiers = ["Alt", "Control", "Meta", "Shift"];
 
   if (aEvent.key != keyPressed) {
     return false;
   }
   let eventModifiers = modifiers.filter(modifier => aEvent.getModifierState(modifier));
@@ -558,29 +551,28 @@ function eventMatchesKey(aEvent, aKey)
      return false;
   }
   // Check whether aKey's modifiers match aEvent's modifiers
   if (keyModifiers) {
     keyModifiers = keyModifiers.split(/[\s,]+/);
     // Capitalize first letter of aKey's modifers to compare to aEvent's modifier
     keyModifiers.forEach(function(modifier, index) {
       if (modifier == "accel") {
-        keyModifiers[index] = AppConstants.platform == "macosx" ?  "Meta" : "Control";
+        keyModifiers[index] = AppConstants.platform == "macosx" ? "Meta" : "Control";
       } else {
         keyModifiers[index] = modifier[0].toUpperCase() + modifier.slice(1);
       }
     });
     return modifiers.every(modifier => keyModifiers.includes(modifier) == aEvent.getModifierState(modifier));
   }
   return true;
 }
 
 // Gather all descendent text under given document node.
-function gatherTextUnder( root )
-{
+function gatherTextUnder(root) {
   var text = "";
   var node = root.firstChild;
   var depth = 1;
   while ( node && depth > 0 ) {
     // See if this node is text.
     if ( node.nodeType == Node.TEXT_NODE ) {
       // Add this text to our collection.
       text += " " + node.data;
@@ -611,18 +603,17 @@ function gatherTextUnder( root )
   // Strip leading and tailing whitespace.
   text = text.trim();
   // Compress remaining whitespace.
   text = text.replace( /\s+/g, " " );
   return text;
 }
 
 // This function exists for legacy reasons.
-function getShellService()
-{
+function getShellService() {
   return ShellService;
 }
 
 function isBidiEnabled() {
   // first check the pref.
   if (getBoolPref("bidi.browser.ui", false))
     return true;
 
@@ -674,18 +665,17 @@ function openAboutDialog() {
     features += "resizable=no,minimizable=no";
   } else {
     features += "centerscreen,dependent,dialog=no";
   }
 
   window.openDialog("chrome://browser/content/aboutDialog.xul", "", features);
 }
 
-function openPreferences(paneID, extraArgs)
-{
+function openPreferences(paneID, extraArgs) {
   function switchToAdvancedSubPane(doc) {
     if (extraArgs && extraArgs["advancedTab"]) {
       let advancedPaneTabs = doc.getElementById("advancedPrefs");
       advancedPaneTabs.selectedTab = doc.getElementById(extraArgs["advancedTab"]);
     }
   }
 
   // This function is duplicated from preferences.js.
@@ -741,78 +731,70 @@ function openPreferences(paneID, extraAr
   } else {
     if (paneID) {
       browser.contentWindow.gotoPref(paneID);
     }
     switchToAdvancedSubPane(browser.contentDocument);
   }
 }
 
-function openAdvancedPreferences(tabID)
-{
+function openAdvancedPreferences(tabID) {
   openPreferences("paneAdvanced", { "advancedTab" : tabID });
 }
 
 /**
  * Opens the troubleshooting information (about:support) page for this version
  * of the application.
  */
-function openTroubleshootingPage()
-{
+function openTroubleshootingPage() {
   openUILinkIn("about:support", "tab");
 }
 
 /**
  * Opens the troubleshooting information (about:support) page for this version
  * of the application.
  */
-function openHealthReport()
-{
+function openHealthReport() {
   openUILinkIn("about:healthreport", "tab");
 }
 
 /**
  * Opens the feedback page for this version of the application.
  */
-function openFeedbackPage()
-{
+function openFeedbackPage() {
   var url = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
                       .getService(Components.interfaces.nsIURLFormatter)
                       .formatURLPref("app.feedback.baseURL");
   openUILinkIn(url, "tab");
 }
 
-function openTourPage()
-{
+function openTourPage() {
   let scope = {}
   Components.utils.import("resource:///modules/UITour.jsm", scope);
   openUILinkIn(scope.UITour.url, "tab");
 }
 
-function buildHelpMenu()
-{
+function buildHelpMenu() {
   // Enable/disable the "Report Web Forgery" menu item.
   if (typeof gSafeBrowsing != "undefined") {
     gSafeBrowsing.setReportPhishingMenu();
   }
 }
 
-function isElementVisible(aElement)
-{
+function isElementVisible(aElement) {
   if (!aElement)
     return false;
 
   // If aElement or a direct or indirect parent is hidden or collapsed,
   // height, width or both will be 0.
   var bo = aElement.boxObject;
   return (bo.height > 0 && bo.width > 0);
 }
 
-function makeURLAbsolute(aBase, aUrl)
-{
+function makeURLAbsolute(aBase, aUrl) {
   // Note:  makeURI() will throw if aUri is not a valid URI
   return makeURI(aUrl, null, makeURI(aBase)).spec;
 }
 
 /**
  * openNewTabWith: opens a new tab with the given URL.
  *
  * @param aURL
--- a/browser/base/content/web-panels.js
+++ b/browser/base/content/web-panels.js
@@ -2,59 +2,55 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 const NS_ERROR_MODULE_NETWORK = 2152398848;
 const NS_NET_STATUS_READ_FROM = NS_ERROR_MODULE_NETWORK + 8;
 const NS_NET_STATUS_WROTE_TO  = NS_ERROR_MODULE_NETWORK + 9;
 
-function getPanelBrowser()
-{
+function getPanelBrowser() {
     return document.getElementById("web-panels-browser");
 }
 
 var panelProgressListener = {
     onProgressChange(aWebProgress, aRequest,
                                 aCurSelfProgress, aMaxSelfProgress,
                                 aCurTotalProgress, aMaxTotalProgress) {
     },
 
-    onStateChange(aWebProgress, aRequest, aStateFlags, aStatus)
-    {
+    onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
         if (!aRequest)
           return;
 
         // ignore local/resource:/chrome: files
         if (aStatus == NS_NET_STATUS_READ_FROM || aStatus == NS_NET_STATUS_WROTE_TO)
            return;
 
         if (aStateFlags & Ci.nsIWebProgressListener.STATE_START &&
             aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK) {
             window.parent.document.getElementById('sidebar-throbber').setAttribute("loading", "true");
-        }
-        else if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP &&
+        } else if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP &&
                 aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK) {
             window.parent.document.getElementById('sidebar-throbber').removeAttribute("loading");
         }
     }
     ,
 
     onLocationChange(aWebProgress, aRequest, aLocation, aFlags) {
         UpdateBackForwardCommands(getPanelBrowser().webNavigation);
     },
 
     onStatusChange(aWebProgress, aRequest, aStatus, aMessage) {
     },
 
     onSecurityChange(aWebProgress, aRequest, aState) {
     },
 
-    QueryInterface(aIID)
-    {
+    QueryInterface(aIID) {
         if (aIID.equals(Ci.nsIWebProgressListener) ||
             aIID.equals(Ci.nsISupportsWeakReference) ||
             aIID.equals(Ci.nsISupports))
             return this;
         throw Cr.NS_NOINTERFACE;
     }
 };
 
@@ -64,41 +60,37 @@ function loadWebPanel(aURI) {
     if (gLoadFired) {
         panelBrowser.webNavigation
                     .loadURI(aURI, nsIWebNavigation.LOAD_FLAGS_NONE,
                              null, null, null);
     }
     panelBrowser.setAttribute("cachedurl", aURI);
 }
 
-function load()
-{
+function load() {
     var panelBrowser = getPanelBrowser();
     panelBrowser.webProgress.addProgressListener(panelProgressListener,
                                                  Ci.nsIWebProgress.NOTIFY_ALL);
     panelBrowser.messageManager.loadFrameScript("chrome://browser/content/content.js", true);
     var cachedurl = panelBrowser.getAttribute("cachedurl")
     if (cachedurl) {
         panelBrowser.webNavigation
                     .loadURI(cachedurl, nsIWebNavigation.LOAD_FLAGS_NONE, null,
                              null, null);
     }
 
     gLoadFired = true;
 }
 
-function unload()
-{
+function unload() {
     getPanelBrowser().webProgress.removeProgressListener(panelProgressListener);
 }
 
-function PanelBrowserStop()
-{
+function PanelBrowserStop() {
     getPanelBrowser().webNavigation.stop(nsIWebNavigation.STOP_ALL)
 }
 
-function PanelBrowserReload()
-{
+function PanelBrowserReload() {
     getPanelBrowser().webNavigation
                      .sessionHistory
                      .QueryInterface(nsIWebNavigation)
                      .reload(nsIWebNavigation.LOAD_FLAGS_NONE);
 }
--- a/browser/base/content/webrtcIndicator.js
+++ b/browser/base/content/webrtcIndicator.js
@@ -50,30 +50,28 @@ function updateIndicatorState() {
   if (webrtcUI.showMicrophoneIndicator)
     shareTypes.push("Microphone");
 
   let audioVideoButton = document.getElementById("audioVideoButton");
   if (shareTypes.length) {
     let stringId = "webrtcIndicator.sharing" + shareTypes.join("And") + ".tooltip";
     audioVideoButton.setAttribute("tooltiptext",
                                    gStringBundle.GetStringFromName(stringId));
-  }
-  else {
+  } else {
     audioVideoButton.removeAttribute("tooltiptext");
   }
 
   // Screen sharing button tooltip.
   let screenShareButton = document.getElementById("screenShareButton");
   if (webrtcUI.showScreenSharingIndicator) {
     let stringId = "webrtcIndicator.sharing" +
       webrtcUI.showScreenSharingIndicator + ".tooltip";
     screenShareButton.setAttribute("tooltiptext",
                                     gStringBundle.GetStringFromName(stringId));
-  }
-  else {
+  } else {
     screenShareButton.removeAttribute("tooltiptext");
   }
 
   // Resize and ensure the window position is correct
   // (sizeToContent messes with our position).
   window.sizeToContent();
   PositionHandler.adjustPosition();
 }
--- a/browser/components/contextualidentity/test/browser/browser_eme.js
+++ b/browser/components/contextualidentity/test/browser/browser_eme.js
@@ -25,27 +25,25 @@ function* openTabInUserContext(uri, user
   gBrowser.selectedTab = tab;
   tab.ownerDocument.defaultView.focus();
 
   let browser = gBrowser.getBrowserForTab(tab);
   yield BrowserTestUtils.browserLoaded(browser);
   return {tab, browser};
 }
 
-function HexToBase64(hex)
-{
+function HexToBase64(hex) {
   var bin = "";
   for (var i = 0; i < hex.length; i += 2) {
     bin += String.fromCharCode(parseInt(hex.substr(i, 2), 16));
   }
   return window.btoa(bin).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
 }
 
-function Base64ToHex(str)
-{
+function Base64ToHex(str) {
   var bin = window.atob(str.replace(/-/g, "+").replace(/_/g, "/"));
   var res = "";
   for (var i = 0; i < bin.length; i++) {
     res += ("0" + bin.charCodeAt(i).toString(16)).substr(-2);
   }
   return res;
 }
 
--- a/browser/components/contextualidentity/test/browser/browser_forgetaboutsite.js
+++ b/browser/components/contextualidentity/test/browser/browser_forgetaboutsite.js
@@ -66,37 +66,34 @@ function* openTabInUserContext(uri, user
   yield BrowserTestUtils.browserLoaded(browser);
   return {tab, browser};
 }
 
 function getCookiesForOA(host, userContextId) {
   return Services.cookies.getCookiesFromHost(host, {userContextId});
 }
 
-function createURI(uri)
-{
+function createURI(uri) {
   let ioServ = Cc["@mozilla.org/network/io-service;1"]
                   .getService(Components.interfaces.nsIIOService);
   return ioServ.newURI(uri, null, null);
 }
 
-function getCacheStorage(where, lci, appcache)
-{
+function getCacheStorage(where, lci, appcache) {
   if (!lci) lci = LoadContextInfo.default;
   switch (where) {
     case "disk": return css.diskCacheStorage(lci, false);
     case "memory": return css.memoryCacheStorage(lci);
     case "appcache": return css.appCacheStorage(lci, appcache);
     case "pin": return css.pinningCacheStorage(lci);
   }
   return null;
 }
 
-function OpenCacheEntry(key, where, flags, lci)
-{
+function OpenCacheEntry(key, where, flags, lci) {
   return new Promise(resolve => {
     key = createURI(key);
     function CacheListener() { }
     CacheListener.prototype = {
       _appCache: null,
 
       QueryInterface(iid) {
         if (iid.equals(Components.interfaces.nsICacheEntryOpenCallback) ||
--- a/browser/components/customizableui/CustomizableUI.jsm
+++ b/browser/components/customizableui/CustomizableUI.jsm
@@ -1337,18 +1337,17 @@ var CustomizableUIInternal = {
 
     let node;
     if (aWidget.type == "custom") {
       if (aWidget.onBuild) {
         node = aWidget.onBuild(aDocument);
       }
       if (!node || !(node instanceof aDocument.defaultView.XULElement))
         log.error("Custom widget with id " + aWidget.id + " does not return a valid node");
-    }
-    else {
+    } else {
       if (aWidget.onBeforeCreated) {
         aWidget.onBeforeCreated(aDocument);
       }
       node = aDocument.createElementNS(kNSXUL, "toolbarbutton");
 
       node.setAttribute("id", aWidget.id);
       node.setAttribute("widget-id", aWidget.id);
       node.setAttribute("widget-type", aWidget.type);
@@ -4319,28 +4318,26 @@ OverflowableToolbar.prototype = {
         // NB: we're guaranteed that it has a previousSibling, because if it didn't,
         // we would have added it to the toolbar instead. See getOverflowedNextNode.
         let prevId = aNode.previousSibling.id;
         let minSize = this._collapsed.get(prevId);
         this._collapsed.set(aNode.id, minSize);
         aNode.setAttribute("cui-anchorid", this._chevron.id);
         aNode.setAttribute("overflowedItem", true);
         CustomizableUIInternal.notifyListeners("onWidgetOverflow", aNode, this._target);
-      }
-      // If it is not overflowed and not in the toolbar, and was not overflowed
-      // either, it moved out of the toolbar. That means there's now space in there!
-      // Let's try to move stuff back:
-      else if (!nowInBar) {
+      } else if (!nowInBar) {
+        // If it is not overflowed and not in the toolbar, and was not overflowed
+        // either, it moved out of the toolbar. That means there's now space in there!
+        // Let's try to move stuff back:
         this._moveItemsBackToTheirOrigin(true);
       }
       // If it's in the toolbar now, then we don't care. An overflow event may
       // fire afterwards; that's ok!
-    }
-    // If it used to be overflowed...
-    else if (!nowOverflowed) {
+    } else if (!nowOverflowed) {
+      // If it used to be overflowed...
       // ... and isn't anymore, let's remove our bookkeeping:
       this._collapsed.delete(aNode.id);
       aNode.removeAttribute("cui-anchorid");
       aNode.removeAttribute("overflowedItem");
       CustomizableUIInternal.notifyListeners("onWidgetUnderflow", aNode, this._target);
 
       if (!this._collapsed.size) {
         this._toolbar.removeAttribute("overflowing");
--- a/browser/components/customizableui/CustomizeMode.jsm
+++ b/browser/components/customizableui/CustomizeMode.jsm
@@ -1141,17 +1141,17 @@ CustomizeMode.prototype = {
         let placements = CustomizableUI.getWidgetIdsInArea(child.id);
         if (!placements.length) {
           CustomizableUI.removeExtraToolbar(child.id);
         }
       }
     }
   },
 
-  persistCurrentSets(aSetBeforePersisting)  {
+  persistCurrentSets(aSetBeforePersisting) {
     let document = this.document;
     let toolbars = document.querySelectorAll("toolbar[customizable='true'][currentset]");
     for (let toolbar of toolbars) {
       if (aSetBeforePersisting) {
         let set = toolbar.currentSet;
         toolbar.setAttribute("currentset", set);
       }
       // Persist the currentset attribute directly on hardcoded toolbars.
@@ -2049,17 +2049,17 @@ CustomizeMode.prototype = {
       // had been set.
       aItem.style.removeProperty("border-left-width");
       aItem.style.removeProperty("border-right-width");
       if (aNoTransition) {
         // Force a layout flush:
         aItem.getBoundingClientRect();
         aItem.removeAttribute("notransition");
       }
-    } else  {
+    } else {
       aItem.removeAttribute("dragover");
       if (aNextItem) {
         let nextArea = this._getCustomizableParent(aNextItem);
         if (nextArea == currentArea) {
           // No need to do anything if we're still dragging in this area:
           return;
         }
       }
@@ -2150,17 +2150,17 @@ CustomizeMode.prototype = {
       aElement = aElement.parentNode;
     }
     return null;
   },
 
   _getDragOverNode(aEvent, aAreaElement, aInToolbar, aDraggedItemId) {
     let expectedParent = aAreaElement.customizationTarget || aAreaElement;
     // Our tests are stupid. Cope:
-    if (!aEvent.clientX  && !aEvent.clientY) {
+    if (!aEvent.clientX && !aEvent.clientY) {
       return aEvent.target;
     }
     // Offset the drag event's position with the offset to the center of
     // the thing we're dragging
     let dragX = aEvent.clientX - this._dragOffset.x;
     let dragY = aEvent.clientY - this._dragOffset.y;
 
     // Ensure this is within the container
--- a/browser/components/customizableui/test/browser_901207_searchbar_in_panel.js
+++ b/browser/components/customizableui/test/browser_901207_searchbar_in_panel.js
@@ -1,18 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 logActiveElement();
 
-function* waitForSearchBarFocus()
-{
+function* waitForSearchBarFocus() {
   let searchbar = document.getElementById("searchbar");
   yield waitForCondition(function() {
     logActiveElement();
     return document.activeElement === searchbar.textbox.inputField;
   });
 }
 
 // Ctrl+K should open the menu panel and focus the search bar if the search bar is in the panel.
--- a/browser/components/customizableui/test/browser_947914_button_newPrivateWindow.js
+++ b/browser/components/customizableui/test/browser_947914_button_newPrivateWindow.js
@@ -33,16 +33,14 @@ add_task(function*() {
   let privateBrowsingButton = document.getElementById("privatebrowsing-button");
   ok(privateBrowsingButton, "Private browsing button exists in Panel Menu");
   privateBrowsingButton.click();
 
   try {
     yield waitForCondition(() => windowWasHandled);
     yield promiseWindowClosed(privateWindow);
     info("The new private window was closed");
-  }
-  catch (e) {
+  } catch (e) {
     ok(false, "The new private browser window was not properly handled");
-  }
-  finally {
+  } finally {
     Services.ww.unregisterNotification(observerWindowOpened);
   }
 });
--- a/browser/components/customizableui/test/browser_947914_button_newWindow.js
+++ b/browser/components/customizableui/test/browser_947914_button_newWindow.js
@@ -32,16 +32,14 @@ add_task(function*() {
   let newWindowButton = document.getElementById("new-window-button");
   ok(newWindowButton, "New Window button exists in Panel Menu");
   newWindowButton.click();
 
   try {
     yield waitForCondition(() => windowWasHandled);
     yield promiseWindowClosed(newWindow);
     info("The new window was closed");
-  }
-  catch (e) {
+  } catch (e) {
     ok(false, "The new browser window was not properly handled");
-  }
-  finally {
+  } finally {
     Services.ww.unregisterNotification(observerWindowOpened);
   }
 });
--- a/browser/components/customizableui/test/browser_947914_button_print.js
+++ b/browser/components/customizableui/test/browser_947914_button_print.js
@@ -21,18 +21,17 @@ add_task(function*() {
     let printButton = document.getElementById("print-button");
     ok(printButton, "Print button exists in Panel Menu");
 
     if (isOSX) {
       let panelHiddenPromise = promisePanelHidden(window);
       PanelUI.hide();
       yield panelHiddenPromise;
       info("Menu panel was closed");
-    }
-    else {
+    } else {
       printButton.click();
       yield waitForCondition(() => gInPrintPreviewMode);
 
       ok(gInPrintPreviewMode, "Entered print preview mode");
 
       // close print preview
       if (gInPrintPreviewMode) {
         PrintUtils.exitPrintPreview();
--- a/browser/components/distribution.js
+++ b/browser/components/distribution.js
@@ -58,18 +58,17 @@ DistributionCustomizer.prototype = {
     this.__defineGetter__("_ini", () => ini);
     return this._ini;
   },
 
   get _locale() {
     let locale;
     try {
       locale = this._prefs.getCharPref("general.useragent.locale");
-    }
-    catch (e) {
+    } catch (e) {
       locale = "en-US";
     }
     this.__defineGetter__("_locale", () => locale);
     return this._locale;
   },
 
   get _language() {
     let language = this._locale.split("-")[0];
@@ -280,27 +279,25 @@ DistributionCustomizer.prototype = {
     let globalPrefs = enumToObject(this._ini.getKeys("Global"));
     if (!(globalPrefs["id"] && globalPrefs["version"] && globalPrefs["about"]))
       return;
 
     let bmProcessedPref;
     try {
       bmProcessedPref = this._ini.getString("Global",
                                             "bookmarks.initialized.pref");
-    }
-    catch (e) {
+    } catch (e) {
       bmProcessedPref = "distribution." +
         this._ini.getString("Global", "id") + ".bookmarksProcessed";
     }
 
     let bmProcessed = false;
     try {
       bmProcessed = this._prefs.getBoolPref(bmProcessedPref);
-    }
-    catch (e) {}
+    } catch (e) {}
 
     if (!bmProcessed) {
       if (sections["BookmarksMenu"])
         yield this._parseBookmarksSection(PlacesUtils.bookmarks.menuGuid,
                                           "BookmarksMenu");
       if (sections["BookmarksToolbar"])
         yield this._parseBookmarksSection(PlacesUtils.bookmarks.toolbarGuid,
                                           "BookmarksToolbar");
--- a/browser/components/extensions/test/browser/head.js
+++ b/browser/components/extensions/test/browser/head.js
@@ -105,23 +105,22 @@ function promisePossiblyInaccurateConten
       for (let prop of props) {
         res[prop] = obj[prop];
       }
       return res;
     }
 
     return {
       window: copyProps(content,
-                        ["innerWidth", "innerHeight", "outerWidth", "outerHeight",
-                         "scrollX", "scrollY", "scrollMaxX", "scrollMaxY"]),
+        ["innerWidth", "innerHeight", "outerWidth", "outerHeight",
+         "scrollX", "scrollY", "scrollMaxX", "scrollMaxY"]),
       body: copyProps(content.document.body,
-                      ["clientWidth", "clientHeight", "scrollWidth", "scrollHeight"]),
+        ["clientWidth", "clientHeight", "scrollWidth", "scrollHeight"]),
       root: copyProps(content.document.documentElement,
-                      ["clientWidth", "clientHeight", "scrollWidth", "scrollHeight"]),
-
+        ["clientWidth", "clientHeight", "scrollWidth", "scrollHeight"]),
       isStandards: content.document.compatMode !== "BackCompat",
     };
   });
 }
 
 function delay(ms = 0) {
   return new Promise(resolve => setTimeout(resolve, ms));
 }
--- a/browser/components/feeds/FeedConverter.js
+++ b/browser/components/feeds/FeedConverter.js
@@ -92,18 +92,17 @@ function getPrefReaderForType(t) {
 }
 
 function safeGetCharPref(pref, defaultValue) {
   var prefs =
       Cc["@mozilla.org/preferences-service;1"].
       getService(Ci.nsIPrefBranch);
   try {
     return prefs.getCharPref(pref);
-  }
-  catch (e) {
+  } catch (e) {
   }
   return defaultValue;
 }
 
 function FeedConverter() {
 }
 FeedConverter.prototype = {
   classID: Components.ID("{229fa115-9412-4d32-baf3-2fc407f76fb1}"),
@@ -261,18 +260,17 @@ FeedConverter.prototype = {
           Services.scriptSecurityManager.createCodebasePrincipal(aboutFeedsURI,
                                                                  loadInfo.originAttributes);
       } else {
         chromeChannel = ios.newChannelFromURIWithLoadInfo(result.uri, loadInfo);
       }
 
       chromeChannel.loadGroup = this._request.loadGroup;
       chromeChannel.asyncOpen(this._listener, null);
-    }
-    finally {
+    } finally {
       this._releaseHandles();
     }
   },
 
   /**
    * See nsIStreamListener.idl
    */
   onDataAvailable(request, context, inputStream,
@@ -297,18 +295,17 @@ FeedConverter.prototype = {
       if (!httpChannel.requestSucceeded) {
         // Just give up, but don't forget to cancel the channel first!
         request.cancel(Cr.NS_BINDING_ABORTED);
         return;
       }
 
       // Note: this throws if the header is not set.
       httpChannel.getResponseHeader("X-Moz-Is-Feed");
-    }
-    catch (ex) {
+    } catch (ex) {
       this._sniffed = true;
     }
 
     this._request = request;
 
     // Save and reset the forced state bit early, in case there's some kind of
     // error.
     let feedService =
--- a/browser/components/feeds/FeedWriter.js
+++ b/browser/components/feeds/FeedWriter.js
@@ -17,18 +17,17 @@ const FEEDWRITER_CONTRACTID = "@mozilla.
 
 function LOG(str) {
   let prefB = Cc["@mozilla.org/preferences-service;1"].
               getService(Ci.nsIPrefBranch);
 
   let shouldLog = false;
   try {
     shouldLog = prefB.getBoolPref("feeds.log");
-  }
-  catch (ex) {
+  } catch (ex) {
   }
 
   if (shouldLog)
     dump("*** Feeds: " + str + "\n");
 }
 
 /**
  * Wrapper function for nsIIOService::newURI.
@@ -164,18 +163,17 @@ FeedWriter.prototype = {
   _getPropertyAsBag(container, property) {
     return container.fields.getProperty(property).
                      QueryInterface(Ci.nsIPropertyBag2);
   },
 
   _getPropertyAsString(container, property) {
     try {
       return container.fields.getPropertyAsAString(property);
-    }
-    catch (e) {
+    } catch (e) {
     }
     return "";
   },
 
   _setContentText(id, text) {
     let element = this._document.getElementById(id);
     let textNode = text.createDocumentFragment(element);
     while (element.hasChildNodes())
@@ -201,18 +199,17 @@ FeedWriter.prototype = {
                  getService(Ci.nsIScriptSecurityManager);
     const flags = Ci.nsIScriptSecurityManager.DISALLOW_INHERIT_PRINCIPAL;
     try {
       // TODO Is this necessary?
       secman.checkLoadURIStrWithPrincipal(this._feedPrincipal, uri, flags);
       // checkLoadURIStrWithPrincipal will throw if the link URI should not be
       // loaded, either because our feedURI isn't allowed to load it or per
       // the rules specified in |flags|, so we'll never "linkify" the link...
-    }
-    catch (e) {
+    } catch (e) {
       // Not allowed to load this link because secman.checkLoadURIStr threw
       return;
     }
 
     element.setAttribute(attribute, uri);
   },
 
   __bundle: null,
@@ -354,18 +351,17 @@ FeedWriter.prototype = {
 
       // Fix the margin on the main title, so that the image doesn't run over
       // the underline
       feedTitleLink.setAttribute('title', titleText);
       feedTitleText.style.marginRight = titleImageWidth + 'px';
 
       this._safeSetURIAttribute(feedTitleLink, "href",
                                 parts.getPropertyAsAString("link"));
-    }
-    catch (e) {
+    } catch (e) {
       LOG("Failed to set Title Image (this is benign): " + e);
     }
   },
 
   /**
    * Writes all entries contained in the feed.
    * @param   container
    *          The container of entries in the feed
@@ -500,17 +496,17 @@ FeedWriter.prototype = {
       if (enc.hasKey("type")) {
         type_text = enc.get("type");
         try {
           let handlerInfoWrapper = this._mimeSvc.getFromTypeAndExtension(enc.get("type"), null);
 
           if (handlerInfoWrapper)
             type_text = handlerInfoWrapper.description;
 
-          if  (type_text && type_text.length > 0)
+          if (type_text && type_text.length > 0)
             mozicon = "moz-icon://goat?size=16&contentType=" + enc.get("type");
 
         } catch (ex) { }
 
       }
 
       if (enc.hasKey("length") && /^[0-9]+$/.test(enc.get("length"))) {
         let enc_size = convertByteUnits(parseInt(enc.get("length")));
@@ -557,30 +553,28 @@ FeedWriter.prototype = {
     let feedService =
         Cc["@mozilla.org/browser/feeds/result-service;1"].
         getService(Ci.nsIFeedResultService);
 
     let result;
     try {
       result =
         feedService.getFeedResult(this._getOriginalURI(this._window));
-    }
-    catch (e) {
+    } catch (e) {
       LOG("Subscribe Preview: feed not available?!");
     }
 
     if (result.bozo) {
       LOG("Subscribe Preview: feed result is bozo?!");
     }
 
     let container;
     try {
       container = result.doc;
-    }
-    catch (e) {
+    } catch (e) {
       LOG("Subscribe Preview: no result.doc? Why didn't the original reload?");
       return null;
     }
     return container;
   },
 
   /**
    * Get moz-icon url for a file
@@ -611,18 +605,17 @@ FeedWriter.prototype = {
 
   _setAlwaysUseCheckedState(feedType) {
     let checkbox = this._document.getElementById("alwaysUse");
     if (checkbox) {
       let alwaysUse = false;
       try {
         if (Services.prefs.getCharPref(getPrefActionForType(feedType)) != "ask")
           alwaysUse = true;
-      }
-      catch (ex) { }
+      } catch (ex) { }
       this._setCheckboxCheckedState(checkbox, alwaysUse);
     }
   },
 
   _setSubscribeUsingLabel() {
     let stringLabel = "subscribeFeedUsing";
     switch (this._getFeedType()) {
       case Ci.nsIFeed.TYPE_VIDEO:
@@ -702,18 +695,17 @@ FeedWriter.prototype = {
     return menu.querySelectorAll('[webhandlerurl="' + aURL + '"]');
   },
 
   _setSelectedHandler(feedType) {
     let prefs = Services.prefs;
     let handler = "bookmarks";
     try {
       handler = prefs.getCharPref(getPrefReaderForType(feedType));
-    }
-    catch (ex) { }
+    } catch (ex) { }
 
     switch (handler) {
       case "web": {
         if (this._handlersList) {
           let url;
           try {
             url = prefs.getComplexValue(getPrefWebForType(feedType), Ci.nsISupportsString).data;
           } catch (ex) {
@@ -841,18 +833,17 @@ FeedWriter.prototype = {
     // Set up the "Subscribe Now" button
     this._document.getElementById("subscribeButton")
         .addEventListener("click", this);
 
     // first-run ui
     let showFirstRunUI = true;
     try {
       showFirstRunUI = Services.prefs.getBoolPref(PREF_SHOW_FIRST_RUN_UI);
-    }
-    catch (ex) { }
+    } catch (ex) { }
     if (showFirstRunUI) {
       let textfeedinfo1, textfeedinfo2;
       switch (feedType) {
         case Ci.nsIFeed.TYPE_VIDEO:
           textfeedinfo1 = "feedSubscriptionVideoPodcast1";
           textfeedinfo2 = "feedSubscriptionVideoPodcast2";
           break;
         case Ci.nsIFeed.TYPE_AUDIO:
@@ -989,18 +980,17 @@ FeedWriter.prototype = {
       // Set up the feed content
       let container = this._getContainer();
       if (!container)
         return;
 
       this._setTitleText(container);
       this._setTitleImage(container);
       this._writeFeedContent(container);
-    }
-    finally {
+    } finally {
       this._removeFeedFromCache();
     }
   },
 
   close() {
     this._document.getElementById("subscribeButton")
         .removeEventListener("click", this, false);
     this._document.getElementById("handlersMenuList")
--- a/browser/components/feeds/WebContentConverter.js
+++ b/browser/components/feeds/WebContentConverter.js
@@ -181,18 +181,17 @@ const Utils = {
         aWindowOrNull);
     }
 
     // check if it is in the black list
     let pb = Services.prefs;
     let allowed;
     try {
       allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "." + aProtocol);
-    }
-    catch (e) {
+    } catch (e) {
       allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "-default");
     }
     if (!allowed) {
       throw this.getSecurityError(
         `Not allowed to register a protocol handler for ${aProtocol}`,
         aWindowOrNull);
     }
   },
@@ -497,18 +496,17 @@ WebContentConverterRegistrar.prototype =
         let browserElement = this._getBrowserForContentWindow(browserWindow, aWindowOrBrowser);
         notificationBox = browserElement.getTabBrowser().getNotificationBox(browserElement);
       } else {
         notificationBox = aWindowOrBrowser.getTabBrowser()
                                           .getNotificationBox(aWindowOrBrowser);
       }
 
       this._appendFeedReaderNotification(uri, aTitle, notificationBox);
-    }
-    else {
+    } else {
       this._registerContentHandler(contentType, aURIString, aTitle);
     }
   },
 
   /**
    * Returns the browser chrome window in which the content window is in
    */
   _getBrowserWindowForContentWindow(aContentWindow) {
@@ -629,18 +627,17 @@ WebContentConverterRegistrar.prototype =
     let i = 0;
     let typeBranch = null;
     while (true) {
       typeBranch =
         ps.getBranch(PREF_CONTENTHANDLERS_BRANCH + i + ".");
       try {
         typeBranch.getCharPref("type");
         ++i;
-      }
-      catch (e) {
+      } catch (e) {
         // No more handlers
         break;
       }
     }
     if (typeBranch) {
       typeBranch.setCharPref("type", contentType);
       let pls =
           Cc["@mozilla.org/pref-localizedstring;1"].
--- a/browser/components/feeds/test/test_registerHandler.html
+++ b/browser/components/feeds/test/test_registerHandler.html
@@ -15,25 +15,23 @@ https://bugzilla.mozilla.org/show_bug.cg
   
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 402788 **/
 
   // return false if an exception has been catched, true otherwise
-  function testRegisterHandler(aIsProtocol, aTxt, aUri, aTitle)
-  {
+  function testRegisterHandler(aIsProtocol, aTxt, aUri, aTitle) {
     try {
       if (aIsProtocol)
         navigator.registerProtocolHandler(aTxt, aUri, aTitle);
       else
         navigator.registerContentHandler(aTxt, aUri, aTitle);
-    }
-    catch (e) {
+    } catch (e) {
       return false;
     }
 
     return true;
   }
 
   ok(navigator.registerProtocolHandler, "navigator.registerProtocolHandler should be defined");
   ok(navigator.registerContentHandler, "navigator.registerContentHandler should be defined");
--- a/browser/components/feeds/test/unit/test_758990.js
+++ b/browser/components/feeds/test/unit/test_758990.js
@@ -1,42 +1,38 @@
 function run_test() {
   var success = false;
   try {
     ios.newURI("feed:javascript:alert('hi');", null, null);
-  }
-  catch (e) {
+  } catch (e) {
     success = e.result == Cr.NS_ERROR_MALFORMED_URI;
   }
   if (!success)
     do_throw("We didn't throw NS_ERROR_MALFORMED_URI creating a feed:javascript: URI");
 
   success = false;
   try {
     ios.newURI("feed:data:text/html,hi", null, null);
-  }
-  catch (e) {
+  } catch (e) {
     success = e.result == Cr.NS_ERROR_MALFORMED_URI;
   }
   if (!success)
     do_throw("We didn't throw NS_ERROR_MALFORMED_URI creating a feed:data: URI");
 
   success = false;
   try {
     ios.newURI("pcast:javascript:alert('hi');", null, null);
-  }
-  catch (e) {
+  } catch (e) {
     success = e.result == Cr.NS_ERROR_MALFORMED_URI;
   }
   if (!success)
     do_throw("We didn't throw NS_ERROR_MALFORMED_URI creating a pcast:javascript: URI");
 
   success = false;
   try {
     ios.newURI("pcast:data:text/html,hi", null, null);
-  }
-  catch (e) {
+  } catch (e) {
     success = e.result == Cr.NS_ERROR_MALFORMED_URI;
   }
   if (!success)
     do_throw("We didn't throw NS_ERROR_MALFORMED_URI creating a pcast:data: URI");
 
 }
--- a/browser/components/migration/.eslintrc.js
+++ b/browser/components/migration/.eslintrc.js
@@ -19,17 +19,17 @@ module.exports = { // eslint-disable-lin
     "comma-dangle": "off",
     "comma-spacing": ["warn", {"before": false, "after": true}],
     "comma-style": ["warn", "last"],
     // "complexity": "warn",
     "consistent-return": "error",
     //"curly": "error",
     "dot-notation": "error",
     "eol-last": "error",
-    "indent": ["warn", 2, {"SwitchCase": 1}],
+    "indent": ["warn", 2, {"SwitchCase": 1, "ArrayExpression": "first", "ObjectExpression": "first"}],
     // "key-spacing": ["warn", {"beforeColon": false, "afterColon": true}],
     "keyword-spacing": "warn",
     "max-nested-callbacks": ["error", 3],
     "new-parens": "error",
     "no-array-constructor": "error",
     "no-cond-assign": "error",
     "no-control-regex": "error",
     "no-debugger": "error",
--- a/browser/components/migration/ChromeProfileMigrator.js
+++ b/browser/components/migration/ChromeProfileMigrator.js
@@ -59,18 +59,17 @@ function getDataFolder(subfoldersWin, su
  * Convert Chrome time format to Date object
  *
  * @param   aTime
  *          Chrome time
  * @return  converted Date object
  * @note    Google Chrome uses FILETIME / 10 as time.
  *          FILETIME is based on same structure of Windows.
  */
-function chromeTimeToDate(aTime)
-{
+function chromeTimeToDate(aTime) {
   return new Date((aTime * S100NS_PER_MS - S100NS_FROM1601TO1970) / 10000);
 }
 
 /**
  * Insert bookmark items into specific folder.
  *
  * @param   parentGuid
  *          GUID of the folder where items will be inserted
@@ -216,18 +215,17 @@ Object.defineProperty(ChromeProfileMigra
       let fstream = Cc[FILE_INPUT_STREAM_CID].
                     createInstance(Ci.nsIFileInputStream);
       fstream.init(prefsFile, -1, 0, 0);
       try {
         return JSON.parse(
           NetUtil.readInputStreamToString(fstream, fstream.available(),
                                           { charset: "UTF-8" })
             ).homepage;
-      }
-      catch (e) {
+      } catch (e) {
         Cu.reportError("Error parsing Chrome's preferences file: " + e);
       }
     }
     return "";
   }
 });
 
 Object.defineProperty(ChromeProfileMigrator.prototype, "sourceLocked", {
--- a/browser/components/migration/FirefoxProfileMigrator.js
+++ b/browser/components/migration/FirefoxProfileMigrator.js
@@ -125,18 +125,18 @@ FirefoxProfileMigrator.prototype._getRes
       }
     };
   }.bind(this);
 
   let types = MigrationUtils.resourceTypes;
   let places = getFileResource(types.HISTORY, ["places.sqlite"]);
   let cookies = getFileResource(types.COOKIES, ["cookies.sqlite"]);
   let passwords = getFileResource(types.PASSWORDS,
-                                  ["signons.sqlite", "logins.json", "key3.db",
-                                   "signedInUser.json"]);
+    ["signons.sqlite", "logins.json", "key3.db",
+     "signedInUser.json"]);
   let formData = getFileResource(types.FORMDATA, ["formhistory.sqlite"]);
   let bookmarksBackups = getFileResource(types.OTHERDATA,
     [PlacesBackups.profileRelativeFolderPath]);
   let dictionary = getFileResource(types.OTHERDATA, ["persdict.dat"]);
 
   let sessionCheckpoints = this._getFileObject(sourceProfileDir, "sessionCheckpoints.json");
   let sessionFile = this._getFileObject(sourceProfileDir, "sessionstore.js");
   let session;
--- a/browser/components/migration/IEProfileMigrator.js
+++ b/browser/components/migration/IEProfileMigrator.js
@@ -334,18 +334,17 @@ IE7FormPasswords.prototype = {
       results.push(currentResult);
       // move to the next login item
       currentLoginItemPointer = currentLoginItemPointer.increment();
     }
     return results;
   },
 };
 
-function IEProfileMigrator()
-{
+function IEProfileMigrator() {
   this.wrappedJSObject = this; // export this to be able to use it in the unittest.
 }
 
 IEProfileMigrator.prototype = Object.create(MigratorPrototype);
 
 IEProfileMigrator.prototype.getResources = function IE_getResources() {
   let resources = [
     MSMigrationUtils.getBookmarksMigrator(),
--- a/browser/components/migration/MSMigrationUtils.jsm
+++ b/browser/components/migration/MSMigrationUtils.jsm
@@ -395,32 +395,30 @@ Bookmarks.prototype = {
           if (entry.leafName == this._toolbarFolderName &&
               entry.parent.equals(this._favoritesFolder)) {
             // Import to the bookmarks toolbar.
             folderGuid = PlacesUtils.bookmarks.toolbarGuid;
             if (!MigrationUtils.isStartupMigration) {
               folderGuid =
                 yield MigrationUtils.createImportedBookmarksFolder(this.importedAppLabel, folderGuid);
             }
-          }
-          else {
+          } else {
             // Import to a new folder.
             folderGuid = (yield MigrationUtils.insertBookmarkWrapper({
               type: PlacesUtils.bookmarks.TYPE_FOLDER,
               parentGuid: aDestFolderGuid,
               title: entry.leafName
             })).guid;
           }
 
           if (entry.isReadable()) {
             // Recursively import the folder.
             yield this._migrateFolder(entry, folderGuid);
           }
-        }
-        else {
+        } else {
           // Strip the .url extension, to both check this is a valid link file,
           // and get the associated title.
           let matches = entry.leafName.match(/(.+)\.url$/i);
           if (matches) {
             let fileHandler = Cc["@mozilla.org/network/protocol;1?name=file"].
                               getService(Ci.nsIFileProtocolHandler);
             let uri = fileHandler.readURLFile(entry);
             let title = matches[1];
--- a/browser/components/migration/MigrationUtils.jsm
+++ b/browser/components/migration/MigrationUtils.jsm
@@ -317,18 +317,17 @@ this.MigratorPrototype = {
             }
             completeDeferred.resolve();
           };
 
           // If migrate throws, an error occurred, and the callback
           // (itemMayBeDone) might haven't been called.
           try {
             res.migrate(resourceDone);
-          }
-          catch (ex) {
+          } catch (ex) {
             Cu.reportError(ex);
             resourceDone(false);
           }
 
           // Certain resources must be ran sequentially or they could fail,
           // for example bookmarks and history (See bug 1272652).
           if (migrationType == MigrationUtils.resourceTypes.BOOKMARKS ||
               migrationType == MigrationUtils.resourceTypes.HISTORY) {
@@ -390,35 +389,32 @@ this.MigratorPrototype = {
     // profile is available.
     let exists = false;
     try {
       let profiles = this.sourceProfiles;
       if (!profiles) {
         let resources = this._getMaybeCachedResources("");
         if (resources && resources.length > 0)
           exists = true;
-      }
-      else {
+      } else {
         exists = profiles.length > 0;
       }
-    }
-    catch (ex) {
+    } catch (ex) {
       Cu.reportError(ex);
     }
     return exists;
   },
 
   /** * PRIVATE STUFF - DO NOT OVERRIDE ***/
   _getMaybeCachedResources: function PMB__getMaybeCachedResources(aProfile) {
     let profileKey = aProfile ? aProfile.id : "";
     if (this._resourcesByProfile) {
       if (profileKey in this._resourcesByProfile)
         return this._resourcesByProfile[profileKey];
-    }
-    else {
+    } else {
       this._resourcesByProfile = { };
     }
     this._resourcesByProfile[profileKey] = this.getResources(aProfile);
     return this._resourcesByProfile[profileKey];
   }
 };
 
 this.MigrationUtils = Object.freeze({
@@ -469,18 +465,17 @@ this.MigrationUtils = Object.freeze({
    * @return the wrapped function.
    */
   wrapMigrateFunction: function MU_wrapMigrateFunction(aFunction, aCallback) {
     return function() {
       let success = false;
       try {
         aFunction.apply(null, arguments);
         success = true;
-      }
-      catch (ex) {
+      } catch (ex) {
         Cu.reportError(ex);
       }
       // Do not change this to call aCallback directly in try try & catch
       // blocks, because if aCallback throws, we may end up calling aCallback
       // twice.
       aCallback(success);
     };
   },
@@ -658,23 +653,21 @@ this.MigrationUtils = Object.freeze({
    *
    * @return profile migrator implementing nsIBrowserProfileMigrator, if it can
    *         import any data, null otherwise.
    */
   getMigrator: function MU_getMigrator(aKey) {
     let migrator = null;
     if (this._migrators.has(aKey)) {
       migrator = this._migrators.get(aKey);
-    }
-    else {
+    } else {
       try {
         migrator = Cc["@mozilla.org/profile/migrator;1?app=browser&type=" +
                       aKey].createInstance(Ci.nsIBrowserProfileMigrator);
-      }
-      catch (ex) { Cu.reportError(ex) }
+      } catch (ex) { Cu.reportError(ex) }
       this._migrators.set(aKey, migrator);
     }
 
     try {
       return migrator && migrator.sourceExists ? migrator : null;
     } catch (ex) { Cu.reportError(ex); return null }
   },
 
@@ -706,18 +699,17 @@ this.MigrationUtils = Object.freeze({
         Cc["@mozilla.org/uriloader/external-protocol-service;1"]
           .getService(Ci.nsIExternalProtocolService)
           .getApplicationDescription("http");
       key = APP_DESC_TO_KEY[browserDesc] || "";
       // Handle devedition, as well as "FirefoxNightly" on OS X.
       if (!key && browserDesc.startsWith("Firefox")) {
         key = "firefox";
       }
-    }
-    catch (ex) {
+    } catch (ex) {
       Cu.reportError("Could not detect default browser: " + ex);
     }
 
     // "firefox" is the least useful entry here, and might just be because we've set
     // ourselves as the default (on Windows 7 and below). In that case, check if we
     // have a registry key that tells us where to go:
     if (key == "firefox" && AppConstants.isPlatformAndVersionAtMost("win", "6.2")) {
       // Because we remove the registry key, reading the registry key only works once.
@@ -884,18 +876,17 @@ this.MigrationUtils = Object.freeze({
         // aMigratorKey must point to a valid source, so, if it doesn't
         // cleanup and throw.
         this.finishMigration();
         throw new Error("startMigration was asked to open auto-migrate from " +
                         "a non-existent source: " + aMigratorKey);
       }
       migratorKey = aMigratorKey;
       skipSourcePage = true;
-    }
-    else {
+    } else {
       let defaultBrowserKey = this.getMigratorKeyForDefaultBrowser();
       if (defaultBrowserKey) {
         migrator = this.getMigrator(defaultBrowserKey);
         if (migrator)
           migratorKey = defaultBrowserKey;
       }
     }
 
--- a/browser/components/migration/SafariProfileMigrator.js
+++ b/browser/components/migration/SafariProfileMigrator.js
@@ -81,23 +81,21 @@ Bookmarks.prototype = {
           if (title == "BookmarksBar")
             yield this._migrateCollection(children, this.TOOLBAR_COLLECTION);
           else if (title == "BookmarksMenu")
             yield this._migrateCollection(children, this.MENU_COLLECTION);
           else if (title == "com.apple.ReadingList")
             yield this._migrateCollection(children, this.READING_LIST_COLLECTION);
           else if (entry.get("ShouldOmitFromUI") !== true)
             entriesFiltered.push(entry);
-        }
-        else if (type == "WebBookmarkTypeLeaf") {
+        } else if (type == "WebBookmarkTypeLeaf") {
           entriesFiltered.push(entry);
         }
       }
-    }
-    else {
+    } else {
       entriesFiltered = aEntries;
     }
 
     if (entriesFiltered.length == 0)
       return;
 
     let folderGuid = -1;
     switch (aCollection) {
@@ -156,18 +154,17 @@ Bookmarks.prototype = {
         let title = entry.get("Title");
         let newFolderGuid = (yield MigrationUtils.insertBookmarkWrapper({
           parentGuid, type: PlacesUtils.bookmarks.TYPE_FOLDER, title
         })).guid;
 
         // Empty folders may not have a children array.
         if (entry.has("Children"))
           yield this._migrateEntries(entry.get("Children"), newFolderGuid, false);
-      }
-      else if (type == "WebBookmarkTypeLeaf" && entry.has("URLString")) {
+      } else if (type == "WebBookmarkTypeLeaf" && entry.has("URLString")) {
         let title;
         if (entry.has("URIDictionary"))
           title = entry.get("URIDictionary").get("title");
 
         try {
           yield MigrationUtils.insertBookmarkWrapper({
             parentGuid, url: entry.get("URLString"), title
           });
@@ -216,18 +213,17 @@ History.prototype = {
         for (let entry of entries) {
           if (entry.has("lastVisitedDate")) {
             let visitDate = this._parseCocoaDate(entry.get("lastVisitedDate"));
             try {
               places.push({ uri: NetUtil.newURI(entry.get("")),
                             title: entry.get("title"),
                             visits: [{ transitionType: transType,
                                        visitDate }] });
-            }
-            catch (ex) {
+            } catch (ex) {
               // Safari's History file may contain malformed URIs which
               // will be ignored.
               Cu.reportError(ex);
             }
           }
         }
         if (places.length > 0) {
           MigrationUtils.insertVisitsWrapper(places, {
@@ -236,22 +232,20 @@ History.prototype = {
               // Importing any entry is considered a successful import.
               this._success = true;
             },
             handleError() {},
             handleCompletion() {
               aCallback(this._success);
             }
           });
-        }
-        else {
+        } else {
           aCallback(false);
         }
-      }
-      catch (ex) {
+      } catch (ex) {
         Cu.reportError(ex);
         aCallback(false);
       }
     }.bind(this));
   }
 };
 
 /**
@@ -279,18 +273,17 @@ MainPreferencesPropertyList.prototype = 
     let alreadyReading = this._callbacks.length > 0;
     this._callbacks.push(aCallback);
     if (!alreadyReading) {
       PropertyListUtils.read(this._file, function readPrefs(aDict) {
         this._dict = aDict;
         for (let callback of this._callbacks) {
           try {
             callback(aDict);
-          }
-          catch (ex) {
+          } catch (ex) {
             Cu.reportError(ex);
           }
         }
         this._callbacks.splice(0);
       }.bind(this));
     }
   },
 
@@ -324,19 +317,19 @@ SearchStrings.prototype = {
       function migrateSearchStrings(aDict) {
         if (!aDict)
           throw new Error("Could not get preferences dictionary");
 
         if (aDict.has("RecentSearchStrings")) {
           let recentSearchStrings = aDict.get("RecentSearchStrings");
           if (recentSearchStrings && recentSearchStrings.length > 0) {
             let changes = recentSearchStrings.map((searchString) => (
-                           {op: "add",
-                            fieldname: "searchbar-history",
-                            value: searchString}));
+              {op: "add",
+               fieldname: "searchbar-history",
+               value: searchString}));
             FormHistory.update(changes);
           }
         }
       }.bind(this), aCallback));
   }
 };
 
 function SafariProfileMigrator() {
--- a/browser/components/migration/content/migration.js
+++ b/browser/components/migration/content/migration.js
@@ -17,18 +17,17 @@ Cu.import("resource:///modules/Migration
 var MigrationWizard = { /* exported MigrationWizard */
   _source: "",                  // Source Profile Migrator ContractID suffix
   _itemsFlags: kIMig.ALL,       // Selected Import Data Sources (16-bit bitfield)
   _selectedProfile: null,       // Selected Profile name to import from
   _wiz: null,
   _migrator: null,
   _autoMigrate: null,
 
-  init()
-  {
+  init() {
     let os = Services.obs;
     os.addObserver(this, "Migration:Started", false);
     os.addObserver(this, "Migration:ItemBeforeMigrate", false);
     os.addObserver(this, "Migration:ItemAfterMigrate", false);
     os.addObserver(this, "Migration:ItemError", false);
     os.addObserver(this, "Migration:Ended", false);
 
     this._wiz = document.documentElement;
@@ -53,31 +52,29 @@ var MigrationWizard = { /* exported Migr
         // easily identifiable way to avoid migration and create a new profile.
         document.getElementById("nothing").hidden = false;
       }
     }
 
     this.onImportSourcePageShow();
   },
 
-  uninit()
-  {
+  uninit() {
     var os = Components.classes["@mozilla.org/observer-service;1"]
                        .getService(Components.interfaces.nsIObserverService);
     os.removeObserver(this, "Migration:Started");
     os.removeObserver(this, "Migration:ItemBeforeMigrate");
     os.removeObserver(this, "Migration:ItemAfterMigrate");
     os.removeObserver(this, "Migration:ItemError");
     os.removeObserver(this, "Migration:Ended");
     MigrationUtils.finishMigration();
   },
 
   // 1 - Import Source
-  onImportSourcePageShow()
-  {
+  onImportSourcePageShow() {
     // Show warning message to close the selected browser when needed
     function toggleCloseBrowserWarning() {
       let visibility = "hidden";
       if (group.selectedItem.id != "nothing") {
         let migrator = MigrationUtils.getMigrator(group.selectedItem.id);
         visibility = migrator.sourceLocked ? "visible" : "hidden";
       }
       document.getElementById("closeSourceBrowser").style.visibility = visibility;
@@ -132,18 +129,17 @@ var MigrationWizard = { /* exported Migr
 
     // Advance to the next page if the caller told us to.
     if (this._migrator && this._skipImportSourcePage) {
       this._wiz.advance();
       this._wiz.canRewind = false;
     }
   },
 
-  onImportSourcePageAdvanced()
-  {
+  onImportSourcePageAdvanced() {
     var newSource = document.getElementById("importSourceGroup").selectedItem.id;
 
     if (newSource == "nothing") {
       // Need to do telemetry here because we're closing the dialog before we get to
       // do actual migration. For actual migration, this doesn't happen until after
       // migration takes place.
       Services.telemetry.getHistogramById("FX_MIGRATION_SOURCE_BROWSER")
                         .add(MigrationUtils.getSourceIdForTelemetry("nothing"));
@@ -159,37 +155,34 @@ var MigrationWizard = { /* exported Migr
       this._selectedProfile = null;
     }
     this._source = newSource;
 
     // check for more than one source profile
     var sourceProfiles = this._migrator.sourceProfiles;
     if (this._skipImportSourcePage) {
       this._wiz.currentPage.next = "homePageImport";
-    }
-    else if (sourceProfiles && sourceProfiles.length > 1) {
+    } else if (sourceProfiles && sourceProfiles.length > 1) {
       this._wiz.currentPage.next = "selectProfile";
-    }
-    else {
+    } else {
       if (this._autoMigrate)
         this._wiz.currentPage.next = "homePageImport";
       else
         this._wiz.currentPage.next = "importItems";
 
       if (sourceProfiles && sourceProfiles.length == 1)
         this._selectedProfile = sourceProfiles[0];
       else
         this._selectedProfile = null;
     }
     return undefined;
   },
 
   // 2 - [Profile Selection]
-  onSelectProfilePageShow()
-  {
+  onSelectProfilePageShow() {
     // Disabling this for now, since we ask about import sources in automigration
     // too and don't want to disable the back button
     // if (this._autoMigrate)
     //   document.documentElement.getButton("back").disabled = true;
 
     var profiles = document.getElementById("profiles");
     while (profiles.hasChildNodes())
       profiles.removeChild(profiles.firstChild);
@@ -205,39 +198,36 @@ var MigrationWizard = { /* exported Migr
         item.setAttribute("label", profile.name);
         profiles.appendChild(item);
       }
     }
 
     profiles.selectedItem = this._selectedProfile ? document.getElementById(this._selectedProfile.id) : profiles.firstChild;
   },
 
-  onSelectProfilePageRewound()
-  {
+  onSelectProfilePageRewound() {
     var profiles = document.getElementById("profiles");
     this._selectedProfile = this._migrator.sourceProfiles.find(
       profile => profile.id == profiles.selectedItem.id
     ) || null;
   },
 
-  onSelectProfilePageAdvanced()
-  {
+  onSelectProfilePageAdvanced() {
     var profiles = document.getElementById("profiles");
     this._selectedProfile = this._migrator.sourceProfiles.find(
       profile => profile.id == profiles.selectedItem.id
     ) || null;
 
     // If we're automigrating or just doing bookmarks don't show the item selection page
     if (this._autoMigrate)
       this._wiz.currentPage.next = "homePageImport";
   },
 
   // 3 - ImportItems
-  onImportItemsPageShow()
-  {
+  onImportItemsPageShow() {
     var dataSources = document.getElementById("dataSources");
     while (dataSources.hasChildNodes())
       dataSources.removeChild(dataSources.firstChild);
 
     var items = this._migrator.getMigrateData(this._selectedProfile, this._autoMigrate);
     for (var i = 0; i < 16; ++i) {
       var itemID = (items >> i) & 0x1 ? Math.pow(2, i) : 0;
       if (itemID > 0) {
@@ -247,68 +237,63 @@ var MigrationWizard = { /* exported Migr
           MigrationUtils.getLocalizedString(itemID + "_" + this._source));
         dataSources.appendChild(checkbox);
         if (!this._itemsFlags || this._itemsFlags & itemID)
           checkbox.checked = true;
       }
     }
   },
 
-  onImportItemsPageRewound()
-  {
+  onImportItemsPageRewound() {
     this._wiz.canAdvance = true;
     this.onImportItemsPageAdvanced();
   },
 
-  onImportItemsPageAdvanced()
-  {
+  onImportItemsPageAdvanced() {
     var dataSources = document.getElementById("dataSources");
     this._itemsFlags = 0;
     for (var i = 0; i < dataSources.childNodes.length; ++i) {
       var checkbox = dataSources.childNodes[i];
       if (checkbox.localName == "checkbox" && checkbox.checked)
         this._itemsFlags |= parseInt(checkbox.id);
     }
   },
 
-  onImportItemCommand()
-  {
+  onImportItemCommand() {
     var items = document.getElementById("dataSources");
     var checkboxes = items.getElementsByTagName("checkbox");
 
     var oneChecked = false;
     for (var i = 0; i < checkboxes.length; ++i) {
       if (checkboxes[i].checked) {
         oneChecked = true;
         break;
       }
     }
 
     this._wiz.canAdvance = oneChecked;
   },
 
   // 4 - Home Page Selection
-  onHomePageMigrationPageShow()
-  {
+  onHomePageMigrationPageShow() {
     // only want this on the first run
     if (!this._autoMigrate) {
       this._wiz.advance();
       return;
     }
 
     var brandBundle = document.getElementById("brandBundle");
     var pageTitle, pageDesc, mainStr;
     // These strings don't exist when not using official branding. If that's
     // the case, just skip this page.
     try {
       pageTitle = brandBundle.getString("homePageMigrationPageTitle");
       pageDesc = brandBundle.getString("homePageMigrationDescription");
       mainStr = brandBundle.getString("homePageSingleStartMain");
-    }
-    catch (e) {
+    } catch (e) {
       this._wiz.advance();
       return;
     }
 
     document.getElementById("homePageImport").setAttribute("label", pageTitle);
     document.getElementById("homePageImportDesc").setAttribute("value", pageDesc);
 
     this._wiz._adjustWizardHeader();
@@ -326,50 +311,46 @@ var MigrationWizard = { /* exported Migr
 
     if (oldHomePageURL && appName) {
       var oldHomePageLabel =
         brandBundle.getFormattedString("homePageImport", [appName]);
       var oldHomePage = document.getElementById("oldHomePage");
       oldHomePage.setAttribute("label", oldHomePageLabel);
       oldHomePage.setAttribute("value", oldHomePageURL);
       oldHomePage.removeAttribute("hidden");
-    }
-    else {
+    } else {
       // if we don't have at least two options, just advance
       this._wiz.advance();
     }
   },
 
-  onHomePageMigrationPageAdvanced()
-  {
+  onHomePageMigrationPageAdvanced() {
     // we might not have a selectedItem if we're in fallback mode
     try {
       var radioGroup = document.getElementById("homePageRadiogroup");
 
       this._newHomePage = radioGroup.selectedItem.value;
     } catch (ex) {}
   },
 
   // 5 - Migrating
-  onMigratingPageShow()
-  {
+  onMigratingPageShow() {
     this._wiz.getButton("cancel").disabled = true;
     this._wiz.canRewind = false;
     this._wiz.canAdvance = false;
 
     // When automigrating, show all of the data that can be received from this source.
     if (this._autoMigrate)
       this._itemsFlags = this._migrator.getMigrateData(this._selectedProfile, this._autoMigrate);
 
     this._listItems("migratingItems");
     setTimeout(() => this.onMigratingMigrate(), 0);
   },
 
-  onMigratingMigrate()
-  {
+  onMigratingMigrate() {
     this._migrator.migrate(this._itemsFlags, this._autoMigrate, this._selectedProfile);
 
     Services.telemetry.getHistogramById("FX_MIGRATION_SOURCE_BROWSER")
                       .add(MigrationUtils.getSourceIdForTelemetry(this._source));
     if (!this._autoMigrate) {
       let hist = Services.telemetry.getKeyedHistogramById("FX_MIGRATION_USAGE");
       let exp = 0;
       let items = this._itemsFlags;
@@ -378,44 +359,41 @@ var MigrationWizard = { /* exported Migr
           hist.add(this._source, exp);
         }
         items = items >> 1;
         exp++;
       }
     }
   },
 
-  _listItems(aID)
-  {
+  _listItems(aID) {
     var items = document.getElementById(aID);
     while (items.hasChildNodes())
       items.removeChild(items.firstChild);
 
     var itemID;
     for (var i = 0; i < 16; ++i) {
       itemID = (this._itemsFlags >> i) & 0x1 ? Math.pow(2, i) : 0;
       if (itemID > 0) {
         var label = document.createElement("label");
         label.id = itemID + "_migrated";
         try {
           label.setAttribute("value",
             MigrationUtils.getLocalizedString(itemID + "_" + this._source));
           items.appendChild(label);
-        }
-        catch (e) {
+        } catch (e) {
           // if the block above throws, we've enumerated all the import data types we
           // currently support and are now just wasting time, break.
           break;
         }
       }
     }
   },
 
-  observe(aSubject, aTopic, aData)
-  {
+  observe(aSubject, aTopic, aData) {
     var label;
     switch (aTopic) {
       case "Migration:Started":
         break;
       case "Migration:ItemBeforeMigrate":
         label = document.getElementById(aData + "_migrated");
         if (label)
           label.setAttribute("style", "font-weight: bold");
@@ -442,18 +420,17 @@ var MigrationWizard = { /* exported Migr
             try {
               // set homepage properly
               var prefSvc = Components.classes["@mozilla.org/preferences-service;1"]
                                       .getService(Components.interfaces.nsIPrefService);
               var prefBranch = prefSvc.getBranch(null);
 
               if (this._newHomePage == "DEFAULT") {
                 prefBranch.clearUserPref("browser.startup.homepage");
-              }
-              else {
+              } else {
                 var str = Components.classes["@mozilla.org/supports-string;1"]
                                   .createInstance(Components.interfaces.nsISupportsString);
                 str.data = this._newHomePage;
                 prefBranch.setComplexValue("browser.startup.homepage",
                                            Components.interfaces.nsISupportsString,
                                            str);
               }
 
@@ -467,18 +444,17 @@ var MigrationWizard = { /* exported Migr
             }
           }
 
           // We're done now.
           this._wiz.canAdvance = true;
           this._wiz.advance();
 
           setTimeout(close, 5000);
-        }
-        else {
+        } else {
           this._wiz.canAdvance = true;
           var nextButton = this._wiz.getButton("next");
           nextButton.click();
         }
         break;
       case "Migration:ItemError":
         let type = "undefined";
         let numericType = parseInt(aData);
@@ -509,18 +485,17 @@ var MigrationWizard = { /* exported Migr
           .getService(Ci.nsIConsoleService)
           .logStringMessage("some " + type + " did not successfully migrate.");
         Services.telemetry.getKeyedHistogramById("FX_MIGRATION_ERRORS")
                           .add(this._source, Math.log2(numericType));
         break;
     }
   },
 
-  onDonePageShow()
-  {
+  onDonePageShow() {
     this._wiz.getButton("cancel").disabled = true;
     this._wiz.canRewind = false;
     this._listItems("doneItems");
   },
 
   reportDataRecencyTelemetry() {
     let histogram = Services.telemetry.getKeyedHistogramById("FX_STARTUP_MIGRATION_DATA_RECENCY");
     let lastUsedPromises = [];
--- a/browser/components/migration/tests/unit/test_automigration.js
+++ b/browser/components/migration/tests/unit/test_automigration.js
@@ -24,18 +24,17 @@ AutoMigrateBackstage.MigrationUtils = ne
 });
 
 do_register_cleanup(function() {
   AutoMigrateBackstage.MigrationUtils = MigrationUtils;
 });
 
 // This should be replaced by using History.fetch with a fetchVisits option,
 // once that becomes available
-function* visitsForURL(url)
-{
+function* visitsForURL(url) {
   let visitCount = 0;
   let db = yield PlacesUtils.promiseDBConnection();
   visitCount = yield db.execute(
     `SELECT count(*) FROM moz_historyvisits v
      JOIN moz_places h ON h.id = v.place_id
      WHERE url_hash = hash(:url) AND url = :url`,
      {url});
   visitCount = visitCount[0].getInt64(0);
--- a/browser/components/newtab/PlacesProvider.jsm
+++ b/browser/components/newtab/PlacesProvider.jsm
@@ -206,19 +206,18 @@ Links.prototype = {
     let items = [];
     let queryError = null;
     let conn = yield PlacesUtils.promiseDBConnection();
     yield conn.executeCached(aSql, params, aRow => {
       try {
         // check if caller wants to handle query raws
         if (callback) {
           callback(aRow);
-        }
-        // otherwise fill in the item and add items array
-        else {
+        } else {
+          // otherwise fill in the item and add items array
           let item = null;
           // if columns array is given construct an object
           if (columns && Array.isArray(columns)) {
             item = {};
             columns.forEach(column => {
               item[column] = aRow.getResultByName(column);
             });
           } else {
--- a/browser/components/newtab/aboutNewTabService.js
+++ b/browser/components/newtab/aboutNewTabService.js
@@ -186,17 +186,17 @@ AboutNewTabService.prototype = {
    * the newtab page has no effect on the result of this function.
    *
    * The result is also the remote URL if this is in a test (PREF_REMOTE_CS_TEST)
    *
    * @returns {String} the default newtab URL, remote or local depending on browser.newtabpage.remote
    */
   get defaultURL() {
     let csTest = Services.prefs.getBoolPref(PREF_REMOTE_CS_TEST);
-    if (this._remoteEnabled || csTest)  {
+    if (this._remoteEnabled || csTest) {
       return this._remoteURL;
     }
     return LOCAL_NEWTAB_URL;
   },
 
   /*
    * Updates the remote location when the page is not overriden.
    *
--- a/browser/components/newtab/tests/xpcshell/test_PlacesProvider.js
+++ b/browser/components/newtab/tests/xpcshell/test_PlacesProvider.js
@@ -333,33 +333,30 @@ add_task(function* test_Links_execute_qu
   testItemObject(results, 2, {url: `${TEST_URL}2`});
   testItemObject(results, 3, {url: `${TEST_URL}3`});
 
   // negative test cases
   // bad sql
   try {
     yield provider.executePlacesQuery("select from moz");
     do_throw("bad sql should've thrown");
-  }
-  catch (e) {
+  } catch (e) {
     do_check_true("expected failure - bad sql");
   }
   // missing bindings
   try {
     yield provider.executePlacesQuery("select * from moz_places limit :limit");
     do_throw("bad sql should've thrown");
-  }
-  catch (e) {
+  } catch (e) {
     do_check_true("expected failure - missing bidning");
   }
   // non-existent column name
   try {
     yield provider.executePlacesQuery("select * from moz_places limit :limit",
                                      {columns: ["no-such-column"], params: {limit: 4}});
     do_throw("bad sql should've thrown");
-  }
-  catch (e) {
+  } catch (e) {
     do_check_true("expected failure - wrong column name");
   }
 
   // cleanup
   yield PlacesTestUtils.clearHistory();
 });
--- a/browser/components/nsBrowserContentHandler.js
+++ b/browser/components/nsBrowserContentHandler.js
@@ -60,28 +60,26 @@ function resolveURIInternal(aCmdLine, aA
   if (!(uri instanceof nsIFileURL)) {
     return uriFixup.createFixupURI(aArgument,
                                    uriFixup.FIXUP_FLAG_FIX_SCHEME_TYPOS);
   }
 
   try {
     if (uri.file.exists())
       return uri;
-  }
-  catch (e) {
+  } catch (e) {
     Components.utils.reportError(e);
   }
 
   // We have interpreted the argument as a relative file URI, but the file
   // doesn't exist. Try URI fixup heuristics: see bug 290782.
 
   try {
     uri = uriFixup.createFixupURI(aArgument, 0);
-  }
-  catch (e) {
+  } catch (e) {
     Components.utils.reportError(e);
   }
 
   return uri;
 }
 
 var gFirstWindow = false;
 
@@ -336,29 +334,27 @@ nsBrowserContentHandler.prototype = {
         let uri = resolveURIInternal(cmdLine, uriparam);
         if (!shouldLoadURI(uri))
           continue;
         openWindow(null, this.chromeURL, "_blank",
                    "chrome,dialog=no,all" + this.getFeatures(cmdLine),
                    uri.spec);
         cmdLine.preventDefault = true;
       }
-    }
-    catch (e) {
+    } catch (e) {
       Components.utils.reportError(e);
     }
 
     try {
       while ((uriparam = cmdLine.handleFlagWithParam("new-tab", false))) {
         let uri = resolveURIInternal(cmdLine, uriparam);
         handURIToExistingBrowser(uri, nsIBrowserDOMWindow.OPEN_NEWTAB, cmdLine);
         cmdLine.preventDefault = true;
       }
-    }
-    catch (e) {
+    } catch (e) {
       Components.utils.reportError(e);
     }
 
     var chromeParam = cmdLine.handleFlagWithParam("chrome", false);
     if (chromeParam) {
 
       // Handle old preference dialog URLs.
       if (chromeParam == "chrome://browser/content/pref/pref.xul" ||
@@ -378,18 +374,17 @@ nsBrowserContentHandler.prototype = {
           // If the URI is local, we are sure it won't wrongly inherit chrome privs
           var features = "chrome,dialog=no,all" + this.getFeatures(cmdLine);
           openWindow(null, resolvedURI.spec, "_blank", features);
           cmdLine.preventDefault = true;
         } else {
           dump("*** Preventing load of web URI as chrome\n");
           dump("    If you're trying to load a webpage, do not pass --chrome.\n");
         }
-      }
-      catch (e) {
+      } catch (e) {
         Components.utils.reportError(e);
       }
     }
     if (cmdLine.handleFlag("preferences", false)) {
       openPreferences();
       cmdLine.preventDefault = true;
     }
     if (cmdLine.handleFlag("silent", false))
@@ -432,17 +427,17 @@ nsBrowserContentHandler.prototype = {
       var file = cmdLine.resolveFile(fileParam);
       var fileURI = Services.io.newFileURI(file);
       openWindow(null, this.chromeURL, "_blank",
                  "chrome,dialog=no,all" + this.getFeatures(cmdLine),
                  fileURI.spec);
       cmdLine.preventDefault = true;
     }
 
-    if (AppConstants.platform  == "win") {
+    if (AppConstants.platform == "win") {
       // Handle "? searchterm" for Windows Vista start menu integration
       for (var i = cmdLine.length - 1; i >= 0; --i) {
         var param = cmdLine.getArgument(i);
         if (param.match(/^\? /)) {
           cmdLine.removeArguments(i, i);
           cmdLine.preventDefault = true;
 
           searchParam = param.substr(2);
@@ -581,18 +576,17 @@ nsBrowserContentHandler.prototype = {
       try {
         var width = cmdLine.handleFlagWithParam("width", false);
         var height = cmdLine.handleFlagWithParam("height", false);
 
         if (width)
           this.mFeatures += ",width=" + width;
         if (height)
           this.mFeatures += ",height=" + height;
-      }
-      catch (e) {
+      } catch (e) {
       }
 
       // The global PB Service consumes this flag, so only eat it in per-window
       // PB builds.
       if (PrivateBrowsingUtils.isInTemporaryAutoStartMode) {
         this.mFeatures = ",private";
       }
     }
@@ -644,18 +638,17 @@ nsBrowserContentHandler.prototype = {
         throw NS_ERROR_ABORT;
       }
       cmdLine.handleFlag("osint", false)
     }
   },
 };
 var gBrowserContentHandler = new nsBrowserContentHandler();
 
-function handURIToExistingBrowser(uri, location, cmdLine, forcePrivate)
-{
+function handURIToExistingBrowser(uri, location, cmdLine, forcePrivate) {
   if (!shouldLoadURI(uri))
     return;
 
   // Unless using a private window is forced, open external links in private
   // windows only if we're in perma-private mode.
   var allowPrivate = forcePrivate || PrivateBrowsingUtils.permanentPrivateBrowsing;
   var navWin = RecentWindow.getMostRecentBrowserWindow({private: allowPrivate});
   if (!navWin) {
@@ -706,74 +699,69 @@ nsDefaultCommandLineHandler.prototype = 
       // preventDefault to true to prevent the display of the ui. The initial
       // command line will be retained when nsAppRunner calls LaunchChild though
       // urls launched after the initial launch will be lost.
       if (!this._haveProfile) {
         try {
           // This will throw when a profile has not been selected.
           Services.dirsvc.get("ProfD", Components.interfaces.nsILocalFile);
           this._haveProfile = true;
-        }
-        catch (e) {
+        } catch (e) {
           while ((ar = cmdLine.handleFlagWithParam("url", false)));
           cmdLine.preventDefault = true;
         }
       }
     }
 
     try {
       var ar;
       while ((ar = cmdLine.handleFlagWithParam("url", false))) {
         var uri = resolveURIInternal(cmdLine, ar);
         urilist.push(uri);
       }
-    }
-    catch (e) {
+    } catch (e) {
       Components.utils.reportError(e);
     }
 
     for (let i = 0; i < cmdLine.length; ++i) {
       var curarg = cmdLine.getArgument(i);
       if (curarg.match(/^-/)) {
         Components.utils.reportError("Warning: unrecognized command line flag " + curarg + "\n");
         // To emulate the pre-nsICommandLine behavior, we ignore
         // the argument after an unrecognized flag.
         ++i;
       } else {
         try {
           urilist.push(resolveURIInternal(cmdLine, curarg));
-        }
-        catch (e) {
+        } catch (e) {
           Components.utils.reportError("Error opening URI '" + curarg + "' from the command line: " + e + "\n");
         }
       }
     }
 
     if (urilist.length) {
       if (cmdLine.state != nsICommandLine.STATE_INITIAL_LAUNCH &&
           urilist.length == 1) {
         // Try to find an existing window and load our URI into the
         // current tab, new tab, or new window as prefs determine.
         try {
           handURIToExistingBrowser(urilist[0], nsIBrowserDOMWindow.OPEN_DEFAULTWINDOW, cmdLine);
           return;
-        }
-        catch (e) {
+        } catch (e) {
         }
       }
 
       var URLlist = urilist.filter(shouldLoadURI).map(u => u.spec);
       if (URLlist.length) {
         openWindow(null, gBrowserContentHandler.chromeURL, "_blank",
                    "chrome,dialog=no,all" + gBrowserContentHandler.getFeatures(cmdLine),
                    URLlist);
       }
 
-    }
-    else if (!cmdLine.preventDefault) {
+    } else if (!cmdLine.preventDefault) {
       if (AppConstants.isPlatformAndVersionAtLeast("win", "10") &&
           cmdLine.state != nsICommandLine.STATE_INITIAL_LAUNCH &&
           WindowsUIUtils.inTabletMode) {
         // In windows 10 tablet mode, do not create a new window, but reuse the existing one.
         let win = RecentWindow.getMostRecentBrowserWindow();
         if (win) {
           win.focus();
           return;
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -293,29 +293,25 @@ BrowserGlue.prototype = {
         Services.obs.removeObserver(this, "distribution-customization-complete");
         // Customization has finished, we don't need the customizer anymore.
         delete this._distributionCustomizer;
         break;
       case "browser-glue-test": // used by tests
         if (data == "post-update-notification") {
           if (Services.prefs.prefHasUserValue("app.update.postupdate"))
             this._showUpdateNotification();
-        }
-        else if (data == "force-ui-migration") {
+        } else if (data == "force-ui-migration") {
           this._migrateUI();
-        }
-        else if (data == "force-distribution-customization") {
+        } else if (data == "force-distribution-customization") {
           this._distributionCustomizer.applyPrefDefaults();
           this._distributionCustomizer.applyCustomizations();
           // To apply distribution bookmarks use "places-init-complete".
-        }
-        else if (data == "force-places-init") {
+        } else if (data == "force-places-init") {
           this._initPlaces(false);
-        }
-        else if (data == "smart-bookmarks-init") {
+        } else if (data == "smart-bookmarks-init") {
           this.ensurePlacesDefaultQueriesInitialized().then(() => {
             Services.obs.notifyObservers(null, "test-smart-bookmarks-done", null);
           });
         }
         break;
       case "initial-migration-will-import-default-bookmarks":
         this._migrationImportsDefaultBookmarks = true;
         break;
@@ -1105,18 +1101,17 @@ BrowserGlue.prototype = {
         usePromptLimit ? Services.prefs.getIntPref("browser.shell.defaultBrowserCheckCount") : 0;
 
       let willRecoverSession = false;
       try {
         let ss = Cc["@mozilla.org/browser/sessionstartup;1"].
                  getService(Ci.nsISessionStartup);
         willRecoverSession =
           (ss.sessionType == Ci.nsISessionStartup.RECOVER_SESSION);
-      }
-      catch (ex) { /* never mind; suppose SessionStore is broken */ }
+      } catch (ex) { /* never mind; suppose SessionStore is broken */ }
 
       // startup check, check all assoc
       let isDefault = false;
       let isDefaultError = false;
       try {
         isDefault = ShellService.isDefaultBrowser(true, false);
       } catch (ex) {
         isDefaultError = true;
@@ -1153,18 +1148,17 @@ BrowserGlue.prototype = {
         Services.telemetry.getHistogramById("BROWSER_IS_USER_DEFAULT")
                           .add(isDefault);
         Services.telemetry.getHistogramById("BROWSER_IS_USER_DEFAULT_ERROR")
                           .add(isDefaultError);
         Services.telemetry.getHistogramById("BROWSER_SET_DEFAULT_ALWAYS_CHECK")
                           .add(shouldCheck);
         Services.telemetry.getHistogramById("BROWSER_SET_DEFAULT_DIALOG_PROMPT_RAWCOUNT")
                           .add(promptCount);
-      }
-      catch (ex) { /* Don't break the default prompt if telemetry is broken. */ }
+      } catch (ex) { /* Don't break the default prompt if telemetry is broken. */ }
 
       if (willPrompt) {
         Services.tm.mainThread.dispatch(function() {
           DefaultBrowserCheck.prompt(RecentWindow.getMostRecentBrowserWindow());
         }.bind(this), Ci.nsIThread.DISPATCH_NORMAL);
       }
     }
 
@@ -1340,18 +1334,17 @@ BrowserGlue.prototype = {
   _showUpdateNotification: function BG__showUpdateNotification() {
     Services.prefs.clearUserPref("app.update.postupdate");
 
     var um = Cc["@mozilla.org/updates/update-manager;1"].
              getService(Ci.nsIUpdateManager);
     try {
       // If the updates.xml file is deleted then getUpdateAt will throw.
       var update = um.getUpdateAt(0).QueryInterface(Ci.nsIPropertyBag);
-    }
-    catch (e) {
+    } catch (e) {
       // This should never happen.
       Cu.reportError("Unable to find update: " + e);
       return;
     }
 
     var actions = update.getProperty("actions");
     if (!actions || actions.indexOf("silent") != -1)
       return;
@@ -1425,18 +1418,17 @@ BrowserGlue.prototype = {
       win.openUILinkIn(data, "tab");
     }
 
     try {
       // This will throw NS_ERROR_NOT_AVAILABLE if the notification cannot
       // be displayed per the idl.
       AlertsService.showAlertNotification(null, title, text,
                                           true, url, clickCallback);
-    }
-    catch (e) {
+    } catch (e) {
       Cu.reportError(e);
     }
   },
 
   /**
    * Initialize Places
    * - imports the bookmarks html file if bookmarks database is empty, try to
    *   restore bookmarks from a JSON backup if the backend indicates that the
@@ -1511,25 +1503,23 @@ BrowserGlue.prototype = {
       // from bookmarks.html, we will try to restore from JSON
       if (importBookmarks && !restoreDefaultBookmarks && !importBookmarksHTML) {
         // get latest JSON backup
         lastBackupFile = yield PlacesBackups.getMostRecentBackup();
         if (lastBackupFile) {
           // restore from JSON backup
           yield BookmarkJSONUtils.importFromFile(lastBackupFile, true);
           importBookmarks = false;
-        }
-        else {
+        } else {
           // We have created a new database but we don't have any backup available
           importBookmarks = true;
           if (yield OS.File.exists(BookmarkHTMLUtils.defaultPath)) {
             // If bookmarks.html is available in current profile import it...
             importBookmarksHTML = true;
-          }
-          else {
+          } else {
             // ...otherwise we will restore defaults
             restoreDefaultBookmarks = true;
           }
         }
       }
 
       // If bookmarks are not imported, then initialize smart bookmarks.  This
       // happens during a common startup.
@@ -1540,34 +1530,32 @@ BrowserGlue.prototype = {
         // Now apply distribution customized bookmarks.
         // This should always run after Places initialization.
         try {
           yield this._distributionCustomizer.applyBookmarks();
           yield this.ensurePlacesDefaultQueriesInitialized();
         } catch (e) {
           Cu.reportError(e);
         }
-      }
-      else {
+      } else {
         // An import operation is about to run.
         // Don't try to recreate smart bookmarks if autoExportHTML is true or
         // smart bookmarks are disabled.
         let smartBookmarksVersion = 0;
         try {
           smartBookmarksVersion = Services.prefs.getIntPref("browser.places.smartBookmarksVersion");
         } catch (ex) {}
         if (!autoExportHTML && smartBookmarksVersion != -1)
           Services.prefs.setIntPref("browser.places.smartBookmarksVersion", 0);
 
         let bookmarksUrl = null;
         if (restoreDefaultBookmarks) {
           // User wants to restore bookmarks.html file from default profile folder
           bookmarksUrl = "chrome://browser/locale/bookmarks.html";
-        }
-        else if (yield OS.File.exists(BookmarkHTMLUtils.defaultPath)) {
+        } else if (yield OS.File.exists(BookmarkHTMLUtils.defaultPath)) {
           bookmarksUrl = OS.Path.toFileURI(BookmarkHTMLUtils.defaultPath);
         }
 
         if (bookmarksUrl) {
           // Import from bookmarks.html file.
           try {
             yield BookmarkHTMLUtils.importFromURL(bookmarksUrl, true);
           } catch (e) {
@@ -1579,18 +1567,17 @@ BrowserGlue.prototype = {
             yield this._distributionCustomizer.applyBookmarks();
             // Ensure that smart bookmarks are created once the operation is
             // complete.
             yield this.ensurePlacesDefaultQueriesInitialized();
           } catch (e) {
             Cu.reportError(e);
           }
 
-        }
-        else {
+        } else {
           Cu.reportError(new Error("Unable to find bookmarks.html file."));
         }
 
         // Reset preferences, so we won't try to import again at next run
         if (importBookmarksHTML)
           Services.prefs.setBoolPref("browser.places.importBookmarksHTML", false);
         if (restoreDefaultBookmarks)
           Services.prefs.setBoolPref("browser.bookmarks.restore_default_bookmarks",
@@ -1602,18 +1589,17 @@ BrowserGlue.prototype = {
         this._bookmarksBackupIdleTime = BOOKMARKS_BACKUP_IDLE_TIME_SEC;
 
         // If there is no backup, or the last bookmarks backup