Bug 1316882: Turn on space-before-function-paren eslint rule (browser). draft
authorDave Townsend <dtownsend@oxymoronical.com>
Fri, 11 Nov 2016 08:10:51 -0800
changeset 438564 4a7093be2123d77e13953360fa70ced27df06dc0
parent 438563 c47a9468de789ad036a0fbe945627c4abb9c53c6
child 438565 d7251ec6a40b7604f459f3345e8955a4da21afe2
push id35762
push userdtownsend@mozilla.com
push dateMon, 14 Nov 2016 19:31:49 +0000
bugs1316882
milestone52.0a1
Bug 1316882: Turn on space-before-function-paren eslint rule (browser). MozReview-Commit-ID: 2ZvTiZDHchz
browser/base/content/aboutDialog-appUpdater.js
browser/base/content/aboutNetError.xhtml
browser/base/content/aboutaccounts/aboutaccounts.js
browser/base/content/abouthealthreport/abouthealth.js
browser/base/content/abouthome/aboutHome.js
browser/base/content/browser-addons.js
browser/base/content/browser-ctrlTab.js
browser/base/content/browser-data-submission-info-bar.js
browser/base/content/browser-devedition.js
browser/base/content/browser-fullScreenAndPointerLock.js
browser/base/content/browser-fullZoom.js
browser/base/content/browser-fxaccounts.js
browser/base/content/browser-gestureSupport.js
browser/base/content/browser-media.js
browser/base/content/browser-places.js
browser/base/content/browser-plugins.js
browser/base/content/browser-refreshblocker.js
browser/base/content/browser-syncui.js
browser/base/content/browser-tabsintitlebar-stub.js
browser/base/content/browser-tabsintitlebar.js
browser/base/content/browser-thumbnails.js
browser/base/content/browser.js
browser/base/content/content.js
browser/base/content/contentSearchUI.js
browser/base/content/pageinfo/pageInfo.js
browser/base/content/pageinfo/permissions.js
browser/base/content/pageinfo/security.js
browser/base/content/sanitize.js
browser/base/content/sync/aboutSyncTabs.js
browser/base/content/sync/addDevice.js
browser/base/content/sync/customize.js
browser/base/content/sync/genericChange.js
browser/base/content/sync/setup.js
browser/base/content/sync/utils.js
browser/base/content/tab-content.js
browser/base/content/tabbrowser.xml
browser/base/content/test/alerts/browser_notification_do_not_disturb.js
browser/base/content/test/alerts/browser_notification_remove_permission.js
browser/base/content/test/general/aboutHome_content_script.js
browser/base/content/test/general/browser_aboutHealthReport.js
browser/base/content/test/general/browser_aboutHome.js
browser/base/content/test/general/browser_alltabslistener.js
browser/base/content/test/general/browser_blockHPKP.js
browser/base/content/test/general/browser_bookmark_titles.js
browser/base/content/test/general/browser_bug1064280_changeUrlInPinnedTab.js
browser/base/content/test/general/browser_bug356571.js
browser/base/content/test/general/browser_bug406216.js
browser/base/content/test/general/browser_bug416661.js
browser/base/content/test/general/browser_bug422590.js
browser/base/content/test/general/browser_bug423833.js
browser/base/content/test/general/browser_bug431826.js
browser/base/content/test/general/browser_bug441778.js
browser/base/content/test/general/browser_bug460146.js
browser/base/content/test/general/browser_bug481560.js
browser/base/content/test/general/browser_bug517902.js
browser/base/content/test/general/browser_bug519216.js
browser/base/content/test/general/browser_bug537013.js
browser/base/content/test/general/browser_bug553455.js
browser/base/content/test/general/browser_bug561636.js
browser/base/content/test/general/browser_bug585785.js
browser/base/content/test/general/browser_bug609700.js
browser/base/content/test/general/browser_bug623893.js
browser/base/content/test/general/browser_bug664672.js
browser/base/content/test/general/browser_bug676619.js
browser/base/content/test/general/browser_bug678392.js
browser/base/content/test/general/browser_bug734076.js
browser/base/content/test/general/browser_bug735471.js
browser/base/content/test/general/browser_bug817947.js
browser/base/content/test/general/browser_contentAltClick.js
browser/base/content/test/general/browser_contentAreaClick.js
browser/base/content/test/general/browser_ctrlTab.js
browser/base/content/test/general/browser_devedition.js
browser/base/content/test/general/browser_discovery.js
browser/base/content/test/general/browser_domFullscreen_fullscreenMode.js
browser/base/content/test/general/browser_drag.js
browser/base/content/test/general/browser_duplicateIDs.js
browser/base/content/test/general/browser_fullscreen-window-open.js
browser/base/content/test/general/browser_fxa_oauth.js
browser/base/content/test/general/browser_fxa_web_channel.html
browser/base/content/test/general/browser_fxa_web_channel.js
browser/base/content/test/general/browser_homeDrop.js
browser/base/content/test/general/browser_keywordSearch.js
browser/base/content/test/general/browser_keywordSearch_postData.js
browser/base/content/test/general/browser_menuButtonFitts.js
browser/base/content/test/general/browser_newWindowDrop.js
browser/base/content/test/general/browser_page_style_menu.js
browser/base/content/test/general/browser_printpreview.js
browser/base/content/test/general/browser_private_no_prompt.js
browser/base/content/test/general/browser_restore_isAppTab.js
browser/base/content/test/general/browser_sanitize-timespans.js
browser/base/content/test/general/browser_sanitizeDialog.js
browser/base/content/test/general/browser_save_link-perwindowpb.js
browser/base/content/test/general/browser_save_link_when_window_navigates.js
browser/base/content/test/general/browser_save_private_link_perwindowpb.js
browser/base/content/test/general/browser_save_video.js
browser/base/content/test/general/browser_save_video_frame.js
browser/base/content/test/general/browser_tabReorder.js
browser/base/content/test/general/browser_tabfocus.js
browser/base/content/test/general/browser_tabopen_reflows.js
browser/base/content/test/general/browser_trackingUI_telemetry.js
browser/base/content/test/general/browser_utilityOverlay.js
browser/base/content/test/general/browser_visibleTabs_bookmarkAllTabs.js
browser/base/content/test/general/browser_web_channel.js
browser/base/content/test/general/browser_windowactivation.js
browser/base/content/test/general/browser_windowopen_reflows.js
browser/base/content/test/general/browser_zbug569342.js
browser/base/content/test/general/contentSearchUI.js
browser/base/content/test/general/content_aboutAccounts.js
browser/base/content/test/general/download_page.html
browser/base/content/test/general/head.js
browser/base/content/test/general/test_remoteTroubleshoot.html
browser/base/content/test/newtab/browser_newtab_bug1194895.js
browser/base/content/test/newtab/browser_newtab_bug722273.js
browser/base/content/test/newtab/browser_newtab_bug734043.js
browser/base/content/test/newtab/browser_newtab_drop_preview.js
browser/base/content/test/newtab/browser_newtab_perwindow_private_browsing.js
browser/base/content/test/newtab/browser_newtab_search.js
browser/base/content/test/newtab/content-reflows.js
browser/base/content/test/newtab/head.js
browser/base/content/test/plugins/blocklist_proxy.js
browser/base/content/test/plugins/browser_CTP_context_menu.js
browser/base/content/test/plugins/browser_CTP_data_urls.js
browser/base/content/test/plugins/browser_CTP_drag_drop.js
browser/base/content/test/plugins/browser_CTP_hide_overlay.js
browser/base/content/test/plugins/browser_CTP_iframe.js
browser/base/content/test/plugins/browser_CTP_multi_allow.js
browser/base/content/test/plugins/browser_CTP_nonplugins.js
browser/base/content/test/plugins/browser_CTP_notificationBar.js
browser/base/content/test/plugins/browser_CTP_outsideScrollArea.js
browser/base/content/test/plugins/browser_CTP_remove_navigate.js
browser/base/content/test/plugins/browser_CTP_resize.js
browser/base/content/test/plugins/browser_CTP_zoom.js
browser/base/content/test/plugins/browser_bug744745.js
browser/base/content/test/plugins/browser_bug787619.js
browser/base/content/test/plugins/browser_bug797677.js
browser/base/content/test/plugins/browser_bug818118.js
browser/base/content/test/plugins/browser_bug820497.js
browser/base/content/test/plugins/browser_clearplugindata.js
browser/base/content/test/popupNotifications/browser_displayURI.js
browser/base/content/test/popupNotifications/browser_popupNotification.js
browser/base/content/test/popupNotifications/browser_popupNotification_2.js
browser/base/content/test/popupNotifications/browser_popupNotification_3.js
browser/base/content/test/popupNotifications/browser_popupNotification_4.js
browser/base/content/test/popupNotifications/browser_popupNotification_checkbox.js
browser/base/content/test/popupNotifications/head.js
browser/base/content/test/social/browser_aboutHome_activation.js
browser/base/content/test/social/browser_addons.js
browser/base/content/test/social/browser_blocklist.js
browser/base/content/test/social/browser_share.js
browser/base/content/test/social/browser_social_activation.js
browser/base/content/test/social/head.js
browser/base/content/test/urlbar/browser_URLBarSetURI.js
browser/base/content/test/urlbar/browser_autocomplete_a11y_label.js
browser/base/content/test/urlbar/browser_autocomplete_enter_race.js
browser/base/content/test/urlbar/browser_bug1003461-switchtab-override.js
browser/base/content/test/urlbar/browser_bug304198.js
browser/base/content/test/urlbar/browser_tabMatchesInAwesomebar.js
browser/base/content/test/urlbar/browser_urlHighlight.js
browser/base/content/test/urlbar/browser_urlbarCopying.js
browser/base/content/test/urlbar/browser_urlbarTrimURLs.js
browser/base/content/test/urlbar/browser_wyciwyg_urlbarCopying.js
browser/base/content/test/urlbar/head.js
browser/base/content/test/webrtc/head.js
browser/base/content/urlbarBindings.xml
browser/base/content/utilityOverlay.js
browser/base/content/web-panels.js
browser/components/contextualidentity/test/browser/browser_broadcastchannel.js
browser/components/contextualidentity/test/browser/browser_favicon.js
browser/components/contextualidentity/test/browser/browser_forgetaboutsite.js
browser/components/customizableui/CustomizableUI.jsm
browser/components/customizableui/CustomizableWidgets.jsm
browser/components/customizableui/content/toolbar.xml
browser/components/customizableui/test/browser_901207_searchbar_in_panel.js
browser/components/feeds/test/test_bug436801.html
browser/components/migration/ESEDBReader.jsm
browser/components/migration/MSMigrationUtils.jsm
browser/components/migration/MigrationUtils.jsm
browser/components/migration/content/migration.js
browser/components/newtab/tests/browser/newtabmessages_places.html
browser/components/newtab/tests/browser/newtabmessages_prefs.html
browser/components/newtab/tests/browser/newtabmessages_preview.html
browser/components/newtab/tests/browser/newtabmessages_search.html
browser/components/newtab/tests/browser/newtabwebchannel_basic.html
browser/components/nsBrowserContentHandler.js
browser/components/nsBrowserGlue.js
browser/components/originattributes/test/browser/browser_blobURLIsolation.js
browser/components/originattributes/test/browser/browser_cache.js
browser/components/originattributes/test/browser/browser_cookieIsolation.js
browser/components/originattributes/test/browser/browser_firstPartyIsolation.js
browser/components/originattributes/test/browser/browser_localStorageIsolation.js
browser/components/originattributes/test/browser/browser_sharedworker.js
browser/components/originattributes/test/browser/file_sharedworker.js
browser/components/originattributes/test/browser/test.html
browser/components/originattributes/test/browser/test_firstParty_postMessage.html
browser/components/originattributes/test/browser/worker_blobify.js
browser/components/originattributes/test/browser/worker_deblobify.js
browser/components/places/PlacesUIUtils.jsm
browser/components/places/content/browserPlacesViews.js
browser/components/places/content/controller.js
browser/components/places/tests/browser/browser_435851_copy_query.js
browser/components/places/tests/browser/browser_475045.js
browser/components/places/tests/browser/browser_bookmarksProperties.js
browser/components/places/tests/browser/browser_drag_bookmarks_on_toolbar.js
browser/components/places/tests/browser/browser_history_sidebar_search.js
browser/components/places/tests/browser/browser_library_batch_delete.js
browser/components/places/tests/browser/browser_library_downloads.js
browser/components/places/tests/browser/browser_library_infoBox.js
browser/components/places/tests/browser/browser_library_middleclick.js
browser/components/places/tests/browser/browser_library_openFlatContainer.js
browser/components/places/tests/browser/browser_library_open_leak.js
browser/components/places/tests/browser/browser_library_views_liveupdate.js
browser/components/places/tests/browser/browser_sidebarpanels_click.js
browser/components/places/tests/browser/browser_sort_in_library.js
browser/components/places/tests/browser/browser_views_liveupdate.js
browser/components/places/tests/browser/head.js
browser/components/places/tests/unit/test_PUIU_makeTransaction.js
browser/components/places/tests/unit/test_browserGlue_corrupt.js
browser/components/places/tests/unit/test_browserGlue_distribution.js
browser/components/places/tests/unit/test_browserGlue_prefs.js
browser/components/places/tests/unit/test_browserGlue_restore.js
browser/components/places/tests/unit/test_clearHistory_shutdown.js
browser/components/preferences/blocklists.js
browser/components/preferences/connection.js
browser/components/preferences/cookies.js
browser/components/preferences/fonts.js
browser/components/preferences/in-content/advanced.js
browser/components/preferences/in-content/applications.js
browser/components/preferences/in-content/containers.js
browser/components/preferences/in-content/content.js
browser/components/preferences/in-content/main.js
browser/components/preferences/in-content/privacy.js
browser/components/preferences/in-content/search.js
browser/components/preferences/in-content/security.js
browser/components/preferences/in-content/sync.js
browser/components/preferences/in-content/tests/browser_advanced_update.js
browser/components/preferences/in-content/tests/head.js
browser/components/preferences/languages.js
browser/components/preferences/permissions.js
browser/components/preferences/sanitize.js
browser/components/preferences/translation.js
browser/components/safebrowsing/content/test/browser_bug400731.js
browser/components/search/content/search.xml
browser/components/search/test/browser_abouthome_behavior.js
browser/components/search/test/browser_addEngine.js
browser/components/search/test/browser_amazon_behavior.js
browser/components/search/test/browser_bing_behavior.js
browser/components/search/test/browser_google_behavior.js
browser/components/search/test/browser_hiddenOneOffs_cleanup.js
browser/components/search/test/browser_yahoo_behavior.js
browser/components/search/test/head.js
browser/components/selfsupport/SelfSupportService.js
browser/components/shell/content/setDesktopBackground.js
browser/components/syncedtabs/EventEmitter.jsm
browser/components/syncedtabs/SyncedTabsDeckComponent.js
browser/components/syncedtabs/SyncedTabsDeckView.js
browser/components/syncedtabs/test/xpcshell/head.js
browser/components/tests/browser/browser_bug538331.js
browser/components/tests/unit/test_distribution.js
browser/components/translation/Translation.jsm
browser/components/translation/test/browser_translation_bing.js
browser/components/translation/test/browser_translation_exceptions.js
browser/components/translation/test/browser_translation_infobar.js
browser/components/translation/test/browser_translation_telemetry.js
browser/components/translation/test/browser_translation_yandex.js
browser/components/uitour/UITour.jsm
browser/components/uitour/content-UITour.js
browser/components/uitour/test/browser_UITour.js
browser/components/uitour/test/browser_UITour_modalDialog.js
browser/components/uitour/test/browser_trackingProtection_tour.js
browser/experiments/Experiments.jsm
browser/experiments/ExperimentsService.js
browser/extensions/pocket/bootstrap.js
browser/extensions/pocket/content/panels/js/saved.js
browser/extensions/pocket/content/panels/js/signup.js
browser/modules/BrowserUITelemetry.jsm
browser/modules/CastingApps.jsm
browser/modules/ContentClick.jsm
browser/modules/ContentCrashHandlers.jsm
browser/modules/ContentSearch.jsm
browser/modules/ContentWebRTC.jsm
browser/modules/DirectoryLinksProvider.jsm
browser/modules/FormSubmitObserver.jsm
browser/modules/FormValidationHandler.jsm
browser/modules/HiddenFrame.jsm
browser/modules/NetworkPrioritizer.jsm
browser/modules/PluginContent.jsm
browser/modules/ProcessHangMonitor.jsm
browser/modules/SelfSupportBackend.jsm
browser/modules/SitePermissions.jsm
browser/modules/Social.jsm
browser/modules/SocialService.jsm
browser/modules/TransientPrefs.jsm
browser/modules/WindowsJumpLists.jsm
browser/modules/WindowsPreviewPerTab.jsm
browser/modules/test/browser_ContentSearch.js
browser/modules/test/browser_ProcessHangNotifications.js
browser/modules/test/browser_taskbar_preview.js
browser/modules/test/contentSearch.js
browser/modules/test/unit/social/head.js
browser/modules/test/unit/social/test_socialDisabledStartup.js
browser/modules/test/xpcshell/test_DirectoryLinksProvider.js
browser/modules/webrtcUI.jsm
browser/tools/mozscreenshots/mozscreenshots/extension/configurations/ControlCenter.jsm
storage/test/unit/head_storage.js
storage/test/unit/test_connection_executeSimpleSQLAsync.js
storage/test/unit/test_locale_collation.js
storage/test/unit/test_statement_executeAsync.js
storage/test/unit/test_statement_wrapper_automatically.js
storage/test/unit/test_storage_connection.js
storage/test/unit/test_vacuum.js
--- a/browser/base/content/aboutDialog-appUpdater.js
+++ b/browser/base/content/aboutDialog-appUpdater.js
@@ -362,17 +362,17 @@ appUpdater.prototype =
     case Components.results.NS_BINDING_ABORTED:
       // Do not remove UI listener since the user may resume downloading again.
       break;
     case Components.results.NS_OK:
       this.removeDownloadListener();
       if (this.backgroundUpdateEnabled) {
         this.selectPanel("applying");
         let self = this;
-        Services.obs.addObserver(function (aSubject, aTopic, aData) {
+        Services.obs.addObserver(function(aSubject, aTopic, aData) {
           // Update the UI when the background updater is finished
           let status = aData;
           if (status == "applied" || status == "applied-service" ||
               status == "pending" || status == "pending-service" ||
               status == "pending-elevate") {
             // If the update is successfully applied, or if the updater has
             // fallen back to non-staged updates, show the "Restart to Update"
             // button.
--- a/browser/base/content/aboutNetError.xhtml
+++ b/browser/base/content/aboutNetError.xhtml
@@ -179,24 +179,24 @@
           // error code link in the advanced panel.
           var div = document.getElementById("certificateErrorDebugInformation");
           div.style.display = "none";
         }
 
         document.getElementById("learnMoreContainer").style.display = "block";
 
         var checkbox = document.getElementById("automaticallyReportInFuture");
-        checkbox.addEventListener("change", function ({target: {checked}}) {
+        checkbox.addEventListener("change", function({target: {checked}}) {
           document.dispatchEvent(new CustomEvent("AboutNetErrorSetAutomatic", {
             detail: checked,
             bubbles: true
           }));
         });
 
-        addEventListener("AboutNetErrorOptions", function (event) {
+        addEventListener("AboutNetErrorOptions", function(event) {
           var options = JSON.parse(event.detail);
           if (options && options.enabled) {
             // Display error reporting UI
             document.getElementById("certificateErrorReporting").style.display = "block";
 
             // set the checkbox
             checkbox.checked = !!options.automatic;
           }
--- a/browser/base/content/aboutaccounts/aboutaccounts.js
+++ b/browser/base/content/aboutaccounts/aboutaccounts.js
@@ -100,17 +100,17 @@ function updateDisplayedEmail(user) {
   if (emailDiv && user) {
     emailDiv.textContent = user.email;
   }
 }
 
 var wrapper = {
   iframe: null,
 
-  init: function (url, urlParams) {
+  init: function(url, urlParams) {
     // If a master-password is enabled, we want to encourage the user to
     // unlock it.  Things still work if not, but the user will probably need
     // to re-auth next startup (in which case we will get here again and
     // re-prompt)
     Utils.ensureMPUnlocked();
 
     let iframe = document.getElementById("remote");
     this.iframe = iframe;
@@ -129,17 +129,17 @@ var wrapper = {
     this.url = url;
     // Set the iframe's location with loadURI/LOAD_FLAGS_REPLACE_HISTORY to
     // avoid having a new history entry being added. REPLACE_HISTORY is used
     // to replace the current entry, which is `about:blank`.
     let webNav = iframe.frameLoader.docShell.QueryInterface(Ci.nsIWebNavigation);
     webNav.loadURI(url, Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY, null, null, null);
   },
 
-  retry: function () {
+  retry: function() {
     let webNav = this.iframe.frameLoader.docShell.QueryInterface(Ci.nsIWebNavigation);
     webNav.loadURI(this.url, Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY, null, null, null);
   },
 
   iframeListener: {
     QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
                                          Ci.nsISupportsWeakReference,
                                          Ci.nsISupports]),
@@ -175,17 +175,17 @@ var wrapper = {
       }
     },
 
     onProgressChange: function() {},
     onStatusChange: function() {},
     onSecurityChange: function() {},
   },
 
-  handleEvent: function (evt) {
+  handleEvent: function(evt) {
     switch (evt.type) {
       case "load":
         this.iframe.contentWindow.addEventListener("FirefoxAccountsCommand", this);
         this.iframe.removeEventListener("load", this);
         break;
       case "FirefoxAccountsCommand":
         this.handleRemoteCommand(evt);
         break;
@@ -193,17 +193,17 @@ var wrapper = {
   },
 
   /**
    * onLogin handler receives user credentials from the jelly after a
    * sucessful login and stores it in the fxaccounts service
    *
    * @param accountData the user's account data and credentials
    */
-  onLogin: function (accountData) {
+  onLogin: function(accountData) {
     log("Received: 'login'. Data:" + JSON.stringify(accountData));
 
     if (accountData.customizeSync) {
       Services.prefs.setBoolPref(PREF_SYNC_SHOW_CUSTOMIZATION, true);
     }
     delete accountData.customizeSync;
     // sessionTokenContext is erroneously sent by the content server.
     // https://github.com/mozilla/fxa-content-server/issues/2766
@@ -259,26 +259,26 @@ var wrapper = {
     // We need to confirm a relink - see shouldAllowRelink for more
     let ok = shouldAllowRelink(accountData.email);
     this.injectData("message", { status: "can_link_account", data: { ok: ok } });
   },
 
   /**
    * onSignOut handler erases the current user's session from the fxaccounts service
    */
-  onSignOut: function () {
+  onSignOut: function() {
     log("Received: 'sign_out'.");
 
     fxAccounts.signOut().then(
       () => this.injectData("message", { status: "sign_out" }),
       (err) => this.injectData("message", { status: "error", error: err })
     );
   },
 
-  handleRemoteCommand: function (evt) {
+  handleRemoteCommand: function(evt) {
     log('command: ' + evt.detail.command);
     let data = evt.detail.data;
 
     switch (evt.detail.command) {
       case "login":
         this.onLogin(data);
         break;
       case "can_link_account":
@@ -288,17 +288,17 @@ var wrapper = {
         this.onSignOut(data);
         break;
       default:
         log("Unexpected remote command received: " + evt.detail.command + ". Ignoring command.");
         break;
     }
   },
 
-  injectData: function (type, content) {
+  injectData: function(type, content) {
     return fxAccounts.promiseAccountsSignUpURI().then(authUrl => {
       let data = {
         type: type,
         content: content
       };
       this.iframe.contentWindow.postMessage(data, authUrl);
     })
     .catch(e => {
--- a/browser/base/content/abouthealthreport/abouthealth.js
+++ b/browser/base/content/abouthealthreport/abouthealth.js
@@ -10,111 +10,111 @@ Cu.import("resource://gre/modules/Prefer
 Cu.import("resource://gre/modules/Services.jsm");
 
 const prefs = new Preferences("datareporting.healthreport.");
 
 const PREF_UNIFIED = "toolkit.telemetry.unified";
 const PREF_REPORTING_URL = "datareporting.healthreport.about.reportUrl";
 
 var healthReportWrapper = {
-  init: function () {
+  init: function() {
     let iframe = document.getElementById("remote-report");
     iframe.addEventListener("load", healthReportWrapper.initRemotePage, false);
     iframe.src = this._getReportURI().spec;
     prefs.observe("uploadEnabled", this.updatePrefState, healthReportWrapper);
   },
 
-  uninit: function () {
+  uninit: function() {
     prefs.ignore("uploadEnabled", this.updatePrefState, healthReportWrapper);
   },
 
-  _getReportURI: function () {
+  _getReportURI: function() {
     let url = Services.urlFormatter.formatURLPref(PREF_REPORTING_URL);
     return Services.io.newURI(url, null, null);
   },
 
-  setDataSubmission: function (enabled) {
+  setDataSubmission: function(enabled) {
     MozSelfSupport.healthReportDataSubmissionEnabled = enabled;
     this.updatePrefState();
   },
 
-  updatePrefState: function () {
+  updatePrefState: function() {
     try {
       let prefs = {
         enabled: MozSelfSupport.healthReportDataSubmissionEnabled,
       };
       healthReportWrapper.injectData("prefs", prefs);
     }
     catch (ex) {
       healthReportWrapper.reportFailure(healthReportWrapper.ERROR_PREFS_FAILED);
     }
   },
 
-  sendTelemetryPingList: function () {
+  sendTelemetryPingList: function() {
     console.log("AboutHealthReport: Collecting Telemetry ping list.");
     MozSelfSupport.getTelemetryPingList().then((list) => {
       console.log("AboutHealthReport: Sending Telemetry ping list.");
       this.injectData("telemetry-ping-list", list);
     }).catch((ex) => {
       console.log("AboutHealthReport: Collecting ping list failed: " + ex);
     });
   },
 
-  sendTelemetryPingData: function (pingId) {
+  sendTelemetryPingData: function(pingId) {
     console.log("AboutHealthReport: Collecting Telemetry ping data.");
     MozSelfSupport.getTelemetryPing(pingId).then((ping) => {
       console.log("AboutHealthReport: Sending Telemetry ping data.");
       this.injectData("telemetry-ping-data", {
         id: pingId,
         pingData: ping,
       });
     }).catch((ex) => {
       console.log("AboutHealthReport: Loading ping data failed: " + ex);
       this.injectData("telemetry-ping-data", {
         id: pingId,
         error: "error-generic",
       });
     });
   },
 
-  sendCurrentEnvironment: function () {
+  sendCurrentEnvironment: function() {
     console.log("AboutHealthReport: Sending Telemetry environment data.");
     MozSelfSupport.getCurrentTelemetryEnvironment().then((environment) => {
       this.injectData("telemetry-current-environment-data", environment);
     }).catch((ex) => {
       console.log("AboutHealthReport: Collecting current environment data failed: " + ex);
     });
   },
 
-  sendCurrentPingData: function () {
+  sendCurrentPingData: function() {
     console.log("AboutHealthReport: Sending current Telemetry ping data.");
     MozSelfSupport.getCurrentTelemetrySubsessionPing().then((ping) => {
       this.injectData("telemetry-current-ping-data", ping);
     }).catch((ex) => {
       console.log("AboutHealthReport: Collecting current ping data failed: " + ex);
     });
   },
 
-  injectData: function (type, content) {
+  injectData: function(type, content) {
     let report = this._getReportURI();
 
     // file URIs can't be used for targetOrigin, so we use "*" for this special case
     // in all other cases, pass in the URL to the report so we properly restrict the message dispatch
     let reportUrl = report.scheme == "file" ? "*" : report.spec;
 
     let data = {
       type: type,
       content: content
     }
 
     let iframe = document.getElementById("remote-report");
     iframe.contentWindow.postMessage(data, reportUrl);
   },
 
-  handleRemoteCommand: function (evt) {
+  handleRemoteCommand: function(evt) {
     // Do an origin check to harden against the frame content being loaded from unexpected locations.
     let allowedPrincipal = Services.scriptSecurityManager.getCodebasePrincipal(this._getReportURI());
     let targetPrincipal = evt.target.nodePrincipal;
     if (!allowedPrincipal.equals(targetPrincipal)) {
       Cu.reportError(`Origin check failed for message "${evt.detail.command}": ` +
                      `target origin is "${targetPrincipal.origin}", expected "${allowedPrincipal.origin}"`);
       return;
     }
@@ -142,39 +142,39 @@ var healthReportWrapper = {
         this.sendCurrentPingData();
         break;
       default:
         Cu.reportError("Unexpected remote command received: " + evt.detail.command + ". Ignoring command.");
         break;
     }
   },
 
-  initRemotePage: function () {
+  initRemotePage: function() {
     let iframe = document.getElementById("remote-report").contentDocument;
     iframe.addEventListener("RemoteHealthReportCommand",
                             function onCommand(e) { healthReportWrapper.handleRemoteCommand(e); },
                             false);
     healthReportWrapper.updatePrefState();
   },
 
   // error handling
   ERROR_INIT_FAILED:    1,
   ERROR_PAYLOAD_FAILED: 2,
   ERROR_PREFS_FAILED:   3,
 
-  reportFailure: function (error) {
+  reportFailure: function(error) {
     let details = {
       errorType: error,
     }
     healthReportWrapper.injectData("error", details);
   },
 
-  handleInitFailure: function () {
+  handleInitFailure: function() {
     healthReportWrapper.reportFailure(healthReportWrapper.ERROR_INIT_FAILED);
   },
 
-  handlePayloadFailure: function () {
+  handlePayloadFailure: function() {
     healthReportWrapper.reportFailure(healthReportWrapper.ERROR_PAYLOAD_FAILED);
   },
 }
 
-window.addEventListener("load", function () { healthReportWrapper.init(); });
-window.addEventListener("unload", function () { healthReportWrapper.uninit(); });
+window.addEventListener("load", function() { healthReportWrapper.init(); });
+window.addEventListener("unload", function() { healthReportWrapper.uninit(); });
--- a/browser/base/content/abouthome/aboutHome.js
+++ b/browser/base/content/abouthome/aboutHome.js
@@ -22,33 +22,33 @@ const SNIPPETS_UPDATE_INTERVAL_MS = 1440
 const DATABASE_NAME = "abouthome";
 const DATABASE_VERSION = 1;
 const DATABASE_STORAGE = "persistent";
 const SNIPPETS_OBJECTSTORE_NAME = "snippets";
 var searchText;
 
 // This global tracks if the page has been set up before, to prevent double inits
 var gInitialized = false;
-var gObserver = new MutationObserver(function (mutations) {
+var gObserver = new MutationObserver(function(mutations) {
   for (let mutation of mutations) {
     // The addition of the restore session button changes our width:
     if (mutation.attributeName == "session") {
       fitToWidth();
     }
     if (mutation.attributeName == "snippetsVersion") {
       if (!gInitialized) {
         ensureSnippetsMapThen(loadSnippets);
         gInitialized = true;
       }
       return;
     }
   }
 });
 
-window.addEventListener("pageshow", function () {
+window.addEventListener("pageshow", function() {
   // Delay search engine setup, cause browser.js::BrowserOnAboutPageLoad runs
   // later and may use asynchronous getters.
   window.gObserver.observe(document.documentElement, { attributes: true });
   window.gObserver.observe(document.getElementById("launcher"), { attributes: true });
   fitToWidth();
   setupSearch();
   window.addEventListener("resize", fitToWidth);
 
@@ -113,96 +113,96 @@ function ensureSnippetsMapThen(aCallback
 
   // Handle multiple requests during the async initialization.
   gSnippetsMapCallbacks.push(aCallback);
   if (gSnippetsMapCallbacks.length > 1) {
     // We are already updating, the callbacks will be invoked when done.
     return;
   }
 
-  let invokeCallbacks = function () {
+  let invokeCallbacks = function() {
     if (!gSnippetsMap) {
       gSnippetsMap = Object.freeze(new Map());
     }
 
     for (let callback of gSnippetsMapCallbacks) {
       callback(gSnippetsMap);
     }
     gSnippetsMapCallbacks.length = 0;
   }
 
   let openRequest = indexedDB.open(DATABASE_NAME, {version: DATABASE_VERSION,
                                                    storage: DATABASE_STORAGE});
 
-  openRequest.onerror = function (event) {
+  openRequest.onerror = function(event) {
     // Try to delete the old database so that we can start this process over
     // next time.
     indexedDB.deleteDatabase(DATABASE_NAME);
     invokeCallbacks();
   };
 
-  openRequest.onupgradeneeded = function (event) {
+  openRequest.onupgradeneeded = function(event) {
     let db = event.target.result;
     if (!db.objectStoreNames.contains(SNIPPETS_OBJECTSTORE_NAME)) {
       db.createObjectStore(SNIPPETS_OBJECTSTORE_NAME);
     }
   }
 
-  openRequest.onsuccess = function (event) {
+  openRequest.onsuccess = function(event) {
     let db = event.target.result;
 
-    db.onerror = function (event) {
+    db.onerror = function(event) {
       invokeCallbacks();
     }
 
-    db.onversionchange = function (event) {
+    db.onversionchange = function(event) {
       event.target.close();
       invokeCallbacks();
     }
 
     let cache = new Map();
     let cursorRequest;
     try {
       cursorRequest = db.transaction(SNIPPETS_OBJECTSTORE_NAME)
                         .objectStore(SNIPPETS_OBJECTSTORE_NAME).openCursor();
     } catch (ex) {
       console.error(ex);
       invokeCallbacks();
       return;
     }
 
-    cursorRequest.onerror = function (event) {
+    cursorRequest.onerror = function(event) {
       invokeCallbacks();
     }
 
     cursorRequest.onsuccess = function(event) {
       let cursor = event.target.result;
 
       // Populate the cache from the persistent storage.
       if (cursor) {
         cache.set(cursor.key, cursor.value);
         cursor.continue();
         return;
       }
 
       // The cache has been filled up, create the snippets map.
       gSnippetsMap = Object.freeze({
         get: (aKey) => cache.get(aKey),
-        set: function (aKey, aValue) {
+        set: function(aKey, aValue) {
           db.transaction(SNIPPETS_OBJECTSTORE_NAME, "readwrite")
             .objectStore(SNIPPETS_OBJECTSTORE_NAME).put(aValue, aKey);
           return cache.set(aKey, aValue);
         },
         has: (aKey) => cache.has(aKey),
-        delete: function (aKey) {
+        delete: function(aKey) {
           db.transaction(SNIPPETS_OBJECTSTORE_NAME, "readwrite")
             .objectStore(SNIPPETS_OBJECTSTORE_NAME).delete(aKey);
           return cache.delete(aKey);
         },
-        clear: function () {
+        clear: function() {
           db.transaction(SNIPPETS_OBJECTSTORE_NAME, "readwrite")
             .objectStore(SNIPPETS_OBJECTSTORE_NAME).clear();
           return cache.clear();
         },
         get size() { return cache.size; },
       });
 
       setTimeout(invokeCallbacks, 0);
@@ -278,17 +278,17 @@ function loadSnippets()
                      Date.now() - lastUpdate > SNIPPETS_UPDATE_INTERVAL_MS;
   if (updateURL && shouldUpdate) {
     // Try to update from network.
     let xhr = new XMLHttpRequest();
     xhr.timeout = 5000;
     // Even if fetching should fail we don't want to spam the server, thus
     // set the last update time regardless its results.  Will retry tomorrow.
     gSnippetsMap.set("snippets-last-update", Date.now());
-    xhr.onloadend = function (event) {
+    xhr.onloadend = function(event) {
       if (xhr.status == 200) {
         gSnippetsMap.set("snippets", xhr.responseText);
         gSnippetsMap.set("snippets-cached-version", currentVersion);
       }
       showSnippets();
       loadCompleted();
     };
     try {
--- a/browser/base/content/browser-addons.js
+++ b/browser/base/content/browser-addons.js
@@ -25,32 +25,32 @@ function removeNotificationOnEnd(notific
       onDownloadFailed: maybeRemove,
       onInstallFailed: maybeRemove,
       onInstallEnded: maybeRemove
     });
   }
 }
 
 const gXPInstallObserver = {
-  _findChildShell: function (aDocShell, aSoughtShell)
+  _findChildShell: function(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: function (aDocShell)
+  _getBrowser: function(aDocShell)
   {
     for (let browser of gBrowser.browsers) {
       if (this._findChildShell(browser.docShell, aDocShell))
         return browser;
     }
     return null;
   },
 
@@ -209,17 +209,17 @@ const gXPInstallObserver = {
 
     removeNotificationOnEnd(popup, installInfo.installs);
 
     Services.telemetry
             .getHistogramById("SECURITY_UI")
             .add(Ci.nsISecurityUITelemetry.WARNING_CONFIRM_ADDON_INSTALL);
   },
 
-  observe: function (aSubject, aTopic, aData)
+  observe: function(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;
@@ -437,24 +437,24 @@ const gXPInstallObserver = {
   _removeProgressNotification(aBrowser) {
     let notification = PopupNotifications.getNotification("addon-progress", aBrowser);
     if (notification)
       notification.remove();
   }
 };
 
 var LightWeightThemeWebInstaller = {
-  init: function () {
+  init: function() {
     let mm = window.messageManager;
     mm.addMessageListener("LightWeightThemeWebInstaller:Install", this);
     mm.addMessageListener("LightWeightThemeWebInstaller:Preview", this);
     mm.addMessageListener("LightWeightThemeWebInstaller:ResetPreview", this);
   },
 
-  receiveMessage: function (message) {
+  receiveMessage: function(message) {
     // ignore requests from background tabs
     if (message.target != gBrowser.selectedBrowser) {
       return;
     }
 
     let data = message.data;
 
     switch (message.name) {
@@ -468,33 +468,33 @@ var LightWeightThemeWebInstaller = {
       }
       case "LightWeightThemeWebInstaller:ResetPreview": {
         this._resetPreview(data && data.baseURI);
         break;
       }
     }
   },
 
-  handleEvent: function (event) {
+  handleEvent: function(event) {
     switch (event.type) {
       case "TabSelect": {
         this._resetPreview();
         break;
       }
     }
   },
 
-  get _manager () {
+  get _manager() {
     let temp = {};
     Cu.import("resource://gre/modules/LightweightThemeManager.jsm", temp);
     delete this._manager;
     return this._manager = temp.LightweightThemeManager;
   },
 
-  _installRequest: function (dataString, baseURI) {
+  _installRequest: function(dataString, baseURI) {
     let data = this._manager.parseTheme(dataString, baseURI);
 
     if (!data) {
       return;
     }
 
     let uri = makeURI(baseURI);
 
@@ -525,47 +525,47 @@ var LightWeightThemeWebInstaller = {
     let allowButtonAccesskey =
       gNavigatorBundle.getString("lwthemeInstallRequest.allowButton.accesskey");
     let message =
       gNavigatorBundle.getFormattedString("lwthemeInstallRequest.message",
                                           [uri.host]);
     let buttons = [{
       label: allowButtonText,
       accessKey: allowButtonAccesskey,
-      callback: function () {
+      callback: function() {
         LightWeightThemeWebInstaller._install(data, notify);
       }
     }];
 
     this._removePreviousNotifications();
 
     let notificationBox = gBrowser.getNotificationBox();
     let notificationBar =
       notificationBox.appendNotification(message, "lwtheme-install-request", "",
                                          notificationBox.PRIORITY_INFO_MEDIUM,
                                          buttons);
     notificationBar.persistence = 1;
   },
 
-  _install: function (newLWTheme, notify) {
+  _install: function(newLWTheme, notify) {
     let previousLWTheme = this._manager.currentTheme;
 
     let listener = {
       onEnabling: function(aAddon, aRequiresRestart) {
         if (!aRequiresRestart) {
           return;
         }
 
         let messageString = gNavigatorBundle.getFormattedString("lwthemeNeedsRestart.message",
           [aAddon.name], 1);
 
         let action = {
           label: gNavigatorBundle.getString("lwthemeNeedsRestart.button"),
           accessKey: gNavigatorBundle.getString("lwthemeNeedsRestart.accesskey"),
-          callback: function () {
+          callback: function() {
             BrowserUtils.restartApplication();
           }
         };
 
         let options = {
           timeout: Date.now() + 30000
         };
 
@@ -581,80 +581,80 @@ var LightWeightThemeWebInstaller = {
       }
     };
 
     AddonManager.addAddonListener(listener);
     this._manager.currentTheme = newLWTheme;
     AddonManager.removeAddonListener(listener);
   },
 
-  _postInstallNotification: function (newTheme, previousTheme) {
+  _postInstallNotification: function(newTheme, previousTheme) {
     function text(id) {
       return gNavigatorBundle.getString("lwthemePostInstallNotification." + id);
     }
 
     let buttons = [{
       label: text("undoButton"),
       accessKey: text("undoButton.accesskey"),
-      callback: function () {
+      callback: function() {
         LightWeightThemeWebInstaller._manager.forgetUsedTheme(newTheme.id);
         LightWeightThemeWebInstaller._manager.currentTheme = previousTheme;
       }
     }, {
       label: text("manageButton"),
       accessKey: text("manageButton.accesskey"),
-      callback: function () {
+      callback: function() {
         BrowserOpenAddonsMgr("addons://list/theme");
       }
     }];
 
     this._removePreviousNotifications();
 
     let notificationBox = gBrowser.getNotificationBox();
     let notificationBar =
       notificationBox.appendNotification(text("message"),
                                          "lwtheme-install-notification", "",
                                          notificationBox.PRIORITY_INFO_MEDIUM,
                                          buttons);
     notificationBar.persistence = 1;
     notificationBar.timeout = Date.now() + 20000; // 20 seconds
   },
 
-  _removePreviousNotifications: function () {
+  _removePreviousNotifications: function() {
     let box = gBrowser.getNotificationBox();
 
     ["lwtheme-install-request",
-     "lwtheme-install-notification"].forEach(function (value) {
+     "lwtheme-install-notification"].forEach(function(value) {
         let notification = box.getNotificationWithValue(value);
         if (notification)
           box.removeNotification(notification);
       });
   },
 
-  _preview: function (dataString, baseURI) {
+  _preview: function(dataString, baseURI) {
     if (!this._isAllowed(baseURI))
       return;
 
     let data = this._manager.parseTheme(dataString, baseURI);
     if (!data)
       return;
 
     this._resetPreview();
     gBrowser.tabContainer.addEventListener("TabSelect", this, false);
     this._manager.previewTheme(data);
   },
 
-  _resetPreview: function (baseURI) {
+  _resetPreview: function(baseURI) {
     if (baseURI && !this._isAllowed(baseURI))
       return;
     gBrowser.tabContainer.removeEventListener("TabSelect", this, false);
     this._manager.resetPreview();
   },
 
-  _isAllowed: function (srcURIString) {
+  _isAllowed: function(srcURIString) {
     let uri;
     try {
       uri = makeURI(srcURIString);
     }
     catch (e) {
       // makeURI fails if srcURIString is a nonsense URI
       return false;
     }
@@ -669,33 +669,33 @@ var LightWeightThemeWebInstaller = {
 };
 
 /*
  * Listen for Lightweight Theme styling changes and update the browser's theme accordingly.
  */
 var LightweightThemeListener = {
   _modifiedStyles: [],
 
-  init: function () {
+  init: function() {
     XPCOMUtils.defineLazyGetter(this, "styleSheet", function() {
       for (let i = document.styleSheets.length - 1; i >= 0; i--) {
         let sheet = document.styleSheets[i];
         if (sheet.href == "chrome://browser/skin/browser-lightweightTheme.css")
           return sheet;
       }
       return undefined;
     });
 
     Services.obs.addObserver(this, "lightweight-theme-styling-update", false);
     Services.obs.addObserver(this, "lightweight-theme-optimized", false);
     if (document.documentElement.hasAttribute("lwtheme"))
       this.updateStyleSheet(document.documentElement.style.backgroundImage);
   },
 
-  uninit: function () {
+  uninit: function() {
     Services.obs.removeObserver(this, "lightweight-theme-styling-update");
     Services.obs.removeObserver(this, "lightweight-theme-optimized");
   },
 
   /**
    * Append the headerImage to the background-image property of all rulesets in
    * browser-lightweightTheme.css.
    *
@@ -726,17 +726,17 @@ var LightweightThemeListener = {
       } else {
         Cu.reportError("Unsupported rule encountered");
       }
     }
     return styleRulesModified;
   },
 
   // nsIObserver
-  observe: function (aSubject, aTopic, aData) {
+  observe: function(aSubject, aTopic, aData) {
     if ((aTopic != "lightweight-theme-styling-update" && aTopic != "lightweight-theme-optimized") ||
           !this.styleSheet)
       return;
 
     if (aTopic == "lightweight-theme-optimized" && aSubject != window)
       return;
 
     let themeData = JSON.parse(aData);
--- a/browser/base/content/browser-ctrlTab.js
+++ b/browser/base/content/browser-ctrlTab.js
@@ -43,17 +43,17 @@ var tabPreviews = {
   },
 
   capture: function tabPreviews_capture(aTab, aShouldCache) {
     let browser = aTab.linkedBrowser;
     let uri = browser.currentURI.spec;
     let canvas = PageThumbs.createCanvas(window);
     PageThumbs.shouldStoreThumbnail(browser, (aDoStore) => {
       if (aDoStore && aShouldCache) {
-        PageThumbs.captureAndStore(browser, function () {
+        PageThumbs.captureAndStore(browser, function() {
           let img = new Image;
           img.src = PageThumbs.getThumbnailURL(uri);
           aTab.__thumbnail = img;
           aTab.__thumbnail_lastURI = uri;
           canvas.getContext("2d").drawImage(img, 0, 0);
         });
       } else {
         PageThumbs.captureToCanvas(browser, canvas, () => {
@@ -73,17 +73,17 @@ var tabPreviews = {
         if (this._selectedTab &&
             this._selectedTab.parentNode &&
             !this._pendingUpdate) {
           // Generate a thumbnail for the tab that was selected.
           // The timeout keeps the UI snappy and prevents us from generating thumbnails
           // for tabs that will be closed. During that timeout, don't generate other
           // thumbnails in case multiple TabSelect events occur fast in succession.
           this._pendingUpdate = true;
-          setTimeout(function (self, aTab) {
+          setTimeout(function(self, aTab) {
             self._pendingUpdate = false;
             if (aTab.parentNode &&
                 !aTab.hasAttribute("busy") &&
                 !aTab.hasAttribute("pending"))
               self.capture(aTab, true);
           }, 2000, this, this._selectedTab);
         }
         this._selectedTab = event.target;
@@ -91,39 +91,39 @@ var tabPreviews = {
       case "SSTabRestored":
         this.capture(event.target, true);
         break;
     }
   }
 };
 
 var tabPreviewPanelHelper = {
-  opening: function (host) {
+  opening: function(host) {
     host.panel.hidden = false;
 
     var handler = this._generateHandler(host);
     host.panel.addEventListener("popupshown", handler, false);
     host.panel.addEventListener("popuphiding", handler, false);
 
     host._prevFocus = document.commandDispatcher.focusedElement;
   },
-  _generateHandler: function (host) {
+  _generateHandler: function(host) {
     var self = this;
-    return function (event) {
+    return function(event) {
       if (event.target == host.panel) {
         host.panel.removeEventListener(event.type, arguments.callee, false);
         self["_" + event.type](host);
       }
     };
   },
-  _popupshown: function (host) {
+  _popupshown: function(host) {
     if ("setupGUI" in host)
       host.setupGUI();
   },
-  _popuphiding: function (host) {
+  _popuphiding: function(host) {
     if ("suspendGUI" in host)
       host.suspendGUI();
 
     if (host._prevFocus) {
       Services.focus.setFocus(host._prevFocus, Ci.nsIFocusManager.FLAG_NOSCROLL);
       host._prevFocus = null;
     } else
       gBrowser.selectedBrowser.focus();
@@ -134,67 +134,67 @@ var tabPreviewPanelHelper = {
     }
   }
 };
 
 /**
  * Ctrl-Tab panel
  */
 var ctrlTab = {
-  get panel () {
+  get panel() {
     delete this.panel;
     return this.panel = document.getElementById("ctrlTab-panel");
   },
-  get showAllButton () {
+  get showAllButton() {
     delete this.showAllButton;
     return this.showAllButton = document.getElementById("ctrlTab-showAll");
   },
-  get previews () {
+  get previews() {
     delete this.previews;
     return this.previews = this.panel.getElementsByClassName("ctrlTab-preview");
   },
-  get maxTabPreviews () {
+  get maxTabPreviews() {
     delete this.maxTabPreviews;
     return this.maxTabPreviews = this.previews.length - 1;
   },
-  get canvasWidth () {
+  get canvasWidth() {
     delete this.canvasWidth;
     return this.canvasWidth = Math.ceil(screen.availWidth * .85 / this.maxTabPreviews);
   },
-  get canvasHeight () {
+  get canvasHeight() {
     delete this.canvasHeight;
     return this.canvasHeight = Math.round(this.canvasWidth * tabPreviews.aspectRatio);
   },
-  get keys () {
+  get keys() {
     var keys = {};
-    ["close", "find", "selectAll"].forEach(function (key) {
+    ["close", "find", "selectAll"].forEach(function(key) {
       keys[key] = document.getElementById("key_" + key)
                           .getAttribute("key")
                           .toLocaleLowerCase().charCodeAt(0);
     });
     delete this.keys;
     return this.keys = keys;
   },
   _selectedIndex: 0,
-  get selected () {
+  get selected() {
     return this._selectedIndex < 0 ?
              document.activeElement :
              this.previews.item(this._selectedIndex);
   },
-  get isOpen () {
+  get isOpen() {
     return this.panel.state == "open" || this.panel.state == "showing" || this._timer;
   },
-  get tabCount () {
+  get tabCount() {
     return this.tabList.length;
   },
-  get tabPreviewCount () {
+  get tabPreviewCount() {
     return Math.min(this.maxTabPreviews, this.tabCount);
   },
 
-  get tabList () {
+  get tabList() {
     return this._recentlyUsedTabs;
   },
 
   init: function ctrlTab_init() {
     if (!this._recentlyUsedTabs) {
       tabPreviews.init();
 
       this._initRecentlyUsedTabs();
@@ -214,17 +214,17 @@ var ctrlTab = {
       (!gPrefService.prefHasUserValue("browser.ctrlTab.disallowForScreenReaders") ||
        !gPrefService.getBoolPref("browser.ctrlTab.disallowForScreenReaders"));
 
     if (enable)
       this.init();
     else
       this.uninit();
   },
-  observe: function (aSubject, aTopic, aPrefName) {
+  observe: function(aSubject, aTopic, aPrefName) {
     this.readPref();
   },
 
   updatePreviews: function ctrlTab_updatePreviews() {
     for (let i = 0; i < this.previews.length; i++)
       this.updatePreview(this.previews[i], this.tabList[i]);
 
     var showAllLabel = gNavigatorBundle.getString("ctrlTab.listAllTabs.label");
@@ -342,17 +342,17 @@ var ctrlTab = {
 
     document.addEventListener("keyup", this, true);
 
     this.updatePreviews();
     this._selectedIndex = 1;
 
     // Add a slight delay before showing the UI, so that a quick
     // "ctrl-tab" keypress just flips back to the MRU tab.
-    this._timer = setTimeout(function (self) {
+    this._timer = setTimeout(function(self) {
       self._timer = null;
       self._openPanel();
     }, 200, this);
   },
 
   _openPanel: function ctrlTab_openPanel() {
     tabPreviewPanelHelper.opening(this);
 
@@ -383,17 +383,17 @@ var ctrlTab = {
 
   setupGUI: function ctrlTab_setupGUI() {
     this.selected.focus();
     this._selectedIndex = -1;
 
     // Track mouse movement after a brief delay so that the item that happens
     // to be under the mouse pointer initially won't be selected unintentionally.
     this._trackMouseOver = false;
-    setTimeout(function (self) {
+    setTimeout(function(self) {
       if (self.isOpen)
         self._trackMouseOver = true;
     }, 0, this);
   },
 
   suspendGUI: function ctrlTab_suspendGUI() {
     document.removeEventListener("keyup", this, true);
 
@@ -457,17 +457,17 @@ var ctrlTab = {
 
     if (this.selected.hidden)
       this.advanceFocus(false);
     if (this.selected == this.showAllButton)
       this.advanceFocus(false);
 
     // If the current tab is removed, another tab can steal our focus.
     if (aTab.selected && this.panel.state == "open") {
-      setTimeout(function (selected) {
+      setTimeout(function(selected) {
         selected.focus();
       }, 0, this.selected);
     }
   },
 
   handleEvent: function ctrlTab_handleEvent(event) {
     switch (event.type) {
       case "SSWindowRestored":
@@ -503,31 +503,31 @@ var ctrlTab = {
         break;
       case "popupshowing":
         if (event.target.id == "menu_viewPopup")
           document.getElementById("menu_showAllTabs").hidden = !allTabs.canOpen;
         break;
     }
   },
 
-  filterForThumbnailExpiration: function (aCallback) {
+  filterForThumbnailExpiration: function(aCallback) {
     // Save a few more thumbnails than we actually display, so that when tabs
     // are closed, the previews we add instead still get thumbnails.
     const extraThumbnails = 3;
     const thumbnailCount = Math.min(this.tabPreviewCount + extraThumbnails,
                                     this.tabCount);
 
     let urls = [];
     for (let i = 0; i < thumbnailCount; i++)
       urls.push(this.tabList[i].linkedBrowser.currentURI.spec);
 
     aCallback(urls);
   },
 
-  _initRecentlyUsedTabs: function () {
+  _initRecentlyUsedTabs: function() {
     this._recentlyUsedTabs =
       Array.filter(gBrowser.tabs, tab => !tab.closing)
            .sort((tab1, tab2) => tab2.lastAccessed - tab1.lastAccessed);
   },
 
   _init: function ctrlTab__init(enable) {
     var toggleEventListener = enable ? "addEventListener" : "removeEventListener";
 
--- a/browser/base/content/browser-data-submission-info-bar.js
+++ b/browser/base/content/browser-data-submission-info-bar.js
@@ -34,21 +34,21 @@ var gDataNotificationInfoBar = {
       }
     }, false);
 
     for (let o of this._OBSERVERS) {
       Services.obs.addObserver(this, o, true);
     }
   },
 
-  _getDataReportingNotification: function (name = this._DATA_REPORTING_NOTIFICATION) {
+  _getDataReportingNotification: function(name = this._DATA_REPORTING_NOTIFICATION) {
     return this._notificationBox.getNotificationWithValue(name);
   },
 
-  _displayDataPolicyInfoBar: function (request) {
+  _displayDataPolicyInfoBar: function(request) {
     if (this._getDataReportingNotification()) {
       return;
     }
 
     let brandBundle = document.getElementById("bundle_brand");
     let appName = brandBundle.getString("brandShortName");
     let vendorName = brandBundle.getString("vendorShortName");
 
@@ -83,17 +83,17 @@ var gDataNotificationInfoBar = {
     );
     // It is important to defer calling onUserNotifyComplete() until we're
     // actually sure the notification was displayed. If we ever called
     // onUserNotifyComplete() without showing anything to the user, that
     // would be very good for user choice. It may also have legal impact.
     request.onUserNotifyComplete();
   },
 
-  _clearPolicyNotification: function () {
+  _clearPolicyNotification: function() {
     let notification = this._getDataReportingNotification();
     if (notification) {
       this._log.debug("Closing notification.");
       notification.close();
     }
   },
 
   observe: function(subject, topic, data) {
--- a/browser/base/content/browser-devedition.js
+++ b/browser/base/content/browser-devedition.js
@@ -16,17 +16,17 @@ var DevEdition = {
     return this.styleSheet && !this.styleSheet.sheet.disabled;
   },
 
   get isThemeCurrentlyApplied() {
     let theme = LightweightThemeManager.currentTheme;
     return theme && theme.id == "firefox-devedition@mozilla.org";
   },
 
-  init: function () {
+  init: function() {
     this.initialized = true;
     Services.prefs.addObserver(this._devtoolsThemePrefName, this, false);
     Services.obs.addObserver(this, "lightweight-theme-styling-update", false);
     Services.obs.addObserver(this, "lightweight-theme-window-updated", false);
     this._updateDevtoolsThemeAttribute();
 
     if (this.isThemeCurrentlyApplied) {
       this._toggleStyleSheet(true);
@@ -37,17 +37,17 @@ var DevEdition = {
     let styleSheetAttr = `href="${this.styleSheetLocation}" type="text/css"`;
     this.styleSheet = document.createProcessingInstruction(
       "xml-stylesheet", styleSheetAttr);
     this.styleSheet.addEventListener("load", this);
     document.insertBefore(this.styleSheet, document.documentElement);
     this.styleSheet.sheet.disabled = true;
   },
 
-  observe: function (subject, topic, data) {
+  observe: function(subject, topic, data) {
     if (topic == "lightweight-theme-styling-update") {
       let newTheme = JSON.parse(data);
       if (newTheme && newTheme.id == "firefox-devedition@mozilla.org") {
         this._toggleStyleSheet(true);
       } else {
         this._toggleStyleSheet(false);
       }
     } else if (topic == "lightweight-theme-window-updated" && subject == window) {
@@ -117,17 +117,17 @@ var DevEdition = {
       this.styleSheet.sheet.disabled = false;
       this.refreshBrowserDisplay();
     } else if (!deveditionThemeEnabled && wasEnabled) {
       this.styleSheet.sheet.disabled = true;
       this.refreshBrowserDisplay();
     }
   },
 
-  uninit: function () {
+  uninit: function() {
     Services.prefs.removeObserver(this._devtoolsThemePrefName, this);
     Services.obs.removeObserver(this, "lightweight-theme-styling-update", false);
     Services.obs.removeObserver(this, "lightweight-theme-window-updated", false);
     if (this.styleSheet) {
       this.styleSheet.removeEventListener("load", this);
     }
     this.styleSheet = null;
   }
--- a/browser/base/content/browser-fullScreenAndPointerLock.js
+++ b/browser/base/content/browser-fullScreenAndPointerLock.js
@@ -272,17 +272,17 @@ var FullScreen = {
 
   uninit: function() {
     for (let type of this._MESSAGES) {
       window.messageManager.removeMessageListener(type, this);
     }
     this.cleanup();
   },
 
-  toggle: function () {
+  toggle: function() {
     var enterFS = window.fullScreen;
 
     // Toggle the View:FullScreen command, which controls elements like the
     // fullscreen menuitem, and menubars.
     let fullscreenCommand = document.getElementById("View:FullScreen");
     if (enterFS) {
       fullscreenCommand.setAttribute("checked", enterFS);
     } else {
@@ -341,17 +341,17 @@ var FullScreen = {
                         .add(1);
     }
   },
 
   exitDomFullScreen : function() {
     document.exitFullscreen();
   },
 
-  handleEvent: function (event) {
+  handleEvent: function(event) {
     switch (event.type) {
       case "fullscreen":
         this.toggle();
         break;
       case "MozDOMFullscreen:Entered": {
         // The event target is the element which requested the DOM
         // fullscreen. If we were entering DOM fullscreen for a remote
         // browser, the target would be `gBrowser` and the original
@@ -451,39 +451,39 @@ var FullScreen = {
     gBrowser.tabContainer.addEventListener("TabSelect", this.exitDomFullScreen);
 
     // Add listener to detect when the fullscreen window is re-focused.
     // If a fullscreen window loses focus, we show a warning when the
     // fullscreen window is refocused.
     window.addEventListener("activate", this);
   },
 
-  cleanup: function () {
+  cleanup: function() {
     if (!window.fullScreen) {
       MousePosTracker.removeListener(this);
       document.removeEventListener("keypress", this._keyToggleCallback, false);
       document.removeEventListener("popupshown", this._setPopupOpen, false);
       document.removeEventListener("popuphidden", this._setPopupOpen, false);
     }
   },
 
-  cleanupDomFullscreen: function () {
+  cleanupDomFullscreen: function() {
     window.messageManager
           .broadcastAsyncMessage("DOMFullscreen:CleanUp");
 
     PointerlockFsWarning.close();
     gBrowser.tabContainer.removeEventListener("TabOpen", this.exitDomFullScreen);
     gBrowser.tabContainer.removeEventListener("TabClose", this.exitDomFullScreen);
     gBrowser.tabContainer.removeEventListener("TabSelect", this.exitDomFullScreen);
     window.removeEventListener("activate", this);
 
     document.documentElement.removeAttribute("inDOMFullscreen");
   },
 
-  _isRemoteBrowser: function (aBrowser) {
+  _isRemoteBrowser: function(aBrowser) {
     return gMultiProcessBrowser && aBrowser.getAttribute("remote") == "true";
   },
 
   get _windowUtils() {
     return window.QueryInterface(Ci.nsIInterfaceRequestor)
                  .getInterface(Ci.nsIDOMWindowUtils);
   },
 
@@ -511,17 +511,17 @@ var FullScreen = {
     // 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: function () {
+  _safeToCollapse: function() {
     if (!gPrefService.getBoolPref("browser.fullscreen.autohide"))
       return false;
 
     // a popup menu is open in chrome: don't collapse chrome
     if (this._isPopupOpen)
       return false;
 
     // On OS X Lion we don't want to hide toolbars.
@@ -586,17 +586,17 @@ var FullScreen = {
         right: rect.right
       };
       MousePosTracker.addListener(this);
     }
 
     this._isChromeCollapsed = false;
   },
 
-  hideNavToolbox: function (aAnimate = false) {
+  hideNavToolbox: function(aAnimate = false) {
     if (this._isChromeCollapsed || !this._safeToCollapse())
       return;
 
     this._fullScrToggler.hidden = false;
 
     if (aAnimate && gPrefService.getBoolPref("browser.fullscreen.animate")) {
       gNavToolbox.setAttribute("fullscreenShouldAnimate", true);
       // Hide the fullscreen toggler until the transition ends.
@@ -610,17 +610,17 @@ var FullScreen = {
     }
 
     gNavToolbox.style.marginTop =
       -gNavToolbox.getBoundingClientRect().height + "px";
     this._isChromeCollapsed = true;
     MousePosTracker.removeListener(this);
   },
 
-  _updateToolbars: function (aEnterFS) {
+  _updateToolbars: function(aEnterFS) {
     for (let el of document.querySelectorAll("toolbar[fullscreentoolbar=true]")) {
       if (aEnterFS) {
         // Give the main nav bar and the tab bar the fullscreen context menu,
         // otherwise remove context menu to prevent breakage
         el.setAttribute("saved-context", el.getAttribute("context"));
         if (el.id == "nav-bar" || el.id == "TabsToolbar")
           el.setAttribute("context", "autohide-context");
         else
--- a/browser/base/content/browser-fullZoom.js
+++ b/browser/base/content/browser-fullZoom.js
@@ -84,17 +84,17 @@ var FullZoom = {
         this._ignorePendingZoomAccesses(browser);
         this._applyZoomToPref(browser);
         break;
     }
   },
 
   // nsIObserver
 
-  observe: function (aSubject, aTopic, aData) {
+  observe: function(aSubject, aTopic, aData) {
     switch (aTopic) {
       case "nsPref:changed":
         switch (aData) {
           case "browser.zoom.siteSpecific":
             this._siteSpecificPref =
               gPrefService.getBoolPref("browser.zoom.siteSpecific");
             break;
           case "browser.zoom.updateBackgroundTabs":
@@ -149,18 +149,18 @@ var FullZoom = {
                           this._ensureValid(aValue);
 
     // If the current page doesn't have a site-specific preference, then its
     // zoom should be set to the new global preference now that the global
     // preference has changed.
     let hasPref = false;
     let token = this._getBrowserToken(browser);
     this._cps2.getByDomainAndName(browser.currentURI.spec, this.name, ctxt, {
-      handleResult: function () { hasPref = true; },
-      handleCompletion: function () {
+      handleResult: function() { hasPref = true; },
+      handleCompletion: function() {
         if (!hasPref && token.isCurrent)
           this._applyPrefToZoom(undefined, browser);
       }.bind(this)
     });
   },
 
   // location change observer
 
@@ -218,18 +218,18 @@ var FullZoom = {
                             this._notifyOnLocationChange.bind(this, browser));
       return;
     }
 
     // It's not cached, so we have to asynchronously fetch it.
     let value = undefined;
     let token = this._getBrowserToken(browser);
     this._cps2.getByDomainAndName(aURI.spec, this.name, ctxt, {
-      handleResult: function (resultPref) { value = resultPref.value; },
-      handleCompletion: function () {
+      handleResult: function(resultPref) { value = resultPref.value; },
+      handleCompletion: function() {
         if (!token.isCurrent) {
           this._notifyOnLocationChange(browser);
           return;
         }
         this._applyPrefToZoom(value, browser,
                               this._notifyOnLocationChange.bind(this, browser));
       }.bind(this)
     });
@@ -264,17 +264,17 @@ var FullZoom = {
     this._ignorePendingZoomAccesses(browser);
     this._applyZoomToPref(browser);
   },
 
   /**
    * Sets the zoom level for the given browser to the given floating
    * point value, where 1 is the default zoom level.
    */
-  setZoom: function (value, browser = gBrowser.selectedBrowser) {
+  setZoom: function(value, browser = gBrowser.selectedBrowser) {
     ZoomManager.setZoomForBrowser(browser, value);
     this._ignorePendingZoomAccesses(browser);
     this._applyZoomToPref(browser);
   },
 
   /**
    * Sets the zoom level of the page in the given browser to the global zoom
    * level.
@@ -359,34 +359,34 @@ var FullZoom = {
     if (!this.siteSpecific ||
         gInPrintPreviewMode ||
         browser.isSyntheticDocument)
       return;
 
     this._cps2.set(browser.currentURI.spec, this.name,
                    ZoomManager.getZoomForBrowser(browser),
                    this._loadContextFromBrowser(browser), {
-      handleCompletion: function () {
+      handleCompletion: function() {
         this._isNextContentPrefChangeInternal = true;
       }.bind(this),
     });
   },
 
   /**
    * Removes from the content prefs store the zoom level of the given browser.
    *
    * @param browser  The zoom of this browser will be removed.  Required.
    */
   _removePref: function FullZoom__removePref(browser) {
     Services.obs.notifyObservers(browser, "browser-fullZoom:zoomReset", "");
     if (browser.isSyntheticDocument)
       return;
     let ctxt = this._loadContextFromBrowser(browser);
     this._cps2.removeByDomainAndName(browser.currentURI.spec, this.name, ctxt, {
-      handleCompletion: function () {
+      handleCompletion: function() {
         this._isNextContentPrefChangeInternal = true;
       }.bind(this),
     });
   },
 
   // Utilities
 
   /**
@@ -482,17 +482,17 @@ var FullZoom = {
     // * Otherwise, this._globalValue is a number, the global value.
     return new Promise(resolve => {
       if ("_globalValue" in this) {
         resolve(this._globalValue);
         return;
       }
       let value = undefined;
       this._cps2.getGlobal(this.name, this._loadContextFromBrowser(browser), {
-        handleResult: function (pref) { value = pref.value; },
+        handleResult: function(pref) { value = pref.value; },
         handleCompletion: (reason) => {
           this._globalValue = this._ensureValid(value);
           resolve(this._globalValue);
         }
       });
     });
   },
 
@@ -508,17 +508,17 @@ var FullZoom = {
 
   /**
    * Asynchronously broadcasts "browser-fullZoom:location-change" so that
    * listeners can be notified when the zoom levels on those pages change.
    * The notification is always asynchronous so that observers are guaranteed a
    * consistent behavior.
    */
   _notifyOnLocationChange: function FullZoom__notifyOnLocationChange(browser) {
-    this._executeSoon(function () {
+    this._executeSoon(function() {
       Services.obs.notifyObservers(browser, "browser-fullZoom:location-change", "");
     });
   },
 
   _executeSoon: function FullZoom__executeSoon(callback) {
     if (!callback)
       return;
     Services.tm.mainThread.dispatch(callback, Ci.nsIThread.DISPATCH_NORMAL);
--- a/browser/base/content/browser-fxaccounts.js
+++ b/browser/base/content/browser-fxaccounts.js
@@ -82,17 +82,17 @@ var gFxAccounts = {
     return Services.prefs.getBoolPref("services.sync.sendTabToDevice.enabled");
   },
 
   get remoteClients() {
     return Weave.Service.clientsEngine.remoteClients
            .sort((a, b) => a.name.localeCompare(b.name));
   },
 
-  init: function () {
+  init: function() {
     // Bail out if we're already initialized and for pop-up windows.
     if (this._initialized || !window.toolbar.visible) {
       return;
     }
 
     for (let topic of this.topics) {
       Services.obs.addObserver(this, topic, false);
     }
@@ -101,43 +101,43 @@ var gFxAccounts = {
     gNavToolbox.addEventListener("customizationending", this);
 
     EnsureFxAccountsWebChannel();
     this._initialized = true;
 
     this.updateUI();
   },
 
-  uninit: function () {
+  uninit: function() {
     if (!this._initialized) {
       return;
     }
 
     for (let topic of this.topics) {
       Services.obs.removeObserver(this, topic);
     }
 
     this._initialized = false;
   },
 
-  observe: function (subject, topic, data) {
+  observe: function(subject, topic, data) {
     switch (topic) {
       case "fxa-migration:state-changed":
         this.onMigrationStateChanged(data, subject);
         break;
       case this.FxAccountsCommon.ONPROFILE_IMAGE_CHANGE_NOTIFICATION:
         this.updateUI();
         break;
       default:
         this.updateUI();
         break;
     }
   },
 
-  onMigrationStateChanged: function () {
+  onMigrationStateChanged: function() {
     // Since we nuked most of the migration code, this notification will fire
     // once after legacy Sync has been disconnected (and should never fire
     // again)
     let nb = window.document.getElementById("global-notificationbox");
 
     let msg = this.strings.GetStringFromName("autoDisconnectDescription")
     let signInLabel = this.strings.GetStringFromName("autoDisconnectSignIn.label");
     let signInAccessKey = this.strings.GetStringFromName("autoDisconnectSignIn.accessKey");
@@ -169,36 +169,36 @@ var gFxAccounts = {
                           undefined,
                           nb.PRIORITY_WARNING_LOW,
                           buttons);
 
     // ensure the hamburger menu reflects the newly disconnected state.
     this.updateAppMenuItem();
   },
 
-  handleEvent: function (event) {
+  handleEvent: function(event) {
     this._inCustomizationMode = event.type == "customizationstarting";
     this.updateAppMenuItem();
   },
 
-  updateUI: function () {
+  updateUI: function() {
     // It's possible someone signed in to FxA after seeing our notification
     // about "Legacy Sync migration" (which now is actually "Legacy Sync
     // auto-disconnect") so kill that notification if it still exists.
     let nb = window.document.getElementById("global-notificationbox");
     let n = nb.getNotificationWithValue(this.SYNC_MIGRATION_NOTIFICATION_TITLE);
     if (n) {
       nb.removeNotification(n, true);
     }
 
     this.updateAppMenuItem();
   },
 
   // Note that updateAppMenuItem() returns a Promise that's only used by tests.
-  updateAppMenuItem: function () {
+  updateAppMenuItem: function() {
     let profileInfoEnabled = false;
     try {
       profileInfoEnabled = Services.prefs.getBoolPref("identity.fxaccounts.profile_image.enabled");
     } catch (e) { }
 
     // Bail out if FxA is disabled.
     if (!this.weave.fxAccountsEnabled) {
       return Promise.resolve();
@@ -314,17 +314,17 @@ var gFxAccounts = {
       // The most likely scenario is a user logged out, so reflect that.
       // Bug 995134 calls for better errors so we could retry if we were
       // sure this was the failure reason.
       this.FxAccountsCommon.log.error("Error updating FxA account info", error);
       updateWithUserData(null);
     });
   },
 
-  onMenuPanelCommand: function () {
+  onMenuPanelCommand: function() {
 
     switch (this.panelUIFooter.getAttribute("fxastatus")) {
     case "signedin":
       this.openPreferences();
       break;
     case "error":
       if (this.panelUIFooter.getAttribute("unverified")) {
         this.openPreferences();
@@ -335,45 +335,45 @@ var gFxAccounts = {
     default:
       this.openPreferences();
       break;
     }
 
     PanelUI.hide();
   },
 
-  openPreferences: function () {
+  openPreferences: function() {
     openPreferences("paneSync", { urlParams: { entrypoint: "menupanel" } });
   },
 
-  openAccountsPage: function (action, urlParams = {}) {
+  openAccountsPage: function(action, urlParams = {}) {
     let params = new URLSearchParams();
     if (action) {
       params.set("action", action);
     }
     for (let name in urlParams) {
       if (urlParams[name] !== undefined) {
         params.set(name, urlParams[name]);
       }
     }
     let url = "about:accounts?" + params;
     switchToTabHavingURI(url, true, {
       replaceQueryString: true
     });
   },
 
-  openSignInAgainPage: function (entryPoint) {
+  openSignInAgainPage: function(entryPoint) {
     this.openAccountsPage("reauth", { entrypoint: entryPoint });
   },
 
-  sendTabToDevice: function (url, clientId, title) {
+  sendTabToDevice: function(url, clientId, title) {
     Weave.Service.clientsEngine.sendURIToClientForDisplay(url, clientId, title);
   },
 
-  populateSendTabToDevicesMenu: function (devicesPopup, url, title) {
+  populateSendTabToDevicesMenu: function(devicesPopup, url, title) {
     // remove existing menu items
     while (devicesPopup.hasChildNodes()) {
       devicesPopup.removeChild(devicesPopup.firstChild);
     }
 
     const fragment = document.createDocumentFragment();
 
     const onTargetDeviceCommand = (event) => {
@@ -405,27 +405,27 @@ var gFxAccounts = {
       fragment.appendChild(separator);
       const allDevicesLabel = this.strings.GetStringFromName("sendTabToAllDevices.menuitem");
       addTargetDevice("", allDevicesLabel);
     }
 
     devicesPopup.appendChild(fragment);
   },
 
-  updateTabContextMenu: function (aPopupMenu) {
+  updateTabContextMenu: function(aPopupMenu) {
     if (!this.sendTabToDeviceEnabled) {
       return;
     }
 
     const remoteClientPresent = this.remoteClients.length > 0;
     ["context_sendTabToDevice", "context_sendTabToDevice_separator"]
     .forEach(id => { document.getElementById(id).hidden = !remoteClientPresent });
   },
 
-  initPageContextMenu: function (contextMenu) {
+  initPageContextMenu: function(contextMenu) {
     if (!this.sendTabToDeviceEnabled) {
       return;
     }
 
     const remoteClientPresent = this.remoteClients.length > 0;
     // showSendLink and showSendPage are mutually exclusive
     const showSendLink = remoteClientPresent
                          && (contextMenu.onSaveableLink || contextMenu.onPlainTextLink);
@@ -437,17 +437,17 @@ var gFxAccounts = {
 
     ["context-sendpagetodevice", "context-sep-sendpagetodevice"]
     .forEach(id => contextMenu.showItem(id, showSendPage));
     ["context-sendlinktodevice", "context-sep-sendlinktodevice"]
     .forEach(id => contextMenu.showItem(id, showSendLink));
   }
 };
 
-XPCOMUtils.defineLazyGetter(gFxAccounts, "FxAccountsCommon", function () {
+XPCOMUtils.defineLazyGetter(gFxAccounts, "FxAccountsCommon", function() {
   return Cu.import("resource://gre/modules/FxAccountsCommon.js", {});
 });
 
 XPCOMUtils.defineLazyModuleGetter(gFxAccounts, "fxaMigrator",
   "resource://services-sync/FxaMigrator.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "EnsureFxAccountsWebChannel",
   "resource://gre/modules/FxAccountsWebChannel.jsm");
--- a/browser/base/content/browser-gestureSupport.js
+++ b/browser/base/content/browser-gestureSupport.js
@@ -237,35 +237,35 @@ var gGestureSupport = {
 
     this._doUpdate = function GS__doUpdate(aEvent) {
       gHistorySwipeAnimation.updateAnimation(aEvent.delta);
     };
 
     this._doEnd = function GS__doEnd(aEvent) {
       gHistorySwipeAnimation.swipeEndEventReceived();
 
-      this._doUpdate = function (aEvent) {};
-      this._doEnd = function (aEvent) {};
+      this._doUpdate = function(aEvent) {};
+      this._doEnd = function(aEvent) {};
     }
   },
 
   /**
    * Generator producing the powerset of the input array where the first result
    * is the complete set and the last result (before StopIteration) is empty.
    *
    * @param aArray
    *        Source array containing any number of elements
    * @yield Array that is a subset of the input array from full set to empty
    */
   _power: function* GS__power(aArray) {
     // Create a bitmask based on the length of the array
     let num = 1 << aArray.length;
     while (--num >= 0) {
       // Only select array elements where the current bit is set
-      yield aArray.reduce(function (aPrev, aCurr, aIndex) {
+      yield aArray.reduce(function(aPrev, aCurr, aIndex) {
         if (num & 1 << aIndex)
           aPrev.push(aCurr);
         return aPrev;
       }, []);
     }
   },
 
   /**
--- a/browser/base/content/browser-media.js
+++ b/browser/base/content/browser-media.js
@@ -139,17 +139,17 @@ var gEMEHandler = {
     box.appendNotification(fragment, notificationId, iconURL, box.PRIORITY_WARNING_MEDIUM,
                            buttons);
   },
   showPopupNotificationForSuccess: function(browser, keySystem) {
     // We're playing EME content! Remove any "we can't play because..." messages.
     var box = gBrowser.getNotificationBox(browser);
     ["drmContentDisabled",
      "drmContentCDMInstalling"
-     ].forEach(function (value) {
+     ].forEach(function(value) {
         var notification = box.getNotificationWithValue(value);
         if (notification)
           box.removeNotification(notification);
       });
 
     // Don't bother creating it if it's already there:
     if (PopupNotifications.getNotification("drmContentPlaying", browser)) {
       return;
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -31,31 +31,31 @@ var StarUI = {
   // Array of command elements to disable when the panel is opened.
   get _blockedCommands() {
     delete this._blockedCommands;
     return this._blockedCommands =
       ["cmd_close", "cmd_closeWindow"].map(id => this._element(id));
   },
 
   _blockCommands: function SU__blockCommands() {
-    this._blockedCommands.forEach(function (elt) {
+    this._blockedCommands.forEach(function(elt) {
       // make sure not to permanently disable this item (see bug 409155)
       if (elt.hasAttribute("wasDisabled"))
         return;
       if (elt.getAttribute("disabled") == "true") {
         elt.setAttribute("wasDisabled", "true");
       } else {
         elt.setAttribute("wasDisabled", "false");
         elt.setAttribute("disabled", "true");
       }
     });
   },
 
   _restoreCommandsState: function SU__restoreCommandsState() {
-    this._blockedCommands.forEach(function (elt) {
+    this._blockedCommands.forEach(function(elt) {
       if (elt.getAttribute("wasDisabled") != "true")
         elt.removeAttribute("disabled");
       elt.removeAttribute("wasDisabled");
     });
   },
 
   // nsIDOMEventListener
   handleEvent(aEvent) {
@@ -193,17 +193,17 @@ var StarUI = {
     if (this._overlayLoaded) {
       this._doShowEditBookmarkPanel(aNode, aAnchorElement, aPosition);
       return;
     }
 
     this._overlayLoading = true;
     document.loadOverlay(
       "chrome://browser/content/places/editBookmarkOverlay.xul",
-      (function (aSubject, aTopic, aData) {
+      (function(aSubject, aTopic, aData) {
         // Move the header (star, title, button) into the grid,
         // so that it aligns nicely with the other items (bug 484022).
         let header = this._element("editBookmarkPanelHeader");
         let rows = this._element("editBookmarkPanelGrid").lastChild;
         rows.insertBefore(header, rows.firstChild);
         header.hidden = false;
 
         this._overlayLoading = false;
@@ -1139,17 +1139,17 @@ var PlacesToolbarHelper = {
 
   _getShouldWrap: function PTH_getShouldWrap() {
     let placement = CustomizableUI.getPlacementOfWidget("personal-bookmarks");
     let area = placement && placement.area;
     let areaType = area && CustomizableUI.getAreaType(area);
     return !area || CustomizableUI.TYPE_MENU_PANEL == areaType;
   },
 
-  onPlaceholderCommand: function () {
+  onPlaceholderCommand: function() {
     let widgetGroup = CustomizableUI.getWidget("personal-bookmarks");
     let widget = widgetGroup.forWindow(window);
     if (widget.overflowed ||
         widgetGroup.areaType == CustomizableUI.TYPE_MENU_PANEL) {
       PlacesCommandHook.showPlacesOrganizer("BookmarksToolbar");
     }
   },
 
@@ -1898,21 +1898,21 @@ var BookmarkingUI = {
         // Only need to update the UI if it wasn't marked as starred before:
         if (this._itemIds.length == 1) {
           this._updateStar();
         }
       }
     }
   },
 
-  onBeginUpdateBatch: function () {},
-  onEndUpdateBatch: function () {},
-  onBeforeItemRemoved: function () {},
-  onItemVisited: function () {},
-  onItemMoved: function () {},
+  onBeginUpdateBatch: function() {},
+  onEndUpdateBatch: function() {},
+  onBeforeItemRemoved: function() {},
+  onItemVisited: function() {},
+  onItemMoved: function() {},
 
   // CustomizableUI events:
   _starButtonLabel: null,
   get _starButtonOverflowedLabel() {
     delete this._starButtonOverflowedLabel;
     return this._starButtonOverflowedLabel =
       gNavigatorBundle.getString("starButtonOverflowed.label");
   },
--- a/browser/base/content/browser-plugins.js
+++ b/browser/base/content/browser-plugins.js
@@ -12,39 +12,39 @@ var gPluginHandler = {
     "PluginContent:UpdateHiddenPluginUI",
     "PluginContent:HideNotificationBar",
     "PluginContent:InstallSinglePlugin",
     "PluginContent:ShowPluginCrashedNotification",
     "PluginContent:SubmitReport",
     "PluginContent:LinkClickCallback",
   ],
 
-  init: function () {
+  init: function() {
     const mm = window.messageManager;
     for (let msg of this.MESSAGES) {
       mm.addMessageListener(msg, this);
     }
     window.addEventListener("unload", this);
   },
 
-  uninit: function () {
+  uninit: function() {
     const mm = window.messageManager;
     for (let msg of this.MESSAGES) {
       mm.removeMessageListener(msg, this);
     }
     window.removeEventListener("unload", this);
   },
 
-  handleEvent: function (event) {
+  handleEvent: function(event) {
     if (event.type == "unload") {
       this.uninit();
     }
   },
 
-  receiveMessage: function (msg) {
+  receiveMessage: function(msg) {
     switch (msg.name) {
       case "PluginContent:ShowClickToPlayNotification":
         this.showClickToPlayNotification(msg.target, msg.data.plugins, msg.data.showNow,
                                          msg.principal, msg.data.location);
         break;
       case "PluginContent:RemoveNotification":
         this.removeNotification(msg.target, msg.data.name);
         break;
@@ -78,17 +78,17 @@ var gPluginHandler = {
         break;
       default:
         Cu.reportError("gPluginHandler did not expect to handle message " + msg.name);
         break;
     }
   },
 
   // Callback for user clicking on a disabled plugin
-  managePlugins: function () {
+  managePlugins: function() {
     BrowserOpenAddonsMgr("addons://list/plugin");
   },
 
   // Callback for user clicking on the link in a click-to-play plugin
   // (where the plugin has an update)
   openPluginUpdatePage: function(pluginTag) {
     let url = Services.blocklist.getPluginInfoURL(pluginTag);
     if (!url) {
@@ -101,22 +101,22 @@ var gPluginHandler = {
     if (!AppConstants.MOZ_CRASHREPORTER) {
       return;
     }
     Services.prefs.setBoolPref("dom.ipc.plugins.reportCrashURL", submitURLOptIn);
     PluginCrashReporter.submitCrashReport(runID, keyVals);
   },
 
   // Callback for user clicking a "reload page" link
-  reloadPage: function (browser) {
+  reloadPage: function(browser) {
     browser.reload();
   },
 
   // Callback for user clicking the help icon
-  openHelpPage: function () {
+  openHelpPage: function() {
     openHelpLink("plugin-crashed", false);
   },
 
   _clickToPlayNotificationEventCallback: function PH_ctpEventCallback(event) {
     if (event == "showing") {
       Services.telemetry.getHistogramById("PLUGINS_NOTIFICATION_SHOWN")
         .add(!this.options.primaryPlugin);
       // Histograms always start at 0, even though our data starts at 1
@@ -134,17 +134,17 @@ var gPluginHandler = {
     }
   },
 
   /**
    * Called from the plugin doorhanger to set the new permissions for a plugin
    * and activate plugins if necessary.
    * aNewState should be either "allownow" "allowalways" or "block"
    */
-  _updatePluginPermission: function (aNotification, aPluginInfo, aNewState) {
+  _updatePluginPermission: function(aNotification, aPluginInfo, aNewState) {
     let permission;
     let expireType;
     let expireTime;
     let histogram =
       Services.telemetry.getHistogramById("PLUGINS_NOTIFICATION_USER_ACTION");
 
     // Update the permission manager.
     // Also update the current state of pluginInfo.fallbackType so that
@@ -203,18 +203,18 @@ var gPluginHandler = {
     }
 
     browser.messageManager.sendAsyncMessage("BrowserPlugins:ActivatePlugins", {
       pluginInfo: aPluginInfo,
       newState: aNewState,
     });
   },
 
-  showClickToPlayNotification: function (browser, plugins, showNow,
-                                         principal, location) {
+  showClickToPlayNotification: function(browser, plugins, showNow,
+                                        principal, location) {
     // It is possible that we've received a message from the frame script to show
     // a click to play notification for a principal that no longer matches the one
     // that the browser's content now has assigned (ie, the browser has browsed away
     // after the message was sent, but before the message was received). In that case,
     // we should just ignore the message.
     if (!principal.equals(browser.contentPrincipal)) {
       return;
     }
@@ -284,31 +284,31 @@ var gPluginHandler = {
       principal: principal,
     };
     PopupNotifications.show(browser, "click-to-play-plugins",
                             "", "plugins-notification-icon",
                             null, null, options);
     browser.messageManager.sendAsyncMessage("BrowserPlugins:NotificationShown");
   },
 
-  removeNotification: function (browser, name) {
+  removeNotification: function(browser, name) {
     let notification = PopupNotifications.getNotification(name, browser);
     if (notification)
       PopupNotifications.remove(notification);
   },
 
-  hideNotificationBar: function (browser, name) {
+  hideNotificationBar: function(browser, name) {
     let notificationBox = gBrowser.getNotificationBox(browser);
     let notification = notificationBox.getNotificationWithValue(name);
     if (notification)
       notificationBox.removeNotification(notification, true);
   },
 
-  updateHiddenPluginUI: function (browser, haveInsecure, actions,
-                                  principal, location) {
+  updateHiddenPluginUI: function(browser, haveInsecure, actions,
+                                 principal, location) {
     let origin = principal.originNoSuffix;
 
     // It is possible that we've received a message from the frame script to show
     // the hidden plugin notification for a principal that no longer matches the one
     // that the browser's content now has assigned (ie, the browser has browsed away
     // after the message was sent, but before the message was received). In that case,
     // we should just ignore the message.
     if (!principal.equals(browser.contentPrincipal)) {
@@ -431,17 +431,17 @@ var gPluginHandler = {
       if (notificationPermission == Ci.nsIPermissionManager.DENY_ACTION) {
         hideNotification();
       } else {
         showNotification();
       }
     }
   },
 
-  contextMenuCommand: function (browser, plugin, command) {
+  contextMenuCommand: function(browser, plugin, command) {
     browser.messageManager.sendAsyncMessage("BrowserPlugins:ContextMenuCommand",
       { command: command }, { plugin: plugin });
   },
 
   // Crashed-plugin observer. Notified once per plugin crash, before events
   // are dispatched to individual plugin instances.
   NPAPIPluginCrashed : function(subject, topic, data) {
     let propertyBag = subject;
@@ -487,17 +487,17 @@ var gPluginHandler = {
    *        The browser to show the notification for.
    * @param messageString
    *        The string to put in the notification bar
    * @param pluginID
    *        The unique-per-process identifier for the NPAPI plugin or GMP.
    *        For a GMP, this is the pluginID. For NPAPI plugins (where "pluginID"
    *        means something different), this is the runID.
    */
-  showPluginCrashedNotification: function (browser, messageString, pluginID) {
+  showPluginCrashedNotification: function(browser, messageString, pluginID) {
     // If there's already an existing notification bar, don't do anything.
     let notificationBox = gBrowser.getNotificationBox(browser);
     let notification = notificationBox.getNotificationWithValue("plugin-crashed");
     if (notification) {
       return;
     }
 
     // Configure the notification bar
--- a/browser/base/content/browser-refreshblocker.js
+++ b/browser/base/content/browser-refreshblocker.js
@@ -63,17 +63,17 @@ var RefreshBlocker = {
       let refreshButtonText =
         gNavigatorBundle.getString("refreshBlocked.goButton");
       let refreshButtonAccesskey =
         gNavigatorBundle.getString("refreshBlocked.goButton.accesskey");
 
       let buttons = [{
         label: refreshButtonText,
         accessKey: refreshButtonAccesskey,
-        callback: function (notification, button) {
+        callback: function(notification, button) {
           if (browser.messageManager) {
             browser.messageManager.sendAsyncMessage("RefreshBlocker:Refresh", data);
           }
         }
       }];
 
       notificationBox.appendNotification(message, "refresh-blocked",
                                          "chrome://browser/skin/Info.png",
--- a/browser/base/content/browser-syncui.js
+++ b/browser/base/content/browser-syncui.js
@@ -34,17 +34,17 @@ var gSyncUI = {
   ],
 
   _unloaded: false,
   // The last sync start time. Used to calculate the leftover animation time
   // once syncing completes (bug 1239042).
   _syncStartTime: 0,
   _syncAnimationTimer: 0,
 
-  init: function () {
+  init: function() {
     Cu.import("resource://services-common/stringbundle.js");
 
     // Proceed to set up the UI if Sync has already started up.
     // Otherwise we'll do it when Sync is firing up.
     if (this.weaveService.ready) {
       this.initUI();
       return;
     }
@@ -132,17 +132,17 @@ var gSyncUI = {
     // Otherwise we are configured for legacy Sync, which has no verification
     // concept.
     return Promise.resolve(false);
   },
 
   // Note that we don't show login errors in a notification bar here, but do
   // still need to track a login-failed state so the "Tools" menu updates
   // with the correct state.
-  _loginFailed: function () {
+  _loginFailed: function() {
     // If Sync isn't already ready, we don't want to force it to initialize
     // by referencing Weave.Status - and it isn't going to be accurate before
     // Sync is ready anyway.
     if (!this.weaveService.ready) {
       this.log.debug("_loginFailed has sync not ready, so returning false");
       return false;
     }
     this.log.debug("_loginFailed has sync state=${sync}",
@@ -237,17 +237,17 @@ var gSyncUI = {
     // the hamburger menu.
     this.updateUI();
   },
 
   onLogout: function SUI_onLogout() {
     this.updateUI();
   },
 
-  _getAppName: function () {
+  _getAppName: function() {
     let brand = new StringBundle("chrome://branding/locale/brand.properties");
     return brand.get("brandShortName");
   },
 
   // Commands
   // doSync forces a sync - it *does not* return a promise as it is called
   // via the various UI components.
   doSync() {
@@ -299,33 +299,33 @@ var gSyncUI = {
         window.openDialog("chrome://browser/content/sync/setup.xul",
                           "weaveSetup", "centerscreen,chrome,resizable=no",
                           wizardType);
       }
     }
   },
 
   // Open the legacy-sync device pairing UI. Note used for FxA Sync.
-  openAddDevice: function () {
+  openAddDevice: function() {
     if (!Weave.Utils.ensureMPUnlocked())
       return;
 
     let win = Services.wm.getMostRecentWindow("Sync:AddDevice");
     if (win)
       win.focus();
     else
       window.openDialog("chrome://browser/content/sync/addDevice.xul",
                         "syncAddDevice", "centerscreen,chrome,resizable=no");
   },
 
-  openPrefs: function (entryPoint) {
+  openPrefs: function(entryPoint) {
     openPreferences("paneSync", { urlParams: { entrypoint: entryPoint } });
   },
 
-  openSignInAgainPage: function (entryPoint = "syncbutton") {
+  openSignInAgainPage: function(entryPoint = "syncbutton") {
     gFxAccounts.openSignInAgainPage(entryPoint);
   },
 
   openSyncedTabsPanel() {
     let placement = CustomizableUI.getPlacementOfWidget("sync-button");
     let area = placement ? placement.area : CustomizableUI.AREA_NAVBAR;
     let anchor = document.getElementById("sync-button") ||
                  document.getElementById("PanelUI-menu-button");
--- a/browser/base/content/browser-tabsintitlebar-stub.js
+++ b/browser/base/content/browser-tabsintitlebar-stub.js
@@ -2,16 +2,16 @@
  * 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/. */
 
 // This file is used as a stub object for platforms which
 // don't have CAN_DRAW_IN_TITLEBAR defined.
 
 var TabsInTitlebar = {
-  init: function () {},
-  uninit: function () {},
-  allowedBy: function (condition, allow) {},
+  init: function() {},
+  uninit: function() {},
+  allowedBy: function(condition, allow) {},
   updateAppearance: function updateAppearance(aForce) {},
   get enabled() {
     return document.documentElement.getAttribute("tabsintitlebar") == "true";
   },
 };
--- a/browser/base/content/browser-tabsintitlebar.js
+++ b/browser/base/content/browser-tabsintitlebar.js
@@ -2,17 +2,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/. */
 
 // Note: the file browser-tabsintitlebar-stub.js is used instead of
 // this one on platforms which don't have CAN_DRAW_IN_TITLEBAR defined.
 
 var TabsInTitlebar = {
-  init: function () {
+  init: function() {
     if (this._initialized) {
       return;
     }
     this._readPref();
     Services.prefs.addObserver(this._prefName, this, false);
 
     // We need to update the appearance of the titlebar when the menu changes
     // from the active to the inactive state. We can't, however, rely on
@@ -44,17 +44,17 @@ var TabsInTitlebar = {
     if (this._updateOnInit) {
       // We don't need to call this with 'true', even if original calls
       // (before init()) did, because this will be the first call and so
       // we will update anyway.
       this._update();
     }
   },
 
-  allowedBy: function (condition, allow) {
+  allowedBy: function(condition, allow) {
     if (allow) {
       if (condition in this._disallowed) {
         delete this._disallowed[condition];
         this._update(true);
       }
     } else if (!(condition in this._disallowed)) {
       this._disallowed[condition] = null;
       this._update(true);
@@ -64,49 +64,49 @@ var TabsInTitlebar = {
   updateAppearance: function updateAppearance(aForce) {
     this._update(aForce);
   },
 
   get enabled() {
     return document.documentElement.getAttribute("tabsintitlebar") == "true";
   },
 
-  observe: function (subject, topic, data) {
+  observe: function(subject, topic, data) {
     if (topic == "nsPref:changed")
       this._readPref();
   },
 
-  handleEvent: function (aEvent) {
+  handleEvent: function(aEvent) {
     if (aEvent.type == "resolutionchange" && aEvent.target == window) {
       this._update(true);
     }
   },
 
-  _onMenuMutate: function (aMutations) {
+  _onMenuMutate: function(aMutations) {
     for (let mutation of aMutations) {
       if (mutation.attributeName == "inactive" ||
           mutation.attributeName == "autohide") {
         TabsInTitlebar._update(true);
         return;
       }
     }
   },
 
   _initialized: false,
   _updateOnInit: false,
   _disallowed: {},
   _prefName: "browser.tabs.drawInTitlebar",
   _lastSizeMode: null,
 
-  _readPref: function () {
+  _readPref: function() {
     this.allowedBy("pref",
                    Services.prefs.getBoolPref(this._prefName));
   },
 
-  _update: function (aForce = false) {
+  _update: function(aForce = false) {
     let $ = id => document.getElementById(id);
     let rect = ele => ele.getBoundingClientRect();
     let verticalMargins = cstyle => parseFloat(cstyle.marginBottom) + parseFloat(cstyle.marginTop);
 
     if (window.fullScreen)
       return;
 
     // In some edgecases it is possible for this to fire before we've initialized.
@@ -248,22 +248,22 @@ var TabsInTitlebar = {
     }
 
     ToolbarIconColor.inferFromText();
     if (CustomizationHandler.isCustomizing()) {
       gCustomizeMode.updateLWTStyling();
     }
   },
 
-  _sizePlaceholder: function (type, width) {
+  _sizePlaceholder: function(type, width) {
     Array.forEach(document.querySelectorAll(".titlebar-placeholder[type='" + type + "']"),
-                  function (node) { node.width = width; });
+                  function(node) { node.width = width; });
   },
 
-  uninit: function () {
+  uninit: function() {
     this._initialized = false;
     removeEventListener("resolutionchange", this);
     Services.prefs.removeObserver(this._prefName, this);
     this._menuObserver.disconnect();
     CustomizableUI.removeListener(this);
   }
 };
 
--- a/browser/base/content/browser-thumbnails.js
+++ b/browser/base/content/browser-thumbnails.js
@@ -31,29 +31,29 @@ var gBrowserThumbnails = {
   init: function Thumbnails_init() {
     PageThumbs.addExpirationFilter(this);
     gBrowser.addTabsProgressListener(this);
     Services.prefs.addObserver(this.PREF_DISK_CACHE_SSL, this, false);
 
     this._sslDiskCacheEnabled =
       Services.prefs.getBoolPref(this.PREF_DISK_CACHE_SSL);
 
-    this._tabEvents.forEach(function (aEvent) {
+    this._tabEvents.forEach(function(aEvent) {
       gBrowser.tabContainer.addEventListener(aEvent, this, false);
     }, this);
 
     this._timeouts = new WeakMap();
   },
 
   uninit: function Thumbnails_uninit() {
     PageThumbs.removeExpirationFilter(this);
     gBrowser.removeTabsProgressListener(this);
     Services.prefs.removeObserver(this.PREF_DISK_CACHE_SSL, this);
 
-    this._tabEvents.forEach(function (aEvent) {
+    this._tabEvents.forEach(function(aEvent) {
       gBrowser.tabContainer.removeEventListener(aEvent, this, false);
     }, this);
   },
 
   handleEvent: function Thumbnails_handleEvent(aEvent) {
     switch (aEvent.type) {
       case "scroll":
         let browser = aEvent.currentTarget;
@@ -89,30 +89,30 @@ var gBrowserThumbnails = {
         aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK)
       this._delayedCapture(aBrowser);
   },
 
   _capture: function Thumbnails_capture(aBrowser) {
     // Only capture about:newtab top sites.
     if (this._topSiteURLs.indexOf(aBrowser.currentURI.spec) == -1)
       return;
-    this._shouldCapture(aBrowser, function (aResult) {
+    this._shouldCapture(aBrowser, function(aResult) {
       if (aResult) {
         PageThumbs.captureAndStoreIfStale(aBrowser);
       }
     });
   },
 
   _delayedCapture: function Thumbnails_delayedCapture(aBrowser) {
     if (this._timeouts.has(aBrowser))
       clearTimeout(this._timeouts.get(aBrowser));
     else
       aBrowser.addEventListener("scroll", this, true);
 
-    let timeout = setTimeout(function () {
+    let timeout = setTimeout(function() {
       this._clearTimeout(aBrowser);
       this._capture(aBrowser);
     }.bind(this), this._captureDelayMS);
 
     this._timeouts.set(aBrowser, timeout);
   },
 
   _shouldCapture: function Thumbnails_shouldCapture(aBrowser, aCallback) {
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -92,17 +92,17 @@ XPCOMUtils.defineLazyGetter(this, "gBrow
 });
 
 XPCOMUtils.defineLazyGetter(this, "gCustomizeMode", function() {
   let scope = {};
   Cu.import("resource:///modules/CustomizeMode.jsm", scope);
   return new scope.CustomizeMode(window);
 });
 
-XPCOMUtils.defineLazyGetter(window, "gShowPageResizers", function () {
+XPCOMUtils.defineLazyGetter(window, "gShowPageResizers", function() {
   // Only show resizers on Windows 2000 and XP
   return AppConstants.isPlatformAndVersionAtMost("win", "5.9");
 });
 
 XPCOMUtils.defineLazyGetter(this, "gPrefService", function() {
   return Services.prefs;
 });
 
@@ -113,42 +113,42 @@ XPCOMUtils.defineLazyGetter(this, "Inlin
 });
 
 XPCOMUtils.defineLazyGetter(this, "PageMenuParent", function() {
   let tmp = {};
   Cu.import("resource://gre/modules/PageMenu.jsm", tmp);
   return new tmp.PageMenuParent();
 });
 
-XPCOMUtils.defineLazyGetter(this, "PopupNotifications", function () {
+XPCOMUtils.defineLazyGetter(this, "PopupNotifications", function() {
   let tmp = {};
   Cu.import("resource://gre/modules/PopupNotifications.jsm", tmp);
   try {
     return new tmp.PopupNotifications(gBrowser,
                                       document.getElementById("notification-popup"),
                                       document.getElementById("notification-popup-box"));
   } catch (ex) {
     Cu.reportError(ex);
     return null;
   }
 });
 
-XPCOMUtils.defineLazyGetter(this, "Win7Features", function () {
+XPCOMUtils.defineLazyGetter(this, "Win7Features", function() {
   if (AppConstants.platform != "win")
     return null;
 
   const WINTASKBAR_CONTRACTID = "@mozilla.org/windows-taskbar;1";
   if (WINTASKBAR_CONTRACTID in Cc &&
       Cc[WINTASKBAR_CONTRACTID].getService(Ci.nsIWinTaskbar).available) {
     let AeroPeek = Cu.import("resource:///modules/WindowsPreviewPerTab.jsm", {}).AeroPeek;
     return {
-      onOpenWindow: function () {
+      onOpenWindow: function() {
         AeroPeek.onOpenWindow(window);
       },
-      onCloseWindow: function () {
+      onCloseWindow: function() {
         AeroPeek.onCloseWindow(window);
       }
     };
   }
   return null;
 });
 
 
@@ -172,26 +172,26 @@ if (AppConstants.platform != "macosx") {
 }
 
 /* globals gBrowser, gNavToolbox, gURLBar, gNavigatorBundle*/
 [
   ["gBrowser",            "content"],
   ["gNavToolbox",         "navigator-toolbox"],
   ["gURLBar",             "urlbar"],
   ["gNavigatorBundle",    "bundle_browser"]
-].forEach(function (elementGlobal) {
+].forEach(function(elementGlobal) {
   var [name, id] = elementGlobal;
-  window.__defineGetter__(name, function () {
+  window.__defineGetter__(name, function() {
     var element = document.getElementById(id);
     if (!element)
       return null;
     delete window[name];
     return window[name] = element;
   });
-  window.__defineSetter__(name, function (val) {
+  window.__defineSetter__(name, function(val) {
     delete window[name];
     return window[name] = val;
   });
 });
 
 // Smart getter for the findbar.  If you don't wish to force the creation of
 // the findbar, check gFindBarInitialized first.
 
@@ -203,17 +203,17 @@ this.__defineGetter__("gFindBarInitializ
   return window.gBrowser.isFindBarInitialized();
 });
 
 this.__defineGetter__("AddonManager", function() {
   let tmp = {};
   Cu.import("resource://gre/modules/AddonManager.jsm", tmp);
   return this.AddonManager = tmp.AddonManager;
 });
-this.__defineSetter__("AddonManager", function (val) {
+this.__defineSetter__("AddonManager", function(val) {
   delete this.AddonManager;
   return this.AddonManager = val;
 });
 
 
 var gInitialPages = [
   "about:blank",
   "about:newtab",
@@ -425,28 +425,28 @@ function findChildShell(aDocument, aDocS
       return docShell;
   }
   return null;
 }
 
 var gPopupBlockerObserver = {
   _reportButton: null,
 
-  onReportButtonMousedown: function (aEvent)
+  onReportButtonMousedown: function(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: function (aEvent)
+  handleEvent: function(aEvent)
   {
     if (aEvent.originalTarget != gBrowser.selectedBrowser)
       return;
 
     if (!this._reportButton)
       this._reportButton = document.getElementById("page-report-button");
 
     if (!gBrowser.selectedBrowser.blockedPopups ||
@@ -507,30 +507,30 @@ 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: function (aEvent)
+  toggleAllowPopupsForSite: function(aEvent)
   {
     var pm = Services.perms;
     var shouldBlock = aEvent.target.getAttribute("block") == "true";
     var perm = shouldBlock ? pm.DENY_ACTION : pm.ALLOW_ACTION;
     pm.add(gBrowser.currentURI, "popup", perm);
 
     if (!shouldBlock)
       this.showAllBlockedPopups(gBrowser.selectedBrowser);
 
     gBrowser.getNotificationBox().removeCurrentNotification();
   },
 
-  fillPopupList: function (aEvent)
+  fillPopupList: function(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
@@ -623,50 +623,50 @@ var gPopupBlockerObserver = {
 
       // Show the separator if we added any
       // showable popup addresses to the menu.
       if (foundUsablePopupURI)
         blockedPopupsSeparator.removeAttribute("hidden");
     }, null);
   },
 
-  onPopupHiding: function (aEvent) {
+  onPopupHiding: function(aEvent) {
     if (aEvent.target.anchorNode.id == "page-report-button")
       aEvent.target.anchorNode.removeAttribute("open");
 
     this.isPopupHidingTick = true;
     setTimeout(() => this.isPopupHidingTick = false, 0);
 
     let item = aEvent.target.lastChild;
     while (item && item.getAttribute("observes") != "blockedPopupsSeparator") {
       let next = item.previousSibling;
       item.parentNode.removeChild(item);
       item = next;
     }
   },
 
-  showBlockedPopup: function (aEvent)
+  showBlockedPopup: function(aEvent)
   {
     var target = aEvent.target;
     var popupReportIndex = target.getAttribute("popupReportIndex");
     let browser = target.popupReportBrowser;
     browser.unblockPopup(popupReportIndex);
   },
 
-  showAllBlockedPopups: function (aBrowser)
+  showAllBlockedPopups: function(aBrowser)
   {
     aBrowser.retrieveListOfBlockedPopups().then(popups => {
       for (let i = 0; i < popups.length; i++) {
         if (popups[i].popupWindowURIspec)
           aBrowser.unblockPopup(i);
       }
     }, null);
   },
 
-  editPopupSettings: function ()
+  editPopupSettings: function()
   {
     var host = "";
     try {
       host = gBrowser.currentURI.host;
     }
     catch (e) { }
 
     var bundlePreferences = document.getElementById("bundle_preferences");
@@ -682,17 +682,17 @@ var gPopupBlockerObserver = {
       existingWindow.initWithParams(params);
       existingWindow.focus();
     }
     else
       window.openDialog("chrome://browser/content/preferences/permissions.xul",
                         "_blank", "resizable,dialog=no,centerscreen", params);
   },
 
-  dontShowMessage: function ()
+  dontShowMessage: function()
   {
     var showMessage = gPrefService.getBoolPref("privacy.popups.showBrowserMessage");
     gPrefService.setBoolPref("privacy.popups.showBrowserMessage", !showMessage);
     gBrowser.getNotificationBox().removeCurrentNotification();
   }
 };
 
 function gKeywordURIFixup({ target: browser, data: fixupInfo }) {
@@ -1059,17 +1059,17 @@ var gBrowserInit = {
 
     // Wait until chrome is painted before executing code not critical to making the window visible
     this._boundDelayedStartup = this._delayedStartup.bind(this);
     window.addEventListener("MozAfterPaint", this._boundDelayedStartup);
 
     this._loadHandled = true;
   },
 
-  _cancelDelayedStartup: function () {
+  _cancelDelayedStartup: function() {
     window.removeEventListener("MozAfterPaint", this._boundDelayedStartup);
     this._boundDelayedStartup = null;
   },
 
   _delayedStartup: function() {
     let tmp = {};
     Cu.import("resource://gre/modules/TelemetryTimestamps.jsm", tmp);
     let TelemetryTimestamps = tmp.TelemetryTimestamps;
@@ -1438,17 +1438,17 @@ var gBrowserInit = {
 
     this.delayedStartupFinished = true;
 
     Services.obs.notifyObservers(window, "browser-delayed-startup-finished", "");
     TelemetryTimestamps.add("delayedStartupFinished");
   },
 
   // Returns the URI(s) to load at startup.
-  _getUriToLoad: function () {
+  _getUriToLoad: function() {
     // window.arguments[0]: URI to load (string), or an nsIArray of
     //                      nsISupportsStrings to load, or a xul:tab of
     //                      a tabbrowser, which will be replaced by this
     //                      window (for this case, all other arguments are
     //                      ignored).
     if (!window.arguments || !window.arguments[0])
       return null;
 
@@ -2543,96 +2543,96 @@ var gMenuButtonBadgeManager = {
   BADGEID_APPUPDATE: "update",
   BADGEID_DOWNLOAD: "download",
   BADGEID_FXA: "fxa",
 
   fxaBadge: null,
   downloadBadge: null,
   appUpdateBadge: null,
 
-  init: function () {
+  init: function() {
     PanelUI.panel.addEventListener("popupshowing", this, true);
   },
 
-  uninit: function () {
+  uninit: function() {
     PanelUI.panel.removeEventListener("popupshowing", this, true);
   },
 
-  handleEvent: function (e) {
+  handleEvent: function(e) {
     if (e.type === "popupshowing") {
       this.clearBadges();
     }
   },
 
-  _showBadge: function () {
+  _showBadge: function() {
     let badgeToShow = this.downloadBadge || this.appUpdateBadge || this.fxaBadge;
 
     if (badgeToShow) {
       PanelUI.menuButton.setAttribute("badge-status", badgeToShow);
     } else {
       PanelUI.menuButton.removeAttribute("badge-status");
     }
   },
 
-  _changeBadge: function (badgeId, badgeStatus = null) {
+  _changeBadge: function(badgeId, badgeStatus = null) {
     if (badgeId == this.BADGEID_APPUPDATE) {
       this.appUpdateBadge = badgeStatus;
     } else if (badgeId == this.BADGEID_DOWNLOAD) {
       this.downloadBadge = badgeStatus;
     } else if (badgeId == this.BADGEID_FXA) {
       this.fxaBadge = badgeStatus;
     } else {
       Cu.reportError("The badge ID '" + badgeId + "' is unknown!");
     }
     this._showBadge();
   },
 
-  addBadge: function (badgeId, badgeStatus) {
+  addBadge: function(badgeId, badgeStatus) {
     if (!badgeStatus) {
       Cu.reportError("badgeStatus must be defined");
       return;
     }
     this._changeBadge(badgeId, badgeStatus);
   },
 
-  removeBadge: function (badgeId) {
+  removeBadge: function(badgeId) {
     this._changeBadge(badgeId);
   },
 
-  clearBadges: function () {
+  clearBadges: function() {
     this.appUpdateBadge = null;
     this.downloadBadge = null;
     this.fxaBadge = null;
     this._showBadge();
   }
 };
 
 // Setup the hamburger button badges for updates, if enabled.
 var gMenuButtonUpdateBadge = {
   enabled: false,
   badgeWaitTime: 0,
   timer: null,
   cancelObserverRegistered: false,
 
-  init: function () {
+  init: function() {
     try {
       this.enabled = Services.prefs.getBoolPref("app.update.badge");
     } catch (e) {}
     if (this.enabled) {
       try {
         this.badgeWaitTime = Services.prefs.getIntPref("app.update.badgeWaitTime");
       } catch (e) {
         this.badgeWaitTime = 345600; // 4 days
       }
       Services.obs.addObserver(this, "update-staged", false);
       Services.obs.addObserver(this, "update-downloaded", false);
     }
   },
 
-  uninit: function () {
+  uninit: function() {
     if (this.timer)
       this.timer.cancel();
     if (this.enabled) {
       Services.obs.removeObserver(this, "update-staged");
       Services.obs.removeObserver(this, "update-downloaded");
       this.enabled = false;
     }
     if (this.cancelObserverRegistered) {
@@ -2653,17 +2653,17 @@ var gMenuButtonUpdateBadge = {
       }
     } else {
       // open the page for manual update
       let url = Services.urlFormatter.formatURLPref("app.update.url.manual");
       openUILinkIn(url, "tab");
     }
   },
 
-  observe: function (subject, topic, status) {
+  observe: function(subject, topic, status) {
     if (topic == "update-canceled") {
       this.reset();
       return;
     }
     if (status == "failed") {
       // Background update has failed, let's show the UI responsible for
       // prompting the user to update manually.
       this.uninit();
@@ -2673,25 +2673,25 @@ var gMenuButtonUpdateBadge = {
 
     // Give the user badgeWaitTime seconds to react before prompting.
     this.timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
     this.timer.initWithCallback(this, this.badgeWaitTime * 1000,
                                 this.timer.TYPE_ONE_SHOT);
     // The timer callback will call uninit() when it completes.
   },
 
-  notify: function () {
+  notify: function() {
     // If the update is successfully applied, or if the updater has fallen back
     // to non-staged updates, add a badge to the hamburger menu to indicate an
     // update will be applied once the browser restarts.
     this.uninit();
     this.displayBadge(true);
   },
 
-  displayBadge: function (succeeded) {
+  displayBadge: function(succeeded) {
     let status = succeeded ? "succeeded" : "failed";
     let badgeStatus = "update-" + status;
     gMenuButtonBadgeManager.addBadge(gMenuButtonBadgeManager.BADGEID_APPUPDATE, badgeStatus);
 
     let stringId;
     let updateButtonText;
     if (succeeded) {
       let brandBundle = document.getElementById("bundle_brand");
@@ -2707,17 +2707,17 @@ var gMenuButtonUpdateBadge = {
     }
 
     let updateButton = document.getElementById("PanelUI-update-status");
     updateButton.setAttribute("label", updateButtonText);
     updateButton.setAttribute("update-status", status);
     updateButton.hidden = false;
   },
 
-  reset: function () {
+  reset: function() {
     gMenuButtonBadgeManager.removeBadge(
       gMenuButtonBadgeManager.BADGEID_APPUPDATE);
     let updateButton = document.getElementById("PanelUI-update-status");
     updateButton.hidden = true;
     this.uninit();
     this.init();
   }
 };
@@ -2735,43 +2735,43 @@ const PREF_SSL_IMPACT = PREF_SSL_IMPACT_
 }, []);
 
 /**
  * Handle command events bubbling up from error page content
  * or from about:newtab or from remote error pages that invoke
  * us via async messaging.
  */
 var BrowserOnClick = {
-  init: function () {
+  init: function() {
     let mm = window.messageManager;
     mm.addMessageListener("Browser:CertExceptionError", this);
     mm.addMessageListener("Browser:SiteBlockedError", this);
     mm.addMessageListener("Browser:EnableOnlineMode", this);
     mm.addMessageListener("Browser:SendSSLErrorReport", this);
     mm.addMessageListener("Browser:SetSSLErrorReportAuto", this);
     mm.addMessageListener("Browser:ResetSSLPreferences", this);
     mm.addMessageListener("Browser:SSLErrorReportTelemetry", this);
     mm.addMessageListener("Browser:OverrideWeakCrypto", this);
     mm.addMessageListener("Browser:SSLErrorGoBack", this);
   },
 
-  uninit: function () {
+  uninit: function() {
     let mm = window.messageManager;
     mm.removeMessageListener("Browser:CertExceptionError", this);
     mm.removeMessageListener("Browser:SiteBlockedError", this);
     mm.removeMessageListener("Browser:EnableOnlineMode", this);
     mm.removeMessageListener("Browser:SendSSLErrorReport", this);
     mm.removeMessageListener("Browser:SetSSLErrorReportAuto", this);
     mm.removeMessageListener("Browser:ResetSSLPreferences", this);
     mm.removeMessageListener("Browser:SSLErrorReportTelemetry", this);
     mm.removeMessageListener("Browser:OverrideWeakCrypto", this);
     mm.removeMessageListener("Browser:SSLErrorGoBack", this);
   },
 
-  handleEvent: function (event) {
+  handleEvent: function(event) {
     if (!event.isTrusted || // Don't trust synthetic events
         event.button == 2) {
       return;
     }
 
     let originalTarget = event.originalTarget;
     let ownerDoc = originalTarget.ownerDocument;
     if (!ownerDoc) {
@@ -2779,17 +2779,17 @@ var BrowserOnClick = {
     }
 
     if (gMultiProcessBrowser &&
         ownerDoc.documentURI.toLowerCase() == "about:newtab") {
       this.onE10sAboutNewTab(event, ownerDoc);
     }
   },
 
-  receiveMessage: function (msg) {
+  receiveMessage: function(msg) {
     switch (msg.name) {
       case "Browser:CertExceptionError":
         this.onCertError(msg.target, msg.data.elementId,
                          msg.data.isTopFrame, msg.data.location,
                          msg.data.securityInfoAsString);
       break;
       case "Browser:SiteBlockedError":
         this.onAboutBlocked(msg.data.elementId, msg.data.reason,
@@ -2851,17 +2851,17 @@ var BrowserOnClick = {
     transportSecurityInfo.QueryInterface(Ci.nsITransportSecurityInfo)
 
     let errorReporter = Cc["@mozilla.org/securityreporter;1"]
                           .getService(Ci.nsISecurityReporter);
     errorReporter.reportTLSError(transportSecurityInfo,
                                  uri.host, uri.port);
   },
 
-  onCertError: function (browser, elementId, isTopFrame, location, securityInfoAsString) {
+  onCertError: function(browser, elementId, isTopFrame, location, securityInfoAsString) {
     let secHistogram = Services.telemetry.getHistogramById("SECURITY_UI");
     let securityInfo;
 
     switch (elementId) {
       case "exceptionDialogButton":
         if (isTopFrame) {
           secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_BAD_CERT_TOP_CLICK_ADD_EXCEPTION);
         }
@@ -2920,17 +2920,17 @@ var BrowserOnClick = {
         let detailedInfo = getDetailedCertErrorInfo(location,
                                                     securityInfo);
         gClipboardHelper.copyString(detailedInfo);
         break;
 
     }
   },
 
-  onAboutBlocked: function (elementId, reason, isTopFrame, location) {
+  onAboutBlocked: function(elementId, reason, isTopFrame, location) {
     // Depending on what page we are displaying here (malware/phishing/unwanted)
     // use the right strings and links for each.
     let bucketName = "";
     let sendTelemetry = false;
     if (reason === 'malware') {
       sendTelemetry = true;
       bucketName = "WARNING_MALWARE_PAGE_";
     } else if (reason === 'phishing') {
@@ -2991,17 +2991,17 @@ var BrowserOnClick = {
     if (anchorTarget instanceof HTMLAnchorElement &&
         anchorTarget.classList.contains("newtab-link")) {
       event.preventDefault();
       let where = whereToOpenLink(event, false, false);
       openLinkIn(anchorTarget.href, where, { charset: ownerDoc.characterSet, referrerURI: ownerDoc.documentURIObject });
     }
   },
 
-  ignoreWarningButton: function (reason) {
+  ignoreWarningButton: function(reason) {
     // Allow users to override and continue through to the site,
     // but add a notify bar as a reminder, so that they don't lose
     // track after, e.g., tab switching.
     gBrowser.loadURIWithFlags(gBrowser.currentURI.spec,
                               nsIWebNavigation.LOAD_FLAGS_BYPASS_CLASSIFIER,
                               null, null, null);
 
     Services.perms.add(gBrowser.currentURI, "safe-browsing",
@@ -3258,78 +3258,78 @@ function getPEMString(cert)
          + "\r\n-----END CERTIFICATE-----\r\n";
 }
 
 var PrintPreviewListener = {
   _printPreviewTab: null,
   _tabBeforePrintPreview: null,
   _simplifyPageTab: null,
 
-  getPrintPreviewBrowser: function () {
+  getPrintPreviewBrowser: function() {
     if (!this._printPreviewTab) {
       let browser = gBrowser.selectedTab.linkedBrowser;
       let forceNotRemote = gMultiProcessBrowser && !browser.isRemoteBrowser;
       this._tabBeforePrintPreview = gBrowser.selectedTab;
       this._printPreviewTab = gBrowser.loadOneTab("about:blank",
                                                   { inBackground: false,
                                                     forceNotRemote,
                                                     relatedBrowser: browser });
       gBrowser.selectedTab = this._printPreviewTab;
     }
     return gBrowser.getBrowserForTab(this._printPreviewTab);
   },
-  createSimplifiedBrowser: function () {
+  createSimplifiedBrowser: function() {
     this._simplifyPageTab = gBrowser.loadOneTab("about:blank",
                                                 { inBackground: true });
     return this.getSimplifiedSourceBrowser();
   },
-  getSourceBrowser: function () {
+  getSourceBrowser: function() {
     return this._tabBeforePrintPreview ?
       this._tabBeforePrintPreview.linkedBrowser : gBrowser.selectedBrowser;
   },
-  getSimplifiedSourceBrowser: function () {
+  getSimplifiedSourceBrowser: function() {
     return this._simplifyPageTab ?
       gBrowser.getBrowserForTab(this._simplifyPageTab) : null;
   },
-  getNavToolbox: function () {
+  getNavToolbox: function() {
     return gNavToolbox;
   },
-  onEnter: function () {
+  onEnter: function() {
     // We might have accidentally switched tabs since the user invoked print
     // preview
     if (gBrowser.selectedTab != this._printPreviewTab) {
       gBrowser.selectedTab = this._printPreviewTab;
     }
     gInPrintPreviewMode = true;
     this._toggleAffectedChrome();
   },
-  onExit: function () {
+  onExit: function() {
     gBrowser.selectedTab = this._tabBeforePrintPreview;
     this._tabBeforePrintPreview = null;
     gInPrintPreviewMode = false;
     this._toggleAffectedChrome();
     if (this._simplifyPageTab) {
       gBrowser.removeTab(this._simplifyPageTab);
       this._simplifyPageTab = null;
     }
     gBrowser.removeTab(this._printPreviewTab);
     gBrowser.deactivatePrintPreviewBrowsers();
     this._printPreviewTab = null;
   },
-  _toggleAffectedChrome: function () {
+  _toggleAffectedChrome: function() {
     gNavToolbox.collapsed = gInPrintPreviewMode;
 
     if (gInPrintPreviewMode)
       this._hideChrome();
     else
       this._showChrome();
 
     TabsInTitlebar.allowedBy("print-preview", !gInPrintPreviewMode);
   },
-  _hideChrome: function () {
+  _hideChrome: function() {
     this._chromeState = {};
 
     this._chromeState.sidebarOpen = SidebarUI.isOpen;
     this._sidebarCommand = SidebarUI.currentID;
     SidebarUI.hide();
 
     var notificationBox = gBrowser.getNotificationBox();
     this._chromeState.notificationsOpen = !notificationBox.notificationsHidden;
@@ -3347,17 +3347,17 @@ var PrintPreviewListener = {
 
     this._chromeState.syncNotificationsOpen = false;
     var syncNotifications = document.getElementById("sync-notifications");
     if (syncNotifications) {
       this._chromeState.syncNotificationsOpen = !syncNotifications.notificationsHidden;
       syncNotifications.notificationsHidden = true;
     }
   },
-  _showChrome: function () {
+  _showChrome: function() {
     if (this._chromeState.notificationsOpen)
       gBrowser.getNotificationBox().notificationsHidden = false;
 
     if (this._chromeState.findOpen)
       gFindBar.open();
 
     if (this._chromeState.globalNotificationsOpen)
       document.getElementById("global-notificationbox").notificationsHidden = false;
@@ -3383,47 +3383,47 @@ function getMarkupDocumentViewer()
 function FillInHTMLTooltip(tipElement)
 {
   document.getElementById("aHTMLTooltip").fillInPageTooltip(tipElement);
 }
 
 var browserDragAndDrop = {
   canDropLink: aEvent => Services.droppedLinkHandler.canDropLink(aEvent, true),
 
-  dragOver: function (aEvent)
+  dragOver: function(aEvent)
   {
     if (this.canDropLink(aEvent)) {
       aEvent.preventDefault();
     }
   },
 
-  dropLinks: function (aEvent, aDisallowInherit) {
+  dropLinks: function(aEvent, aDisallowInherit) {
     return Services.droppedLinkHandler.dropLinks(aEvent, aDisallowInherit);
   }
 };
 
 var homeButtonObserver = {
-  onDrop: function (aEvent)
+  onDrop: function(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: function (aEvent)
+  onDragOver: function(aEvent)
     {
       if (gPrefService.prefIsLocked("browser.startup.homepage")) {
         return;
       }
       browserDragAndDrop.dragOver(aEvent);
       aEvent.dropEffect = "link";
     },
-  onDragExit: function (aEvent)
+  onDragExit: function(aEvent)
     {
     }
 }
 
 function openHomeDialog(aURL)
 {
   var promptTitle = gNavigatorBundle.getString("droponhometitle");
   var promptMsg;
@@ -3487,17 +3487,17 @@ var newWindowButtonObserver = {
 const DOMLinkHandler = {
   init: function() {
     let mm = window.messageManager;
     mm.addMessageListener("Link:AddFeed", this);
     mm.addMessageListener("Link:SetIcon", this);
     mm.addMessageListener("Link:AddSearch", this);
   },
 
-  receiveMessage: function (aMsg) {
+  receiveMessage: function(aMsg) {
     switch (aMsg.name) {
       case "Link:AddFeed":
         let link = {type: aMsg.data.type, href: aMsg.data.href, title: aMsg.data.title};
         FeedHandler.addFeed(link, aMsg.target);
         break;
 
       case "Link:SetIcon":
         this.setIcon(aMsg.target, aMsg.data.url, aMsg.data.loadingPrincipal);
@@ -3654,17 +3654,17 @@ const BrowserSearch = {
    * @param purpose [optional]
    *        A string meant to indicate the context of the search request. This
    *        allows the search service to provide a different nsISearchSubmission
    *        depending on e.g. where the search is triggered in the UI.
    *
    * @return engine The search engine used to perform a search, or null if no
    *                search was performed.
    */
-  _loadSearch: function (searchText, useNewTab, purpose) {
+  _loadSearch: function(searchText, useNewTab, purpose) {
     let engine;
 
     // If the search bar is visible, use the current engine, otherwise, fall
     // back to the default engine.
     if (isElementVisible(this.searchBar))
       engine = Services.search.currentEngine;
     else
       engine = Services.search.defaultEngine;
@@ -3704,24 +3704,24 @@ const BrowserSearch = {
   },
 
   /**
    * Perform a search initiated from the context menu.
    *
    * This should only be called from the context menu. See
    * BrowserSearch.loadSearch for the preferred API.
    */
-  loadSearchFromContext: function (terms) {
+  loadSearchFromContext: function(terms) {
     let engine = BrowserSearch._loadSearch(terms, true, "contextmenu");
     if (engine) {
       BrowserSearch.recordSearchInTelemetry(engine, "contextmenu");
     }
   },
 
-  pasteAndSearch: function (event) {
+  pasteAndSearch: function(event) {
     BrowserSearch.searchBar.select();
     goDoCommand("cmd_paste");
     BrowserSearch.searchBar.handleSearchCommand(event);
   },
 
   /**
    * Returns the search bar element if it is present in the toolbar, null otherwise.
    */
@@ -3734,17 +3734,17 @@ const BrowserSearch = {
   },
 
   loadAddEngines: function BrowserSearch_loadAddEngines() {
     var newWindowPref = gPrefService.getIntPref("browser.link.open_newwindow");
     var where = newWindowPref == 3 ? "tab" : "window";
     openUILinkIn(this.searchEnginesURL, where);
   },
 
-  _getSearchEngineId: function (engine) {
+  _getSearchEngineId: function(engine) {
     if (engine && engine.identifier) {
       return engine.identifier;
     }
 
     if (!engine || (engine.name === undefined) ||
         !Services.prefs.getBoolPref("toolkit.telemetry.enabled"))
       return "other";
 
@@ -3763,17 +3763,17 @@ const BrowserSearch = {
    *        allowed values.
    * @param details [optional]
    *        An optional parameter passed to |BrowserUsageTelemetry.recordSearch|.
    *        See its documentation for allowed options.
    *        Additionally, if the search was a suggested search, |details.selection|
    *        indicates where the item was in the suggestion list and how the user
    *        selected it: {selection: {index: The selected index, kind: "key" or "mouse"}}
    */
-  recordSearchInTelemetry: function (engine, source, details = {}) {
+  recordSearchInTelemetry: function(engine, source, details = {}) {
     BrowserUITelemetry.countSearchEvent(source, null, details.selection);
     try {
       BrowserUsageTelemetry.recordSearch(engine, source, details);
     } catch (ex) {
       Cu.reportError(ex);
     }
   },
 
@@ -3787,17 +3787,17 @@ const BrowserSearch = {
    * @param source
    *        (string) Where the search originated from. See BrowserUsageTelemetry for
    *        allowed values.
    * @param type
    *        (string) Indicates how the user selected the search item.
    * @param where
    *        (string) Where was the search link opened (e.g. new tab, current tab, ..).
    */
-  recordOneoffSearchInTelemetry: function (engine, source, type, where) {
+  recordOneoffSearchInTelemetry: function(engine, source, type, where) {
     let id = this._getSearchEngineId(engine) + "." + source;
     BrowserUITelemetry.countOneoffSearchEvent(id, type, where);
     try {
       const details = {type, isOneOff: true};
       BrowserUsageTelemetry.recordSearch(engine, source, details);
     } catch (ex) {
       Cu.reportError(ex);
     }
@@ -3876,17 +3876,17 @@ function FillHistoryMenu(aParent) {
       item.setAttribute("uri", uri);
       item.setAttribute("label", entry.title || uri);
       item.setAttribute("index", j);
 
       // Cache this so that gotoHistoryIndex doesn't need the original index
       item.setAttribute("historyindex", j - index);
 
       if (j != index) {
-        PlacesUtils.favicons.getFaviconURLForPage(entryURI, function (aURI) {
+        PlacesUtils.favicons.getFaviconURLForPage(entryURI, function(aURI) {
           if (aURI) {
             let iconURL = PlacesUtils.favicons.getFaviconLinkForIcon(aURI).spec;
             item.style.listStyleImage = "url(" + iconURL + ")";
           }
         });
       }
 
       if (j < index) {
@@ -4179,112 +4179,112 @@ var XULBrowserWindow = {
   defaultStatus: "",
   overLink: "",
   startTime: 0,
   statusText: "",
   isBusy: false,
   // Left here for add-on compatibility, see bug 752434
   inContentWhitelist: [],
 
-  QueryInterface: function (aIID) {
+  QueryInterface: function(aIID) {
     if (aIID.equals(Ci.nsIWebProgressListener) ||
         aIID.equals(Ci.nsIWebProgressListener2) ||
         aIID.equals(Ci.nsISupportsWeakReference) ||
         aIID.equals(Ci.nsIXULBrowserWindow) ||
         aIID.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_NOINTERFACE;
   },
 
-  get stopCommand () {
+  get stopCommand() {
     delete this.stopCommand;
     return this.stopCommand = document.getElementById("Browser:Stop");
   },
-  get reloadCommand () {
+  get reloadCommand() {
     delete this.reloadCommand;
     return this.reloadCommand = document.getElementById("Browser:Reload");
   },
-  get statusTextField () {
+  get statusTextField() {
     return gBrowser.getStatusPanel();
   },
-  get isImage () {
+  get isImage() {
     delete this.isImage;
     return this.isImage = document.getElementById("isImage");
   },
-  get canViewSource () {
+  get canViewSource() {
     delete this.canViewSource;
     return this.canViewSource = document.getElementById("canViewSource");
   },
 
-  init: function () {
+  init: function() {
     // Initialize the security button's state and tooltip text.
     var securityUI = gBrowser.securityUI;
     this.onSecurityChange(null, null, securityUI.state, true);
   },
 
-  setJSStatus: function () {
+  setJSStatus: function() {
     // unsupported
   },
 
   forceInitialBrowserRemote: function() {
     let initBrowser =
       document.getAnonymousElementByAttribute(gBrowser, "anonid", "initialBrowser");
     return initBrowser.frameLoader.tabParent;
   },
 
   forceInitialBrowserNonRemote: function(aOpener) {
     let initBrowser =
       document.getAnonymousElementByAttribute(gBrowser, "anonid", "initialBrowser");
     gBrowser.updateBrowserRemoteness(initBrowser, false, aOpener);
   },
 
-  setDefaultStatus: function (status) {
+  setDefaultStatus: function(status) {
     this.defaultStatus = status;
     this.updateStatusField();
   },
 
-  setOverLink: function (url, anchorElt) {
+  setOverLink: function(url, anchorElt) {
     // Encode bidirectional formatting characters.
     // (RFC 3987 sections 3.2 and 4.1 paragraph 6)
     url = url.replace(/[\u200e\u200f\u202a\u202b\u202c\u202d\u202e]/g,
                       encodeURIComponent);
 
     if (gURLBar && gURLBar._mayTrimURLs /* corresponds to browser.urlbar.trimURLs */)
       url = trimURL(url);
 
     this.overLink = url;
     LinkTargetDisplay.update();
   },
 
-  showTooltip: function (x, y, tooltip, direction) {
+  showTooltip: function(x, y, tooltip, direction) {
     if (Cc["@mozilla.org/widget/dragservice;1"].getService(Ci.nsIDragService).
         getCurrentSession()) {
       return;
     }
 
     // The x,y coordinates are relative to the <browser> element using
     // the chrome zoom level.
     let elt = document.getElementById("remoteBrowserTooltip");
     elt.label = tooltip;
     elt.style.direction = direction;
 
     let anchor = gBrowser.selectedBrowser;
     elt.openPopupAtScreen(anchor.boxObject.screenX + x, anchor.boxObject.screenY + y, false, null);
   },
 
-  hideTooltip: function () {
+  hideTooltip: function() {
     let elt = document.getElementById("remoteBrowserTooltip");
     elt.hidePopup();
   },
 
-  getTabCount: function () {
+  getTabCount: function() {
     return gBrowser.tabs.length;
   },
 
-  updateStatusField: function () {
+  updateStatusField: function() {
     var text, type, types = ["overLink"];
     if (this._busyUI)
       types.push("status");
     types.push("defaultStatus");
     for (type of types) {
       text = this[type];
       if (text)
         break;
@@ -4326,32 +4326,32 @@ var XULBrowserWindow = {
     if (!E10SUtils.shouldLoadURI(aDocShell, aURI, aReferrer)) {
       E10SUtils.redirectLoad(aDocShell, aURI, aReferrer);
       return false;
     }
 
     return true;
   },
 
-  onProgressChange: function (aWebProgress, aRequest,
-                              aCurSelfProgress, aMaxSelfProgress,
-                              aCurTotalProgress, aMaxTotalProgress) {
+  onProgressChange: function(aWebProgress, aRequest,
+                             aCurSelfProgress, aMaxSelfProgress,
+                             aCurTotalProgress, aMaxTotalProgress) {
     // Do nothing.
   },
 
-  onProgressChange64: function (aWebProgress, aRequest,
-                                aCurSelfProgress, aMaxSelfProgress,
-                                aCurTotalProgress, aMaxTotalProgress) {
+  onProgressChange64: function(aWebProgress, aRequest,
+                               aCurSelfProgress, aMaxSelfProgress,
+                               aCurTotalProgress, aMaxTotalProgress) {
     return this.onProgressChange(aWebProgress, aRequest,
       aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress,
       aMaxTotalProgress);
   },
 
   // This function fires only for the currently selected tab.
-  onStateChange: function (aWebProgress, aRequest, aStateFlags, aStatus) {
+  onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus) {
     const nsIWebProgressListener = Ci.nsIWebProgressListener;
     const nsIChannel = Ci.nsIChannel;
 
     let browser = gBrowser.selectedBrowser;
 
     if (aStateFlags & nsIWebProgressListener.STATE_START &&
         aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK) {
 
@@ -4425,17 +4425,17 @@ var XULBrowserWindow = {
         this._busyUI = false;
 
         this.stopCommand.setAttribute("disabled", "true");
         CombinedStopReload.switchToReload(aRequest instanceof Ci.nsIRequest);
       }
     }
   },
 
-  onLocationChange: function (aWebProgress, aRequest, aLocationURI, aFlags) {
+  onLocationChange: function(aWebProgress, aRequest, aLocationURI, aFlags) {
     var location = aLocationURI ? aLocationURI.spec : "";
 
     // If displayed, hide the form validation popup.
     FormValidationHandler.hidePopup();
 
     let pageTooltip = document.getElementById("aHTMLTooltip");
     let tooltipNode = pageTooltip.triggerNode;
     if (tooltipNode) {
@@ -4547,17 +4547,17 @@ var XULBrowserWindow = {
     UpdateBackForwardCommands(gBrowser.webNavigation);
     ReaderParent.updateReaderButton(gBrowser.selectedBrowser);
 
     gGestureSupport.restoreRotationState();
 
     // See bug 358202, when tabs are switched during a drag operation,
     // timers don't fire on windows (bug 203573)
     if (aRequest)
-      setTimeout(function () { XULBrowserWindow.asyncUpdateUI(); }, 0);
+      setTimeout(function() { XULBrowserWindow.asyncUpdateUI(); }, 0);
     else
       this.asyncUpdateUI();
 
     if (AppConstants.MOZ_CRASHREPORTER && aLocationURI) {
       let uri = aLocationURI.clone();
       try {
         // If the current URI contains a username/password, remove it.
         uri.userPass = "";
@@ -4569,40 +4569,40 @@ var XULBrowserWindow = {
         // Don't make noise when the crash reporter is built but not enabled.
         if (ex.result != Components.results.NS_ERROR_NOT_INITIALIZED) {
           throw ex;
         }
       }
     }
   },
 
-  asyncUpdateUI: function () {
+  asyncUpdateUI: function() {
     FeedHandler.updateFeeds();
     BrowserSearch.updateOpenSearchBadge();
   },
 
   // Left here for add-on compatibility, see bug 752434
   hideChromeForLocation: function() {},
 
-  onStatusChange: function (aWebProgress, aRequest, aStatus, aMessage) {
+  onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage) {
     this.status = aMessage;
     this.updateStatusField();
   },
 
   // Properties used to cache security state used to update the UI
   _state: null,
   _lastLocation: null,
 
   // This is called in multiple ways:
   //  1. Due to the nsIWebProgressListener.onSecurityChange notification.
   //  2. Called by tabbrowser.xml when updating the current browser.
   //  3. Called directly during this object's initializations.
   // aRequest will be null always in case 2 and 3, and sometimes in case 1 (for
   // instance, there won't be a request when STATE_BLOCKED_TRACKING_CONTENT is observed).
-  onSecurityChange: function (aWebProgress, aRequest, aState, aIsSimulated) {
+  onSecurityChange: function(aWebProgress, aRequest, aState, aIsSimulated) {
     // Don't need to do anything if the data we use to update the UI hasn't
     // changed
     let uri = gBrowser.currentURI;
     let spec = uri.spec;
     if (this._state == aState &&
         this._lastLocation == spec)
       return;
     this._state = aState;
@@ -4649,21 +4649,21 @@ var LinkTargetDisplay = {
   get DELAY_SHOW() {
      delete this.DELAY_SHOW;
      return this.DELAY_SHOW = Services.prefs.getIntPref("browser.overlink-delay");
   },
 
   DELAY_HIDE: 250,
   _timer: 0,
 
-  get _isVisible () {
+  get _isVisible() {
     return XULBrowserWindow.statusTextField.label != "";
   },
 
-  update: function () {
+  update: function() {
     clearTimeout(this._timer);
     window.removeEventListener("mousemove", this, true);
 
     if (!XULBrowserWindow.overLink) {
       if (XULBrowserWindow.hideOverLinkImmediately)
         this._hide();
       else
         this._timer = setTimeout(this._hide.bind(this), this.DELAY_HIDE);
@@ -4674,85 +4674,85 @@ var LinkTargetDisplay = {
       XULBrowserWindow.updateStatusField();
     } else {
       // Let the display appear when the mouse doesn't move within the delay
       this._showDelayed();
       window.addEventListener("mousemove", this, true);
     }
   },
 
-  handleEvent: function (event) {
+  handleEvent: function(event) {
     switch (event.type) {
       case "mousemove":
         // Restart the delay since the mouse was moved
         clearTimeout(this._timer);
         this._showDelayed();
         break;
     }
   },
 
-  _showDelayed: function () {
-    this._timer = setTimeout(function (self) {
+  _showDelayed: function() {
+    this._timer = setTimeout(function(self) {
       XULBrowserWindow.updateStatusField();
       window.removeEventListener("mousemove", self, true);
     }, this.DELAY_SHOW, this);
   },
 
-  _hide: function () {
+  _hide: function() {
     clearTimeout(this._timer);
 
     XULBrowserWindow.updateStatusField();
   }
 };
 
 var CombinedStopReload = {
-  init: function () {
+  init: function() {
     if (this._initialized)
       return;
 
     let reload = document.getElementById("urlbar-reload-button");
     let stop = document.getElementById("urlbar-stop-button");
     if (!stop || !reload || reload.nextSibling != stop)
       return;
 
     this._initialized = true;
     if (XULBrowserWindow.stopCommand.getAttribute("disabled") != "true")
       reload.setAttribute("displaystop", "true");
     stop.addEventListener("click", this, false);
     this.reload = reload;
     this.stop = stop;
   },
 
-  uninit: function () {
+  uninit: function() {
     if (!this._initialized)
       return;
 
     this._cancelTransition();
     this._initialized = false;
     this.stop.removeEventListener("click", this, false);
     this.reload = null;
     this.stop = null;
   },
 
-  handleEvent: function (event) {
+  handleEvent: function(event) {
     // the only event we listen to is "click" on the stop button
     if (event.button == 0 &&
         !this.stop.disabled)
       this._stopClicked = true;
   },
 
-  switchToStop: function () {
+  switchToStop: function() {
     if (!this._initialized)
       return;
 
     this._cancelTransition();
     this.reload.setAttribute("displaystop", "true");
   },
 
-  switchToReload: function (aDelay) {
+  switchToReload: function(aDelay) {
     if (!this._initialized)
       return;
 
     this.reload.removeAttribute("displaystop");
 
     if (!aDelay || this._stopClicked) {
       this._stopClicked = false;
       this._cancelTransition();
@@ -4762,37 +4762,37 @@ var CombinedStopReload = {
     }
 
     if (this._timer)
       return;
 
     // Temporarily disable the reload button to prevent the user from
     // accidentally reloading the page when intending to click the stop button
     this.reload.disabled = true;
-    this._timer = setTimeout(function (self) {
+    this._timer = setTimeout(function(self) {
       self._timer = 0;
       self.reload.disabled = XULBrowserWindow.reloadCommand
                                              .getAttribute("disabled") == "true";
     }, 650, this);
   },
 
-  _cancelTransition: function () {
+  _cancelTransition: function() {
     if (this._timer) {
       clearTimeout(this._timer);
       this._timer = 0;
     }
   }
 };
 
 var TabsProgressListener = {
   // Keep track of which browsers we've started load timers for, since
   // we won't see STATE_START events for pre-rendered tabs.
   _startedLoadTimer: new WeakSet(),
 
-  onStateChange: function (aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
+  onStateChange: function(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
     // Collect telemetry data about tab load times.
     if (aWebProgress.isTopLevel && (!aRequest.originalURI || aRequest.originalURI.spec.scheme != "about")) {
       if (aStateFlags & Ci.nsIWebProgressListener.STATE_IS_WINDOW) {
         if (aStateFlags & Ci.nsIWebProgressListener.STATE_START) {
           this._startedLoadTimer.add(aBrowser);
           TelemetryStopwatch.start("FX_PAGE_LOAD_MS", aBrowser);
           Services.telemetry.getHistogramById("FX_TOTAL_TOP_VISITS").add(true);
         } else if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP &&
@@ -4836,18 +4836,18 @@ var TabsProgressListener = {
         aBrowser.removeEventListener("click", BrowserOnClick, true);
         aBrowser.removeEventListener("pagehide", onPageHide, true);
         if (event.target.documentElement)
           event.target.documentElement.removeAttribute("hasBrowserHandlers");
       }, true);
     }
   },
 
-  onLocationChange: function (aBrowser, aWebProgress, aRequest, aLocationURI,
-                              aFlags) {
+  onLocationChange: function(aBrowser, aWebProgress, aRequest, aLocationURI,
+                             aFlags) {
     // Filter out location changes caused by anchor navigation
     // or history.push/pop/replaceState.
     if (aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT) {
       // Reader mode actually cares about these:
       let mm = gBrowser.selectedBrowser.messageManager;
       mm.sendAsyncMessage("Reader:PushState", {isArticle: gBrowser.selectedBrowser.isArticle});
       return;
     }
@@ -4918,17 +4918,17 @@ nsBrowserAccess.prototype = {
     let browser = win.gBrowser.getBrowserForTab(tab);
 
     if (needToFocusWin || (!loadInBackground && aIsExternal))
       win.focus();
 
     return browser;
   },
 
-  openURI: function (aURI, aOpener, aWhere, aFlags) {
+  openURI: function(aURI, aOpener, aWhere, aFlags) {
     // This function should only ever be called if we're opening a URI
     // from a non-remote browser window (via nsContentTreeOwner).
     if (aOpener && Cu.isCrossProcessWrapper(aOpener)) {
       Cu.reportError("nsBrowserAccess.openURI was passed a CPOW for aOpener. " +
                      "openURI should only ever be called from non-remote browsers.");
       throw Cr.NS_ERROR_FAILURE;
     }
 
@@ -5032,17 +5032,17 @@ nsBrowserAccess.prototype = {
                                         isExternal, false,
                                         userContextId);
     if (browser)
       return browser.QueryInterface(Ci.nsIFrameLoaderOwner);
 
     return null;
   },
 
-  isTabContentWindow: function (aWindow) {
+  isTabContentWindow: function(aWindow) {
     return gBrowser.browsers.some(browser => browser.contentWindow == aWindow);
   },
 
   canClose() {
     return CanCloseWindow();
   },
 }
 
@@ -5248,39 +5248,39 @@ var gTabletModePageCounter = {
 function displaySecurityInfo()
 {
   BrowserPageInfo(null, "securityTab");
 }
 
 
 var gHomeButton = {
   prefDomain: "browser.startup.homepage",
-  observe: function (aSubject, aTopic, aPrefName)
+  observe: function(aSubject, aTopic, aPrefName)
   {
     if (aTopic != "nsPref:changed" || aPrefName != this.prefDomain)
       return;
 
     this.updateTooltip();
   },
 
-  updateTooltip: function (homeButton)
+  updateTooltip: function(homeButton)
   {
     if (!homeButton)
       homeButton = document.getElementById("home-button");
     if (homeButton) {
       var homePage = this.getHomePage();
       homePage = homePage.replace(/\|/g, ', ');
       if (homePage.toLowerCase() == "about:home")
         homeButton.setAttribute("tooltiptext", homeButton.getAttribute("aboutHomeOverrideTooltip"));
       else
         homeButton.setAttribute("tooltiptext", homePage);
     }
   },
 
-  getHomePage: function ()
+  getHomePage: function()
   {
     var url;
     try {
       url = gPrefService.getComplexValue(this.prefDomain,
                                 Components.interfaces.nsIPrefLocalizedString).data;
     } catch (e) {
     }
 
@@ -5771,42 +5771,42 @@ var gPageStyleMenu = {
    * @param browser (optional)
    *        The <xul:browser> to search for stylesheets. If omitted, this
    *        defaults to the currently selected tab's browser.
    * @returns Array
    *        An Array of Objects representing stylesheets in the browser.
    *        See the documentation for gPageStyleMenu for a description
    *        of the Object structure.
    */
-  getBrowserStyleSheets: function (browser) {
+  getBrowserStyleSheets: function(browser) {
     if (!browser) {
       browser = gBrowser.selectedBrowser;
     }
 
     let data = this._pageStyleSheets.get(browser.permanentKey);
     if (!data) {
       return [];
     }
     return data.filteredStyleSheets;
   },
 
-  _getStyleSheetInfo: function (browser) {
+  _getStyleSheetInfo: function(browser) {
     let data = this._pageStyleSheets.get(browser.permanentKey);
     if (!data) {
       return {
         filteredStyleSheets: [],
         authorStyleDisabled: false,
         preferredStyleSheetSet: true
       };
     }
 
     return data;
   },
 
-  fillPopup: function (menuPopup) {
+  fillPopup: function(menuPopup) {
     let styleSheetInfo = this._getStyleSheetInfo(gBrowser.selectedBrowser);
     var noStyle = menuPopup.firstChild;
     var persistentOnly = noStyle.nextSibling;
     var sep = persistentOnly.nextSibling;
     while (sep.nextSibling)
       menuPopup.removeChild(sep.nextSibling);
 
     let styleSheets = styleSheetInfo.filteredStyleSheets;
@@ -5840,22 +5840,22 @@ var gPageStyleMenu = {
     }
 
     noStyle.setAttribute("checked", styleDisabled);
     persistentOnly.setAttribute("checked", !altStyleSelected && !styleDisabled);
     persistentOnly.hidden = styleSheetInfo.preferredStyleSheetSet ? haveAltSheets : false;
     sep.hidden = (noStyle.hidden && persistentOnly.hidden) || !haveAltSheets;
   },
 
-  switchStyleSheet: function (title) {
+  switchStyleSheet: function(title) {
     let mm = gBrowser.selectedBrowser.messageManager;
     mm.sendAsyncMessage("PageStyle:Switch", {title: title});
   },
 
-  disableStyle: function () {
+  disableStyle: function() {
     let mm = gBrowser.selectedBrowser.messageManager;
     mm.sendAsyncMessage("PageStyle:Disable");
   },
 };
 
 /* Legacy global page-style functions */
 var stylesheetFillPopup = gPageStyleMenu.fillPopup.bind(gPageStyleMenu);
 function stylesheetSwitchAll(contentWindow, title) {
@@ -5878,77 +5878,77 @@ var LanguageDetectionListener = {
   }
 };
 
 
 var BrowserOffline = {
   _inited: false,
 
   // BrowserOffline Public Methods
-  init: function ()
+  init: function()
   {
     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: function ()
+  uninit: function()
   {
     if (this._inited) {
       Services.obs.removeObserver(this, "network:offline-status-changed");
     }
   },
 
-  toggleOfflineStatus: function ()
+  toggleOfflineStatus: function()
   {
     var ioService = Services.io;
 
     if (!ioService.offline && !this._canGoOffline()) {
       this._updateOfflineUI(false);
       return;
     }
 
     ioService.offline = !ioService.offline;
   },
 
   // nsIObserver
-  observe: function (aSubject, aTopic, aState)
+  observe: function(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: function ()
+  _canGoOffline: function()
   {
     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) {
     }
 
     return true;
   },
 
   _uiElement: null,
-  _updateOfflineUI: function (aOffline)
+  _updateOfflineUI: function(aOffline)
   {
     var offlineLocked = gPrefService.prefIsLocked("network.online");
     if (offlineLocked)
       this._uiElement.setAttribute("disabled", "true");
 
     this._uiElement.setAttribute("checked", aOffline);
   }
 };
@@ -6323,38 +6323,38 @@ function warnAboutClosingWindow() {
   // OS X doesn't quit the application when the last window is closed, but keeps
   // the session alive. Hence don't prompt users to save tabs, but warn about
   // closing multiple tabs.
   return AppConstants.platform != "macosx"
          || (isPBWindow || gBrowser.warnAboutClosingTabs(gBrowser.closingTabsEnum.ALL));
 }
 
 var MailIntegration = {
-  sendLinkForBrowser: function (aBrowser) {
+  sendLinkForBrowser: function(aBrowser) {
     this.sendMessage(aBrowser.currentURI.spec, aBrowser.contentTitle);
   },
 
-  sendMessage: function (aBody, aSubject) {
+  sendMessage: function(aBody, aSubject) {
     // generate a mailto url based on the url and the url's title
     var mailtoUrl = "mailto:";
     if (aBody) {
       mailtoUrl += "?body=" + encodeURIComponent(aBody);
       mailtoUrl += "&subject=" + encodeURIComponent(aSubject);
     }
 
     var uri = makeURI(mailtoUrl);
 
     // now pass this uri to the operating system
     this._launchExternalUrl(uri);
   },
 
   // a generic method which can be used to pass arbitrary urls to the operating
   // system.
   // aURL --> a nsIURI which represents the url to launch
-  _launchExternalUrl: function (aURL) {
+  _launchExternalUrl: function(aURL) {
     var extProtocolSvc =
        Cc["@mozilla.org/uriloader/external-protocol-service;1"]
          .getService(Ci.nsIExternalProtocolService);
     if (extProtocolSvc)
       extProtocolSvc.loadUrl(aURL);
   }
 };
 
@@ -6646,107 +6646,107 @@ var gIdentityHandler = {
   get _hasInsecureLoginForms() {
     // checks if the page has been flagged for an insecure login. Also checks
     // if the pref to degrade the UI is set to true
     return LoginManagerParent.hasInsecureLoginForms(gBrowser.selectedBrowser) &&
            Services.prefs.getBoolPref("security.insecure_password.ui.enabled");
   },
 
   // smart getters
-  get _identityPopup () {
+  get _identityPopup() {
     delete this._identityPopup;
     return this._identityPopup = document.getElementById("identity-popup");
   },
-  get _identityBox () {
+  get _identityBox() {
     delete this._identityBox;
     return this._identityBox = document.getElementById("identity-box");
   },
-  get _identityPopupMultiView () {
+  get _identityPopupMultiView() {
     delete _identityPopupMultiView;
     return document.getElementById("identity-popup-multiView");
   },
-  get _identityPopupContentHosts () {
+  get _identityPopupContentHosts() {
     delete this._identityPopupContentHosts;
     let selector = ".identity-popup-headline.host";
     return this._identityPopupContentHosts = [
       ...this._identityPopupMultiView._mainView.querySelectorAll(selector),
       ...document.querySelectorAll(selector)
     ];
   },
-  get _identityPopupContentHostless () {
+  get _identityPopupContentHostless() {
     delete this._identityPopupContentHostless;
     let selector = ".identity-popup-headline.hostless";
     return this._identityPopupContentHostless = [
       ...this._identityPopupMultiView._mainView.querySelectorAll(selector),
       ...document.querySelectorAll(selector)
     ];
   },
-  get _identityPopupContentOwner () {
+  get _identityPopupContentOwner() {
     delete this._identityPopupContentOwner;
     return this._identityPopupContentOwner =
       document.getElementById("identity-popup-content-owner");
   },
-  get _identityPopupContentSupp () {
+  get _identityPopupContentSupp() {
     delete this._identityPopupContentSupp;
     return this._identityPopupContentSupp =
       document.getElementById("identity-popup-content-supplemental");
   },
-  get _identityPopupContentVerif () {
+  get _identityPopupContentVerif() {
     delete this._identityPopupContentVerif;
     return this._identityPopupContentVerif =
       document.getElementById("identity-popup-content-verifier");
   },
-  get _identityPopupMixedContentLearnMore () {
+  get _identityPopupMixedContentLearnMore() {
     delete this._identityPopupMixedContentLearnMore;
     return this._identityPopupMixedContentLearnMore =
       document.getElementById("identity-popup-mcb-learn-more");
   },
-  get _identityPopupInsecureLoginFormsLearnMore () {
+  get _identityPopupInsecureLoginFormsLearnMore() {
     delete this._identityPopupInsecureLoginFormsLearnMore;
     return this._identityPopupInsecureLoginFormsLearnMore =
       document.getElementById("identity-popup-insecure-login-forms-learn-more");
   },
-  get _identityIconLabels () {
+  get _identityIconLabels() {
     delete this._identityIconLabels;
     return this._identityIconLabels = document.getElementById("identity-icon-labels");
   },
-  get _identityIconLabel () {
+  get _identityIconLabel() {
     delete this._identityIconLabel;
     return this._identityIconLabel = document.getElementById("identity-icon-label");
   },
-  get _connectionIcon () {
+  get _connectionIcon() {
     delete this._connectionIcon;
     return this._connectionIcon = document.getElementById("connection-icon");
   },
-  get _overrideService () {
+  get _overrideService() {
     delete this._overrideService;
     return this._overrideService = Cc["@mozilla.org/security/certoverride;1"]
                                      .getService(Ci.nsICertOverrideService);
   },
-  get _identityIconCountryLabel () {
+  get _identityIconCountryLabel() {
     delete this._identityIconCountryLabel;
     return this._identityIconCountryLabel = document.getElementById("identity-icon-country-label");
   },
-  get _identityIcon () {
+  get _identityIcon() {
     delete this._identityIcon;
     return this._identityIcon = document.getElementById("identity-icon");
   },
-  get _permissionList () {
+  get _permissionList() {
     delete this._permissionList;
     return this._permissionList = document.getElementById("identity-popup-permission-list");
   },
   get _permissionEmptyHint() {
     delete this._permissionEmptyHint;
     return this._permissionEmptyHint = document.getElementById("identity-popup-permission-empty-hint");
   },
-  get _permissionReloadHint () {
+  get _permissionReloadHint() {
     delete this._permissionReloadHint;
     return this._permissionReloadHint = document.getElementById("identity-popup-permission-reload-hint");
   },
-  get _permissionAnchors () {
+  get _permissionAnchors() {
     delete this._permissionAnchors;
     let permissionAnchors = {};
     for (let anchor of document.getElementById("blocked-permissions-container").children) {
       permissionAnchors[anchor.getAttribute("data-permission-id")] = anchor;
     }
     return this._permissionAnchors = permissionAnchors;
   },
 
@@ -7088,17 +7088,17 @@ var gIdentityHandler = {
       if (this._uri.port > 0) {
         port = this._uri.port;
       }
     } catch (e) {}
 
     let buttons = [{
       label: gNavigatorBundle.getString("revokeOverride.label"),
       accessKey: gNavigatorBundle.getString("revokeOverride.accesskey"),
-      callback: function (aNotification, aButton) {
+      callback: function(aNotification, aButton) {
         try {
           let weakCryptoOverride = Cc["@mozilla.org/security/weakcryptooverride;1"]
                                      .getService(Ci.nsIWeakCryptoOverride);
           weakCryptoOverride.removeWeakCryptoOverride(host, port,
             PrivateBrowsingUtils.isBrowserPrivate(gBrowser.selectedBrowser));
           BrowserReloadWithFlags(nsIWebNavigation.LOAD_FLAGS_BYPASS_CACHE);
         } catch (e) {
           Cu.reportError(e);
@@ -7339,52 +7339,52 @@ var gIdentityHandler = {
   },
 
   observe(subject, topic, data) {
     if (topic == "perm-changed") {
       this.refreshIdentityBlock();
     }
   },
 
-  onDragStart: function (event) {
+  onDragStart: function(event) {
     if (gURLBar.getAttribute("pageproxystate") != "valid")
       return;
 
     let value = gBrowser.currentURI.spec;
     let urlString = value + "\n" + gBrowser.contentTitle;
     let htmlString = "<a href=\"" + value + "\">" + value + "</a>";
 
     let dt = event.dataTransfer;
     dt.setData("text/x-moz-url", urlString);
     dt.setData("text/uri-list", value);
     dt.setData("text/plain", value);
     dt.setData("text/html", htmlString);
     dt.setDragImage(this._identityIcon, 16, 16);
   },
 
-  onLocationChange: function () {
+  onLocationChange: function() {
     this._permissionJustRemoved = false;
     this.updatePermissionHint();
   },
 
-  updatePermissionHint: function () {
+  updatePermissionHint: function() {
     if (!this._permissionList.hasChildNodes() && !this._permissionJustRemoved) {
       this._permissionEmptyHint.removeAttribute("hidden");
     } else {
       this._permissionEmptyHint.setAttribute("hidden", "true");
     }
 
     if (this._permissionJustRemoved) {
       this._permissionReloadHint.removeAttribute("hidden");
     } else {
       this._permissionReloadHint.setAttribute("hidden", "true");
     }
   },
 
-  updateSitePermissions: function () {
+  updateSitePermissions: function() {
     while (this._permissionList.hasChildNodes())
       this._permissionList.removeChild(this._permissionList.lastChild);
 
     let uri = gBrowser.currentURI;
 
     let permissions = SitePermissions.getPermissionDetailsByURI(uri);
     if (this._sharingState) {
       // If WebRTC device or screen permissions are in use, we need to find
@@ -7427,17 +7427,17 @@ var gIdentityHandler = {
       heightAfter = parseInt(heightAfter) +
                     parseInt(getComputedStyle(this._permissionList.nextSibling).height);
     }
     let heightChange = parseInt(heightAfter) - parseInt(heightBefore);
     if (heightChange)
       this._identityPopupMultiView.setHeightToFit(heightChange);
   },
 
-  _createPermissionItem: function (aPermission) {
+  _createPermissionItem: function(aPermission) {
     let container = document.createElement("hbox");
     container.setAttribute("class", "identity-popup-permission-item");
     container.setAttribute("align", "center");
 
     let img = document.createElement("image");
     let classes = "identity-popup-permission-icon " + aPermission.id + "-icon";
     if (aPermission.state == SitePermissions.BLOCK)
       classes += " blocked-permission-icon";
@@ -7737,25 +7737,25 @@ function switchToTabHavingURI(aURI, aOpe
     else
       openUILinkIn(aURI.spec, "tab", aOpenParams);
   }
 
   return false;
 }
 
 var RestoreLastSessionObserver = {
-  init: function () {
+  init: function() {
     if (SessionStore.canRestoreLastSession &&
         !PrivateBrowsingUtils.isWindowPrivate(window)) {
       Services.obs.addObserver(this, "sessionstore-last-session-cleared", true);
       goSetCommandEnabled("Browser:RestoreLastSession", true);
     }
   },
 
-  observe: function () {
+  observe: function() {
     // The last session can only be restored once so there's
     // no way we need to re-enable our menu item.
     Services.obs.removeObserver(this, "sessionstore-last-session-cleared");
     goSetCommandEnabled("Browser:RestoreLastSession", false);
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
                                          Ci.nsISupportsWeakReference])
@@ -7956,45 +7956,45 @@ var MousePosTracker = {
   _listeners: new Set(),
   _x: 0,
   _y: 0,
   get _windowUtils() {
     delete this._windowUtils;
     return this._windowUtils = window.getInterface(Ci.nsIDOMWindowUtils);
   },
 
-  addListener: function (listener) {
+  addListener: function(listener) {
     if (this._listeners.has(listener))
       return;
 
     listener._hover = false;
     this._listeners.add(listener);
 
     this._callListener(listener);
   },
 
-  removeListener: function (listener) {
+  removeListener: function(listener) {
     this._listeners.delete(listener);
   },
 
-  handleEvent: function (event) {
+  handleEvent: function(event) {
     var fullZoom = this._windowUtils.fullZoom;
     this._x = event.screenX / fullZoom - window.mozInnerScreenX;
     this._y = event.screenY / fullZoom - window.mozInnerScreenY;
 
-    this._listeners.forEach(function (listener) {
+    this._listeners.forEach(function(listener) {
       try {
         this._callListener(listener);
       } catch (e) {
         Cu.reportError(e);
       }
     }, this);
   },
 
-  _callListener: function (listener) {
+  _callListener: function(listener) {
     let rect = listener.getMouseTargetRect();
     let hover = this._x >= rect.left &&
                 this._x <= rect.right &&
                 this._y >= rect.top &&
                 this._y <= rect.bottom;
 
     if (hover == listener._hover)
       return;
@@ -8006,58 +8006,58 @@ var MousePosTracker = {
         listener.onMouseEnter();
     } else if (listener.onMouseLeave) {
       listener.onMouseLeave();
     }
   }
 };
 
 var ToolbarIconColor = {
-  init: function () {
+  init: function() {
     this._initialized = true;
 
     window.addEventListener("activate", this);
     window.addEventListener("deactivate", this);
     Services.obs.addObserver(this, "lightweight-theme-styling-update", false);
 
     // If the window isn't active now, we assume that it has never been active
     // before and will soon become active such that inferFromText will be
     // called from the initial activate event.
     if (Services.focus.activeWindow == window)
       this.inferFromText();
   },
 
-  uninit: function () {
+  uninit: function() {
     this._initialized = false;
 
     window.removeEventListener("activate", this);
     window.removeEventListener("deactivate", this);
     Services.obs.removeObserver(this, "lightweight-theme-styling-update");
   },
 
-  handleEvent: function (event) {
+  handleEvent: function(event) {
     switch (event.type) {
       case "activate":
       case "deactivate":
         this.inferFromText();
         break;
     }
   },
 
-  observe: function (aSubject, aTopic, aData) {
+  observe: function(aSubject, aTopic, aData) {
     switch (aTopic) {
       case "lightweight-theme-styling-update":
         // inferFromText needs to run after LightweightThemeConsumer.jsm's
         // lightweight-theme-styling-update observer.
         setTimeout(() => { this.inferFromText(); }, 0);
         break;
     }
   },
 
-  inferFromText: function () {
+  inferFromText: function() {
     if (!this._initialized)
       return;
 
     function parseRGB(aColorString) {
       let rgb = aColorString.match(/^rgba?\((\d+), (\d+), (\d+)/);
       rgb.shift();
       return rgb.map(x => parseInt(x));
     }
@@ -8112,17 +8112,17 @@ var PanicButtonNotifier = {
   },
   close: function() {
     let popup = document.getElementById("panic-button-success-notification");
     popup.hidePopup();
   },
 };
 
 var AboutPrivateBrowsingListener = {
-  init: function () {
+  init: function() {
     window.messageManager.addMessageListener(
       "AboutPrivateBrowsing:OpenPrivateWindow",
       msg => {
         OpenBrowserWindow({private: true});
     });
     window.messageManager.addMessageListener(
       "AboutPrivateBrowsing:ToggleTrackingProtection",
       msg => {
--- a/browser/base/content/content.js
+++ b/browser/base/content/content.js
@@ -78,17 +78,17 @@ addEventListener("pageshow", function(ev
 });
 addEventListener("DOMAutoComplete", function(event) {
   LoginManagerContent.onUsernameInput(event);
 });
 addEventListener("blur", function(event) {
   LoginManagerContent.onUsernameInput(event);
 });
 
-var handleContentContextMenu = function (event) {
+var handleContentContextMenu = function(event) {
   let defaultPrevented = event.defaultPrevented;
   if (!Services.prefs.getBoolPref("dom.event.contextmenu.enabled")) {
     let plugin = null;
     try {
       plugin = event.target.QueryInterface(Ci.nsIObjectLoadingContent);
     } catch (e) {}
     if (plugin && plugin.displayedType == Ci.nsIObjectLoadingContent.TYPE_PLUGIN) {
       // Don't open a context menu for plugins.
@@ -355,17 +355,17 @@ var AboutNetAndCertErrorListener = {
       this.onOverride(aEvent);
       break;
     case "AboutNetErrorResetPreferences":
       this.onResetPreferences(aEvent);
       break;
     }
   },
 
-  changedCertPrefs: function () {
+  changedCertPrefs: function() {
     for (let prefName of PREF_SSL_IMPACT) {
       if (Services.prefs.prefHasUserValue(prefName)) {
         return true;
       }
     }
 
     return false;
   },
@@ -514,44 +514,44 @@ var ClickEventHandler = {
     }
 
     // This might be middle mouse navigation.
     if (event.button == 1) {
       sendAsyncMessage("Content:Click", json);
     }
   },
 
-  onCertError: function (targetElement, ownerDoc) {
+  onCertError: function(targetElement, ownerDoc) {
     let docShell = ownerDoc.defaultView.QueryInterface(Ci.nsIInterfaceRequestor)
                                        .getInterface(Ci.nsIWebNavigation)
                                        .QueryInterface(Ci.nsIDocShell);
     sendAsyncMessage("Browser:CertExceptionError", {
       location: ownerDoc.location.href,
       elementId: targetElement.getAttribute("id"),
       isTopFrame: (ownerDoc.defaultView.parent === ownerDoc.defaultView),
       securityInfoAsString: getSerializedSecurityInfo(docShell),
     });
   },
 
-  onAboutBlocked: function (targetElement, ownerDoc) {
+  onAboutBlocked: function(targetElement, ownerDoc) {
     var reason = 'phishing';
     if (/e=malwareBlocked/.test(ownerDoc.documentURI)) {
       reason = 'malware';
     } else if (/e=unwantedBlocked/.test(ownerDoc.documentURI)) {
       reason = 'unwanted';
     }
     sendAsyncMessage("Browser:SiteBlockedError", {
       location: ownerDoc.location.href,
       reason: reason,
       elementId: targetElement.getAttribute("id"),
       isTopFrame: (ownerDoc.defaultView.parent === ownerDoc.defaultView)
     });
   },
 
-  onAboutNetError: function (event, documentURI) {
+  onAboutNetError: function(event, documentURI) {
     let elmId = event.originalTarget.getAttribute("id");
     if (elmId == "returnButton") {
       sendAsyncMessage("Browser:SSLErrorGoBack", {});
       return;
     }
     if (elmId != "errorTryAgain" || !/e=netOffline/.test(documentURI)) {
       return;
     }
@@ -678,17 +678,17 @@ var PageMetadataMessenger = {
         sendAsyncMessage("PageMetadata:MicroformatsResult", result);
         break;
       }
     }
   }
 }
 PageMetadataMessenger.init();
 
-addEventListener("ActivateSocialFeature", function (aEvent) {
+addEventListener("ActivateSocialFeature", function(aEvent) {
   let document = content.document;
   let dwu = content.QueryInterface(Ci.nsIInterfaceRequestor)
                    .getInterface(Ci.nsIDOMWindowUtils);
   if (!dwu.isHandlingUserInput) {
     Cu.reportError("attempt to activate provider without user input from " + document.nodePrincipal.origin);
     return;
   }
 
@@ -868,17 +868,17 @@ var LightWeightThemeWebInstallListener =
   _previewWindow: null,
 
   init: function() {
     addEventListener("InstallBrowserTheme", this, false, true);
     addEventListener("PreviewBrowserTheme", this, false, true);
     addEventListener("ResetBrowserThemePreview", this, false, true);
   },
 
-  handleEvent: function (event) {
+  handleEvent: function(event) {
     switch (event.type) {
       case "InstallBrowserTheme": {
         sendAsyncMessage("LightWeightThemeWebInstaller:Install", {
           baseURI: event.target.baseURI,
           themeData: event.target.getAttribute("data-browsertheme"),
         });
         break;
       }
@@ -902,17 +902,17 @@ var LightWeightThemeWebInstallListener =
                            {baseURI: event.target.baseURI});
           this._resetPreviewWindow();
         }
         break;
       }
     }
   },
 
-  _resetPreviewWindow: function () {
+  _resetPreviewWindow: function() {
     this._previewWindow.removeEventListener("pagehide", this, true);
     this._previewWindow = null;
   }
 };
 
 LightWeightThemeWebInstallListener.init();
 
 function disableSetDesktopBackground(aTarget) {
--- a/browser/base/content/contentSearchUI.js
+++ b/browser/base/content/contentSearchUI.js
@@ -1,15 +1,15 @@
 /* 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";
 
-this.ContentSearchUIController = (function () {
+this.ContentSearchUIController = (function() {
 
 const MAX_DISPLAYED_SUGGESTIONS = 6;
 const SUGGESTION_ID_PREFIX = "searchSuggestion";
 const ONE_OFF_ID_PREFIX = "oneOff";
 
 const HTML_NS = "http://www.w3.org/1999/xhtml";
 
 /**
@@ -188,52 +188,52 @@ ContentSearchUIController.prototype = {
     }
     return this.defaultEngine.name;
   },
 
   get numSuggestions() {
     return this._suggestionsList.children.length;
   },
 
-  selectAndUpdateInput: function (idx) {
+  selectAndUpdateInput: function(idx) {
     this.selectedIndex = idx;
     let newValue = this.suggestionAtIndex(idx) || this._stickyInputValue;
     // Setting the input value when the value has not changed commits the current
     // IME composition, which we don't want to do.
     if (this.input.value != newValue) {
       this.input.value = newValue;
     }
     this._updateSearchWithHeader();
   },
 
-  suggestionAtIndex: function (idx) {
+  suggestionAtIndex: function(idx) {
     let row = this._suggestionsList.children[idx];
     return row ? row.textContent : null;
   },
 
-  deleteSuggestionAtIndex: function (idx) {
+  deleteSuggestionAtIndex: function(idx) {
     // Only form history suggestions can be deleted.
     if (this.isFormHistorySuggestionAtIndex(idx)) {
       let suggestionStr = this.suggestionAtIndex(idx);
       this._sendMsg("RemoveFormHistoryEntry", suggestionStr);
       this._suggestionsList.children[idx].remove();
       this.selectAndUpdateInput(-1);
     }
   },
 
-  isFormHistorySuggestionAtIndex: function (idx) {
+  isFormHistorySuggestionAtIndex: function(idx) {
     let row = this._suggestionsList.children[idx];
     return row && row.classList.contains("formHistory");
   },
 
-  addInputValueToFormHistory: function () {
+  addInputValueToFormHistory: function() {
     this._sendMsg("AddFormHistoryEntry", this.input.value);
   },
 
-  handleEvent: function (event) {
+  handleEvent: function(event) {
     this["_on" + event.type[0].toUpperCase() + event.type.substr(1)](event);
   },
 
   _onCommand: function(aEvent) {
     if (this.selectedButtonIndex == this._oneOffButtons.length) {
       // Settings button was selected.
       this._sendMsg("ManageEngines");
       return;
@@ -241,17 +241,17 @@ ContentSearchUIController.prototype = {
 
     this.search(aEvent);
 
     if (aEvent) {
       aEvent.preventDefault();
     }
   },
 
-  search: function (aEvent) {
+  search: function(aEvent) {
     if (!this.defaultEngine) {
       return; // Not initialized yet.
     }
 
     let searchText = this.input;
     let searchTerms;
     if (this._table.hidden ||
         aEvent.originalTarget.id == "contentSearchDefaultEngineHeader" ||
@@ -290,30 +290,30 @@ ContentSearchUIController.prototype = {
         eventData.selection.kind = "key";
       }
     }
 
     this._sendMsg("Search", eventData);
     this.addInputValueToFormHistory();
   },
 
-  _onInput: function () {
+  _onInput: function() {
     if (!this.input.value) {
       this._stickyInputValue = "";
       this._hideSuggestions();
     }
     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: function (event) {
+  _onKeypress: function(event) {
     let selectedIndexDelta = 0;
     let selectedSuggestionDelta = 0;
     let selectedOneOffDelta = 0;
 
     switch (event.keyCode) {
     case event.DOM_VK_UP:
       if (this._table.hidden) {
         return;
@@ -450,92 +450,92 @@ ContentSearchUIController.prototype = {
       this.selectedButtonIndex = newSelectedIndex;
     }
 
     // Prevent the input's caret from moving.
     event.preventDefault();
   },
 
   _currentEngineIndex: -1,
-  _cycleCurrentEngine: function (aReverse) {
+  _cycleCurrentEngine: function(aReverse) {
     if ((this._currentEngineIndex == this._engines.length - 1 && !aReverse) ||
         (this._currentEngineIndex == 0 && aReverse)) {
       return;
     }
     this._currentEngineIndex += aReverse ? -1 : 1;
     let engineName = this._engines[this._currentEngineIndex].name;
     this._sendMsg("SetCurrentEngine", engineName);
   },
 
-  _onFocus: function () {
+  _onFocus: function() {
     if (this._mousedown) {
       return;
     }
     // When the input box loses focus to something in our table, we refocus it
     // immediately. This causes the focus highlight to flicker, so we set a
     // custom attribute which consumers should use for focus highlighting. This
     // attribute is removed only when we do not immediately refocus the input
     // box, thus eliminating flicker.
     this.input.setAttribute("keepfocus", "true");
     this._speculativeConnect();
   },
 
-  _onBlur: function () {
+  _onBlur: function() {
     if (this._mousedown) {
       // At this point, this.input has lost focus, but a new element has not yet
       // received it. If we re-focus this.input directly, the new element will
       // steal focus immediately, so we queue it instead.
       setTimeout(() => this.input.focus(), 0);
       return;
     }
     this.input.removeAttribute("keepfocus");
     this._hideSuggestions();
   },
 
-  _onMousemove: function (event) {
+  _onMousemove: function(event) {
     let idx = this._indexOfTableItem(event.target);
     if (idx >= this.numSuggestions) {
       this.selectedButtonIndex = idx - this.numSuggestions;
       return;
     }
     this.selectedIndex = idx;
   },
 
-  _onMouseup: function (event) {
+  _onMouseup: function(event) {
     if (event.button == 2) {
       return;
     }
     this._onCommand(event);
   },
 
-  _onMouseout: function (event) {
+  _onMouseout: function(event) {
     // We only deselect one-off buttons and the settings button when they are
     // moused out.
     let idx = this._indexOfTableItem(event.originalTarget);
     if (idx >= this.numSuggestions) {
       this.selectedButtonIndex = -1;
     }
   },
 
-  _onClick: function (event) {
+  _onClick: function(event) {
     this._onMouseup(event);
   },
 
-  _onContentSearchService: function (event) {
+  _onContentSearchService: function(event) {
     let methodName = "_onMsg" + event.detail.type;
     if (methodName in this) {
       this[methodName](event.detail.data);
     }
   },
 
-  _onMsgFocusInput: function (event) {
+  _onMsgFocusInput: function(event) {
     this.input.focus();
   },
 
-  _onMsgSuggestions: function (suggestions) {
+  _onMsgSuggestions: function(suggestions) {
     // Ignore the suggestions if their search string or engine doesn't match
     // ours.  Due to the async nature of message passing, this can easily happen
     // when the user types quickly.
     if (this._stickyInputValue != suggestions.searchString ||
         this.defaultEngine.name != suggestions.engineName) {
       return;
     }
 
@@ -580,84 +580,84 @@ ContentSearchUIController.prototype = {
       this.input.setAttribute("aria-expanded", "true");
       this._originalDefaultEngine = {
         name: this.defaultEngine.name,
         icon: this.defaultEngine.icon,
       };
     }
   },
 
-  _onMsgSuggestionsCancelled: function () {
+  _onMsgSuggestionsCancelled: function() {
     if (!this._table.hidden) {
       this._hideSuggestions();
     }
   },
 
-  _onMsgState: function (state) {
+  _onMsgState: function(state) {
     this.engines = state.engines;
     // No point updating the default engine (and the header) if there's no change.
     if (this.defaultEngine &&
         this.defaultEngine.name == state.currentEngine.name &&
         this.defaultEngine.icon == state.currentEngine.icon) {
       return;
     }
     this.defaultEngine = state.currentEngine;
   },
 
-  _onMsgCurrentState: function (state) {
+  _onMsgCurrentState: function(state) {
     this._onMsgState(state);
   },
 
-  _onMsgCurrentEngine: function (engine) {
+  _onMsgCurrentEngine: function(engine) {
     this.defaultEngine = engine;
     this._pendingOneOffRefresh = true;
   },
 
-  _onMsgStrings: function (strings) {
+  _onMsgStrings: function(strings) {
     this._strings = strings;
     this._updateDefaultEngineHeader();
     this._updateSearchWithHeader();
     document.getElementById("contentSearchSettingsButton").textContent =
       this._strings.searchSettings;
     this.input.setAttribute("placeholder", this._strings.searchPlaceholder);
   },
 
-  _updateDefaultEngineHeader: function () {
+  _updateDefaultEngineHeader: function() {
     let header = document.getElementById("contentSearchDefaultEngineHeader");
     header.firstChild.setAttribute("src", this.defaultEngine.icon);
     if (!this._strings) {
       return;
     }
     while (header.firstChild.nextSibling) {
       header.firstChild.nextSibling.remove();
     }
     header.appendChild(document.createTextNode(
       this._strings.searchHeader.replace("%S", this.defaultEngine.name)));
   },
 
-  _updateSearchWithHeader: function () {
+  _updateSearchWithHeader: function() {
     if (!this._strings) {
       return;
     }
     let searchWithHeader = document.getElementById("contentSearchSearchWithHeader");
     if (this.input.value) {
       searchWithHeader.innerHTML = this._strings.searchForSomethingWith;
       searchWithHeader.querySelector('.contentSearchSearchWithHeaderSearchText').textContent = this.input.value;
     } else {
       searchWithHeader.textContent = this._strings.searchWithHeader;
     }
   },
 
-  _speculativeConnect: function () {
+  _speculativeConnect: function() {
     if (this.defaultEngine) {
       this._sendMsg("SpeculativeConnect", this.defaultEngine.name);
     }
   },
 
-  _makeTableRow: function (type, suggestionStr, currentRow, searchWords) {
+  _makeTableRow: function(type, suggestionStr, currentRow, searchWords) {
     let row = document.createElementNS(HTML_NS, "tr");
     row.dir = "auto";
     row.classList.add("contentSearchSuggestionRow");
     row.classList.add(type);
     row.setAttribute("role", "presentation");
     row.addEventListener("mousemove", this);
     row.addEventListener("mouseup", this);
 
@@ -684,79 +684,79 @@ ContentSearchUIController.prototype = {
       }
     }
 
     row.appendChild(entry);
     return row;
   },
 
   // Converts favicon array buffer into a data URI.
-  _getFaviconURIFromBuffer: function (buffer) {
+  _getFaviconURIFromBuffer: function(buffer) {
     let blob = new Blob([buffer]);
     return URL.createObjectURL(blob);
   },
 
   // Adds "@2x" to the name of the given PNG url for "retina" screens.
-  _getImageURIForCurrentResolution: function (uri) {
+  _getImageURIForCurrentResolution: function(uri) {
     if (window.devicePixelRatio > 1) {
       return uri.replace(/\.png$/, "@2x.png");
     }
     return uri;
   },
 
-  _getSearchEngines: function () {
+  _getSearchEngines: function() {
     this._sendMsg("GetState");
   },
 
-  _getStrings: function () {
+  _getStrings: function() {
     this._sendMsg("GetStrings");
   },
 
-  _getSuggestions: function () {
+  _getSuggestions: function() {
     this._stickyInputValue = this.input.value;
     if (this.defaultEngine) {
       this._sendMsg("GetSuggestions", {
         engineName: this.defaultEngine.name,
         searchString: this.input.value,
         remoteTimeout: this.remoteTimeout,
       });
     }
   },
 
   _clearSuggestionRows: function() {
     while (this._suggestionsList.firstElementChild) {
       this._suggestionsList.firstElementChild.remove();
     }
   },
 
-  _hideSuggestions: function () {
+  _hideSuggestions: function() {
     this.input.setAttribute("aria-expanded", "false");
     this.selectedIndex = -1;
     this.selectedButtonIndex = -1;
     this._currentEngineIndex = -1;
     this._table.hidden = true;
   },
 
-  _indexOfTableItem: function (elt) {
+  _indexOfTableItem: function(elt) {
     if (elt.classList.contains("contentSearchOneOffItem")) {
       return this.numSuggestions + this._oneOffButtons.indexOf(elt);
     }
     if (elt.classList.contains("contentSearchSettingsButton")) {
       return this.numSuggestions + this._oneOffButtons.length;
     }
     while (elt && elt.localName != "tr") {
       elt = elt.parentNode;
     }
     if (!elt) {
       throw new Error("Element is not a row");
     }
     return elt.rowIndex;
   },
 
-  _makeTable: function (id) {
+  _makeTable: function(id) {
     this._table = document.createElementNS(HTML_NS, "table");
     this._table.id = id;
     this._table.hidden = true;
     this._table.classList.add("contentSearchSuggestionTable");
     this._table.setAttribute("role", "presentation");
 
     // When the search input box loses focus, we want to immediately give focus
     // back to it if the blur was because the user clicked somewhere in the table.
@@ -815,17 +815,17 @@ ContentSearchUIController.prototype = {
     button.id = "contentSearchSettingsButton";
     button.addEventListener("click", this);
     button.addEventListener("mousemove", this);
     this._table.appendChild(button);
 
     return this._table;
   },
 
-  _setUpOneOffButtons: function () {
+  _setUpOneOffButtons: function() {
     // Sometimes we receive a CurrentEngine message from the ContentSearch service
     // before we've received a State message - i.e. before we have our engines.
     if (!this._engines) {
       return;
     }
 
     while (this._oneOffsTable.firstChild.nextSibling) {
       this._oneOffsTable.firstChild.nextSibling.remove();
@@ -896,17 +896,17 @@ ContentSearchUIController.prototype = {
       cell.appendChild(button);
       this._oneOffButtons.push(button);
     }
     row.appendChild(cell);
     this._oneOffsTable.appendChild(row);
     this._oneOffsTable.hidden = false;
   },
 
-  _sendMsg: function (type, data = null) {
+  _sendMsg: function(type, data = null) {
     dispatchEvent(new CustomEvent("ContentSearchClient", {
       detail: {
         type: type,
         data: data,
       },
     }));
   },
 };
--- a/browser/base/content/pageinfo/pageInfo.js
+++ b/browser/base/content/pageinfo/pageInfo.js
@@ -999,17 +999,17 @@ function makeBlockImage(url)
       checkbox.checked = perm == nsIPermissionManager.DENY_ACTION;
     }
     else
       checkbox.hidden = true;
   }
 }
 
 var imagePermissionObserver = {
-  observe: function (aSubject, aTopic, aData)
+  observe: function(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");
--- a/browser/base/content/pageinfo/permissions.js
+++ b/browser/base/content/pageinfo/permissions.js
@@ -10,17 +10,17 @@ const nsIQuotaManagerService = Component
 var gPermURI;
 var gPermPrincipal;
 var gUsageRequest;
 
 var gPermissions = SitePermissions.listPermissions();
 gPermissions.push("plugins");
 
 var permissionObserver = {
-  observe: function (aSubject, aTopic, aData)
+  observe: function(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();
--- a/browser/base/content/pageinfo/security.js
+++ b/browser/base/content/pageinfo/security.js
@@ -10,17 +10,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 
 var security = {
   init: function(uri, windowInfo) {
     this.uri = uri;
     this.windowInfo = windowInfo;
   },
 
   // Display the server certificate (static)
-  viewCert : function () {
+  viewCert : function() {
     var cert = security._cert;
     viewCertHelper(window, cert);
   },
 
   _getSecurityInfo : function() {
     const nsISSLStatusProvider = Components.interfaces.nsISSLStatusProvider;
     const nsISSLStatus = Components.interfaces.nsISSLStatus;
 
--- a/browser/base/content/sanitize.js
+++ b/browser/base/content/sanitize.js
@@ -33,24 +33,24 @@ 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: function (aItemName)
+  clearItem: function(aItemName)
   {
     this.items[aItemName].clear();
   },
 
   prefDomain: "",
 
-  getNameFromPreference: function (aPreferenceName)
+  getNameFromPreference: function(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
@@ -726,17 +726,17 @@ Sanitizer.TIMESPAN_4HOURS     = 3;
 Sanitizer.TIMESPAN_TODAY      = 4;
 Sanitizer.TIMESPAN_5MIN       = 5;
 Sanitizer.TIMESPAN_24HOURS    = 6;
 
 // Return a 2 element array representing the start and end times,
 // in the uSec-since-epoch format that PRTime likes.  If we should
 // clear everything, return null.  Use ts if it is defined; otherwise
 // use the timeSpan pref.
-Sanitizer.getClearRange = function (ts) {
+Sanitizer.getClearRange = function(ts) {
   if (ts === undefined)
     ts = Sanitizer.prefs.getIntPref("timeSpan");
   if (ts === Sanitizer.TIMESPAN_EVERYTHING)
     return null;
 
   // PRTime is microseconds while JS time is milliseconds
   var endDate = Date.now() * 1000;
   switch (ts) {
--- a/browser/base/content/sync/aboutSyncTabs.js
+++ b/browser/base/content/sync/aboutSyncTabs.js
@@ -18,50 +18,50 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 if (AppConstants.MOZ_SERVICES_CLOUDSYNC) {
   XPCOMUtils.defineLazyModuleGetter(this, "CloudSync",
                                     "resource://gre/modules/CloudSync.jsm");
 }
 
 var RemoteTabViewer = {
   _tabsList: null,
 
-  init: function () {
+  init: function() {
     Services.obs.addObserver(this, "weave:service:login:finish", false);
     Services.obs.addObserver(this, "weave:engine:sync:finish", false);
 
     Services.obs.addObserver(this, "cloudsync:tabs:update", false);
 
     this._tabsList = document.getElementById("tabsList");
 
     this.buildList(true);
   },
 
-  uninit: function () {
+  uninit: function() {
     Services.obs.removeObserver(this, "weave:service:login:finish");
     Services.obs.removeObserver(this, "weave:engine:sync:finish");
 
     Services.obs.removeObserver(this, "cloudsync:tabs:update");
   },
 
-  createItem: function (attrs) {
+  createItem: function(attrs) {
     let item = document.createElement("richlistitem");
 
     // Copy the attributes from the argument into the item.
     for (let attr in attrs) {
       item.setAttribute(attr, attrs[attr]);
     }
 
     if (attrs["type"] == "tab") {
       item.label = attrs.title != "" ? attrs.title : attrs.url;
     }
 
     return item;
   },
 
-  filterTabs: function (event) {
+  filterTabs: function(event) {
     let val = event.target.value.toLowerCase();
     let numTabs = this._tabsList.getRowCount();
     let clientTabs = 0;
     let currentClient = null;
 
     for (let i = 0; i < numTabs; i++) {
       let item = this._tabsList.getItemAtIndex(i);
       let hide = false;
@@ -84,48 +84,48 @@ var RemoteTabViewer = {
       }
       item.hidden = hide;
     }
     if (clientTabs == 0) {
       currentClient.hidden = true;
     }
   },
 
-  openSelected: function () {
+  openSelected: function() {
     let items = this._tabsList.selectedItems;
     let urls = [];
     for (let i = 0; i < items.length; i++) {
       if (items[i].getAttribute("type") == "tab") {
         urls.push(items[i].getAttribute("url"));
         let index = this._tabsList.getIndexOfItem(items[i]);
         this._tabsList.removeItemAt(index);
       }
     }
     if (urls.length) {
       getTopWin().gBrowser.loadTabs(urls);
       this._tabsList.clearSelection();
     }
   },
 
-  bookmarkSingleTab: function () {
+  bookmarkSingleTab: function() {
     let item = this._tabsList.selectedItems[0];
     let uri = Weave.Utils.makeURI(item.getAttribute("url"));
     let title = item.getAttribute("title");
     PlacesUIUtils.showBookmarkDialog({ action: "add"
                                      , type: "bookmark"
                                      , uri: uri
                                      , title: title
                                      , hiddenRows: [ "description"
                                                    , "location"
                                                    , "loadInSidebar"
                                                    , "keyword" ]
                                      }, window.top);
   },
 
-  bookmarkSelectedTabs: function () {
+  bookmarkSelectedTabs: function() {
     let items = this._tabsList.selectedItems;
     let URIs = [];
     for (let i = 0; i < items.length; i++) {
       if (items[i].getAttribute("type") == "tab") {
         let uri = Weave.Utils.makeURI(items[i].getAttribute("url"));
         if (!uri) {
           continue;
         }
@@ -137,33 +137,33 @@ var RemoteTabViewer = {
       PlacesUIUtils.showBookmarkDialog({ action: "add"
                                        , type: "folder"
                                        , URIList: URIs
                                        , hiddenRows: [ "description" ]
                                        }, window.top);
     }
   },
 
-  getIcon: function (iconUri, defaultIcon) {
+  getIcon: function(iconUri, defaultIcon) {
     try {
       let iconURI = Weave.Utils.makeURI(iconUri);
       return PlacesUtils.favicons.getFaviconLinkForIcon(iconURI).spec;
     } catch (ex) {
       // Do nothing.
     }
 
     // Just give the provided default icon or the system's default.
     return defaultIcon || PlacesUtils.favicons.defaultFavicon.spec;
   },
 
   _waitingForBuildList: false,
 
   _buildListRequested: false,
 
-  buildList: function (forceSync) {
+  buildList: function(forceSync) {
     if (this._waitingForBuildList) {
       this._buildListRequested = true;
       return;
     }
 
     this._waitingForBuildList = true;
     this._buildListRequested = false;
 
@@ -187,29 +187,29 @@ var RemoteTabViewer = {
     if (CloudSync && CloudSync.ready && CloudSync().tabsReady && CloudSync().tabs.hasRemoteTabs()) {
       this._generateCloudSyncTabList()
           .then(complete, complete);
     } else {
       complete();
     }
   },
 
-  _clearTabList: function () {
+  _clearTabList: function() {
     let list = this._tabsList;
 
     // Clear out existing richlistitems.
     let count = list.getRowCount();
     if (count > 0) {
       for (let i = count - 1; i >= 0; i--) {
         list.removeItemAt(i);
       }
     }
   },
 
-  _generateWeaveTabList: function () {
+  _generateWeaveTabList: function() {
     let engine = Weave.Service.engineManager.get("tabs");
     let list = this._tabsList;
 
     let seenURLs = new Set();
     let localURLs = engine.getOpenURLs();
 
     for (let [, client] of Object.entries(engine.getAllClients())) {
       // Create the client node, but don't add it in-case we don't show any tabs
@@ -240,18 +240,18 @@ var RemoteTabViewer = {
           icon:  this.getIcon(icon),
         }
         let tab = this.createItem(attrs);
         list.appendChild(tab);
       }, this);
     }
   },
 
-  _generateCloudSyncTabList: function () {
-    let updateTabList = function (remoteTabs) {
+  _generateCloudSyncTabList: function() {
+    let updateTabList = function(remoteTabs) {
       let list = this._tabsList;
 
       for (let client of remoteTabs) {
         let clientAttrs = {
           type: "client",
           clientName: client.name,
         };
 
@@ -270,17 +270,17 @@ var RemoteTabViewer = {
         }
       }
     }.bind(this);
 
     return CloudSync().tabs.getRemoteTabs()
                            .then(updateTabList, Promise.reject.bind(Promise));
   },
 
-  adjustContextMenu: function (event) {
+  adjustContextMenu: function(event) {
     let mode = "all";
     switch (this._tabsList.selectedItems.length) {
       case 0:
         break;
       case 1:
         mode = "single"
         break;
       default:
@@ -295,17 +295,17 @@ var RemoteTabViewer = {
       if (showFor) {
         el.hidden = showFor != mode && showFor != "all";
       }
 
       el = el.nextSibling;
     }
   },
 
-  _refetchTabs: function (force) {
+  _refetchTabs: function(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) {
         /* Just use the default value of 0 */
@@ -320,17 +320,17 @@ var RemoteTabViewer = {
     // Ask Sync to just do the tabs engine if it can.
     Weave.Service.sync(["tabs"]);
     Services.prefs.setIntPref("services.sync.lastTabFetch",
                               Math.floor(Date.now() / 1000));
 
     return true;
   },
 
-  observe: function (subject, topic, data) {
+  observe: function(subject, topic, data) {
     switch (topic) {
       case "weave:service:login:finish":
         // A login has finished, which means that a Sync is about to start and
         // we will eventually get to the "tabs" engine - but try and force the
         // tab engine to sync first by passing |true| for the forceSync param.
         this.buildList(true);
         break;
       case "weave:engine:sync:finish":
@@ -341,17 +341,17 @@ var RemoteTabViewer = {
         }
         break;
       case "cloudsync:tabs:update":
         this.buildList(false);
         break;
     }
   },
 
-  handleClick: function (event) {
+  handleClick: function(event) {
     if (event.target.getAttribute("type") != "tab") {
       return;
     }
 
     if (event.button == 1) {
       let url = event.target.getAttribute("url");
       openUILink(url, event);
       let index = this._tabsList.getIndexOfItem(event.target);
--- a/browser/base/content/sync/addDevice.js
+++ b/browser/base/content/sync/addDevice.js
@@ -145,13 +145,13 @@ var gSyncAddDevice = {
 
   goToSyncKeyPage: function goToSyncKeyPage() {
     this.wizard.pageIndex = SYNC_KEY_PAGE;
   }
 
 };
 // onWizardAdvance() and onPageShow() are run before init() so we'll set
 // these up as lazy getters.
-["wizard", "pin1", "pin2", "pin3"].forEach(function (id) {
+["wizard", "pin1", "pin2", "pin3"].forEach(function(id) {
   XPCOMUtils.defineLazyGetter(gSyncAddDevice, id, function() {
     return document.getElementById(id);
   });
 });
--- a/browser/base/content/sync/customize.js
+++ b/browser/base/content/sync/customize.js
@@ -1,17 +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";
 
 Components.utils.import("resource://gre/modules/Services.jsm");
 
-addEventListener("dialogaccept", function () {
+addEventListener("dialogaccept", function() {
   let pane = document.getElementById("sync-customize-pane");
   // First determine what the preference for the "global" sync enabled pref
   // should be based on the engines selected.
   let prefElts = pane.querySelectorAll("preferences > preference");
   let syncEnabled = false;
   for (let elt of prefElts) {
     if (elt.name.startsWith("services.sync.") && elt.value) {
       syncEnabled = true;
--- a/browser/base/content/sync/genericChange.js
+++ b/browser/base/content/sync/genericChange.js
@@ -142,17 +142,17 @@ var Change = {
       case "ResetPassphrase":
         return this.doChangePassphrase();
       case "ChangePassword":
         return this.doChangePassword();
     }
     return undefined;
   },
 
-  doGeneratePassphrase: function () {
+  doGeneratePassphrase: function() {
     let passphrase = Weave.Utils.generatePassphrase();
     this._passphraseBox.value = Weave.Utils.hyphenatePassphrase(passphrase);
     this._dialog.getButton("finish").disabled = false;
   },
 
   doChangePassphrase: function Change_doChangePassphrase() {
     let pp = Weave.Utils.normalizePassphrase(this._passphraseBox.value);
     if (this._updatingPassphrase) {
@@ -196,17 +196,17 @@ var Change = {
         this._updateStatus("change.password.status.success", "success");
       else
         this._updateStatus("change.password.status.error", "error");
     }
 
     return false;
   },
 
-  validate: function (event) {
+  validate: function(event) {
     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);
--- a/browser/base/content/sync/setup.js
+++ b/browser/base/content/sync/setup.js
@@ -56,17 +56,17 @@ var gSyncSetup = {
   },
 
   get _usingMainServers() {
     if (this._settingUpNew)
       return document.getElementById("server").selectedIndex == 0;
     return document.getElementById("existingServer").selectedIndex == 0;
   },
 
-  init: function () {
+  init: function() {
     let obs = [
       ["weave:service:change-passphrase", "onResetPassphrase"],
       ["weave:service:login:start",       "onLoginStart"],
       ["weave:service:login:error",       "onLoginEnd"],
       ["weave:service:login:finish",      "onLoginEnd"]];
 
     // Add the observers now and remove them on unload
     let self = this;
@@ -78,17 +78,17 @@ var gSyncSetup = {
           Weave.Svc.Obs.add(topic, self[func], self);
         else
           Weave.Svc.Obs.remove(topic, self[func], self);
       });
     };
     addRem(true);
     window.addEventListener("unload", () => addRem(false), false);
 
-    window.setTimeout(function () {
+    window.setTimeout(function() {
       // Force Service to be loaded so that engines are registered.
       // See Bug 670082.
       Weave.Service;
     }, 0);
 
     this.captchaBrowser = document.getElementById("captcha");
 
     this.wizardType = null;
@@ -116,24 +116,24 @@ var gSyncSetup = {
     this._nextButtonLabel = this.wizard.getButton("next").label;
     this._nextButtonAccesskey = this.wizard.getButton("next")
                                            .getAttribute("accesskey");
     this._backButtonLabel = this.wizard.getButton("back").label;
     this._backButtonAccesskey = this.wizard.getButton("back")
                                            .getAttribute("accesskey");
   },
 
-  startNewAccountSetup: function () {
+  startNewAccountSetup: function() {
     if (!Weave.Utils.ensureMPUnlocked())
       return;
     this._settingUpNew = true;
     this.wizard.pageIndex = NEW_ACCOUNT_START_PAGE;
   },
 
-  useExistingAccount: function () {
+  useExistingAccount: function() {
     if (!Weave.Utils.ensureMPUnlocked())
       return;
     this._settingUpNew = false;
     if (this.wizardType == "pair") {
       // We're already pairing, so there's no point in pairing again.
       // Go straight to the manual login page.
       this.wizard.pageIndex = EXISTING_ACCOUNT_LOGIN_PAGE;
     } else {
@@ -168,46 +168,46 @@ var gSyncSetup = {
 
     // changePassphrase() will sync, make sure we set the "firstSync" pref
     // according to the user's pref.
     Weave.Svc.Prefs.reset("firstSync");
     this.setupInitialSync();
     gSyncUtils.resetPassphrase(true);
   },
 
-  onResetPassphrase: function () {
+  onResetPassphrase: function() {
     document.getElementById("existingPassphrase").value =
       Weave.Utils.hyphenatePassphrase(Weave.Service.identity.syncKey);
     this.checkFields();
     this.wizard.advance();
   },
 
-  onLoginStart: function () {
+  onLoginStart: function() {
     this.toggleLoginFeedback(false);
   },
 
-  onLoginEnd: function () {
+  onLoginEnd: function() {
     this.toggleLoginFeedback(true);
   },
 
-  sendCredentialsAfterSync: function () {
+  sendCredentialsAfterSync: function() {
     let send = function() {
       Services.obs.removeObserver("weave:service:sync:finish", send);
       Services.obs.removeObserver("weave:service:sync:error", send);
       let credentials = {account:   Weave.Service.identity.account,
                          password:  Weave.Service.identity.basicPassword,
                          synckey:   Weave.Service.identity.syncKey,
                          serverURL: Weave.Service.serverURL};
       this._jpakeclient.sendAndComplete(credentials);
     }.bind(this);
     Services.obs.addObserver("weave:service:sync:finish", send, false);
     Services.obs.addObserver("weave:service:sync:error", send, false);
   },
 
-  toggleLoginFeedback: function (stop) {
+  toggleLoginFeedback: function(stop) {
     document.getElementById("login-throbber").hidden = stop;
     let password = document.getElementById("existingPasswordFeedbackRow");
     let server = document.getElementById("existingServerFeedbackRow");
     let passphrase = document.getElementById("existingPassphraseFeedbackRow");
 
     if (!stop || (Weave.Status.login == Weave.LOGIN_SUCCEEDED)) {
       password.hidden = server.hidden = passphrase.hidden = true;
       return;
@@ -226,38 +226,38 @@ var gSyncSetup = {
         break;
       case Weave.LOGIN_FAILED_INVALID_PASSPHRASE:
         feedback = passphrase;
         break;
     }
     this._setFeedbackMessage(feedback, false, Weave.Status.login);
   },
 
-  setupInitialSync: function () {
+  setupInitialSync: function() {
     let action = document.getElementById("mergeChoiceRadio").selectedItem.id;
     switch (action) {
       case "resetClient":
         // if we're not resetting sync, we don't need to explicitly
         // call resetClient
         if (!this._resettingSync)
           return;
         // otherwise, fall through
       case "wipeClient":
       case "wipeRemote":
         Weave.Svc.Prefs.set("firstSync", action);
         break;
     }
   },
 
   // fun with validation!
-  checkFields: function () {
+  checkFields: function() {
     this.wizard.canAdvance = this.readyToAdvance();
   },
 
-  readyToAdvance: function () {
+  readyToAdvance: function() {
     switch (this.wizard.pageIndex) {
       case INTRO_PAGE:
         return false;
       case NEW_ACCOUNT_START_PAGE:
         for (let i in this.status) {
           if (!this.status[i])
             return false;
         }
@@ -288,21 +288,21 @@ var gSyncSetup = {
     if (textbox && textbox.value.length == PIN_PART_LENGTH) {
       this.nextFocusEl[textbox.id].focus();
     }
     this.wizard.canAdvance = (this.pin1.value.length == PIN_PART_LENGTH &&
                               this.pin2.value.length == PIN_PART_LENGTH &&
                               this.pin3.value.length == PIN_PART_LENGTH);
   },
 
-  onEmailInput: function () {
+  onEmailInput: function() {
     // Check account validity when the user stops typing for 1 second.
     if (this._checkAccountTimer)
       window.clearTimeout(this._checkAccountTimer);
-    this._checkAccountTimer = window.setTimeout(function () {
+    this._checkAccountTimer = window.setTimeout(function() {
       gSyncSetup.checkAccount();
     }, 1000);
   },
 
   checkAccount: function() {
     delete this._checkAccountTimer;
     let value = Weave.Utils.normalizeAccount(
       document.getElementById("weaveEmail").value);
@@ -332,17 +332,17 @@ var gSyncSetup = {
 
     this._setFeedbackMessage(feedback, valid, str);
     this.status.email = valid;
     if (valid)
       Weave.Service.identity.account = value;
     this.checkFields();
   },
 
-  onPasswordChange: function () {
+  onPasswordChange: function() {
     let password = document.getElementById("weavePassword");
     let pwconfirm = document.getElementById("weavePasswordConfirm");
     let [valid, errorString] = gSyncUtils.validatePassword(password, pwconfirm);
 
     let feedback = document.getElementById("passwordFeedbackRow");
     this._setFeedback(feedback, valid, errorString);
 
     this.status.password = valid;
@@ -415,17 +415,17 @@ var gSyncSetup = {
         this.wizard.getButton("back").removeAttribute("accesskey");
         this.wizard.getButton("back").hidden = this._resettingSync;
         this.wizard.getButton("next").hidden = false;
         this.wizard.getButton("finish").hidden = true;
         break;
     }
   },
 
-  onWizardAdvance: function () {
+  onWizardAdvance: function() {
     // Check pageIndex so we don't prompt before the Sync setup wizard appears.
     // This is a fallback in case the Master Password gets locked mid-wizard.
     if ((this.wizard.pageIndex >= 0) &&
         !Weave.Utils.ensureMPUnlocked()) {
       return false;
     }
 
     switch (this.wizard.pageIndex) {
@@ -504,17 +504,17 @@ var gSyncSetup = {
           this.wizardFinish();
           return false;
         }
         return this.returnFromOptions();
     }
     return true;
   },
 
-  onWizardBack: function () {
+  onWizardBack: function() {
     switch (this.wizard.pageIndex) {
       case NEW_ACCOUNT_START_PAGE:
         this.wizard.pageIndex = INTRO_PAGE;
         return false;
       case EXISTING_ACCOUNT_CONNECT_PAGE:
         this.abortEasySetup();
         this.wizard.pageIndex = INTRO_PAGE;
         return false;
@@ -530,17 +530,17 @@ var gSyncSetup = {
       case OPTIONS_CONFIRM_PAGE:
         // Backing up from the confirmation page = resetting first sync to merge.
         document.getElementById("mergeChoiceRadio").selectedIndex = 0;
         return this.returnFromOptions();
     }
     return true;
   },
 
-  wizardFinish: function () {
+  wizardFinish: function() {
     this.setupInitialSync();
 
     if (this.wizardType == "pair") {
       this.completePairing();
     }
 
     if (!this._resettingSync) {
       function isChecked(element) {
@@ -558,26 +558,26 @@ var gSyncSetup = {
 
       Weave.Service.persistLogin();
       Weave.Svc.Obs.notify("weave:service:setup-complete");
     }
     Weave.Utils.nextTick(Weave.Service.sync, Weave.Service);
     window.close();
   },
 
-  onWizardCancel: function () {
+  onWizardCancel: function() {
     if (this._resettingSync)
       return;
 
     this.abortEasySetup();
     this._handleNoScript(false);
     Weave.Service.startOver();
   },
 
-  onSyncOptions: function () {
+  onSyncOptions: function() {
     this._beforeOptionsPage = this.wizard.pageIndex;
     this.wizard.pageIndex = OPTIONS_PAGE;
   },
 
   returnFromOptions: function() {
     this.wizard.getButton("next").label = this._nextButtonLabel;
     this.wizard.getButton("next").setAttribute("accesskey",
                                                this._nextButtonAccesskey);
@@ -639,17 +639,17 @@ var gSyncSetup = {
       // have to pair again?
       return;
     }
     let controller = new Weave.SendCredentialsController(this._jpakeclient,
                                                          Weave.Service);
     this._jpakeclient.controller = controller;
   },
 
-  startEasySetup: function () {
+  startEasySetup: function() {
     // Don't do anything if we have a client already (e.g. we went to
     // Sync Options and just came back).
     if (this._jpakeclient)
       return;
 
     // When onAbort is called, Weave may already be gone
     const JPAKE_ERROR_USERABORT = Weave.JPAKE_ERROR_USERABORT;
 
@@ -686,36 +686,36 @@ var gSyncSetup = {
 
         // Restart on all other errors.
         self.startEasySetup();
       }
     });
     this._jpakeclient.receiveNoPIN();
   },
 
-  abortEasySetup: function () {
+  abortEasySetup: function() {
     document.getElementById("easySetupPIN1").value = "";
     document.getElementById("easySetupPIN2").value = "";
     document.getElementById("easySetupPIN3").value = "";
     if (!this._jpakeclient)
       return;
 
     this._jpakeclient.abort();
     delete this._jpakeclient;
   },
 
-  manualSetup: function () {
+  manualSetup: function() {
     this.abortEasySetup();
     this.wizard.pageIndex = EXISTING_ACCOUNT_LOGIN_PAGE;
   },
 
   // _handleNoScript is needed because it blocks the captcha. So we temporarily
   // allow the necessary sites so that we can verify the user is in fact a human.
   // This was done with the help of Giorgio (NoScript author). See bug 508112.
-  _handleNoScript: function (addExceptions) {
+  _handleNoScript: function(addExceptions) {
     // if NoScript isn't installed, or is disabled, bail out.
     let ns = Cc["@maone.net/noscript-service;1"];
     if (ns == null)
       return;
 
     ns = ns.getService().wrappedJSObject;
     if (addExceptions) {
       this._remoteSites.forEach(function(site) {
@@ -729,42 +729,42 @@ var gSyncSetup = {
     else {
       this._disabledSites.forEach(function(site) {
         ns.setJSEnabled(site, false);
       });
       this._disabledSites = [];
     }
   },
 
-  onExistingServerCommand: function () {
+  onExistingServerCommand: function() {
     let control = document.getElementById("existingServer");
     if (control.selectedIndex == 0) {
       control.removeAttribute("editable");
       Weave.Svc.Prefs.reset("serverURL");
     } else {
       control.setAttribute("editable", "true");
       // Force a style flush to ensure that the binding is attached.
       control.clientTop;
       control.value = "";
       control.inputField.focus();
     }
     document.getElementById("existingServerFeedbackRow").hidden = true;
     this.checkFields();
   },
 
-  onExistingServerInput: function () {
+  onExistingServerInput: function() {
     // Check custom server validity when the user stops typing for 1 second.
     if (this._existingServerTimer)
       window.clearTimeout(this._existingServerTimer);
-    this._existingServerTimer = window.setTimeout(function () {
+    this._existingServerTimer = window.setTimeout(function() {
       gSyncSetup.checkFields();
     }, 1000);
   },
 
-  onServerCommand: function () {
+  onServerCommand: function() {
     setVisibility(document.getElementById("TOSRow"), this._usingMainServers);
     let control = document.getElementById("server");
     if (!this._usingMainServers) {
       control.setAttribute("editable", "true");
       // Force a style flush to ensure that the binding is attached.
       control.clientTop;
       control.value = "";
       control.inputField.focus();
@@ -778,26 +778,26 @@ var gSyncSetup = {
       this.loadCaptcha();
     }
     this.checkAccount();
     this.status.server = true;
     document.getElementById("serverFeedbackRow").hidden = true;
     this.checkFields();
   },
 
-  onServerInput: function () {
+  onServerInput: function() {
     // Check custom server validity when the user stops typing for 1 second.
     if (this._checkServerTimer)
       window.clearTimeout(this._checkServerTimer);
-    this._checkServerTimer = window.setTimeout(function () {
+    this._checkServerTimer = window.setTimeout(function() {
       gSyncSetup.checkServer();
     }, 1000);
   },
 
-  checkServer: function () {
+  checkServer: function() {
     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);
@@ -808,17 +808,17 @@ var gSyncSetup = {
     // Recheck account against the new server.
     if (valid)
       this.checkAccount();
 
     this.status.server = valid;
     this.checkFields();
   },
 
-  _validateServer: function (element) {
+  _validateServer: function(element) {
     let valid = false;
     let val = element.value;
     if (!val)
       return false;
 
     let uri = Weave.Utils.makeURI(val);
 
     if (!uri)
@@ -854,17 +854,17 @@ var gSyncSetup = {
     if (valid)
       element.value = Weave.Service.serverURL;
     else
       Weave.Svc.Prefs.reset("serverURL");
 
     return valid;
   },
 
-  _handleChoice: function () {
+  _handleChoice: function() {
     let desc = document.getElementById("mergeChoiceRadio").selectedIndex;
     document.getElementById("chosenActionDeck").selectedIndex = desc;
     switch (desc) {
       case 1:
         if (this._case1Setup)
           break;
 
         let places_db = PlacesUtils.history
@@ -978,27 +978,27 @@ var gSyncSetup = {
         break;
     }
 
     return true;
   },
 
   // sets class and string on a feedback element
   // if no property string is passed in, we clear label/style
-  _setFeedback: function (element, success, string) {
+  _setFeedback: function(element, success, string) {
     element.hidden = success || !string;
     let classname = success ? "success" : "error";
     let image = element.getElementsByAttribute("class", "statusIcon")[0];
     image.setAttribute("status", classname);
     let label = element.getElementsByAttribute("class", "status")[0];
     label.value = string;
   },
 
   // shim
-  _setFeedbackMessage: function (element, success, string) {
+  _setFeedbackMessage: function(element, success, string) {
     let str = "";
     if (string) {
       try {
         str = this._stringBundle.GetStringFromName(string);
       } catch (e) {}
 
       if (!str)
         str = Weave.Utils.getErrorString(string);
@@ -1027,34 +1027,34 @@ var gSyncSetup = {
     // If we didn't find a captcha, assume it's not needed and don't show it.
     let responseStatus = request.QueryInterface(Ci.nsIHttpChannel).responseStatus;
     setVisibility(this.captchaBrowser, responseStatus != 404);
     // XXX TODO we should really log any responseStatus other than 200
   },
   onProgressChange: function() {},
   onStatusChange: function() {},
   onSecurityChange: function() {},
-  onLocationChange: function () {}
+  onLocationChange: function() {}
 };
 
 // Define lazy getters for various XUL elements.
 //
 // onWizardAdvance() and onPageShow() are run before init(), so we'll even
 // define things that will almost certainly be used (like 'wizard') as a lazy
 // getter here.
 ["wizard",
  "pin1",
  "pin2",
  "pin3",
  "pairDeviceErrorRow",
- "pairDeviceThrobber"].forEach(function (id) {
+ "pairDeviceThrobber"].forEach(function(id) {
   XPCOMUtils.defineLazyGetter(gSyncSetup, id, function() {
     return document.getElementById(id);
   });
 });
-XPCOMUtils.defineLazyGetter(gSyncSetup, "nextFocusEl", function () {
+XPCOMUtils.defineLazyGetter(gSyncSetup, "nextFocusEl", function() {
   return {pin1: this.pin2,
           pin2: this.pin3,
           pin3: this.wizard.getButton("next")};
 });
 XPCOMUtils.defineLazyGetter(gSyncSetup, "_stringBundle", function() {
   return Services.strings.createBundle("chrome://browser/locale/syncSetup.properties");
 });
--- a/browser/base/content/sync/utils.js
+++ b/browser/base/content/sync/utils.js
@@ -17,17 +17,17 @@ var gSyncUtils = {
   get fxAccountsEnabled() {
     let service = Components.classes["@mozilla.org/weave/service;1"]
                             .getService(Components.interfaces.nsISupports)
                             .wrappedJSObject;
     return service.fxAccountsEnabled;
   },
 
   // opens in a new window if we're in a modal prefwindow world, in a new tab otherwise
-  _openLink: function (url) {
+  _openLink: function(url) {
     let thisDocEl = document.documentElement,
         openerDocEl = window.opener && window.opener.document.documentElement;
     if (thisDocEl.id == "accountSetup" && window.opener &&
         openerDocEl.id == "BrowserPreferences" && !openerDocEl.instantApply)
       openUILinkIn(url, "window");
     else if (thisDocEl.id == "BrowserPreferences" && !thisDocEl.instantApply)
       openUILinkIn(url, "window");
     else if (document.documentElement.id == "change-dialog")
@@ -53,50 +53,50 @@ var gSyncUtils = {
 
     // Open up the change dialog
     let changeXUL = "chrome://browser/content/sync/genericChange.xul";
     let changeOpt = "centerscreen,chrome,resizable=no";
     Services.ww.activeWindow.openDialog(changeXUL, "", changeOpt,
                                         type, duringSetup);
   },
 
-  changePassword: function () {
+  changePassword: function() {
     if (Weave.Utils.ensureMPUnlocked())
       this.openChange("ChangePassword");
   },
 
-  resetPassphrase: function (duringSetup) {
+  resetPassphrase: function(duringSetup) {
     if (Weave.Utils.ensureMPUnlocked())
       this.openChange("ResetPassphrase", duringSetup);
   },
 
-  updatePassphrase: function () {
+  updatePassphrase: function() {
     if (Weave.Utils.ensureMPUnlocked())
       this.openChange("UpdatePassphrase");
   },
 
-  resetPassword: function () {
+  resetPassword: function() {
     this._openLink(Weave.Service.pwResetURL);
   },
 
   get tosURL() {
     let root = this.fxAccountsEnabled ? "fxa." : "";
     return  Weave.Svc.Prefs.get(root + "termsURL");
   },
 
-  openToS: function () {
+  openToS: function() {
     this._openLink(this.tosURL);
   },
 
   get privacyPolicyURL() {
     let root = this.fxAccountsEnabled ? "fxa." : "";
     return  Weave.Svc.Prefs.get(root + "privacyURL");
   },
 
-  openPrivacyPolicy: function () {
+  openPrivacyPolicy: function() {
     this._openLink(this.privacyPolicyURL);
   },
 
   /**
    * Prepare an invisible iframe with the passphrase backup document.
    * Used by both the print and saving methods.
    *
    * @param elid : ID of the form element containing the passphrase.
@@ -198,17 +198,17 @@ var gSyncUtils = {
   /**
    * validatePassword
    *
    * @param el1 : the first textbox element in the form
    * @param el2 : the second textbox element, if omitted it's an update form
    *
    * returns [valid, errorString]
    */
-  validatePassword: function (el1, el2) {
+  validatePassword: function(el1, el2) {
     let valid = false;
     let val1 = el1.value;
     let val2 = el2 ? el2.value : "";
     let error = "";
 
     if (!el2)
       valid = val1.length >= Weave.MIN_PASS_LENGTH;
     else if (val1 && val1 == Weave.Service.identity.username)
--- a/browser/base/content/tab-content.js
+++ b/browser/base/content/tab-content.js
@@ -47,17 +47,17 @@ addEventListener("MozDOMPointerLock:Ente
   });
 });
 
 addEventListener("MozDOMPointerLock:Exited", function(aEvent) {
   sendAsyncMessage("PointerLock:Exited");
 });
 
 
-addMessageListener("Browser:HideSessionRestoreButton", function (message) {
+addMessageListener("Browser:HideSessionRestoreButton", function(message) {
   // Hide session restore button on about:home
   let doc = content.document;
   let container;
   if (doc.documentURI.toLowerCase() == "about:home" &&
       (container = doc.getElementById("sessionRestoreContainer"))) {
     container.hidden = true;
   }
 });
@@ -396,52 +396,52 @@ AboutReaderListener.init();
 
 var ContentSearchMediator = {
 
   whitelist: new Set([
     "about:home",
     "about:newtab",
   ]),
 
-  init: function (chromeGlobal) {
+  init: function(chromeGlobal) {
     chromeGlobal.addEventListener("ContentSearchClient", this, true, true);
     addMessageListener("ContentSearch", this);
   },
 
-  handleEvent: function (event) {
+  handleEvent: function(event) {
     if (this._contentWhitelisted) {
       this._sendMsg(event.detail.type, event.detail.data);
     }
   },
 
-  receiveMessage: function (msg) {
+  receiveMessage: function(msg) {
     if (msg.data.type == "AddToWhitelist") {
       for (let uri of msg.data.data) {
         this.whitelist.add(uri);
       }
       this._sendMsg("AddToWhitelistAck");
       return;
     }
     if (this._contentWhitelisted) {
       this._fireEvent(msg.data.type, msg.data.data);
     }
   },
 
   get _contentWhitelisted() {
     return this.whitelist.has(content.document.documentURI);
   },
 
-  _sendMsg: function (type, data = null) {
+  _sendMsg: function(type, data = null) {
     sendAsyncMessage("ContentSearch", {
       type: type,
       data: data,
     });
   },
 
-  _fireEvent: function (type, data = null) {
+  _fireEvent: function(type, data = null) {
     let event = Cu.cloneInto({
       detail: {
         type: type,
         data: data,
       },
     }, content);
     content.dispatchEvent(new content.CustomEvent("ContentSearchService",
                                                   event));
@@ -486,41 +486,41 @@ var PageStyleHandler = {
       case "PageStyle:Disable":
         this.markupDocumentViewer.authorStyleDisabled = true;
         break;
     }
 
     this.sendStyleSheetInfo();
   },
 
-  _stylesheetSwitchAll: function (frameset, title) {
+  _stylesheetSwitchAll: function(frameset, title) {
     if (!title || this._stylesheetInFrame(frameset, title)) {
       this._stylesheetSwitchFrame(frameset, title);
     }
 
     for (let i = 0; i < frameset.frames.length; i++) {
       // Recurse into sub-frames.
       this._stylesheetSwitchAll(frameset.frames[i], title);
     }
   },
 
-  _stylesheetSwitchFrame: function (frame, title) {
+  _stylesheetSwitchFrame: function(frame, title) {
     var docStyleSheets = frame.document.styleSheets;
 
     for (let i = 0; i < docStyleSheets.length; ++i) {
       let docStyleSheet = docStyleSheets[i];
       if (docStyleSheet.title) {
         docStyleSheet.disabled = (docStyleSheet.title != title);
       } else if (docStyleSheet.disabled) {
         docStyleSheet.disabled = false;
       }
     }
   },
 
-  _stylesheetInFrame: function (frame, title) {
+  _stylesheetInFrame: function(frame, title) {
     return Array.some(frame.document.styleSheets, (styleSheet) => styleSheet.title == title);
   },
 
   _filterStyleSheets: function(styleSheets) {
     let result = [];
 
     for (let currentStyleSheet of styleSheets) {
       if (!currentStyleSheet.title)
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -544,67 +544,67 @@
             mStateFlags: stateFlags,
             mStatus: 0,
             mMessage: "",
             mTotalProgress: 0,
 
             // count of open requests (should always be 0 or 1)
             mRequestCount: 0,
 
-            destroy: function () {
+            destroy: function() {
               delete this.mTab;
               delete this.mBrowser;
               delete this.mTabBrowser;
             },
 
-            _callProgressListeners: function () {
+            _callProgressListeners: function() {
               Array.unshift(arguments, this.mBrowser);
               return this.mTabBrowser._callProgressListeners.apply(this.mTabBrowser, arguments);
             },
 
-            _shouldShowProgress: function (aRequest) {
+            _shouldShowProgress: function(aRequest) {
               if (this.mBlank)
                 return false;
 
               // Don't show progress indicators in tabs for about: URIs
               // pointing to local resources.
               if ((aRequest instanceof Ci.nsIChannel) &&
                   aRequest.originalURI.schemeIs("about") &&
                   (aRequest.URI.schemeIs("jar") || aRequest.URI.schemeIs("file")))
                 return false;
 
               return true;
             },
 
-            onProgressChange: function (aWebProgress, aRequest,
-                                        aCurSelfProgress, aMaxSelfProgress,
-                                        aCurTotalProgress, aMaxTotalProgress) {
+            onProgressChange: function(aWebProgress, aRequest,
+                                       aCurSelfProgress, aMaxSelfProgress,
+                                       aCurTotalProgress, aMaxTotalProgress) {
               this.mTotalProgress = aMaxTotalProgress ? aCurTotalProgress / aMaxTotalProgress : 0;
 
               if (!this._shouldShowProgress(aRequest))
                 return;
 
               if (this.mTotalProgress)
                 this.mTab.setAttribute("progress", "true");
 
               this._callProgressListeners("onProgressChange",
                                           [aWebProgress, aRequest,
                                            aCurSelfProgress, aMaxSelfProgress,
                                            aCurTotalProgress, aMaxTotalProgress]);
             },
 
-            onProgressChange64: function (aWebProgress, aRequest,
-                                          aCurSelfProgress, aMaxSelfProgress,
-                                          aCurTotalProgress, aMaxTotalProgress) {
+            onProgressChange64: function(aWebProgress, aRequest,
+                                         aCurSelfProgress, aMaxSelfProgress,
+                                         aCurTotalProgress, aMaxTotalProgress) {
               return this.onProgressChange(aWebProgress, aRequest,
                 aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress,
                 aMaxTotalProgress);
             },
 
-            onStateChange: function (aWebProgress, aRequest, aStateFlags, aStatus) {
+            onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus) {
               if (!aRequest)
                 return;
 
               var oldBlank = this.mBlank;
 
               const nsIWebProgressListener = Components.interfaces.nsIWebProgressListener;
               const nsIChannel = Components.interfaces.nsIChannel;
               let location, originalLocation;
@@ -735,18 +735,18 @@
                 // reset cached temporary values at beginning and end
                 this.mMessage = "";
                 this.mTotalProgress = 0;
               }
               this.mStateFlags = aStateFlags;
               this.mStatus = aStatus;
             },
 
-            onLocationChange: function (aWebProgress, aRequest, aLocation,
-                                        aFlags) {
+            onLocationChange: function(aWebProgress, aRequest, aLocation,
+                                       aFlags) {
               // OnLocationChange is called for both the top-level content
               // and the subframes.
               let topLevel = aWebProgress.isTopLevel;
 
               if (topLevel) {
                 let isSameDocument =
                   !!(aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT);
                 // We need to clear the typed value
@@ -819,37 +819,37 @@
               }
 
               if (topLevel) {
                 this.mBrowser.lastURI = aLocation;
                 this.mBrowser.lastLocationChange = Date.now();
               }
             },
 
-            onStatusChange: function (aWebProgress, aRequest, aStatus, aMessage) {
+            onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage) {
               if (this.mBlank)
                 return;
 
               this._callProgressListeners("onStatusChange",
                                           [aWebProgress, aRequest, aStatus, aMessage]);
 
               this.mMessage = aMessage;
             },
 
-            onSecurityChange: function (aWebProgress, aRequest, aState) {
+            onSecurityChange: function(aWebProgress, aRequest, aState) {
               this._callProgressListeners("onSecurityChange",
                                           [aWebProgress, aRequest, aState]);
             },
 
-            onRefreshAttempted: function (aWebProgress, aURI, aDelay, aSameURI) {
+            onRefreshAttempted: function(aWebProgress, aURI, aDelay, aSameURI) {
               return this._callProgressListeners("onRefreshAttempted",
                                                  [aWebProgress, aURI, aDelay, aSameURI]);
             },
 
-            QueryInterface: function (aIID) {
+            QueryInterface: function(aIID) {
               if (aIID.equals(Components.interfaces.nsIWebProgressListener) ||
                   aIID.equals(Components.interfaces.nsIWebProgressListener2) ||
                   aIID.equals(Components.interfaces.nsISupportsWeakReference) ||
                   aIID.equals(Components.interfaces.nsISupports))
                 return this;
               throw Components.results.NS_NOINTERFACE;
             }
           });
@@ -2170,17 +2170,17 @@
             // When overflowing, new tabs are scrolled into view smoothly, which
             // doesn't go well together with the width transition. So we skip the
             // transition in that case.
             let animate = !aSkipAnimation &&
                           this.tabContainer.getAttribute("overflow") != "true" &&
                           Services.prefs.getBoolPref("browser.tabs.animate");
             if (!animate) {
               t.setAttribute("fadein", "true");
-              setTimeout(function (tabContainer) {
+              setTimeout(function(tabContainer) {
                 tabContainer._handleNewTab(t);
               }, 0, this.tabContainer);
             }
 
             // invalidate cache
             this._visibleTabs = null;
 
             this.tabContainer.appendChild(t);
@@ -2266,17 +2266,17 @@
                 this._lastRelatedTab.owner = null;
               else
                 t.owner = this.selectedTab;
               this.moveTabTo(t, newTabPos);
               this._lastRelatedTab = t;
             }
 
             if (animate) {
-              requestAnimationFrame(function () {
+              requestAnimationFrame(function() {
                 this.tabContainer._handleTabTelemetryStart(t, aURI);
 
                 // kick the animation off
                 t.setAttribute("fadein", "true");
               }.bind(this));
             }
 
             return t;
@@ -2458,17 +2458,17 @@
             }
 
             this.tabContainer._handleTabTelemetryStart(aTab);
 
             this._blurTab(aTab);
             aTab.style.maxWidth = ""; // ensure that fade-out transition happens
             aTab.removeAttribute("fadein");
 
-            setTimeout(function (tab, tabbrowser) {
+            setTimeout(function(tab, tabbrowser) {
               if (tab.parentNode &&
                   window.getComputedStyle(tab).maxWidth == "0.1px") {
                 NS_ASSERT(false, "Giving up waiting for the tab closing animation to finish (bug 608589)");
                 tabbrowser._endRemoveTab(tab);
               }
             }, 3000, aTab, this);
           ]]>
         </body>
@@ -4118,54 +4118,54 @@
               this._processing = false;
             },
 
             /*
              * Telemetry and Profiler related helpers for recording tab switch
              * timing.
              */
 
-            startTabSwitch: function () {
+            startTabSwitch: function() {
               TelemetryStopwatch.cancel("FX_TAB_SWITCH_TOTAL_E10S_MS", window);
               TelemetryStopwatch.start("FX_TAB_SWITCH_TOTAL_E10S_MS", window);
               this.addMarker("AsyncTabSwitch:Start");
               this.switchInProgress = true;
             },
 
             /**
              * Something has occurred that might mean that we've completed
              * the tab switch (layers are ready, paints are done, spinners
              * are hidden). This checks to make sure all conditions are
              * satisfied, and then records the tab switch as finished.
              */
-            maybeFinishTabSwitch: function () {
+            maybeFinishTabSwitch: function() {
               if (this.switchInProgress && this.requestedTab &&
                   this.getTabState(this.requestedTab) == this.STATE_LOADED) {
                 // After this point the tab has switched from the content thread's point of view.
                 // The changes will be visible after the next refresh driver tick + composite.
                 let time = TelemetryStopwatch.timeElapsed("FX_TAB_SWITCH_TOTAL_E10S_MS", window);
                 if (time != -1) {
                   TelemetryStopwatch.finish("FX_TAB_SWITCH_TOTAL_E10S_MS", window);
                   this.log("DEBUG: tab switch time = " + time);
                   this.addMarker("AsyncTabSwitch:Finish");
                 }
                 this.switchInProgress = false;
               }
             },
 
-            spinnerDisplayed: function () {
+            spinnerDisplayed: function() {
               this.assert(!this.spinnerTab);
               TelemetryStopwatch.start("FX_TAB_SWITCH_SPINNER_VISIBLE_MS", window);
               // We have a second, similar probe for capturing recordings of
               // when the spinner is displayed for very long periods.
               TelemetryStopwatch.start("FX_TAB_SWITCH_SPINNER_VISIBLE_LONG_MS", window);
               this.addMarker("AsyncTabSwitch:SpinnerShown");
             },
 
-            spinnerHidden: function () {
+            spinnerHidden: function() {
               this.assert(this.spinnerTab);
               this.log("DEBUG: spinner time = " +
                        TelemetryStopwatch.timeElapsed("FX_TAB_SWITCH_SPINNER_VISIBLE_MS", window));
               TelemetryStopwatch.finish("FX_TAB_SWITCH_SPINNER_VISIBLE_MS", window);
               TelemetryStopwatch.finish("FX_TAB_SWITCH_SPINNER_VISIBLE_LONG_MS", window);
               this.addMarker("AsyncTabSwitch:SpinnerHidden");
               // we do not get a onPaint after displaying the spinner
               this.maybeFinishTabSwitch();
@@ -4179,17 +4179,17 @@
 
             /*
              * Debug related logging for switcher.
              */
 
             _useDumpForLogging: false,
             _logInit: false,
 
-            logging: function () {
+            logging: function() {
               if (this._useDumpForLogging)
                 return true;
               if (this._logInit)
                 return this._shouldLog;
               let result = false;
               try {
                 result = Services.prefs.getBoolPref("browser.tabs.remote.logSwitchTiming");
               } catch (ex) {
@@ -4930,24 +4930,24 @@
         -->
       <property name="mStrip" readonly="true">
         <getter>
         <![CDATA[
           return ({
             self: this,
             childNodes: [null, this.tabContextMenu, this.tabContainer],
             firstChild: { nextSibling: this.tabContextMenu },
-            getElementsByAttribute: function (attr, attrValue) {
+            getElementsByAttribute: function(attr, attrValue) {
               if (attr == "anonid" && attrValue == "tabContextMenu")
                 return [this.self.tabContextMenu];
               return [];
             },
             // Also support adding event listeners (forward to the tab container)
-            addEventListener: function (a, b, c) { this.self.tabContainer.addEventListener(a, b, c); },
-            removeEventListener: function (a, b, c) { this.self.tabContainer.removeEventListener(a, b, c); }
+            addEventListener: function(a, b, c) { this.self.tabContainer.addEventListener(a, b, c); },
+            removeEventListener: function(a, b, c) { this.self.tabContainer.removeEventListener(a, b, c); }
           });
         ]]>
         </getter>
       </property>
       <field name="_soundPlayingAttrRemovalTimer">0</field>
     </implementation>
 
     <handlers>
@@ -5845,17 +5845,17 @@
 
             this.mTabstrip._smoothScrollByPixels(this.mTabstrip._isRTLScrollbox ?
                                                  selected.right - scrollRect.right :
                                                  selected.left - scrollRect.left);
           }
 
           if (!this._animateElement.hasAttribute("notifybgtab")) {
             this._animateElement.setAttribute("notifybgtab", "true");
-            setTimeout(function (ele) {
+            setTimeout(function(ele) {
               ele.removeAttribute("notifybgtab");
             }, 150, this._animateElement);
           }
         ]]></body>
       </method>
 
       <method name="_getDragTargetTab">
         <parameter name="event"/>
--- a/browser/base/content/test/alerts/browser_notification_do_not_disturb.js
+++ b/browser/base/content/test/alerts/browser_notification_do_not_disturb.js
@@ -2,17 +2,17 @@
 
 var tab;
 var notificationURL = "http://example.org/browser/browser/base/content/test/alerts/file_dom_notifications.html";
 
 const ALERT_SERVICE = Cc["@mozilla.org/alerts-service;1"]
                         .getService(Ci.nsIAlertsService)
                         .QueryInterface(Ci.nsIAlertsDoNotDisturb);
 
-function test () {
+function test() {
   waitForExplicitFinish();
 
   try {
     // Only run the test if the do-not-disturb
     // interface has been implemented.
     ALERT_SERVICE.manualDoNotDisturb;
     ok(true, "Alert service implements do-not-disturb interface");
   } catch (e) {
--- a/browser/base/content/test/alerts/browser_notification_remove_permission.js
+++ b/browser/base/content/test/alerts/browser_notification_remove_permission.js
@@ -1,16 +1,16 @@
 "use strict";
 
 var tab;
 var notificationURL = "http://example.org/browser/browser/base/content/test/alerts/file_dom_notifications.html";
 var alertWindowClosed = false;
 var permRemoved = false;
 
-function test () {
+function test() {
   waitForExplicitFinish();
 
   let pm = Services.perms;
   registerCleanupFunction(function() {
     pm.remove(makeURI(notificationURL), "desktop-notification");
     gBrowser.removeTab(tab);
     window.restore();
   });
--- a/browser/base/content/test/general/aboutHome_content_script.js
+++ b/browser/base/content/test/general/aboutHome_content_script.js
@@ -1,6 +1,6 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-addMessageListener("AboutHome:SearchTriggered", function (msg) {
+addMessageListener("AboutHome:SearchTriggered", function(msg) {
   sendAsyncMessage("AboutHomeTest:CheckRecordedSearch", msg.data);
 });
--- a/browser/base/content/test/general/browser_aboutHealthReport.js
+++ b/browser/base/content/test/general/browser_aboutHealthReport.js
@@ -63,17 +63,17 @@ var gTests = [
   desc: "Test the remote commands",
   setup: Task.async(function*()
   {
     Preferences.set(TELEMETRY_LOG_PREF, "Trace");
     yield setupPingArchive();
     Preferences.set("datareporting.healthreport.about.reportUrl",
                     HTTPS_BASE + "healthreport_testRemoteCommands.html");
   }),
-  run: function (iframe)
+  run: function(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);
--- a/browser/base/content/test/general/browser_aboutHome.js
+++ b/browser/base/content/test/general/browser_aboutHome.js
@@ -492,17 +492,17 @@ add_task(function* () {
 });
 
 add_task(function* () {
   info("Sync button should open about:preferences#sync");
 
   yield BrowserTestUtils.withNewTab({ gBrowser, url: "about:home" }, function* (browser) {
     let oldOpenPrefs = window.openPreferences;
     let openPrefsPromise = new Promise(resolve => {
-      window.openPreferences = function (pane, params) {
+      window.openPreferences = function(pane, params) {
         resolve({ pane: pane, params: params });
       };
     });
 
     yield BrowserTestUtils.synthesizeMouseAtCenter("#sync", {}, browser);
 
     let result = yield openPrefsPromise;
     window.openPreferences = oldOpenPrefs;
@@ -645,24 +645,24 @@ function promiseContentSearchChange(brow
   });
 }
 
 function promiseNewEngine(basename) {
   info("Waiting for engine to be added: " + basename);
   return new Promise((resolve, reject) => {
     let url = getRootDirectory(gTestPath) + basename;
     Services.search.addEngine(url, null, "", false, {
-      onSuccess: function (engine) {
+      onSuccess: function(engine) {
         info("Search engine added: " + basename);
         registerCleanupFunction(() => {
           try {
             Services.search.removeEngine(engine);
           } catch (ex) { /* Can't remove the engine more than once */ }
         });
         resolve(engine);
       },
-      onError: function (errCode) {
+      onError: function(errCode) {
         ok(false, "addEngine failed with error code " + errCode);
         reject();
       },
     });
   });
 }
--- a/browser/base/content/test/general/browser_alltabslistener.js
+++ b/browser/base/content/test/general/browser_alltabslistener.js
@@ -1,79 +1,79 @@
 var Ci = Components.interfaces;
 
 const gCompleteState = Ci.nsIWebProgressListener.STATE_STOP +
                        Ci.nsIWebProgressListener.STATE_IS_NETWORK;
 
 var gFrontProgressListener = {
-  onProgressChange: function (aWebProgress, aRequest,
-                              aCurSelfProgress, aMaxSelfProgress,
-                              aCurTotalProgress, aMaxTotalProgress) {
+  onProgressChange: function(aWebProgress, aRequest,
+                             aCurSelfProgress, aMaxSelfProgress,
+                             aCurTotalProgress, aMaxTotalProgress) {
   },
 
-  onStateChange: function (aWebProgress, aRequest, aStateFlags, aStatus) {
+  onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus) {
     var state = "onStateChange";
     info("FrontProgress: " + state + " 0x" + aStateFlags.toString(16));
     ok(gFrontNotificationsPos < gFrontNotifications.length, "Got an expected notification for the front notifications listener");
     is(state, gFrontNotifications[gFrontNotificationsPos], "Got a notification for the front notifications listener");
     gFrontNotificationsPos++;
   },
 
-  onLocationChange: function (aWebProgress, aRequest, aLocationURI, aFlags) {
+  onLocationChange: function(aWebProgress, aRequest, aLocationURI, aFlags) {
     var state = "onLocationChange";
     info("FrontProgress: " + state + " " + aLocationURI.spec);
     ok(gFrontNotificationsPos < gFrontNotifications.length, "Got an expected notification for the front notifications listener");
     is(state, gFrontNotifications[gFrontNotificationsPos], "Got a notification for the front notifications listener");
     gFrontNotificationsPos++;
   },
 
-  onStatusChange: function (aWebProgress, aRequest, aStatus, aMessage) {
+  onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage) {
   },
 
-  onSecurityChange: function (aWebProgress, aRequest, aState) {
+  onSecurityChange: function(aWebProgress, aRequest, aState) {
     var state = "onSecurityChange";
     info("FrontProgress: " + state + " 0x" + aState.toString(16));
     ok(gFrontNotificationsPos < gFrontNotifications.length, "Got an expected notification for the front notifications listener");
     is(state, gFrontNotifications[gFrontNotificationsPos], "Got a notification for the front notifications listener");
     gFrontNotificationsPos++;
   }
 }
 
 var gAllProgressListener = {
-  onStateChange: function (aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
+  onStateChange: function(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
     var state = "onStateChange";
     info("AllProgress: " + state + " 0x" + aStateFlags.toString(16));
     ok(aBrowser == gTestBrowser, state + " notification came from the correct browser");
     ok(gAllNotificationsPos < gAllNotifications.length, "Got an expected notification for the all notifications listener");
     is(state, gAllNotifications[gAllNotificationsPos], "Got a notification for the all notifications listener");
     gAllNotificationsPos++;
 
     if ((aStateFlags & gCompleteState) == gCompleteState) {
       ok(gAllNotificationsPos == gAllNotifications.length, "Saw the expected number of notifications");
       ok(gFrontNotificationsPos == gFrontNotifications.length, "Saw the expected number of frontnotifications");
       executeSoon(gNextTest);
     }
   },
 
-  onLocationChange: function (aBrowser, aWebProgress, aRequest, aLocationURI,
-                              aFlags) {
+  onLocationChange: function(aBrowser, aWebProgress, aRequest, aLocationURI,
+                             aFlags) {
     var state = "onLocationChange";
     info("AllProgress: " + state + " " + aLocationURI.spec);
     ok(aBrowser == gTestBrowser, state + " notification came from the correct browser");
     ok(gAllNotificationsPos < gAllNotifications.length, "Got an expected notification for the all notifications listener");
     is(state, gAllNotifications[gAllNotificationsPos], "Got a notification for the all notifications listener");
     gAllNotificationsPos++;
   },
 
-  onStatusChange: function (aBrowser, aWebProgress, aRequest, aStatus, aMessage) {
+  onStatusChange: function(aBrowser, aWebProgress, aRequest, aStatus, aMessage) {
     var state = "onStatusChange";
     ok(aBrowser == gTestBrowser, state + " notification came from the correct browser");
   },
 
-  onSecurityChange: function (aBrowser, aWebProgress, aRequest, aState) {
+  onSecurityChange: function(aBrowser, aWebProgress, aRequest, aState) {
     var state = "onSecurityChange";
     info("AllProgress: " + state + " 0x" + aState.toString(16));
     ok(aBrowser == gTestBrowser, state + " notification came from the correct browser");
     ok(gAllNotificationsPos < gAllNotifications.length, "Got an expected notification for the all notifications listener");
     is(state, gAllNotifications[gAllNotificationsPos], "Got a notification for the all notifications listener");
     gAllNotificationsPos++;
   }
 }
--- a/browser/base/content/test/general/browser_blockHPKP.js
+++ b/browser/base/content/test/general/browser_blockHPKP.js
@@ -33,17 +33,17 @@ const kBadPinningDomain = "bad.include-s
 const kURLPath = "/browser/browser/base/content/test/general/pinning_headers.sjs?";
 
 function test() {
   waitForExplicitFinish();
   // Enable enforcing strict pinning and processing headers from
   // non-builtin roots.
   Services.prefs.setIntPref(kpkpEnforcementPref, 2);
   Services.prefs.setBoolPref(khpkpPinninEnablePref, true);
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     Services.prefs.clearUserPref(kpkpEnforcementPref);
     Services.prefs.clearUserPref(khpkpPinninEnablePref);
     let uri = gIOService.newURI("https://" + kPinningDomain, null, null);
     gSSService.removeState(Ci.nsISiteSecurityService.HEADER_HPKP, uri, 0);
   });
   whenNewTabLoaded(window, loadPinningPage);
 }
 
--- a/browser/base/content/test/general/browser_bookmark_titles.js
+++ b/browser/base/content/test/general/browser_bookmark_titles.js
@@ -37,17 +37,17 @@ add_task(function* () {
     // Network failure test: now that dummy_page.html is in history, bookmarking
     // it should give the last known page title as the default bookmark title.
 
     // Simulate a network outage with offline mode. (Localhost is still
     // accessible in offline mode, so disable the test proxy as well.)
     BrowserOffline.toggleOfflineStatus();
     let proxy = Services.prefs.getIntPref('network.proxy.type');
     Services.prefs.setIntPref('network.proxy.type', 0);
-    registerCleanupFunction(function () {
+    registerCleanupFunction(function() {
         BrowserOffline.toggleOfflineStatus();
         Services.prefs.setIntPref('network.proxy.type', proxy);
     });
 
     // LOAD_FLAGS_BYPASS_CACHE isn't good enough. So clear the cache.
     Services.cache2.clear();
 
     let [uri, title] = tests[0];
--- a/browser/base/content/test/general/browser_bug1064280_changeUrlInPinnedTab.js
+++ b/browser/base/content/test/general/browser_bug1064280_changeUrlInPinnedTab.js
@@ -26,11 +26,11 @@ add_task(function* () {
   goButton.click();
   yield BrowserTestUtils.browserLoaded(browser);
 
   is(appTab.linkedBrowser.currentURI.spec, TEST_LINK_CHANGED,
      "New page loaded in the app tab");
   is(gBrowser.tabs.length, initialTabsNo, "No additional tabs were opened");
 });
 
-registerCleanupFunction(function () {
+registerCleanupFunction(function() {
   gBrowser.removeTab(gBrowser.selectedTab);
 });
--- a/browser/base/content/test/general/browser_bug356571.js
+++ b/browser/base/content/test/general/browser_bug356571.js
@@ -42,17 +42,17 @@ const kDummyPage = "http://example.org/b
 const kURIs = [
   "bad://www.mozilla.org/",
   kDummyPage,
   kDummyPage,
 ];
 
 var gProgressListener = {
   _runCount: 0,
-  onStateChange: function (aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
+  onStateChange: function(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
     if ((aStateFlags & kCompleteState) == kCompleteState) {
       if (++this._runCount != kURIs.length)
         return;
       // Check we failed on unknown protocol (received an alert from docShell)
       ok(didFail, "Correctly failed on unknown protocol");
       // Check we opened all tabs
       ok(gBrowser.tabs.length == kURIs.length, "Correctly opened all expected tabs");
       finishTest();
--- a/browser/base/content/test/general/browser_bug406216.js
+++ b/browser/base/content/test/general/browser_bug406216.js
@@ -19,32 +19,32 @@ function test() {
   URIS.forEach(addTab);
 }
 
 function addTab(aURI, aIndex) {
   var tab = gBrowser.addTab(aURI);
   if (aIndex == 0)
     gBrowser.removeTab(gBrowser.tabs[0], {skipPermitUnload: true});
 
-  tab.linkedBrowser.addEventListener("load", function (event) {
+  tab.linkedBrowser.addEventListener("load", function(event) {
     event.currentTarget.removeEventListener("load", arguments.callee, true);
     if (++count == URIS.length)
       executeSoon(doTabsTest);
   }, true);
 }
 
 function doTabsTest() {
   is(gBrowser.tabs.length, URIS.length, "Correctly opened all expected tabs");
 
   // sample of "close related tabs" feature
-  gBrowser.tabContainer.addEventListener("TabClose", function (event) {
+  gBrowser.tabContainer.addEventListener("TabClose", function(event) {
     event.currentTarget.removeEventListener("TabClose", arguments.callee, true);
     var closedTab = event.originalTarget;
     var scheme = closedTab.linkedBrowser.currentURI.scheme;
-    Array.slice(gBrowser.tabs).forEach(function (aTab) {
+    Array.slice(gBrowser.tabs).forEach(function(aTab) {
       if (aTab != closedTab && aTab.linkedBrowser.currentURI.scheme == scheme)
         gBrowser.removeTab(aTab, {skipPermitUnload: true});
     });
   }, true);
 
   gBrowser.removeTab(gBrowser.tabs[0], {skipPermitUnload: true});
   is(gBrowser.tabs.length, 1, "Related tabs are not closed unexpectedly");
 
--- a/browser/base/content/test/general/browser_bug416661.js
+++ b/browser/base/content/test/general/browser_bug416661.js
@@ -7,17 +7,17 @@ function start_test_prefNotSet() {
     // capture the zoom level to test later
     zoomLevel = ZoomManager.zoom;
     isnot(zoomLevel, 1, "zoom level should have changed");
 
     yield FullZoomHelper.load(gBrowser.selectedTab, "http://mochi.test:8888/browser/browser/base/content/test/general/moz.png");
   }).then(continue_test_prefNotSet, FullZoomHelper.failAndContinue(finish));
 }
 
-function continue_test_prefNotSet () {
+function continue_test_prefNotSet() {
   Task.spawn(function* () {
     is(ZoomManager.zoom, 1, "zoom level pref should not apply to an image");
     yield FullZoom.reset();
 
     yield FullZoomHelper.load(gBrowser.selectedTab, "http://mochi.test:8888/browser/browser/base/content/test/general/zoom_test.html");
   }).then(end_test_prefNotSet, FullZoomHelper.failAndContinue(finish));
 }
 
--- a/browser/base/content/test/general/browser_bug422590.js
+++ b/browser/base/content/test/general/browser_bug422590.js
@@ -5,38 +5,38 @@ function test() {
 }
 
 function testChromeless() {
   // test a chromeless window
   var newWin = openDialog(getBrowserURL(), "_blank",
                           "chrome,dialog=no,location=yes,toolbar=no", "about:blank");
   ok(newWin, "got new window");
 
-  whenDelayedStartupFinished(newWin, function () {
+  whenDelayedStartupFinished(newWin, function() {
     // Check that the search bar is hidden
     var searchBar = newWin.BrowserSearch.searchBar;
     ok(searchBar, "got search bar");
 
     var searchBarBO = searchBar.boxObject;
     is(searchBarBO.width, 0, "search bar hidden");
     is(searchBarBO.height, 0, "search bar hidden");
 
-    testCustomize(newWin, function () {
+    testCustomize(newWin, function() {
       newWin.close();
       finish();
     });
   });
 }
 
 function testCustomize(aWindow, aCallback) {
   var fileMenu = aWindow.document.getElementById("file-menu");
   ok(fileMenu, "got file menu");
   is(fileMenu.disabled, false, "file menu initially enabled");
 
-  openToolbarCustomizationUI(function () {
+  openToolbarCustomizationUI(function() {
     // Can't use the property, since the binding may have since been removed
     // if the element is hidden (see bug 422590)
     is(fileMenu.getAttribute("disabled"), "true",
        "file menu is disabled during toolbar customization");
 
     closeToolbarCustomizationUI(onClose, aWindow);
   }, aWindow);
 
--- a/browser/base/content/test/general/browser_bug423833.js
+++ b/browser/base/content/test/general/browser_bug423833.js
@@ -66,17 +66,17 @@ function test2Setup() {
   // Now let's do the whole thing again, but this time for "Open frame in new tab"
   var badFrame = content.frames[1];
 
   document.popupNode = badFrame.document.firstChild;
 
   var contentAreaContextMenu = document.getElementById("contentAreaContextMenu");
   var contextMenu = new nsContextMenu(contentAreaContextMenu);
 
-  gBrowser.tabContainer.addEventListener("TabOpen", function (event) {
+  gBrowser.tabContainer.addEventListener("TabOpen", function(event) {
     test2tab = event.target;
     gBrowser.tabContainer.removeEventListener("TabOpen", arguments.callee, false);
   }, false);
   contextMenu.openFrameInTab();
   ok(test2tab, "openFrameInTab() opened a tab");
 
   gBrowser.selectedTab = test2tab;
 
@@ -102,17 +102,17 @@ function testOpenFrameInTab() {
 function test3Setup() {
   // One more time, for "Open frame in new window"
   var badFrame = content.frames[1];
   document.popupNode = badFrame.document.firstChild;
 
   var contentAreaContextMenu = document.getElementById("contentAreaContextMenu");
   var contextMenu = new nsContextMenu(contentAreaContextMenu);
 
-  Services.ww.registerNotification(function (aSubject, aTopic, aData) {
+  Services.ww.registerNotification(function(aSubject, aTopic, aData) {
     if (aTopic == "domwindowopened")
       test3window = aSubject;
     Services.ww.unregisterNotification(arguments.callee);
   });
 
   contextMenu.openFrame();
 
   intervalID = setInterval(testOpenFrame, 3000);
--- a/browser/base/content/test/general/browser_bug431826.js
+++ b/browser/base/content/test/general/browser_bug431826.js
@@ -1,16 +1,16 @@
 function remote(task) {
   return ContentTask.spawn(gBrowser.selectedBrowser, null, task);
 }
 
 add_task(function* () {
   gBrowser.selectedTab = gBrowser.addTab();
 
-  let promise = remote(function () {
+  let promise = remote(function() {
     return ContentTaskUtils.waitForEvent(this, "DOMContentLoaded", true, event => {
       return content.document.documentURI != "about:blank";
     }).then(() => 0); // don't want to send the event to the chrome process
   });
   gBrowser.loadURI("https://nocert.example.com/");
   yield promise;
 
   yield remote(() => {
@@ -25,17 +25,17 @@ add_task(function* () {
     Assert.ok(div, "Advanced content div should exist");
     Assert.equal(div.ownerGlobal.getComputedStyle(div).display,
       "none", "Advanced content should not be visible by default");
   });
 
   // Tweak the expert mode pref
   gPrefService.setBoolPref("browser.xul.error_pages.expert_bad_cert", true);
 
-  promise = remote(function () {
+  promise = remote(function() {
     return ContentTaskUtils.waitForEvent(this, "DOMContentLoaded", true);
   });
   gBrowser.reload();
   yield promise;
 
   yield remote(() => {
     let div = content.document.getElementById("badCertAdvancedPanel");
     Assert.ok(div, "Advanced content div should exist");
--- a/browser/base/content/test/general/browser_bug441778.js
+++ b/browser/base/content/test/general/browser_bug441778.js
@@ -24,17 +24,17 @@ function test() {
 
     // Change the zoom level and then save it so we can compare it to the level
     // after loading the sub-document.
     FullZoom.enlarge();
     var zoomLevel = ZoomManager.zoom;
 
     // Start the sub-document load.
     let deferred = Promise.defer();
-    executeSoon(function () {
+    executeSoon(function() {
       BrowserTestUtils.browserLoaded(testBrowser, true).then(url => {
         is(url, TEST_IFRAME_URL, "got the load event for the iframe");
         is(ZoomManager.zoom, zoomLevel, "zoom is retained after sub-document load");
 
         FullZoomHelper.removeTabAndWaitForLocationChange().
           then(() => deferred.resolve());
       });
       ContentTask.spawn(testBrowser, TEST_IFRAME_URL, url => {
--- a/browser/base/content/test/general/browser_bug460146.js
+++ b/browser/base/content/test/general/browser_bug460146.js
@@ -1,25 +1,25 @@
 /* Check proper image url retrieval from all kinds of elements/styles */
 
 function test() {
   waitForExplicitFinish();
 
   gBrowser.selectedTab = gBrowser.addTab();
 
-  gBrowser.selectedBrowser.addEventListener("load", function () {
+  gBrowser.selectedBrowser.addEventListener("load", function() {
     gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
 
     var pageInfo = BrowserPageInfo(gBrowser.selectedBrowser.currentURI.spec,
                                    "mediaTab");
 
-    pageInfo.addEventListener("load", function () {
+    pageInfo.addEventListener("load", function() {
       pageInfo.removeEventListener("load", arguments.callee, true);
-      pageInfo.onFinished.push(function () {
-        executeSoon(function () {
+      pageInfo.onFinished.push(function() {
+        executeSoon(function() {
           var imageTree = pageInfo.document.getElementById("imagetree");
           var imageRowsNum = imageTree.view.rowCount;
 
           ok(imageTree, "Image tree is null (media tab is broken)");
 
           ok(imageRowsNum == 7, "Number of images listed: " +
                                 imageRowsNum + ", should be 7");
 
--- a/browser/base/content/test/general/browser_bug481560.js
+++ b/browser/base/content/test/general/browser_bug481560.js
@@ -1,13 +1,13 @@
 function test() {
   waitForExplicitFinish();
 
-  whenNewWindowLoaded(null, function (win) {
-    waitForFocus(function () {
+  whenNewWindowLoaded(null, function(win) {
+    waitForFocus(function() {
       function onTabClose() {
         ok(false, "shouldn't have gotten the TabClose event for the last tab");
       }
       var tab = win.gBrowser.selectedTab;
       tab.addEventListener("TabClose", onTabClose, false);
 
       EventUtils.synthesizeKey("w", { accelKey: true }, win);
 
--- a/browser/base/content/test/general/browser_bug517902.js
+++ b/browser/base/content/test/general/browser_bug517902.js
@@ -1,27 +1,27 @@
 /* Make sure that "View Image Info" loads the correct image data */
 
 function test() {
   waitForExplicitFinish();
 
   gBrowser.selectedTab = gBrowser.addTab();
 
-  gBrowser.selectedBrowser.addEventListener("load", function () {
+  gBrowser.selectedBrowser.addEventListener("load", function() {
     gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
 
     var doc = gBrowser.contentDocument;
     var testImg = doc.getElementById("test-image");
     var pageInfo = BrowserPageInfo(gBrowser.selectedBrowser.currentURI.spec,
                                    "mediaTab", testImg);
 
-    pageInfo.addEventListener("load", function () {
+    pageInfo.addEventListener("load", function() {
       pageInfo.removeEventListener("load", arguments.callee, true);
-      pageInfo.onFinished.push(function () {
-        executeSoon(function () {
+      pageInfo.onFinished.push(function() {
+        executeSoon(function() {
           var pageInfoImg = pageInfo.document.getElementById("thepreviewimage");
 
           is(pageInfoImg.src, testImg.src, "selected image has the correct source");
           is(pageInfoImg.width, testImg.width, "selected image has the correct width");
           is(pageInfoImg.height, testImg.height, "selected image has the correct height");
 
           pageInfo.close();
           gBrowser.removeCurrentTab();
--- a/browser/base/content/test/general/browser_bug519216.js
+++ b/browser/base/content/test/general/browser_bug519216.js
@@ -23,17 +23,17 @@ var progressListener2 = {
   }
 };
 
 var progressListener3 = {
   onLocationChange: function onLocationChange() {
     ok(calledListener2, "called progressListener2 before progressListener3");
     gBrowser.removeProgressListener(this);
     gBrowser.addProgressListener(progressListener4);
-    executeSoon(function () {
+    executeSoon(function() {
       expectListener4 = true;
       gBrowser.reload();
     });
   }
 };
 
 var expectListener4 = false;
 var progressListener4 = {
--- a/browser/base/content/test/general/browser_bug537013.js
+++ b/browser/base/content/test/general/browser_bug537013.js
@@ -28,17 +28,17 @@ function setFindString(aString) {
   EventUtils.sendString(aString);
   is(gFindBar._findField.value, aString, "Set the field correctly!");
 }
 
 var newWindow;
 
 function test() {
   waitForExplicitFinish();
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     while (tabs.length) {
       gBrowser.removeTab(tabs.pop());
     }
   });
   texts.forEach(aText => addTabWithText(aText));
 
   // Set up the first tab
   gBrowser.selectedTab = tabs[0];
--- a/browser/base/content/test/general/browser_bug553455.js
+++ b/browser/base/content/test/general/browser_bug553455.js
@@ -494,17 +494,17 @@ function test_multiple() {
        "2 add-ons will be installed after you restart " + gApp + ".",
        "Should have seen the right message");
 
     let installs = yield getInstalls();
     is(installs.length, 1, "Should be one pending install");
     installs[0].cancel();
 
     let addon = yield new Promise(resolve => {
-      AddonManager.getAddonByID("restartless-xpi@tests.mozilla.org", function (result) {
+      AddonManager.getAddonByID("restartless-xpi@tests.mozilla.org", function(result) {
         resolve(result);
       });
     });
     addon.uninstall();
     Services.perms.remove(makeURI("http://example.com/"), "install");
     yield removeTab();
   });
 },
@@ -1116,17 +1116,17 @@ function test_failedSecurity() {
     yield removeTab();
   });
 }
 ];
 
 var gTestStart = null;
 
 var XPInstallObserver = {
-  observe: function (aSubject, aTopic, aData) {
+  observe: function(aSubject, aTopic, aData) {
     var installInfo = aSubject.QueryInterface(Components.interfaces.amIWebInstallInfo);
     info("Observed " + aTopic + " for " + installInfo.installs.length + " installs");
     installInfo.installs.forEach(function(aInstall) {
       info("Install of " + aInstall.sourceURI.spec + " was in state " + aInstall.state);
     });
   }
 };
 
--- a/browser/base/content/test/general/browser_bug561636.js
+++ b/browser/base/content/test/general/browser_bug561636.js
@@ -12,17 +12,17 @@ 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 : function (aFormElement, aInvalidElements)
+  notifyInvalidSubmit : function(aFormElement, aInvalidElements)
   {
   }
 };
 
 var testId = 0;
 
 function incrementTest()
 {
@@ -292,24 +292,24 @@ add_task(function* ()
 
   let notifierPromise = new Promise((resolve, reject) => {
     gObserver.notifyInvalidSubmit = function() {
       executeSoon(function() {
         checkPopupHide();
 
         // Clean-up
         Services.obs.removeObserver(gObserver, "invalidformsubmit");
-        gObserver.notifyInvalidSubmit = function () {};
+        gObserver.notifyInvalidSubmit = function() {};
         resolve();
       });
     };
 
     Services.obs.addObserver(gObserver, "invalidformsubmit", false);
 
-    executeSoon(function () {
+    executeSoon(function() {
       browser.contentDocument.getElementById('s').click();
     });
   });
 
   yield notifierPromise;
 
   gBrowser.removeTab(gBrowser.getTabForBrowser(browser));
 });
--- a/browser/base/content/test/general/browser_bug585785.js
+++ b/browser/base/content/test/general/browser_bug585785.js
@@ -18,18 +18,18 @@ function checkAnimationState() {
   if (!tab.parentNode) {
     ok(true, "tab removed synchronously since the opening animation hasn't moved yet");
     finish();
     return;
   }
 
   info("tab didn't close immediately, so the tab opening animation must have started moving");
   info("waiting for the tab to close asynchronously");
-  tab.addEventListener("transitionend", function (event) {
+  tab.addEventListener("transitionend", function(event) {
     if (event.propertyName == "max-width") {
       tab.removeEventListener("transitionend", arguments.callee, false);
-      executeSoon(function () {
+      executeSoon(function() {
         ok(!tab.parentNode, "tab removed asynchronously");
         finish();
       });
     }
   }, false);
 }
--- a/browser/base/content/test/general/browser_bug609700.js
+++ b/browser/base/content/test/general/browser_bug609700.js
@@ -1,19 +1,19 @@
 function test() {
   waitForExplicitFinish();
 
-  Services.ww.registerNotification(function (aSubject, aTopic, aData) {
+  Services.ww.registerNotification(function(aSubject, aTopic, aData) {
     if (aTopic == "domwindowopened") {
       Services.ww.unregisterNotification(arguments.callee);
 
       ok(true, "duplicateTabIn opened a new window");
 
-      whenDelayedStartupFinished(aSubject, function () {
-        executeSoon(function () {
+      whenDelayedStartupFinished(aSubject, function() {
+        executeSoon(function() {
           aSubject.close();
           finish();
         });
       }, false);
     }
   });
 
   duplicateTabIn(gBrowser.selectedTab, "window");
--- a/browser/base/content/test/general/browser_bug623893.js
+++ b/browser/base/content/test/general/browser_bug623893.js
@@ -1,24 +1,24 @@
 function test() {
   waitForExplicitFinish();
 
-  loadAndWait("data:text/plain,1", function () {
-    loadAndWait("data:text/plain,2", function () {
+  loadAndWait("data:text/plain,1", function() {
+    loadAndWait("data:text/plain,2", function() {
       loadAndWait("data:text/plain,3", runTests);
     });
   });
 }
 
 function runTests() {
-  duplicate(0, "maintained the original index", function () {
+  duplicate(0, "maintained the original index", function() {
     gBrowser.removeCurrentTab();
 
-    duplicate(-1, "went back", function () {
-      duplicate(1, "went forward", function () {
+    duplicate(-1, "went back", function() {
+      duplicate(1, "went forward", function() {
         gBrowser.removeCurrentTab();
         gBrowser.removeCurrentTab();
         gBrowser.addTab();
         gBrowser.removeCurrentTab();
         finish();
       });
     });
   });
@@ -33,15 +33,15 @@ function duplicate(delta, msg, cb) {
   tab.addEventListener("SSTabRestored", function tabRestoredListener() {
     tab.removeEventListener("SSTabRestored", tabRestoredListener, false);
     is(gBrowser.sessionHistory.index, start + delta, msg);
     executeSoon(cb);
   }, false);
 }
 
 function loadAndWait(url, cb) {
-  gBrowser.selectedBrowser.addEventListener("load", function () {
+  gBrowser.selectedBrowser.addEventListener("load", function() {
     gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
     executeSoon(cb);
   }, true);
 
   gBrowser.loadURI(url);
 }
--- a/browser/base/content/test/general/browser_bug664672.js
+++ b/browser/base/content/test/general/browser_bug664672.js
@@ -1,19 +1,19 @@
 function test() {
   waitForExplicitFinish();
 
   var tab = gBrowser.addTab();
 
-  tab.addEventListener("TabClose", function () {
+  tab.addEventListener("TabClose", function() {
     tab.removeEventListener("TabClose", arguments.callee, false);
 
     ok(tab.linkedBrowser, "linkedBrowser should still exist during the TabClose event");
 
-    executeSoon(function () {
+    executeSoon(function() {
       ok(!tab.linkedBrowser, "linkedBrowser should be gone after the TabClose event");
 
       finish();
     });
   }, false);
 
   gBrowser.removeTab(tab);
 }
--- a/browser/base/content/test/general/browser_bug676619.js
+++ b/browser/base/content/test/general/browser_bug676619.js
@@ -1,29 +1,29 @@
-function test () {
+function test() {
   requestLongerTimeout(3);
   waitForExplicitFinish();
 
   var isHTTPS = false;
 
   function loadListener() {
     function testLocation(link, url, next) {
-      new TabOpenListener(url, function () {
+      new TabOpenListener(url, function() {
         gBrowser.removeTab(this.tab);
-      }, function () {
+      }, function() {
         next();
       });
 
       ContentTask.spawn(gBrowser.selectedBrowser, link, contentLink => {
         content.document.getElementById(contentLink).click();
       });
     }
 
     function testLink(link, name, next) {
-      addWindowListener("chrome://mozapps/content/downloads/unknownContentType.xul", function (win) {
+      addWindowListener("chrome://mozapps/content/downloads/unknownContentType.xul", function(win) {
         ContentTask.spawn(gBrowser.selectedBrowser, null, () => {
           Assert.equal(content.document.getElementById("unload-flag").textContent,
             "Okay", "beforeunload shouldn't have fired");
         }).then(() => {
           is(win.document.getElementById("location").value, name, "file name should match");
           win.close();
           next();
         });
@@ -36,17 +36,17 @@ function test () {
 
     testLink("link1", "test.txt",
       testLink.bind(null, "link2", "video.ogg",
         testLink.bind(null, "link3", "just some video",
           testLink.bind(null, "link4", "with-target.txt",
             testLink.bind(null, "link5", "javascript.txt",
               testLink.bind(null, "link6", "test.blob",
                 testLocation.bind(null, "link7", "http://example.com/",
-                  function () {
+                  function() {
                     if (isHTTPS) {
                       finish();
                     } else {
                       // same test again with https:
                       isHTTPS = true;
                       gBrowser.loadURI("https://example.com:443/browser/browser/base/content/test/general/download_page.html");
                     }
                   })))))));
--- a/browser/base/content/test/general/browser_bug678392.js
+++ b/browser/base/content/test/general/browser_bug678392.js
@@ -8,17 +8,17 @@ function maxSnapshotOverride() {
   return 5;
 }
 
 function test() {
   waitForExplicitFinish();
 
   BrowserOpenTab();
   let tab = gBrowser.selectedTab;
-  registerCleanupFunction(function () { gBrowser.removeTab(tab); });
+  registerCleanupFunction(function() { gBrowser.removeTab(tab); });
 
   ok(gHistorySwipeAnimation, "gHistorySwipeAnimation exists.");
 
   if (!gHistorySwipeAnimation._isSupported()) {
     is(gHistorySwipeAnimation.active, false, "History swipe animation is not " +
        "active when not supported by the platform.");
     finish();
     return;
--- a/browser/base/content/test/general/browser_bug734076.js
+++ b/browser/base/content/test/general/browser_bug734076.js
@@ -10,75 +10,75 @@ add_task(function* ()
 
   let writeDomainURL = encodeURI("data:text/html,<script>document.write(document.domain);</script>");
 
   let tests = [
     {
       name: "view background image",
       url: "http://mochi.test:8888/",
       element: "body",
-      go: function () {
+      go: function() {
         return ContentTask.spawn(gBrowser.selectedBrowser, { writeDomainURL: writeDomainURL }, function* (arg) {
           let contentBody = content.document.body;
           contentBody.style.backgroundImage = "url('" + arg.writeDomainURL + "')";
 
           return "context-viewbgimage";
         });
       },
-      verify: function () {
+      verify: function() {
         return ContentTask.spawn(gBrowser.selectedBrowser, null, function* (arg) {
           Assert.ok(!content.document.body.textContent,
             "no domain was inherited for view background image");
         });
       }
     },
     {
       name: "view image",
       url: "http://mochi.test:8888/",
       element: "img",
-      go: function () {
+      go: function() {
         return ContentTask.spawn(gBrowser.selectedBrowser, { writeDomainURL: writeDomainURL }, function* (arg) {
           let doc = content.document;
           let img = doc.createElement("img");
           img.height = 100;
           img.width = 100;
           img.setAttribute("src", arg.writeDomainURL);
           doc.body.insertBefore(img, doc.body.firstChild);
 
           return "context-viewimage";
         });
       },
-      verify: function () {
+      verify: function() {
         return ContentTask.spawn(gBrowser.selectedBrowser, null, function* (arg) {
           Assert.ok(!content.document.body.textContent,
             "no domain was inherited for view image");
         });
       }
     },
     {
       name: "show only this frame",
       url: "http://mochi.test:8888/",
       element: "iframe",
-      go: function () {
+      go: function() {
         return ContentTask.spawn(gBrowser.selectedBrowser, { writeDomainURL: writeDomainURL }, function* (arg) {
           let doc = content.document;
           let iframe = doc.createElement("iframe");
           iframe.setAttribute("src", arg.writeDomainURL);
           doc.body.insertBefore(iframe, doc.body.firstChild);
 
           // Wait for the iframe to load.
           return new Promise(resolve => {
             iframe.addEventListener("load", function onload() {
               iframe.removeEventListener("load", onload, true);
               resolve("context-showonlythisframe");
             }, true);
           });
         });
       },
-      verify: function () {
+      verify: function() {
         return ContentTask.spawn(gBrowser.selectedBrowser, null, function* (arg) {
           Assert.ok(!content.document.body.textContent,
             "no domain was inherited for 'show only this frame'");
         });
       }
     }
   ];
 
--- a/browser/base/content/test/general/browser_bug735471.js
+++ b/browser/base/content/test/general/browser_bug735471.js
@@ -7,17 +7,17 @@
 
 function test() {
   waitForExplicitFinish();
   // Open a new tab.
   whenNewTabLoaded(window, testPreferences);
 }
 
 function testPreferences() {
-  whenTabLoaded(gBrowser.selectedTab, function () {
+  whenTabLoaded(gBrowser.selectedTab, function() {
     is(content.location.href, "about:preferences", "Checking if the preferences tab was opened");
 
     gBrowser.removeCurrentTab();
     finish();
   });
 
   openPreferences();
 }
--- a/browser/base/content/test/general/browser_bug817947.js
+++ b/browser/base/content/test/general/browser_bug817947.js
@@ -4,46 +4,46 @@
 
 const URL = "http://mochi.test:8888/browser/";
 const PREF = "browser.sessionstore.restore_on_demand";
 
 function test() {
   waitForExplicitFinish();
 
   Services.prefs.setBoolPref(PREF, true);
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     Services.prefs.clearUserPref(PREF);
   });
 
-  preparePendingTab(function (aTab) {
+  preparePendingTab(function(aTab) {
     let win = gBrowser.replaceTabWithWindow(aTab);
 
-    whenDelayedStartupFinished(win, function () {
+    whenDelayedStartupFinished(win, function() {
       let [tab] = win.gBrowser.tabs;
 
-      whenLoaded(tab.linkedBrowser, function () {
+      whenLoaded(tab.linkedBrowser, function() {
         is(tab.linkedBrowser.currentURI.spec, URL, "correct url should be loaded");
         ok(!tab.hasAttribute("pending"), "tab should not be pending");
 
         win.close();
         finish();
       });
     });
   });
 }
 
 function preparePendingTab(aCallback) {
   let tab = gBrowser.addTab(URL);
 
-  whenLoaded(tab.linkedBrowser, function () {
+  whenLoaded(tab.linkedBrowser, function() {
     BrowserTestUtils.removeTab(tab).then(() => {
       let [{state}] = JSON.parse(SessionStore.getClosedTabData(window));
 
       tab = gBrowser.addTab("about:blank");
-      whenLoaded(tab.linkedBrowser, function () {
+      whenLoaded(tab.linkedBrowser, function() {
         SessionStore.setTabState(tab, JSON.stringify(state));
         ok(tab.hasAttribute("pending"), "tab should be pending");
         aCallback(tab);
       });
     });
   });
 }
 
--- a/browser/base/content/test/general/browser_contentAltClick.js
+++ b/browser/base/content/test/general/browser_contentAltClick.js
@@ -49,17 +49,17 @@ 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 = {
-      onDownloadAdded: function (aDownload) {
+      onDownloadAdded: function(aDownload) {
         downloads.push(aDownload);
         resolve();
       },
     };
   });
   yield downloadList.addView(downloadView);
   yield BrowserTestUtils.synthesizeMouseAtCenter("#commonlink", {altKey: true}, gBrowser.selectedBrowser);
 
@@ -78,17 +78,17 @@ add_task(function* test_alt_click_on_xli
   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 = {
-      onDownloadAdded: function (aDownload) {
+      onDownloadAdded: function(aDownload) {
         downloads.push(aDownload);
         if (downloads.length == 2) {
           resolve();
         }
       },
     };
   });
   yield downloadList.addView(downloadView);
--- a/browser/base/content/test/general/browser_contentAreaClick.js
+++ b/browser/base/content/test/general/browser_contentAreaClick.js
@@ -178,33 +178,33 @@ var gInvokedMethods = [];
 
 // The test currently running.
 var gCurrentTest = null;
 
 function test() {
   waitForExplicitFinish();
 
   gTestWin = openDialog(location, "", "chrome,all,dialog=no", "about:blank");
-  whenDelayedStartupFinished(gTestWin, function () {
+  whenDelayedStartupFinished(gTestWin, function() {
     info("Browser window opened");
     waitForFocus(function() {
       info("Browser window focused");
       waitForFocus(function() {
         info("Setting up browser...");
         setupTestBrowserWindow();
         info("Running tests...");
         executeSoon(runNextTest);
       }, gTestWin.content, true);
     }, gTestWin);
   });
 }
 
 // Click handler used to steal click events.
 var gClickHandler = {
-  handleEvent: function (event) {
+  handleEvent: function(event) {
     let linkId = event.target.id || event.target.localName;
     is(event.type, "click",
        gCurrentTest.desc + ":Handler received a click event on " + linkId);
 
     let isPanelClick = linkId == "panellink";
     gTestWin.contentAreaClick(event, isPanelClick);
     let prevent = event.defaultPrevented;
     is(prevent, gCurrentTest.preventDefault,
@@ -225,29 +225,29 @@ var gClickHandler = {
     event.stopPropagation();
 
     executeSoon(runNextTest);
   }
 }
 
 // Wraps around the methods' replacement mock function.
 function wrapperMethod(aInvokedMethods, aMethodName) {
-  return function () {
+  return function() {
     aInvokedMethods.push(aMethodName);
     // At least getShortcutOrURIAndPostData requires to return url
     return (aMethodName == "getShortcutOrURIAndPostData") ? arguments.url : arguments[0];
   }
 }
 
 function setupTestBrowserWindow() {
   // Steal click events and don't propagate them.
   gTestWin.addEventListener("click", gClickHandler, true);
 
   // Replace methods.
-  gReplacedMethods.forEach(function (aMethodName) {
+  gReplacedMethods.forEach(function(aMethodName) {
     gTestWin["old_" + aMethodName] = gTestWin[aMethodName];
     gTestWin[aMethodName] = wrapperMethod(gInvokedMethods, aMethodName);
   });
 
   // Inject links in content.
   let doc = gTestWin.content.document;
   let mainDiv = doc.createElement("div");
   mainDiv.innerHTML =
@@ -292,16 +292,16 @@ function runNextTest() {
   EventUtils.synthesizeMouseAtCenter(targetElt, gCurrentTest.event, gTestWin.content);
 }
 
 function finishTest() {
   info("Restoring browser...");
   gTestWin.removeEventListener("click", gClickHandler, true);
 
   // Restore original methods.
-  gReplacedMethods.forEach(function (aMethodName) {
+  gReplacedMethods.forEach(function(aMethodName) {
     gTestWin[aMethodName] = gTestWin["old_" + aMethodName];
     delete gTestWin["old_" + aMethodName];
   });
 
   gTestWin.close();
   finish();
 }
--- a/browser/base/content/test/general/browser_ctrlTab.js
+++ b/browser/base/content/test/general/browser_ctrlTab.js
@@ -80,17 +80,17 @@ add_task(function* () {
   yield ctrlTabTest([1], 1, 0);
 
   gBrowser.removeTab(gBrowser.tabContainer.lastChild);
   checkTabs(1);
 
   { // test for bug 445768
     let focusedWindow = document.commandDispatcher.focusedWindow;
     let eventConsumed = true;
-    let detectKeyEvent = function (event) {
+    let detectKeyEvent = function(event) {
       eventConsumed = event.defaultPrevented;
     };
     document.addEventListener("keypress", detectKeyEvent, false);
     yield pressCtrlTab();
     document.removeEventListener("keypress", detectKeyEvent, false);
     ok(eventConsumed, "Ctrl+Tab consumed by the tabbed browser if one tab is open");
     is(focusedWindow, document.commandDispatcher.focusedWindow,
        "Ctrl+Tab doesn't change focus if one tab is open");
@@ -138,17 +138,17 @@ add_task(function* () {
     return gPrefService.getBoolPref("browser.ctrlTab.previews") && gBrowser.tabs.length > 2;
   }
 
   function checkTabs(aTabs) {
     is(gBrowser.tabs.length, aTabs, "number of open tabs should be " + aTabs);
   }
 
   function selectTabs(tabs) {
-    tabs.forEach(function (index) {
+    tabs.forEach(function(index) {
       gBrowser.selectedTab = gBrowser.tabs[index];
     });
   }
 
   function* ctrlTabTest(tabsToSelect, tabTimes, expectedIndex) {
     selectTabs(tabsToSelect);
 
     var indexStart = gBrowser.tabContainer.selectedIndex;
--- a/browser/base/content/test/general/browser_devedition.js
+++ b/browser/base/content/test/general/browser_devedition.js
@@ -111,17 +111,17 @@ add_task(function* testLightweightThemeP
   ok(!DevEdition.isStyleSheetEnabled, "The devedition stylesheet is now disabled after resetting the preview.");
 });
 
 // Use a mutation observer to wait for the brighttitlebarforeground
 // attribute to change.  Using this instead of waiting for the load
 // event on the DevEdition styleSheet.
 function waitForBrightTitlebarAttribute() {
   return new Promise((resolve, reject) => {
-    let mutationObserver = new MutationObserver(function (mutations) {
+    let mutationObserver = new MutationObserver(function(mutations) {
       for (let mutation of mutations) {
         if (mutation.attributeName == "brighttitlebarforeground") {
           mutationObserver.disconnect();
           resolve();
         }
       }
     });
     mutationObserver.observe(document.documentElement, { attributes: true });
--- a/browser/base/content/test/general/browser_discovery.js
+++ b/browser/base/content/test/general/browser_discovery.js
@@ -1,27 +1,27 @@
 var browser;
 
 function doc() {
   return browser.contentDocument;
 }
 
 function setHandlerFunc(aResultFunc) {
-  gBrowser.addEventListener("DOMLinkAdded", function (event) {
+  gBrowser.addEventListener("DOMLinkAdded", function(event) {
     gBrowser.removeEventListener("DOMLinkAdded", arguments.callee, false);
     executeSoon(aResultFunc);
   }, false);
 }
 
 function test() {
   waitForExplicitFinish();
 
   gBrowser.selectedTab = gBrowser.addTab();
   browser = gBrowser.selectedBrowser;
-  browser.addEventListener("load", function (event) {
+  browser.addEventListener("load", function(event) {
     event.currentTarget.removeEventListener("load", arguments.callee, true);
     iconDiscovery();
   }, true);
   var rootDir = getRootDirectory(gTestPath);
   content.location = rootDir + "discovery.html";
 }
 
 var iconDiscoveryTests = [
--- a/browser/base/content/test/general/browser_domFullscreen_fullscreenMode.js
+++ b/browser/base/content/test/general/browser_domFullscreen_fullscreenMode.js
@@ -109,17 +109,17 @@ var gTests = [
     affectsFullscreenMode: false,
     exitFunc: () => {
       executeSoon(() => EventUtils.synthesizeKey("VK_ESCAPE", {}));
     }
   },
   {
     desc: "F11 key",
     affectsFullscreenMode: true,
-    exitFunc: function () {
+    exitFunc: function() {
       executeSoon(() => EventUtils.synthesizeKey("VK_F11", {}));
     }
   }
 ];
 
 function checkState(expectedStates, contentStates) {
   is(contentStates.inDOMFullscreen, expectedStates.inDOMFullscreen,
      "The DOM fullscreen state of the content should match");
--- a/browser/base/content/test/general/browser_drag.js
+++ b/browser/base/content/test/general/browser_drag.js
@@ -30,16 +30,16 @@ function test()
   // Now, the identity information panel is opened by the proxy icon click.
   // We need to close it for next tests.
   EventUtils.synthesizeKey("VK_ESCAPE", {}, window);
 
   // now test dragging onto a tab
   var tab = gBrowser.addTab("about:blank", {skipAnimation: true});
   var browser = gBrowser.getBrowserForTab(tab);
 
-  browser.addEventListener("load", function () {
+  browser.addEventListener("load", function() {
     is(browser.contentWindow.location, "http://mochi.test:8888/", "drop on tab");
     gBrowser.removeTab(tab);
     finish();
   }, true);
 
   EventUtils.synthesizeDrop(tab, tab, [[{type: "text/uri-list", data: "http://mochi.test:8888/"}]], "copy", window);
 }
--- a/browser/base/content/test/general/browser_duplicateIDs.js
+++ b/browser/base/content/test/general/browser_duplicateIDs.js
@@ -1,8 +1,8 @@
 function test() {
   var ids = {};
-  Array.forEach(document.querySelectorAll("[id]"), function (node) {
+  Array.forEach(document.querySelectorAll("[id]"), function(node) {
     var id = node.id;
     ok(!(id in ids), id + " should be unique");
     ids[id] = null;
   });
 }
--- a/browser/base/content/test/general/browser_fullscreen-window-open.js
+++ b/browser/base/content/test/general/browser_fullscreen-window-open.js
@@ -6,25 +6,25 @@ var Ci = Components.interfaces;
 
 const PREF_DISABLE_OPEN_NEW_WINDOW = "browser.link.open_newwindow.disabled_in_fullscreen";
 const isOSX = (Services.appinfo.OS === "Darwin");
 
 const TEST_FILE = "file_fullscreen-window-open.html";
 const gHttpTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/",
                                                           "http://127.0.0.1:8888/");
 
-function test () {
+function test() {
   waitForExplicitFinish();
 
   Services.prefs.setBoolPref(PREF_DISABLE_OPEN_NEW_WINDOW, true);
 
   let newTab = gBrowser.addTab(gHttpTestRoot + TEST_FILE);
   gBrowser.selectedTab = newTab;
 
-  whenTabLoaded(newTab, function () {
+  whenTabLoaded(newTab, function() {
     // Enter browser fullscreen mode.
     BrowserFullScreen();
 
     runNextTest();
   });
 }
 
 registerCleanupFunction(function() {
@@ -43,17 +43,17 @@ var gTests = [
   test_open_with_outerSize,
   test_open_with_innerSize,
   test_open_with_dialog,
   test_open_when_open_new_window_by_pref,
   test_open_with_pref_to_disable_in_fullscreen,
   test_open_from_chrome,
 ];
 
-function runNextTest () {
+function runNextTest() {
   let testCase = gTests.shift();
   if (testCase) {
     executeSoon(testCase);
   }
   else {
     finish();
   }
 }
@@ -61,128 +61,128 @@ function runNextTest () {
 
 // Test for window.open() with no feature.
 function test_open() {
   waitForTabOpen({
     message: {
       title: "test_open",
       param: "",
     },
-    finalizeFn: function () {},
+    finalizeFn: function() {},
   });
 }
 
 // Test for window.open() with width/height.
 function test_open_with_size() {
   waitForTabOpen({
     message: {
       title: "test_open_with_size",
       param: "width=400,height=400",
     },
-    finalizeFn: function () {},
+    finalizeFn: function() {},
   });
 }
 
 // Test for window.open() with top/left.
 function test_open_with_pos() {
   waitForTabOpen({
     message: {
       title: "test_open_with_pos",
       param: "top=200,left=200",
     },
-    finalizeFn: function () {},
+    finalizeFn: function() {},
   });
 }
 
 // Test for window.open() with outerWidth/Height.
 function test_open_with_outerSize() {
   let [outerWidth, outerHeight] = [window.outerWidth, window.outerHeight];
   waitForTabOpen({
     message: {
       title: "test_open_with_outerSize",
       param: "outerWidth=200,outerHeight=200",
     },
-    successFn: function () {
+    successFn: function() {
       is(window.outerWidth, outerWidth, "Don't change window.outerWidth.");
       is(window.outerHeight, outerHeight, "Don't change window.outerHeight.");
     },
-    finalizeFn: function () {},
+    finalizeFn: function() {},
   });
 }
 
 // Test for window.open() with innerWidth/Height.
 function test_open_with_innerSize() {
   let [innerWidth, innerHeight] = [window.innerWidth, window.innerHeight];
   waitForTabOpen({
     message: {
       title: "test_open_with_innerSize",
       param: "innerWidth=200,innerHeight=200",
     },
-    successFn: function () {
+    successFn: function() {
       is(window.innerWidth, innerWidth, "Don't change window.innerWidth.");
       is(window.innerHeight, innerHeight, "Don't change window.innerHeight.");
     },
-    finalizeFn: function () {},
+    finalizeFn: function() {},
   });
 }
 
 // Test for window.open() with dialog.
 function test_open_with_dialog() {
   waitForTabOpen({
     message: {
       title: "test_open_with_dialog",
       param: "dialog=yes",
     },
-    finalizeFn: function () {},
+    finalizeFn: function() {},
   });
 }
 
 // Test for window.open()
 // when "browser.link.open_newwindow" is nsIBrowserDOMWindow.OPEN_NEWWINDOW
 function test_open_when_open_new_window_by_pref() {
   const PREF_NAME = "browser.link.open_newwindow";
   Services.prefs.setIntPref(PREF_NAME, Ci.nsIBrowserDOMWindow.OPEN_NEWWINDOW);
   is(Services.prefs.getIntPref(PREF_NAME), Ci.nsIBrowserDOMWindow.OPEN_NEWWINDOW,
      PREF_NAME + " is nsIBrowserDOMWindow.OPEN_NEWWINDOW at this time");
 
   waitForTabOpen({
     message: {
       title: "test_open_when_open_new_window_by_pref",
       param: "width=400,height=400",
     },
-    finalizeFn: function () {
+    finalizeFn: function() {
       Services.prefs.clearUserPref(PREF_NAME);
     },
   });
 }
 
 // Test for the pref, "browser.link.open_newwindow.disabled_in_fullscreen"
 function test_open_with_pref_to_disable_in_fullscreen() {
   Services.prefs.setBoolPref(PREF_DISABLE_OPEN_NEW_WINDOW, false);
 
   waitForWindowOpen({
     message: {
       title: "test_open_with_pref_disabled_in_fullscreen",
       param: "width=400,height=400",
     },
-    finalizeFn: function () {
+    finalizeFn: function() {
       Services.prefs.setBoolPref(PREF_DISABLE_OPEN_NEW_WINDOW, true);
     },
   });
 }
 
 
 // Test for window.open() called from chrome context.
 function test_open_from_chrome() {
   waitForWindowOpenFromChrome({
     message: {
       title: "test_open_from_chrome",
       param: "",
     },
-    finalizeFn: function () {}
+    finalizeFn: function() {}
   });
 }
 
 function waitForTabOpen(aOptions) {
   let message = aOptions.message;
 
   if (!message.title) {
     ok(false, "Can't get message.title.");
@@ -192,31 +192,31 @@ function waitForTabOpen(aOptions) {
   }
 
   info("Running test: " + message.title);
 
   let onTabOpen = function onTabOpen(aEvent) {
     gBrowser.tabContainer.removeEventListener("TabOpen", onTabOpen, true);
 
     let tab = aEvent.target;
-    whenTabLoaded(tab, function () {
+    whenTabLoaded(tab, function() {
       is(tab.linkedBrowser.contentTitle, message.title,
          "Opened Tab is expected: " + message.title);
 
       if (aOptions.successFn) {
         aOptions.successFn();
       }
 
       gBrowser.removeTab(tab);
       finalize();
     });
   }
   gBrowser.tabContainer.addEventListener("TabOpen", onTabOpen, true);
 
-  let finalize = function () {
+  let finalize = function() {
     aOptions.finalizeFn();
     info("Finished: " + message.title);
     runNextTest();
   };
 
   const URI = "data:text/html;charset=utf-8,<!DOCTYPE html><html><head><title>" +
               message.title +
               "<%2Ftitle><%2Fhead><body><%2Fbody><%2Fhtml>";
@@ -237,17 +237,17 @@ function waitForWindowOpen(aOptions) {
     ok(false, "Can't get message.title");
     aOptions.finalizeFn();
     runNextTest();
     return;
   }
 
   info("Running test: " + message.title);
 
-  let onFinalize = function () {
+  let onFinalize = function() {
     aOptions.finalizeFn();
 
     info("Finished: " + message.title);
     runNextTest();
   };
 
   let listener = new WindowListener(message.title, getBrowserURL(), {
     onSuccess: aOptions.successFn,
@@ -278,17 +278,17 @@ function waitForWindowOpenFromChrome(aOp
     ok(false, "Can't get message.title");
     aOptions.finalizeFn();
     runNextTest();
     return;
   }
 
   info("Running test: " + message.title);
 
-  let onFinalize = function () {
+  let onFinalize = function() {
     aOptions.finalizeFn();
 
     info("Finished: " + message.title);
     runNextTest();
   };
 
   let listener = new WindowListener(message.title, getBrowserURL(), {
     onSuccess: aOptions.successFn,
--- a/browser/base/content/test/general/browser_fxa_oauth.js
+++ b/browser/base/content/test/general/browser_fxa_oauth.js
@@ -16,30 +16,30 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 
 const HTTP_PATH = "http://example.com";
 const HTTP_ENDPOINT = "/browser/browser/base/content/test/general/browser_fxa_oauth.html";
 const HTTP_ENDPOINT_WITH_KEYS = "/browser/browser/base/content/test/general/browser_fxa_oauth_with_keys.html";
 
 var gTests = [
   {
     desc: "FxA OAuth - should open a new tab, complete OAuth flow",
-    run: function () {
+    run: function() {
       return new Promise(function(resolve, reject) {
         let tabOpened = false;
         let properURL = "http://example.com/browser/browser/base/content/test/general/browser_fxa_oauth.html";
         let queryStrings = [
           "action=signin",
           "client_id=client_id",
           "scope=",
           "state=state",
           "webChannelId=oauth_client_id",
         ];
         queryStrings.sort();
 
-        waitForTab(function (tab) {
+        waitForTab(function(tab) {
           Assert.ok("Tab successfully opened");
           Assert.ok(gBrowser.currentURI.spec.split("?")[0], properURL, "Check URL without params");
           let actualURL = new URL(gBrowser.currentURI.spec);
           let actualQueryStrings = actualURL.search.substring(1).split("&");
           actualQueryStrings.sort();
           Assert.equal(actualQueryStrings.length, queryStrings.length, "Check number of params");
 
           for (let i = 0; i < queryStrings.length; i++) {
@@ -69,31 +69,31 @@ var gTests = [
         client.onError = reject;
 
         client.launchWebFlow();
       });
     }
   },
   {
     desc: "FxA OAuth - should open a new tab, complete OAuth flow when forcing auth",
-    run: function () {
+    run: function() {
       return new Promise(function(resolve, reject) {
         let tabOpened = false;
         let properURL = "http://example.com/browser/browser/base/content/test/general/browser_fxa_oauth.html";
         let queryStrings = [
           "action=force_auth",
           "client_id=client_id",
           "scope=",
           "state=state",
           "webChannelId=oauth_client_id",
           "email=test%40invalid.com",
         ];
         queryStrings.sort();
 
-        waitForTab(function (tab) {
+        waitForTab(function(tab) {
           Assert.ok("Tab successfully opened");
           Assert.ok(gBrowser.currentURI.spec.split("?")[0], properURL, "Check URL without params");
 
           let actualURL = new URL(gBrowser.currentURI.spec);
           let actualQueryStrings = actualURL.search.substring(1).split("&");
           actualQueryStrings.sort();
           Assert.equal(actualQueryStrings.length, queryStrings.length, "Check number of params");
 
@@ -126,21 +126,21 @@ var gTests = [
         client.onError = reject;
 
         client.launchWebFlow();
       });
     }
   },
   {
     desc: "FxA OAuth - should receive an error when there's a state mismatch",
-    run: function () {
+    run: function() {
       return new Promise(function(resolve, reject) {
         let tabOpened = false;
 
-        waitForTab(function (tab) {
+        waitForTab(function(tab) {
           Assert.ok("Tab successfully opened");
 
           // It should have passed in the expected non-matching state value.
           let queryString = gBrowser.currentURI.spec.split("?")[1];
           Assert.ok(queryString.indexOf('state=different-state') >= 0);
 
           tabOpened = true;
         });
@@ -164,21 +164,21 @@ var gTests = [
         };
 
         client.launchWebFlow();
       });
     }
   },
   {
     desc: "FxA OAuth - should be able to request keys during OAuth flow",
-    run: function () {
+    run: function() {
       return new Promise(function(resolve, reject) {
         let tabOpened = false;
 
-        waitForTab(function (tab) {
+        waitForTab(function(tab) {
           Assert.ok("Tab successfully opened");
 
           // It should have asked for keys.
           let queryString = gBrowser.currentURI.spec.split('?')[1];
           Assert.ok(queryString.indexOf('keys=true') >= 0);
 
           tabOpened = true;
         });
@@ -206,21 +206,21 @@ var gTests = [
         client.onError = reject;
 
         client.launchWebFlow();
       });
     }
   },
   {
     desc: "FxA OAuth - should not receive keys if not explicitly requested",
-    run: function () {
+    run: function() {
       return new Promise(function(resolve, reject) {
         let tabOpened = false;
 
-        waitForTab(function (tab) {
+        waitForTab(function(tab) {
           Assert.ok("Tab successfully opened");
 
           // It should not have asked for keys.
           let queryString = gBrowser.currentURI.spec.split('?')[1];
           Assert.ok(queryString.indexOf('keys=true') == -1);
 
           tabOpened = true;
         });
@@ -247,21 +247,21 @@ var gTests = [
         client.onError = reject;
 
         client.launchWebFlow();
       });
     }
   },
   {
     desc: "FxA OAuth - should receive an error if keys could not be obtained",
-    run: function () {
+    run: function() {
       return new Promise(function(resolve, reject) {
         let tabOpened = false;
 
-        waitForTab(function (tab) {
+        waitForTab(function(tab) {
           Assert.ok("Tab successfully opened");
 
           // It should have asked for keys.
           let queryString = gBrowser.currentURI.spec.split('?')[1];
           Assert.ok(queryString.indexOf('keys=true') >= 0);
 
           tabOpened = true;
         });
--- a/browser/base/content/test/general/browser_fxa_web_channel.html
+++ b/browser/base/content/test/general/browser_fxa_web_channel.html
@@ -65,17 +65,17 @@
         },
       }),
     });
 
     window.dispatchEvent(event);
   }
 
   function test_can_link_account() {
-    window.addEventListener("WebChannelMessageToContent", function (e) {
+    window.addEventListener("WebChannelMessageToContent", function(e) {
       // echo any responses from the browser back to the tests on the
       // fxaccounts_webchannel_response_echo WebChannel. The tests are
       // listening for events and do the appropriate checks.
       var event = new window.CustomEvent("WebChannelMessageToChrome", {
         detail: JSON.stringify({
           id: 'fxaccounts_webchannel_response_echo',
           message: e.detail.message,
         })
--- a/browser/base/content/test/general/browser_fxa_web_channel.js
+++ b/browser/base/content/test/general/browser_fxa_web_channel.js
@@ -1,16 +1,16 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 Cu.import("resource://gre/modules/Promise.jsm");
 Cu.import("resource://gre/modules/Task.jsm");
 
-XPCOMUtils.defineLazyGetter(this, "FxAccountsCommon", function () {
+XPCOMUtils.defineLazyGetter(this, "FxAccountsCommon", function() {
   return Components.utils.import("resource://gre/modules/FxAccountsCommon.js", {});
 });
 
 XPCOMUtils.defineLazyModuleGetter(this, "WebChannel",
                                   "resource://gre/modules/WebChannel.jsm");
 
 // FxAccountsWebChannel isn't explicitly exported by FxAccountsWebChannel.jsm
 // but we can get it here via a backstage pass.
@@ -24,17 +24,17 @@ var gTests = [
   {
     desc: "FxA Web Channel - should receive message about profile changes",
     run: function* () {
       let client = new FxAccountsWebChannel({
         content_uri: TEST_HTTP_PATH,
         channel_id: TEST_CHANNEL_ID,
       });
       let promiseObserver = new Promise((resolve, reject) => {
-        makeObserver(FxAccountsCommon.ON_PROFILE_CHANGE_NOTIFICATION, function (subject, topic, data) {
+        makeObserver(FxAccountsCommon.ON_PROFILE_CHANGE_NOTIFICATION, function(subject, topic, data) {
           Assert.equal(data, "abc123");
           client.tearDown();
           resolve();
         });
       });
 
       yield BrowserTestUtils.withNewTab({
         gBrowser: gBrowser,
@@ -175,17 +175,17 @@ var gTests = [
       }, function* () {
         yield promiseDelete;
       });
     }
   }
 ]; // gTests
 
 function makeObserver(aObserveTopic, aObserveFunc) {
-  let callback = function (aSubject, aTopic, aData) {
+  let callback = function(aSubject, aTopic, aData) {
     if (aTopic == aObserveTopic) {
       removeMe();
       aObserveFunc(aSubject, aTopic, aData);
     }
   };
 
   function removeMe() {
     Services.obs.removeObserver(callback, aObserveTopic);
--- a/browser/base/content/test/general/browser_homeDrop.js
+++ b/browser/base/content/test/general/browser_homeDrop.js
@@ -52,29 +52,29 @@ add_task(function*() {
     setHomepageDialog.document.documentElement.acceptDialog();
 
     yield setHomepagePromise;
   }
 
   function dropInvalidURI() {
     return new Promise(resolve => {
       let consoleListener = {
-        observe: function (m) {
+        observe: function(m) {
           if (m.message.includes("NS_ERROR_DOM_BAD_URI")) {
             ok(true, "drop was blocked");
             resolve();
           }
         }
       };
       Services.console.registerListener(consoleListener);
-      registerCleanupFunction(function () {
+      registerCleanupFunction(function() {
         Services.console.unregisterListener(consoleListener);
       });
 
-      executeSoon(function () {
+      executeSoon(function() {
         info("Attempting second drop, of a javascript: URI");
         // The drop handler throws an exception when dragging URIs that inherit
         // principal, e.g. javascript:
         expectUncaughtException();
         EventUtils.synthesizeDrop(dragSrcElement, homeButton, [[{type: "text/plain", data: "javascript:8888"}]], "copy", window);
       });
     });
   }
--- a/browser/base/content/test/general/browser_keywordSearch.js
+++ b/browser/base/content/test/general/browser_keywordSearch.js
@@ -53,17 +53,17 @@ function test() {
 
       req.cancel(Components.results.NS_ERROR_FAILURE);
 
       executeSoon(nextTest);
     }
   };
   gBrowser.addProgressListener(listener);
 
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     Services.ww.unregisterNotification(windowObserver);
 
     gBrowser.removeProgressListener(listener);
     gBrowser.removeTab(tab);
   });
 
   nextTest();
 }
--- a/browser/base/content/test/general/browser_keywordSearch_postData.js
+++ b/browser/base/content/test/general/browser_keywordSearch_postData.js
@@ -28,27 +28,27 @@ function test() {
     if (aData != "engine-added")
       return;
 
     if (engine.name != "POST Search")
       return;
 
     Services.search.defaultEngine = engine;
 
-    registerCleanupFunction(function () {
+    registerCleanupFunction(function() {
       Services.search.removeEngine(engine);
     });
 
     // ready to execute the tests!
     executeSoon(nextTest);
   };
 
   Services.obs.addObserver(searchObserver, "browser-search-engine-modified", false);
 
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     gBrowser.removeTab(tab);
 
     Services.obs.removeObserver(searchObserver, "browser-search-engine-modified");
   });
 
   Services.search.addEngine("http://test:80/browser/browser/base/content/test/general/POSTSearchEngine.xml",
                             null, null, false);
 }
@@ -61,17 +61,17 @@ function nextTest() {
   } else {
     finish();
   }
 }
 
 function doTest() {
   info("Running test: " + gCurrTest.name);
 
-  waitForLoad(function () {
+  waitForLoad(function() {
     let loadedText = gBrowser.contentDocument.body.textContent;
     ok(loadedText, "search page loaded");
     let needle = "searchterms=" + gCurrTest.expectText;
     is(loadedText, needle, "The query POST data should be returned in the response");
     nextTest();
   });
 
   // Simulate a user entering search terms
--- a/browser/base/content/test/general/browser_menuButtonFitts.js
+++ b/browser/base/content/test/general/browser_menuButtonFitts.js
@@ -1,13 +1,13 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
-function test () {
+function test() {
   waitForExplicitFinish();
   window.maximize();
 
   // Find where the nav-bar is vertically.
   var navBar = document.getElementById("nav-bar");
   var boundingRect = navBar.getBoundingClientRect();
   var yPixel = boundingRect.top + Math.floor(boundingRect.height / 2);
   var xPixel = boundingRect.width - 1; // Use the last pixel of the screen since it is maximized.
--- a/browser/base/content/test/general/browser_newWindowDrop.js
+++ b/browser/base/content/test/general/browser_newWindowDrop.js
@@ -19,17 +19,17 @@ add_task(function* test_setup() {
   // Move New Window button to nav bar, to make it possible to drag and drop.
   let {CustomizableUI} = Cu.import("resource:///modules/CustomizableUI.jsm", {});
   let origPlacement = CustomizableUI.getPlacementOfWidget("new-window-button");
   if (!origPlacement || origPlacement.area != CustomizableUI.AREA_NAVBAR) {
     CustomizableUI.addWidgetToArea("new-window-button",
                                    CustomizableUI.AREA_NAVBAR,
                                    0);
     CustomizableUI.ensureWidgetPlacedInWindow("new-window-button", window);
-    registerCleanupFunction(function () {
+    registerCleanupFunction(function() {
       CustomizableUI.reset();
     });
   }
 });
 
 // New Window Button opens any link.
 add_task(function*() { yield dropText("mochi.test/first", 1); });
 add_task(function*() { yield dropText("javascript:'bad'", 1); });
--- a/browser/base/content/test/general/browser_page_style_menu.js
+++ b/browser/base/content/test/general/browser_page_style_menu.js
@@ -47,17 +47,17 @@ add_task(function*() {
 
   items = items.map(el => ({
     label: el.getAttribute("label"),
     checked: el.getAttribute("checked") == "true",
   }));
 
   let validLinks = yield ContentTask.spawn(gBrowser.selectedBrowser, items, function(contentItems) {
     let contentValidLinks = 0;
-    Array.forEach(content.document.querySelectorAll("link, style"), function (el) {
+    Array.forEach(content.document.querySelectorAll("link, style"), function(el) {
       var title = el.getAttribute("title");
       var rel = el.getAttribute("rel");
       var media = el.getAttribute("media");
       var idstring = el.nodeName + " " + (title ? title : "without title and") +
                      " with rel=\"" + rel + "\"" +
                      (media ? " and media=\"" + media + "\"" : "");
 
       var item = contentItems.filter(aItem => aItem.label == title);
--- a/browser/base/content/test/general/browser_printpreview.js
+++ b/browser/base/content/test/general/browser_printpreview.js
@@ -17,57 +17,57 @@ function test() {
 }
 
 function tidyUp() {
   BrowserTestUtils.removeTab(ourTab).then(finish);
 }
 
 function testClosePrintPreviewWithAccessKey() {
   EventUtils.synthesizeKey("c", { altKey: true });
-  checkPrintPreviewClosed(function (aSucceeded) {
+  checkPrintPreviewClosed(function(aSucceeded) {
     ok(aSucceeded,
        "print preview mode should be finished by access key");
     openPrintPreview(testClosePrintPreviewWithEscKey);
   });
 }
 
 function testClosePrintPreviewWithEscKey() {
   EventUtils.synthesizeKey("VK_ESCAPE", {});
-  checkPrintPreviewClosed(function (aSucceeded) {
+  checkPrintPreviewClosed(function(aSucceeded) {
     ok(aSucceeded,
        "print preview mode should be finished by Esc key press");
     openPrintPreview(testClosePrintPreviewWithClosingWindowShortcutKey);
   });
 }
 
 function testClosePrintPreviewWithClosingWindowShortcutKey() {
   EventUtils.synthesizeKey("w", { accelKey: true });
-  checkPrintPreviewClosed(function (aSucceeded) {
+  checkPrintPreviewClosed(function(aSucceeded) {
     ok(aSucceeded,
        "print preview mode should be finished by closing window shortcut key");
     tidyUp();
   });
 }
 
 function openPrintPreview(aCallback) {
   document.getElementById("cmd_printPreview").doCommand();
-  executeSoon(function () {
+  executeSoon(function() {
     if (gInPrintPreviewMode) {
       executeSoon(aCallback);
       return;
     }
     executeSoon(arguments.callee);
   });
 }
 
 function checkPrintPreviewClosed(aCallback) {
   let count = 0;
-  executeSoon(function () {
+  executeSoon(function() {
     if (!gInPrintPreviewMode) {
-      executeSoon(function () { aCallback(count < 1000); });
+      executeSoon(function() { aCallback(count < 1000); });
       return;
     }
     if (++count == 1000) {
       // The test might fail.
       PrintUtils.exitPrintPreview();
     }
     executeSoon(arguments.callee);
   });
--- a/browser/base/content/test/general/browser_private_no_prompt.js
+++ b/browser/base/content/test/general/browser_private_no_prompt.js
@@ -1,12 +1,12 @@
 function test() {
   waitForExplicitFinish();
   var privateWin = OpenBrowserWindow({private: true});
 
-  whenDelayedStartupFinished(privateWin, function () {
+  whenDelayedStartupFinished(privateWin, function() {
     privateWin.BrowserOpenTab();
     privateWin.BrowserTryToCloseWindow();
     ok(true, "didn't prompt");
 
     executeSoon(finish);
   });
 }
--- a/browser/base/content/test/general/browser_restore_isAppTab.js
+++ b/browser/base/content/test/general/browser_restore_isAppTab.js
@@ -69,17 +69,17 @@ function loadFrameScript(browser) {
 function isBrowserAppTab(browser) {
   return new Promise(resolve => {
     function listener({ data }) {
       browser.messageManager.removeMessageListener("Test:IsAppTab", listener);
       resolve(data.isAppTab);
     }
     // It looks like same-process messages may be reordered by the message
     // manager, so we need to wait one tick before sending the message.
-    executeSoon(function () {
+    executeSoon(function() {
       browser.messageManager.addMessageListener("Test:IsAppTab", listener);
       browser.messageManager.sendAsyncMessage("Test:GetIsAppTab");
     });
   });
 }
 
 // Restarts the child process by crashing it then reloading the tab
 var restart = Task.async(function*(browser) {
--- a/browser/base/content/test/general/browser_sanitize-timespans.js
+++ b/browser/base/content/test/general/browser_sanitize-timespans.js
@@ -53,21 +53,21 @@ function countEntries(name, message, che
   let deferred = Promise.defer();
 
   var obj = {};
   if (name !== null)
     obj.fieldname = name;
 
   let count;
   FormHistory.count(obj, { handleResult: result => count = result,
-                           handleError: function (error) {
+                           handleError: function(error) {
                              deferred.reject(error)
                              throw new Error("Error occurred searching form history: " + error);
                            },
-                           handleCompletion: function (reason) {
+                           handleCompletion: function(reason) {
                              if (!reason) {
                                check(count, message);
                                deferred.resolve();
                              }
                            },
                          });
 
   return deferred.promise;
@@ -488,33 +488,33 @@ function setupHistory() {
 
 function* setupFormHistory() {
 
   function searchEntries(terms, params) {
     let deferred = Promise.defer();
 
     let results = [];
     FormHistory.search(terms, params, { handleResult: result => results.push(result),
-                                        handleError: function (error) {
+                                        handleError: function(error) {
                                           deferred.reject(error);
                                           throw new Error("Error occurred searching form history: " + error);
                                         },
-                                        handleCompletion: function (reason) { deferred.resolve(results); }
+                                        handleCompletion: function(reason) { deferred.resolve(results); }
                                       });
     return deferred.promise;
   }
 
   function update(changes)
   {
     let deferred = Promise.defer();
-    FormHistory.update(changes, { handleError: function (error) {
+    FormHistory.update(changes, { handleError: function(error) {
                                     deferred.reject(error);
                                     throw new Error("Error occurred searching form history: " + error);
                                   },
-                                  handleCompletion: function (reason) { deferred.resolve(); }
+                                  handleCompletion: function(reason) { deferred.resolve(); }
                                 });
     return deferred.promise;
   }
 
   // Make sure we've got a clean DB to start with, then add the entries we'll be testing.
   yield update(
     [{
         op: "remove"
--- a/browser/base/content/test/general/browser_sanitizeDialog.js
+++ b/browser/base/content/test/general/browser_sanitizeDialog.js
@@ -45,17 +45,17 @@ add_task(function* init() {
   });
 });
 
 /**
  * Initializes the dialog to its default state.
  */
 add_task(function* default_state() {
   let wh = new WindowHelper();
-  wh.onload = function () {
+  wh.onload = function() {
     // Select "Last Hour"
     this.selectDuration(Sanitizer.TIMESPAN_HOUR);
     // Hide details
     if (!this.getItemList().collapsed)
       this.toggleDetails();
     this.acceptDialog();
   };
   wh.open();
@@ -73,17 +73,17 @@ add_task(function* test_cancel() {
   for (let i = 0; i < 30; i++) {
     pURI = makeURI("http://" + i + "-minutes-ago.com/");
     places.push({uri: pURI, visitDate: visitTimeForMinutesAgo(i)});
     uris.push(pURI);
   }
   yield PlacesTestUtils.addVisits(places);
 
   let wh = new WindowHelper();
-  wh.onload = function () {
+  wh.onload = function() {
     this.selectDuration(Sanitizer.TIMESPAN_HOUR);
     this.checkPrefCheckbox("history", false);
     this.checkDetails(false);
 
     // Show details
     this.toggleDetails();
     this.checkDetails(true);
 
@@ -133,17 +133,17 @@ add_task(function* test_history_download
     places.push({uri: pURI, visitDate: visitTimeForMinutesAgo(61 + i)});
     olderURIs.push(pURI);
   }
   let promiseSanitized = promiseSanitizationComplete();
 
   yield PlacesTestUtils.addVisits(places);
 
   let wh = new WindowHelper();
-  wh.onload = function () {
+  wh.onload = function() {
     this.selectDuration(Sanitizer.TIMESPAN_HOUR);
     this.checkPrefCheckbox("history", true);
     this.acceptDialog();
   };
   wh.onunload = function* () {
     intPrefIs("sanitize.timeSpan", Sanitizer.TIMESPAN_HOUR,
               "timeSpan pref should be hour after accepting dialog with " +
               "hour selected");
@@ -199,17 +199,17 @@ add_task(function* test_history_download
   for (let i = 0; i < 5; i++) {
     pURI = makeURI("http://" + i + "-minutes-ago.com/");
     places.push({uri: pURI, visitDate: visitTimeForMinutesAgo(i)});
     uris.push(pURI);
   }
 
   yield PlacesTestUtils.addVisits(places);
   let wh = new WindowHelper();
-  wh.onload = function () {
+  wh.onload = function() {
     is(this.isWarningPanelVisible(), false,
        "Warning panel should be hidden after previously accepting dialog " +
        "with a predefined timespan");
     this.selectDuration(Sanitizer.TIMESPAN_HOUR);
 
     // Remove only form entries, leave history (including downloads).
     this.checkPrefCheckbox("history", false);
     this.checkPrefCheckbox("formdata", true);
@@ -259,17 +259,17 @@ add_task(function* test_everything() {
     places.push({uri: pURI, visitDate: visitTimeForMinutesAgo(aValue)});
     uris.push(pURI);
   });
 
   let promiseSanitized = promiseSanitizationComplete();
 
   yield PlacesTestUtils.addVisits(places);
   let wh = new WindowHelper();
-  wh.onload = function () {
+  wh.onload = function() {
     is(this.isWarningPanelVisible(), false,
        "Warning panel should be hidden after previously accepting dialog " +
        "with a predefined timespan");
     this.selectDuration(Sanitizer.TIMESPAN_EVERYTHING);
     this.checkPrefCheckbox("history", true);
     this.checkDetails(true);
 
     // Hide details
@@ -310,17 +310,17 @@ add_task(function* test_everything_warni
     places.push({uri: pURI, visitDate: visitTimeForMinutesAgo(aValue)});
     uris.push(pURI);
   });
 
   let promiseSanitized = promiseSanitizationComplete();
 
   yield PlacesTestUtils.addVisits(places);
   let wh = new WindowHelper();
-  wh.onload = function () {
+  wh.onload = function() {
     is(this.isWarningPanelVisible(), true,
        "Warning panel should be visible after previously accepting dialog " +
        "with clearing everything");
     this.selectDuration(Sanitizer.TIMESPAN_EVERYTHING);
     this.checkPrefCheckbox("history", true);
     this.acceptDialog();
   };
   wh.onunload = function* () {
@@ -437,100 +437,100 @@ add_task(function* test_form_entries() {
 
 /**
  * Ensure that toggling details persists
  * across dialog openings.
  */
 add_task(function* test_toggling_details_persists() {
   {
     let wh = new WindowHelper();
-    wh.onload = function () {
+    wh.onload = function() {
       // Check all items and select "Everything"
       this.checkAllCheckboxes();
       this.selectDuration(Sanitizer.TIMESPAN_EVERYTHING);
 
       // Hide details
       this.toggleDetails();
       this.checkDetails(false);
       this.acceptDialog();
     };
     wh.open();
     yield wh.promiseClosed;
   }
   {
     let wh = new WindowHelper();
-    wh.onload = function () {
+    wh.onload = function() {
       // Details should remain closed because all items are checked.
       this.checkDetails(false);
 
       // Uncheck history.
       this.checkPrefCheckbox("history", false);
       this.acceptDialog();
     };
     wh.open();
     yield wh.promiseClosed;
   }
   {
     let wh = new WindowHelper();
-    wh.onload = function () {
+    wh.onload = function() {
       // Details should be open because not all items are checked.
       this.checkDetails(true);
 
       // Modify the Site Preferences item state (bug 527820)
       this.checkAllCheckboxes();
       this.checkPrefCheckbox("siteSettings", false);
       this.acceptDialog();
     };
     wh.open();
     yield wh.promiseClosed;
   }
   {
     let wh = new WindowHelper();
-    wh.onload = function () {
+    wh.onload = function() {
       // Details should be open because not all items are checked.
       this.checkDetails(true);
 
       // Hide details
       this.toggleDetails();
       this.checkDetails(false);
       this.cancelDialog();
     };
     wh.open();
     yield wh.promiseClosed;
   }
   {
     let wh = new WindowHelper();
-    wh.onload = function () {
+    wh.onload = function() {
       // Details should be open because not all items are checked.
       this.checkDetails(true);
 
       // Select another duration
       this.selectDuration(Sanitizer.TIMESPAN_HOUR);
       // Hide details
       this.toggleDetails();
       this.checkDetails(false);
       this.acceptDialog();
     };
     wh.open();
     yield wh.promiseClosed;
   }
   {
     let wh = new WindowHelper();
-    wh.onload = function () {
+    wh.onload = function() {
       // Details should not be open because "Last Hour" is selected
       this.checkDetails(false);
 
       this.cancelDialog();
     };
     wh.open();
     yield wh.promiseClosed;
   }
   {
     let wh = new WindowHelper();
-    wh.onload = function () {
+    wh.onload = function() {
       // Details should have remained closed
       this.checkDetails(false);
 
       // Show details
       this.toggleDetails();
       this.checkDetails(true);
       this.cancelDialog();
     };
@@ -554,42 +554,42 @@ add_task(function* test_offline_cache() 
   var appcacheserv = Cc["@mozilla.org/network/application-cache-service;1"]
                      .getService(Ci.nsIApplicationCacheService);
   var appcachegroupid = appcacheserv.buildGroupIDForInfo(makeURI(URL + "/manifest"), LoadContextInfo.default);
   var appcache = appcacheserv.createApplicationCache(appcachegroupid);
   var storage = Services.cache2.appCacheStorage(LoadContextInfo.default, appcache);
 
   // Open the dialog
   let wh = new WindowHelper();
-  wh.onload = function () {
+  wh.onload = function() {
     this.selectDuration(Sanitizer.TIMESPAN_EVERYTHING);
     // Show details
     this.toggleDetails();
     // Clear only offlineApps
     this.uncheckAllCheckboxes();
     this.checkPrefCheckbox("offlineApps", true);
     this.acceptDialog();
   };
-  wh.onunload = function () {
+  wh.onunload = function() {
     // Check if the cache has been deleted
     var size = -1;
     var visitor = {
-      onCacheStorageInfo: function (aEntryCount, aConsumption, aCapacity, aDiskDirectory)
+      onCacheStorageInfo: function(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");
   };
 
   var cacheListener = {
     onCacheEntryCheck: function() { return Ci.nsICacheEntryOpenCallback.ENTRY_WANTED; },
-    onCacheEntryAvailable: function (entry, isnew, unused, status) {
+    onCacheEntryAvailable: function(entry, isnew, unused, status) {
       is(status, Cr.NS_OK);
       var stream = entry.openOutputStream(0);
       var content = "content";
       stream.write(content, content.length);
       stream.close();
       entry.close();
       wh.open();
     }
@@ -605,17 +605,17 @@ add_task(function* test_offline_apps_per
   var URL = "http://www.example.com";
   var URI = makeURI(URL);
   var principal = Services.scriptSecurityManager.createCodebasePrincipal(URI, {});
 
   let promiseSanitized = promiseSanitizationComplete();
 
   // Open the dialog
   let wh = new WindowHelper();
-  wh.onload = function () {
+  wh.onload = function() {
     this.selectDuration(Sanitizer.TIMESPAN_EVERYTHING);
     // Show details
     this.toggleDetails();
     // Clear only offlineApps
     this.uncheckAllCheckboxes();
     this.checkPrefCheckbox("siteSettings", true);
     this.acceptDialog();
   };
@@ -643,38 +643,38 @@ function WindowHelper(aWin) {
   this.win = aWin;
   this.promiseClosed = new Promise(resolve => { this._resolveClosed = resolve });
 }
 
 WindowHelper.prototype = {
   /**
    * "Presses" the dialog's OK button.
    */
-  acceptDialog: function () {
+  acceptDialog: function() {
     is(this.win.document.documentElement.getButton("accept").disabled, false,
        "Dialog's OK button should not be disabled");
     this.win.document.documentElement.acceptDialog();
   },
 
   /**
    * "Presses" the dialog's Cancel button.
    */
-  cancelDialog: function () {
+  cancelDialog: function() {
     this.win.document.documentElement.cancelDialog();
   },
 
   /**
    * Ensures that the details progressive disclosure button and the item list
    * hidden by it match up.  Also makes sure the height of the dialog is
    * sufficient for the item list and warning panel.
    *
    * @param aShouldBeShown
    *        True if you expect the details to be shown and false if hidden
    */
-  checkDetails: function (aShouldBeShown) {
+  checkDetails: function(aShouldBeShown) {
     let button = this.getDetailsButton();
     let list = this.getItemList();
     let hidden = list.hidden || list.collapsed;
     is(hidden, !aShouldBeShown,
        "Details should be " + (aShouldBeShown ? "shown" : "hidden") +
        " but were actually " + (hidden ? "hidden" : "shown"));
     let dir = hidden ? "down" : "up";
     is(button.className, "expander-" + dir,
@@ -695,91 +695,91 @@ WindowHelper.prototype = {
    * (Un)checks a history scope checkbox (browser & download history,
    * form history, etc.).
    *
    * @param aPrefName
    *        The final portion of the checkbox's privacy.cpd.* preference name
    * @param aCheckState
    *        True if the checkbox should be checked, false otherwise
    */
-  checkPrefCheckbox: function (aPrefName, aCheckState) {
+  checkPrefCheckbox: function(aPrefName, aCheckState) {
     var pref = "privacy.cpd." + aPrefName;
     var cb = this.win.document.querySelectorAll(
                "#itemList > [preference='" + pref + "']");
     is(cb.length, 1, "found checkbox for " + pref + " preference");
     if (cb[0].checked != aCheckState)
       cb[0].click();
   },
 
   /**
    * Makes sure all the checkboxes are checked.
    */
-  _checkAllCheckboxesCustom: function (check) {
+  _checkAllCheckboxesCustom: function(check) {
     var cb = this.win.document.querySelectorAll("#itemList > [preference]");
     ok(cb.length > 1, "found checkboxes for preferences");
     for (var i = 0; i < cb.length; ++i) {
       var pref = this.win.document.getElementById(cb[i].getAttribute("preference"));
       if (!!pref.value ^ check)
         cb[i].click();
     }
   },
 
-  checkAllCheckboxes: function () {
+  checkAllCheckboxes: function() {
     this._checkAllCheckboxesCustom(true);
   },
 
-  uncheckAllCheckboxes: function () {
+  uncheckAllCheckboxes: function() {
     this._checkAllCheckboxesCustom(false);
   },
 
   /**
    * @return The details progressive disclosure button
    */
-  getDetailsButton: function () {
+  getDetailsButton: function() {
     return this.win.document.getElementById("detailsExpander");
   },
 
   /**
    * @return The dialog's duration dropdown
    */
-  getDurationDropdown: function () {
+  getDurationDropdown: function() {
     return this.win.document.getElementById("sanitizeDurationChoice");
   },
 
   /**
    * @return The item list hidden by the details progressive disclosure button
    */
-  getItemList: function () {
+  getItemList: function() {
     return this.win.document.getElementById("itemList");
   },
 
   /**
    * @return The clear-everything warning box
    */
-  getWarningPanel: function () {
+  getWarningPanel: function() {
     return this.win.document.getElementById("sanitizeEverythingWarningBox");
   },
 
   /**
    * @return True if the "Everything" warning panel is visible (as opposed to
    *         the tree)
    */
-  isWarningPanelVisible: function () {
+  isWarningPanelVisible: function() {
     return !this.getWarningPanel().hidden;
   },
 
   /**
    * Opens the clear recent history dialog.  Before calling this, set
    * this.onload to a function to execute onload.  It should close the dialog
    * when done so that the tests may continue.  Set this.onunload to a function
    * to execute onunload.  this.onunload is optional. If it returns true, the
    * caller is expected to call waitForAsyncUpdates at some point; if false is
    * returned, waitForAsyncUpdates is called automatically.
    */
-  open: function () {
+  open: function() {
     let wh = this;
 
     function windowObserver(aSubject, aTopic, aData) {
       if (aTopic != "domwindowopened")
         return;
 
       Services.ww.unregisterNotification(windowObserver);
 
@@ -830,32 +830,32 @@ WindowHelper.prototype = {
   },
 
   /**
    * Selects a duration in the duration dropdown.
    *
    * @param aDurVal
    *        One of the Sanitizer.TIMESPAN_* values
    */
-  selectDuration: function (aDurVal) {
+  selectDuration: function(aDurVal) {
     this.getDurationDropdown().value = aDurVal;
     if (aDurVal === Sanitizer.TIMESPAN_EVERYTHING) {
       is(this.isWarningPanelVisible(), true,
          "Warning panel should be visible for TIMESPAN_EVERYTHING");
     }
     else {
       is(this.isWarningPanelVisible(), false,
          "Warning panel should not be visible for non-TIMESPAN_EVERYTHING");
     }
   },
 
   /**
    * Toggles the details progressive disclosure button.
    */
-  toggleDetails: function () {
+  toggleDetails: function() {
     this.getDetailsButton().click();
   }
 };
 
 function promiseSanitizationComplete() {
   return promiseTopicObserved("sanitizer-sanitization-complete");
 }
 
@@ -893,41 +893,41 @@ function* addDownloadWithMinutesAgo(aExp
 function promiseAddFormEntryWithMinutesAgo(aMinutesAgo) {
   let name = aMinutesAgo + "-minutes-ago";
 
   // Artifically age the entry to the proper vintage.
   let timestamp = now_uSec - (aMinutesAgo * kUsecPerMin);
 
   return new Promise((resolve, reject) =>
     FormHistory.update({ op: "add", fieldname: name, value: "dummy", firstUsed: timestamp },
-                       { handleError: function (error) {
+                       { handleError: function(error) {
                            reject();
                            throw new Error("Error occurred updating form history: " + error);
                          },
-                         handleCompletion: function (reason) {
+                         handleCompletion: function(reason) {
                            resolve(name);
                          }
                        })
    )
 }
 
 /**
  * Checks if a form entry exists.
  */
 function formNameExists(name)
 {
   return new Promise((resolve, reject) => {
     let count = 0;
     FormHistory.count({ fieldname: name },
                       { handleResult: result => count = result,
-                        handleError: function (error) {
+                        handleError: function(error) {
                           reject(error);
                           throw new Error("Error occurred searching form history: " + error);
                         },
-                        handleCompletion: function (reason) {
+                        handleCompletion: function(reason) {
                           if (!reason) {
                             resolve(count);
                           }
                         }
                       });
   });
 }
 
--- a/browser/base/content/test/general/browser_save_link-perwindowpb.js
+++ b/browser/base/content/test/general/browser_save_link-perwindowpb.js
@@ -12,17 +12,17 @@ function triggerSave(aWindow, aCallback)
   info("started triggerSave");
   var fileName;
   let testBrowser = aWindow.gBrowser.selectedBrowser;
   // This page sets a cookie if and only if a cookie does not exist yet
   let testURI = "http://mochi.test:8888/browser/browser/base/content/test/general/bug792517-2.html";
   testBrowser.loadURI(testURI);
   BrowserTestUtils.browserLoaded(testBrowser, false, testURI)
                   .then(() => {
-    waitForFocus(function () {
+    waitForFocus(function() {
       info("register to handle popupshown");
       aWindow.document.addEventListener("popupshown", contextMenuOpened, false);
 
       BrowserTestUtils.synthesizeMouseAtCenter("#fff", {type: "contextmenu", button: 2}, testBrowser);
       info("right clicked!");
     }, aWindow);
   });
 
@@ -93,17 +93,17 @@ function test() {
         executeSoon(aCallback);
         info("whenDelayedStartupFinished found our window");
       }
     }, "browser-delayed-startup-finished", false);
   }
 
   mockTransferRegisterer.register();
 
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     info("Running the cleanup code");
     mockTransferRegisterer.unregister();
     MockFilePicker.cleanup();
     Services.obs.removeObserver(observer, "http-on-modify-request");
     Services.obs.removeObserver(observer, "http-on-examine-response");
     info("Finished running the cleanup code");
   });
 
--- a/browser/base/content/test/general/browser_save_link_when_window_navigates.js
+++ b/browser/base/content/test/general/browser_save_link_when_window_navigates.js
@@ -141,17 +141,17 @@ function test() {
         executeSoon(aCallback);
         info("whenDelayedStartupFinished found our window");
       }
     }, "browser-delayed-startup-finished", false);
   }
 
   mockTransferRegisterer.register();
 
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     info("Running the cleanup code");
     mockTransferRegisterer.unregister();
     MockFilePicker.cleanup();
     Services.ww.unregisterNotification(windowObserver);
     Services.prefs.clearUserPref(ALWAYS_DOWNLOAD_DIR_PREF);
     Services.prefs.clearUserPref(SAVE_PER_SITE_PREF);
     info("Finished running the cleanup code");
   });
--- a/browser/base/content/test/general/browser_save_private_link_perwindowpb.js
+++ b/browser/base/content/test/general/browser_save_private_link_perwindowpb.js
@@ -63,17 +63,17 @@ function promiseImageDownloaded() {
       destFile.append(fileName);
       MockFilePicker.returnFiles = [destFile];
       MockFilePicker.filterIndex = 1; // kSaveAsType_URL
     };
 
     mockTransferCallback = onTransferComplete;
     mockTransferRegisterer.register();
 
-    registerCleanupFunction(function () {
+    registerCleanupFunction(function() {
       mockTransferCallback = null;
       mockTransferRegisterer.unregister();
       MockFilePicker.cleanup();
       destDir.remove(true);
     });
 
   });
 }
--- a/browser/base/content/test/general/browser_save_video.js
+++ b/browser/base/content/test/general/browser_save_video.js
@@ -46,17 +46,17 @@ add_task(function* () {
          "Video file name is correctly retrieved from Content-Disposition http header");
       resolve();
     }
 
     mockTransferCallback = onTransferComplete;
     mockTransferRegisterer.register();
   });
 
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     mockTransferRegisterer.unregister();
     MockFilePicker.cleanup();
     destDir.remove(true);
   });
 
   // Select "Save Video As" option from context menu
   var saveVideoCommand = document.getElementById("context-savevideo");
   saveVideoCommand.doCommand();
--- a/browser/base/content/test/general/browser_save_video_frame.js
+++ b/browser/base/content/test/general/browser_save_video_frame.js
@@ -86,17 +86,17 @@ add_task(function*() {
     destFile.append(fp.defaultString);
     MockFilePicker.returnFiles = [destFile];
     MockFilePicker.filterIndex = 1; // kSaveAsType_URL
   };
 
   mockTransferRegisterer.register();
 
   // Make sure that we clean these things up when we're done.
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     mockTransferRegisterer.unregister();
     MockFilePicker.cleanup();
     destDir.remove(true);
   });
 
   let tab = gBrowser.addTab();
   gBrowser.selectedTab = tab;
   let browser = tab.linkedBrowser;
--- a/browser/base/content/test/general/browser_tabReorder.js
+++ b/browser/base/content/test/general/browser_tabReorder.js
@@ -2,17 +2,17 @@
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 function test() {
   let initialTabsLength = gBrowser.tabs.length;
 
   let newTab1 = gBrowser.selectedTab = gBrowser.addTab("about:robots", {skipAnimation: true});
   let newTab2 = gBrowser.selectedTab = gBrowser.addTab("about:about", {skipAnimation: true});
   let newTab3 = gBrowser.selectedTab = gBrowser.addTab("about:config", {skipAnimation: true});
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     while (gBrowser.tabs.length > initialTabsLength) {
       gBrowser.removeTab(gBrowser.tabs[initialTabsLength]);
     }
   });
 
   is(gBrowser.tabs.length, initialTabsLength + 3, "new tabs are opened");
   is(gBrowser.tabs[initialTabsLength], newTab1, "newTab1 position is correct");
   is(gBrowser.tabs[initialTabsLength + 1], newTab2, "newTab2 position is correct");
--- a/browser/base/content/test/general/browser_tabfocus.js
+++ b/browser/base/content/test/general/browser_tabfocus.js
@@ -10,17 +10,17 @@ const fm = Services.focus;
 
 function EventStore() {
   this["main-window"] = [];
   this["window1"] = [];
   this["window2"] = [];
 }
 
 EventStore.prototype = {
-  "push": function (event) {
+  "push": function(event) {
     if (event.indexOf("1") > -1) {
       this["window1"].push(event);
     } else if (event.indexOf("2") > -1) {
       this["window2"].push(event);
     } else {
       this["main-window"].push(event);
     }
   }
--- a/browser/base/content/test/general/browser_tabopen_reflows.js
+++ b/browser/base/content/test/general/browser_tabopen_reflows.js
@@ -108,17 +108,17 @@ add_task(function*() {
   yield waitForTransitionEnd();
 
   // Remove reflow observer and clean up.
   docShell.removeWeakReflowObserver(observer);
   gBrowser.removeCurrentTab();
 });
 
 var observer = {
-  reflow: function (start, end) {
+  reflow: function(start, end) {
     // Gather information about the current code path.
     let path = (new Error().stack).split("\n").slice(1).map(line => {
       return line.replace(/:\d+:\d+$/, "");
     }).join("|");
     let pathWithLineNumbers = (new Error().stack).split("\n").slice(1).join("|");
 
     // Stack trace is empty. Reflow was triggered by native code.
     if (path === "") {
@@ -131,17 +131,17 @@ var observer = {
         ok(true, "expected uninterruptible reflow '" + stack + "'");
         return;
       }
     }
 
     ok(false, "unexpected uninterruptible reflow '" + pathWithLineNumbers + "'");
   },
 
-  reflowInterruptible: function (start, end) {
+  reflowInterruptible: function(start, end) {
     // We're not interested in interruptible reflows.
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIReflowObserver,
                                          Ci.nsISupportsWeakReference])
 };
 
 function waitForTransitionEnd() {
--- a/browser/base/content/test/general/browser_trackingUI_telemetry.js
+++ b/browser/base/content/test/general/browser_trackingUI_telemetry.js
@@ -10,17 +10,17 @@ const {UrlClassifierTestUtils} = Cu.impo
 
 /**
  * Enable local telemetry recording for the duration of the tests.
  */
 var oldCanRecord = Services.telemetry.canRecordExtended;
 Services.telemetry.canRecordExtended = true;
 Services.prefs.setBoolPref(PREF, false);
 Services.telemetry.getHistogramById("TRACKING_PROTECTION_ENABLED").clear();
-registerCleanupFunction(function () {
+registerCleanupFunction(function() {
   UrlClassifierTestUtils.cleanupTestTrackers();
   Services.telemetry.canRecordExtended = oldCanRecord;
   Services.prefs.clearUserPref(PREF);
 });
 
 function getShieldHistogram() {
   return Services.telemetry.getHistogramById("TRACKING_PROTECTION_SHIELD");
 }
--- a/browser/base/content/test/general/browser_utilityOverlay.js
+++ b/browser/base/content/test/general/browser_utilityOverlay.js
@@ -5,17 +5,17 @@
 const gTests = [
   test_eventMatchesKey,
   test_getTopWin,
   test_getBoolPref,
   test_openNewTabWith,
   test_openUILink
 ];
 
-function test () {
+function test() {
   waitForExplicitFinish();
   executeSoon(runNextTest);
 }
 
 function runNextTest() {
   if (gTests.length) {
     let testFun = gTests.shift();
     info("Running " + testFun.name);
--- a/browser/base/content/test/general/browser_visibleTabs_bookmarkAllTabs.js
+++ b/browser/base/content/test/general/browser_visibleTabs_bookmarkAllTabs.js
@@ -13,17 +13,17 @@ function test() {
   // Add a tab
   let testTab1 = gBrowser.addTab();
   is(gBrowser.visibleTabs.length, 2, "2 tabs should be open");
   is(Disabled(), true, "Bookmark All Tabs should be disabled since there are two tabs with the same address");
 
   let testTab2 = gBrowser.addTab("about:mozilla");
   is(gBrowser.visibleTabs.length, 3, "3 tabs should be open");
   // Wait for tab load, the code checks for currentURI.
-  testTab2.linkedBrowser.addEventListener("load", function () {
+  testTab2.linkedBrowser.addEventListener("load", function() {
     testTab2.linkedBrowser.removeEventListener("load", arguments.callee, true);
     is(Disabled(), false, "Bookmark All Tabs should be enabled since there are two tabs with different addresses");
 
     // Hide the original tab
     gBrowser.selectedTab = testTab2;
     gBrowser.showOnlyTheseTabs([testTab2]);
     is(gBrowser.visibleTabs.length, 1, "1 tab should be visible");
     is(Disabled(), true, "Bookmark All Tabs should be disabled as there is only one visible tab");
--- a/browser/base/content/test/general/browser_web_channel.js
+++ b/browser/base/content/test/general/browser_web_channel.js
@@ -19,17 +19,17 @@ const HTTP_REDIRECTED_IFRAME_PATH = "htt
 // tests on Android.  Yet?)
 var gTests = [
   {
     desc: "WebChannel generic message",
     run: function* () {
       return new Promise(function(resolve, reject) {
         let tab;
         let channel = new WebChannel("generic", Services.io.newURI(HTTP_PATH, null, null));
-        channel.listen(function (id, message, target) {
+        channel.listen(function(id, message, target) {
           is(id, "generic");
           is(message.something.nested, "hello");
           channel.stopListening();
           gBrowser.removeTab(tab);
           resolve();
         });
 
         tab = gBrowser.addTab(HTTP_PATH + HTTP_ENDPOINT + "?generic");
@@ -38,17 +38,17 @@ var gTests = [
   },
   {
     desc: "WebChannel two way communication",
     run: function* () {
       return new Promise(function(resolve, reject) {
         let tab;
         let channel = new WebChannel("twoway", Services.io.newURI(HTTP_PATH, null, null));
 
-        channel.listen(function (id, message, sender) {
+        channel.listen(function(id, message, sender) {
           is(id, "twoway", "bad id");
           ok(message.command, "command not ok");
 
           if (message.command === "one") {
             channel.send({ data: { nested: true } }, sender);
           }
 
           if (message.command === "two") {
@@ -63,22 +63,22 @@ var gTests = [
       });
     }
   },
   {
     desc: "WebChannel two way communication in an iframe",
     run: function* () {
       let parentChannel = new WebChannel("echo", Services.io.newURI(HTTP_PATH, null, null));
       let iframeChannel = new WebChannel("twoway", Services.io.newURI(HTTP_IFRAME_PATH, null, null));
-      let promiseTestDone = new Promise(function (resolve, reject) {
-        parentChannel.listen(function (id, message, sender) {
+      let promiseTestDone = new Promise(function(resolve, reject) {
+        parentChannel.listen(function(id, message, sender) {
           reject(new Error("WebChannel message incorrectly sent to parent"));
         });
 
-        iframeChannel.listen(function (id, message, sender) {
+        iframeChannel.listen(function(id, message, sender) {
           is(id, "twoway", "bad id (2)");
           ok(message.command, "command not ok (2)");
 
           if (message.command === "one") {
             iframeChannel.send({ data: { nested: true } }, sender);
           }
 
           if (message.command === "two") {
@@ -121,21 +121,21 @@ var gTests = [
        * 6. the test parent sends a `done` message to origin B, which origin
        *    B echoes back. If the response to origin A is not echoed but
        *    the message to origin B is, then hooray, the test passes.
        */
 
       let preRedirectChannel = new WebChannel("pre_redirect", Services.io.newURI(HTTP_IFRAME_PATH, null, null));
       let postRedirectChannel = new WebChannel("post_redirect", Services.io.newURI(HTTP_REDIRECTED_IFRAME_PATH, null, null));
 
-      let promiseTestDone = new Promise(function (resolve, reject) {
-        preRedirectChannel.listen(function (id, message, preRedirectSender) {
+      let promiseTestDone = new Promise(function(resolve, reject) {
+        preRedirectChannel.listen(function(id, message, preRedirectSender) {
           if (message.command === "redirecting") {
 
-            postRedirectChannel.listen(function (aId, aMessage, aPostRedirectSender) {
+            postRedirectChannel.listen(function(aId, aMessage, aPostRedirectSender) {
               is(aId, "post_redirect");
               isnot(aMessage.command, "no_response_expected");
 
               if (aMessage.command === "loaded") {
                 // The message should not be received on the preRedirectChannel
                 // because the target window has redirected.
                 preRedirectChannel.send({ command: "no_response_expected" }, preRedirectSender);
                 postRedirectChannel.send({ command: "done" }, aPostRedirectSender);
@@ -163,17 +163,17 @@ var gTests = [
   },
   {
     desc: "WebChannel multichannel",
     run: function* () {
       return new Promise(function(resolve, reject) {
         let tab;
         let channel = new WebChannel("multichannel", Services.io.newURI(HTTP_PATH, null, null));
 
-        channel.listen(function (id, message, sender) {
+        channel.listen(function(id, message, sender) {
           is(id, "multichannel");
           gBrowser.removeTab(tab);
           resolve();
         });
 
         tab = gBrowser.addTab(HTTP_PATH + HTTP_ENDPOINT + "?multichannel");
       });
     }
@@ -181,18 +181,18 @@ var gTests = [
   {
     desc: "WebChannel unsolicited send, using system principal",
     run: function* () {
       let channel = new WebChannel("echo", Services.io.newURI(HTTP_PATH, null, null));
 
       // an unsolicted message is sent from Chrome->Content which is then
       // echoed back. If the echo is received here, then the content
       // received the message.
-      let messagePromise = new Promise(function (resolve, reject) {
-        channel.listen(function (id, message, sender) {
+      let messagePromise = new Promise(function(resolve, reject) {
+        channel.listen(function(id, message, sender) {
           is(id, "echo");
           is(message.command, "unsolicited");
 
           resolve()
         });
       });
 
       yield BrowserTestUtils.withNewTab({
@@ -212,18 +212,18 @@ var gTests = [
     desc: "WebChannel unsolicited send, using target origin's principal",
     run: function* () {
       let targetURI = Services.io.newURI(HTTP_PATH, null, null);
       let channel = new WebChannel("echo", targetURI);
 
       // an unsolicted message is sent from Chrome->Content which is then
       // echoed back. If the echo is received here, then the content
       // received the message.
-      let messagePromise = new Promise(function (resolve, reject) {
-        channel.listen(function (id, message, sender) {
+      let messagePromise = new Promise(function(resolve, reject) {
+        channel.listen(function(id, message, sender) {
           is(id, "echo");
           is(message.command, "unsolicited");
 
           resolve();
         });
       });
 
       yield BrowserTestUtils.withNewTab({
@@ -246,18 +246,18 @@ var gTests = [
     run: function* () {
       let targetURI = Services.io.newURI(HTTP_PATH, null, null);
       let channel = new WebChannel("echo", targetURI);
 
       // two unsolicited messages are sent from Chrome->Content. The first,
       // `unsolicited_no_response_expected` is sent to the wrong principal
       // and should not be echoed back. The second, `done`, is sent to the
       // correct principal and should be echoed back.
-      let messagePromise = new Promise(function (resolve, reject) {
-        channel.listen(function (id, message, sender) {
+      let messagePromise = new Promise(function(resolve, reject) {
+        channel.listen(function(id, message, sender) {
           is(id, "echo");
 
           if (message.command === "done") {
             resolve();
           } else {
             reject(new Error(`Unexpected command ${message.command}`));
           }
         });
@@ -302,18 +302,18 @@ var gTests = [
        * First wait for the non-window element to send a "start" message.
        * Then send the non-window element a "done" message.
        * The non-window element will echo the "done" message back, if it
        * receives the message.
        * Listen for the response. If received, good to go!
        */
       let channel = new WebChannel("not_a_window", Services.io.newURI(HTTP_PATH, null, null));
 
-      let testDonePromise = new Promise(function (resolve, reject) {
-        channel.listen(function (id, message, sender) {
+      let testDonePromise = new Promise(function(resolve, reject) {
+        channel.listen(function(id, message, sender) {
           if (message.command === "start") {
             channel.send({ command: "done" }, sender);
           } else if (message.command === "done") {
             resolve();
           } else {
             reject(new Error(`Unexpected command ${message.command}`));
           }
         });
--- a/browser/base/content/test/general/browser_windowactivation.js
+++ b/browser/base/content/test/general/browser_windowactivation.js
@@ -110,17 +110,17 @@ function reallyRunTests() {
 function sendGetBackgroundRequest(ifChanged)
 {
   browser1.messageManager.sendAsyncMessage("Test:GetBackgroundColor", { ifChanged: ifChanged });
   browser2.messageManager.sendAsyncMessage("Test:GetBackgroundColor", { ifChanged: ifChanged });
 }
 
 function runOtherWindowTests() {
   otherWindow = window.open("data:text/html,<body>Hi</body>", "", "chrome");
-  waitForFocus(function () {
+  waitForFocus(function() {
     sendGetBackgroundRequest(true);
   }, otherWindow);
 }
 
 function finishTest()
 {
   gBrowser.removeCurrentTab();
   gBrowser.removeCurrentTab();
@@ -135,17 +135,17 @@ function childFunction()
   let expectingResponse = false;
   let ifChanged = true;
 
   addMessageListener("Test:GetBackgroundColor", function(message) {
     expectingResponse = true;
     ifChanged = message.data.ifChanged;
   });
 
-  content.addEventListener("focus", function () {
+  content.addEventListener("focus", function() {
     sendAsyncMessage("Test:FocusReceived", { });
   }, false);
 
   var windowGotActivate = false;
   var windowGotDeactivate = false;
   addEventListener("activate", function() {
       sendAsyncMessage("Test:ActivateEvent", { ok: !windowGotActivate });
       windowGotActivate = false;
@@ -158,17 +158,17 @@ function childFunction()
   content.addEventListener("activate", function() {
       windowGotActivate = true;
     });
 
   content.addEventListener("deactivate", function() {
       windowGotDeactivate = true;
     });
 
-  content.setInterval(function () {
+  content.setInterval(function() {
     if (!expectingResponse) {
       return;
     }
 
     let area = content.document.getElementById("area");
     if (!area) {
       return; /* hasn't loaded yet */
     }
--- a/browser/base/content/test/general/browser_windowopen_reflows.js
+++ b/browser/base/content/test/general/browser_windowopen_reflows.js
@@ -68,17 +68,17 @@ function test() {
     docShell.removeWeakReflowObserver(observer);
     win.close();
 
     finish();
   });
 }
 
 var observer = {
-  reflow: function (start, end) {
+  reflow: function(start, end) {
     // Gather information about the current code path.
     let stack = new Error().stack;
     let path = stack.split("\n").slice(1).map(line => {
       return line.replace(/:\d+:\d+$/, "");
     }).join("|");
     let pathWithLineNumbers = (new Error().stack).split("\n").slice(1).join("|");
 
     // Stack trace is empty. Reflow was triggered by native code.
@@ -94,17 +94,17 @@ var observer = {
         ok(true, "expected uninterruptible reflow '" + expectedStack + "'");
         return;
       }
     }
 
     ok(false, "unexpected uninterruptible reflow '" + pathWithLineNumbers + "'");
   },
 
-  reflowInterruptible: function (start, end) {
+  reflowInterruptible: function(start, end) {
     // We're not interested in interruptible reflows.
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIReflowObserver,
                                          Ci.nsISupportsWeakReference])
 };
 
 function waitForMozAfterPaint(win, callback) {
--- a/browser/base/content/test/general/browser_zbug569342.js
+++ b/browser/base/content/test/general/browser_zbug569342.js
@@ -1,17 +1,17 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
 var gTab = null;
 
 function load(url, cb) {
   gTab = gBrowser.addTab(url);
-  gBrowser.addEventListener("load", function (event) {
+  gBrowser.addEventListener("load", function(event) {
     if (event.target.location != url)
       return;
 
     gBrowser.removeEventListener("load", arguments.callee, true);
     // Trigger onLocationChange by switching tabs.
     gBrowser.selectedTab = gTab;
     cb();
   }, true);
@@ -35,17 +35,17 @@ var urls = [
 ];
 
 function nextTest() {
   let url = urls.shift();
   if (url) {
     testFindDisabled(url, nextTest);
   } else {
     // Make sure the find bar is re-enabled after disabled page is closed.
-    testFindEnabled("about:blank", function () {
+    testFindEnabled("about:blank", function() {
       EventUtils.synthesizeKey("VK_ESCAPE", { });
       ok(gFindBar.hidden, "Find bar should now be hidden");
       finish();
     });
   }
 }
 
 function testFindDisabled(url, cb) {
--- a/browser/base/content/test/general/contentSearchUI.js
+++ b/browser/base/content/test/general/contentSearchUI.js
@@ -1,14 +1,14 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
-(function () {
+(function() {
 
 const TEST_MSG = "ContentSearchUIControllerTest";
 const ENGINE_NAME = "browser_searchSuggestionEngine searchSuggestionEngine.xml";
 var gController;
 
 addMessageListener(TEST_MSG, msg => {
   messageHandlers[msg.data.type](msg.data.data);
 });
@@ -25,68 +25,68 @@ var messageHandlers = {
           gController.defaultEngine.name == ENGINE_NAME) {
         content.removeEventListener("ContentSearchService", listener);
         ack("init");
       }
     });
     gController.remoteTimeout = 5000;
   },
 
-  key: function (arg) {
+  key: function(arg) {
     let keyName = typeof(arg) == "string" ? arg : arg.key;
     content.synthesizeKey(keyName, arg.modifiers || {});
     let wait = arg.waitForSuggestions ? waitForSuggestions : cb => cb();
     wait(ack.bind(null, "key"));
   },
 
-  startComposition: function (arg) {
+  startComposition: function(arg) {
     content.synthesizeComposition({ type: "compositionstart", data: "" });
     ack("startComposition");
   },
 
-  changeComposition: function (arg) {
+  changeComposition: function(arg) {
     let data = typeof(arg) == "string" ? arg : arg.data;
     content.synthesizeCompositionChange({
       composition: {
         string: data,
         clauses: [
           { length: data.length, attr: content.COMPOSITION_ATTR_RAW_CLAUSE }
         ]
       },
       caret: { start: data.length, length: 0 }
     });
     let wait = arg.waitForSuggestions ? waitForSuggestions : cb => cb();
     wait(ack.bind(null, "changeComposition"));
   },
 
-  commitComposition: function () {
+  commitComposition: function() {
     content.synthesizeComposition({ type: "compositioncommitasis" });
     ack("commitComposition");
   },
 
-  focus: function () {
+  focus: function() {
     gController.input.focus();
     ack("focus");
   },
 
-  blur: function () {
+  blur: function() {
     gController.input.blur();
     ack("blur");
   },
 
-  waitForSearch: function () {
+  waitForSearch: function() {
     waitForContentSearchEvent("Search", aData => ack("waitForSearch", aData));
   },
 
-  waitForSearchSettings: function () {
+  waitForSearchSettings: function() {
     waitForContentSearchEvent("ManageEngines",
                               aData => ack("waitForSearchSettings", aData));
   },
 
-  mousemove: function (itemIndex) {
+  mousemove: function(itemIndex) {
     let row;
     if (itemIndex == -1) {
       row = gController._table.firstChild;
     }
     else {
       let allElts = [...gController._suggestionsList.children,
                      ...gController._oneOffButtons,
                      content.document.getElementById("contentSearchSettingsButton")];
@@ -98,17 +98,17 @@ var messageHandlers = {
     }
     row.addEventListener("mousemove", function handler() {
       row.removeEventListener("mousemove", handler);
       ack("mousemove");
     });
     content.synthesizeMouseAtCenter(row, event);
   },
 
-  click: function (arg) {
+  click: function(arg) {
     let eltIdx = typeof(arg) == "object" ? arg.eltIdx : arg;
     let row;
     if (eltIdx == -1) {
       row = gController._table.firstChild;
     }
     else {
       let allElts = [...gController._suggestionsList.children,
                      ...gController._oneOffButtons,
@@ -117,35 +117,35 @@ var messageHandlers = {
     }
     let event = arg.modifiers || {};
     // synthesizeMouseAtCenter defaults to sending a mousedown followed by a
     // mouseup if the event type is not specified.
     content.synthesizeMouseAtCenter(row, event);
     ack("click");
   },
 
-  addInputValueToFormHistory: function () {
+  addInputValueToFormHistory: function() {
     gController.addInputValueToFormHistory();
     ack("addInputValueToFormHistory");
   },
 
-  addDuplicateOneOff: function () {
+  addDuplicateOneOff: function() {
     let btn = gController._oneOffButtons[gController._oneOffButtons.length - 1];
     let newBtn = btn.cloneNode(true);
     btn.parentNode.appendChild(newBtn);
     gController._oneOffButtons.push(newBtn);
     ack("addDuplicateOneOff");
   },
 
-  removeLastOneOff: function () {
+  removeLastOneOff: function() {
     gController._oneOffButtons.pop().remove();
     ack("removeLastOneOff");
   },
 
-  reset: function () {
+  reset: function() {
     // Reset both the input and suggestions by select all + delete. If there was
     // no text entered, this won't have any effect, so also escape to ensure the
     // suggestions table is closed.
     gController.input.focus();
     content.synthesizeKey("a", { accelKey: true });
     content.synthesizeKey("VK_DELETE", {});
     content.synthesizeKey("VK_ESCAPE", {});
     ack("reset");
--- a/browser/base/content/test/general/content_aboutAccounts.js
+++ b/browser/base/content/test/general/content_aboutAccounts.js
@@ -34,24 +34,24 @@ addEventListener("DOMContentLoaded", fun
     if (iframe.contentWindow.location.href == "about:blank" ||
         dclEvent.target != iframe.contentDocument) {
       return;
     }
     removeEventListener("DOMContentLoaded", iframeLoaded, true);
     sendAsyncMessage("test:iframe:load", {url: iframe.contentDocument.location.href});
     // And an event listener for the test responses, which we send to the test
     // via a message.
-    iframe.contentWindow.addEventListener("FirefoxAccountsTestResponse", function (fxAccountsEvent) {
+    iframe.contentWindow.addEventListener("FirefoxAccountsTestResponse", function(fxAccountsEvent) {
       sendAsyncMessage("test:response", {data: fxAccountsEvent.detail.data});
     }, true);
   }, true);
 }, true);
 
 // Return the visibility state of a list of ids.
-addMessageListener("test:check-visibilities", function (message) {
+addMessageListener("test:check-visibilities", function(message) {
   let result = {};
   for (let id of message.data.ids) {
     let elt = content.document.getElementById(id);
     if (elt) {
       let displayStyle = content.window.getComputedStyle(elt).display;
       if (displayStyle == 'none') {
         result[id] = false;
       } else if (displayStyle == 'block') {
@@ -61,17 +61,17 @@ addMessageListener("test:check-visibilit
       }
     } else {
       result[id] = "doesn't exist: " + id;
     }
   }
   sendAsyncMessage("test:check-visibilities-response", result);
 });
 
-addMessageListener("test:load-with-mocked-profile-path", function (message) {
+addMessageListener("test:load-with-mocked-profile-path", function(message) {
   addEventListener("DOMContentLoaded", function domContentLoaded(event) {
     removeEventListener("DOMContentLoaded", domContentLoaded, true);
     content.getDefaultProfilePath = () => message.data.profilePath;
     // now wait for the iframe to load.
     let iframe = content.document.getElementById("remote");
     iframe.addEventListener("load", function iframeLoaded(loadEvent) {
       if (iframe.contentWindow.location.href == "about:blank" ||
           loadEvent.target != iframe) {
--- a/browser/base/content/test/general/download_page.html
+++ b/browser/base/content/test/general/download_page.html
@@ -29,17 +29,17 @@ https://bugzilla.mozilla.org/show_bug.cg
         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) {
+        window.addEventListener("beforeunload", function(evt) {
             document.getElementById("unload-flag").textContent = "Fail";
         });
     </script>
     <ul>
         <li><a href="http://example.com/"
                 download="example.com" id="link7" target="_blank">Download "example.com"</a></li>
     <ul>
     <div id="unload-flag">Okay</div>
--- a/browser/base/content/test/general/head.js
+++ b/browser/base/content/test/general/head.js
@@ -27,26 +27,26 @@ function waitForNotificationClose(notifi
         observer.disconnect();
         cb();
       }
     }
   });
   observer.observe(parent, {childList: true});
 }
 
-function closeAllNotifications () {
+function closeAllNotifications() {
   let notificationBox = document.getElementById("global-notificationbox");
 
   if (!notificationBox || !notificationBox.currentNotification) {
     return Promise.resolve();
   }
 
   let deferred = Promise.defer();
   for (let notification of notificationBox.allNotifications) {
-    waitForNotificationClose(notification, function () {
+    waitForNotificationClose(notification, function() {
       if (notificationBox.allNotifications.length === 0) {
         deferred.resolve();
       }
     });
     notification.close();
   }
 
   return deferred.promise;
@@ -367,17 +367,17 @@ function promiseTabLoaded(aTab) {
 function promiseHistoryClearedState(aURIs, aShouldBeCleared) {
   let deferred = Promise.defer();
   let callbackCount = 0;
   let niceStr = aShouldBeCleared ? "no longer" : "still";
   function callbackDone() {
     if (++callbackCount == aURIs.length)
       deferred.resolve();
   }
-  aURIs.forEach(function (aURI) {
+  aURIs.forEach(function(aURI) {
     PlacesUtils.asyncHistory.isURIVisited(aURI, function(uri, isVisited) {
       is(isVisited, !aShouldBeCleared,
          "history visit " + uri.spec + " should " + niceStr + " exist");
       callbackDone();
     });
   });
 
   return deferred.promise;
@@ -413,17 +413,17 @@ function waitForDocLoadAndStopIt(aExpect
         /* Let the parent know we're done. */
         sendAsyncMessage("Test:WaitForDocLoadAndStopIt", { uri });
       } else {
         setTimeout(stopContent.bind(null, true, uri), 0);
       }
     }
 
     let progressListener = {
-      onStateChange: function (webProgress, req, flags, status) {
+      onStateChange: function(webProgress, req, flags, status) {
         dump("waitForDocLoadAndStopIt: onStateChange " + flags.toString(16) + ": " + req.name + "\n");
 
         if (webProgress.isTopLevel &&
             flags & Ci.nsIWebProgressListener.STATE_START) {
           wp.removeProgressListener(progressListener);
 
           let chan = req.QueryInterface(Ci.nsIChannel);
           dump(`waitForDocLoadAndStopIt: Document start: ${chan.URI.spec}\n`);
@@ -435,17 +435,17 @@ function waitForDocLoadAndStopIt(aExpect
     };
     wp.addProgressListener(progressListener, wp.NOTIFY_STATE_WINDOW);
 
     /**
      * As |this| is undefined and we can't extend |docShell|, adding an unload
      * event handler is the easiest way to ensure the weakly referenced
      * progress listener is kept alive as long as necessary.
      */
-    addEventListener("unload", function () {
+    addEventListener("unload", function() {
       try {
         wp.removeProgressListener(progressListener);
       } catch (e) { /* Will most likely fail. */ }
     });
   }
 
   return new Promise((resolve, reject) => {
     function complete({ data }) {
@@ -465,17 +465,17 @@ function waitForDocLoadAndStopIt(aExpect
  * Waits for the next load to complete in any browser or the given browser.
  * If a <tabbrowser> is given it waits for a load in any of its browsers.
  *
  * @return promise
  */
 function waitForDocLoadComplete(aBrowser = gBrowser) {
   return new Promise(resolve => {
     let listener = {
-      onStateChange: function (webProgress, req, flags, status) {
+      onStateChange: function(webProgress, req, flags, status) {
         let docStop = Ci.nsIWebProgressListener.STATE_IS_NETWORK |
                       Ci.nsIWebProgressListener.STATE_STOP;
         info("Saw state " + flags.toString(16) + " and status " + status.toString(16));
 
         // When a load needs to be retargetted to a new process it is cancelled
         // with NS_BINDING_ABORTED so ignore that case
         if ((flags & docStop) == docStop && status != Cr.NS_BINDING_ABORTED) {
           aBrowser.removeProgressListener(this);
@@ -536,17 +536,17 @@ var FullZoomHelper = {
       let didZoom = false;
 
       promiseTabLoadEvent(tab).then(event => {
         didLoad = true;
         if (didZoom)
           resolve();
       }, true);
 
-      this.waitForLocationChange().then(function () {
+      this.waitForLocationChange().then(function() {
         didZoom = true;
         if (didLoad)
           resolve();
       });
 
       tab.linkedBrowser.loadURI(url);
     });
   },
@@ -581,26 +581,26 @@ var FullZoomHelper = {
           resolve();
       }, true);
 
       if (direction == this.BACK)
         gBrowser.goBack();
       else if (direction == this.FORWARD)
         gBrowser.goForward();
 
-      this.waitForLocationChange().then(function () {
+      this.waitForLocationChange().then(function() {
         didZoom = true;
         if (didPs)
           resolve();
       });
     });
   },
 
   failAndContinue: function failAndContinue(func) {
-    return function (err) {
+    return function(err) {
       ok(false, err);
       func();
     };
   },
 };
 
 /**
  * Waits for a load (or custom) event to finish in a given tab. If provided
@@ -913,22 +913,22 @@ function promiseTopicObserved(aTopic)
   });
 }
 
 function promiseNewSearchEngine(basename) {
   return new Promise((resolve, reject) => {
     info("Waiting for engine to be added: " + basename);
     let url = getRootDirectory(gTestPath) + basename;
     Services.search.addEngine(url, null, "", false, {
-      onSuccess: function (engine) {
+      onSuccess: function(engine) {
         info("Search engine added: " + basename);
         registerCleanupFunction(() => Services.search.removeEngine(engine));
         resolve(engine);
       },
-      onError: function (errCode) {
+      onError: function(errCode) {
         Assert.ok(false, "addEngine failed with error code " + errCode);
         reject();
       },
     });
   });
 }
 
 // Compares the security state of the page with what is expected
@@ -961,32 +961,32 @@ function isSecurityState(expectedState) 
 }
 
 /**
  * Resolves when a bookmark with the given uri is added.
  */
 function promiseOnBookmarkItemAdded(aExpectedURI) {
   return new Promise((resolve, reject) => {
     let bookmarksObserver = {
-      onItemAdded: function (aItemId, aFolderId, aIndex, aItemType, aURI) {
+      onItemAdded: function(aItemId, aFolderId, aIndex, aItemType, aURI) {
         info("Added a bookmark to " + aURI.spec);
         PlacesUtils.bookmarks.removeObserver(bookmarksObserver);
         if (aURI.equals(aExpectedURI)) {
           resolve();
         }
         else {
           reject(new Error("Added an unexpected bookmark"));
         }
       },
-      onBeginUpdateBatch: function () {},
-      onEndUpdateBatch: function () {},
-      onItemRemoved: function () {},
-      onItemChanged: function () {},
-      onItemVisited: function () {},
-      onItemMoved: function () {},
+      onBeginUpdateBatch: function() {},
+      onEndUpdateBatch: function() {},
+      onItemRemoved: function() {},
+      onItemChanged: function() {},
+      onItemVisited: function() {},
+      onItemMoved: function() {},
       QueryInterface: XPCOMUtils.generateQI([
         Ci.nsINavBookmarkObserver,
       ])
     };
     info("Waiting for a bookmark to be added");
     PlacesUtils.bookmarks.addObserver(bookmarksObserver, false);
   });
 }
--- a/browser/base/content/test/general/test_remoteTroubleshoot.html
+++ b/browser/base/content/test/general/test_remoteTroubleshoot.html
@@ -6,17 +6,17 @@
 // both cases without too much pain.
 function makeDetails(object) {
   if (window.location.search.indexOf("object") >= 0) {
     return object;
   }
   return JSON.stringify(object)
 }
 // Add a listener for responses to our remote requests.
-window.addEventListener("WebChannelMessageToContent", function (event) {
+window.addEventListener("WebChannelMessageToContent", function(event) {
   if (event.detail.id == "remote-troubleshooting") {
     // Send what we got back to the test.
     var backEvent = new window.CustomEvent("WebChannelMessageToChrome", {
       detail: makeDetails({
         id: "test-remote-troubleshooting-backchannel",
         message: {
           message: event.detail.message,
         },
--- a/browser/base/content/test/newtab/browser_newtab_bug1194895.js
+++ b/browser/base/content/test/newtab/browser_newtab_bug1194895.js
@@ -115,17 +115,17 @@ add_task(function* () {
   // block that history tile, and watch scrollbar disappear
   yield blockCell(14);
   yield* addNewTabPageTab();
   scrolling = yield hasScrollbar();
   ok(!scrolling, "no scrollbar after bottom history tiles is blocked");
 
   // Test well-populated user history - newtab has highly-frecent history sites
   // redefine compareLinks to always choose history tiles first
-  NewTabUtils.links.compareLinks = function (aLink1, aLink2) {
+  NewTabUtils.links.compareLinks = function(aLink1, aLink2) {
     if (aLink1.type == aLink2.type) {
       return aLink2.frecency - aLink1.frecency ||
              aLink2.lastVisitDate - aLink1.lastVisitDate;
     }
     if (aLink2.type == "history") {
       return 1;
     }
     return -1;
--- a/browser/base/content/test/newtab/browser_newtab_bug722273.js
+++ b/browser/base/content/test/newtab/browser_newtab_bug722273.js
@@ -38,19 +38,19 @@ function promiseAddFakeVisits() {
   let place = {
     uri: makeURI(URL),
     title: "fake site",
     visits: visits
   };
   return new Promise((resolve, reject) => {
     PlacesUtils.asyncHistory.updatePlaces(place, {
       handleError: () => reject(new Error("Couldn't add visit")),
-      handleResult: function () {},
-      handleCompletion: function () {
-        NewTabUtils.links.populateCache(function () {
+      handleResult: function() {},
+      handleCompletion: function() {
+        NewTabUtils.links.populateCache(function() {
           NewTabUtils.allPages.update();
           resolve();
         }, true);
       }
     });
   });
 }
 
--- a/browser/base/content/test/newtab/browser_newtab_bug734043.js
+++ b/browser/base/content/test/newtab/browser_newtab_bug734043.js
@@ -4,17 +4,17 @@
 add_task(function* () {
   yield setLinks("0,1,2,3,4,5,6,7,8");
   setPinnedLinks("");
 
   yield* addNewTabPageTab();
   yield* checkGrid("0,1,2,3,4,5,6,7,8");
 
   yield ContentTask.spawn(gBrowser.selectedBrowser, {}, function* () {
-    content.addEventListener("error", function () {
+    content.addEventListener("error", function() {
       sendAsyncMessage("test:newtab-error", {});
     });
   });
 
   let receivedError = false;
   let mm = gBrowser.selectedBrowser.messageManager;
   mm.addMessageListener("test:newtab-error", function onResponse(message) {
     mm.removeMessageListener("test:newtab-error", onResponse);
--- a/browser/base/content/test/newtab/browser_newtab_drop_preview.js
+++ b/browser/base/content/test/newtab/browser_newtab_drop_preview.js
@@ -17,17 +17,17 @@ add_task(function* () {
 
   let foundSites = yield ContentTask.spawn(gWindow.gBrowser.selectedBrowser, {}, function*() {
     let cells = content.gGrid.cells;
     content.gDrag._draggedSite = cells[0].site;
     let sites = content.gDropPreview.rearrange(cells[4]);
     content.gDrag._draggedSite = null;
 
     sites = sites.slice(0, 9);
-    return sites.map(function (aSite) {
+    return sites.map(function(aSite) {
       if (!aSite)
         return "";
 
       let pinned = aSite.isPinned();
       if (pinned != aSite.node.hasAttribute("pinned")) {
         Assert.ok(false, "invalid state (site.isPinned() != site[pinned])");
       }
 
--- a/browser/base/content/test/newtab/browser_newtab_perwindow_private_browsing.js
+++ b/browser/base/content/test/newtab/browser_newtab_perwindow_private_browsing.js
@@ -42,15 +42,15 @@ var windowsToClose = [];
 function* testOnWindow(options) {
   let newWindowPromise = BrowserTestUtils.waitForNewWindow();
   var win = OpenBrowserWindow(options);
   windowsToClose.push(win);
   gWindow = win;
   yield newWindowPromise;
 }
 
-registerCleanupFunction(function () {
+registerCleanupFunction(function() {
   gWindow = window;
   windowsToClose.forEach(function(win) {
     win.close();
   });
 });
 
--- a/browser/base/content/test/newtab/browser_newtab_search.js
+++ b/browser/base/content/test/newtab/browser_newtab_search.js
@@ -58,23 +58,23 @@ add_task(function* () {
 
   yield* addNewTabPageTab();
 
   // The tab is removed at the end of the test, so there's no need to remove
   // this listener at the end of the test.
   info("Adding search event listener");
   yield ContentTask.spawn(gBrowser.selectedBrowser, {}, function* () {
     const SERVICE_EVENT_NAME = "ContentSearchService";
-    content.addEventListener(SERVICE_EVENT_NAME, function (event) {
+    content.addEventListener(SERVICE_EVENT_NAME, function(event) {
       sendAsyncMessage("test:search-event", { eventType: event.detail.type });
     });
   });
 
   let mm = gBrowser.selectedBrowser.messageManager;
-  mm.addMessageListener("test:search-event", function (message) {
+  mm.addMessageListener("test:search-event", function(message) {
     let eventType = message.data.eventType;
     if (!gExpectedSearchEventResolver) {
       ok(false, "Got search event " + eventType + " with no promise assigned");
     }
 
     let expectedEventType = gExpectedSearchEventQueue.shift();
     is(eventType, expectedEventType, "Got expected search event " + expectedEventType);
     if (!gExpectedSearchEventQueue.length) {
@@ -211,22 +211,22 @@ function promiseNewSearchEngine({name: b
     expectedSearchEvents.push("CurrentState");
   }
   let eventPromise = promiseSearchEvents(expectedSearchEvents);
 
   // Wait for addEngine().
   let addEnginePromise = new Promise((resolve, reject) => {
     let url = getRootDirectory(gTestPath) + basename;
     Services.search.addEngine(url, null, "", false, {
-      onSuccess: function (engine) {
+      onSuccess: function(engine) {
         info("Search engine added: " + basename);
         gNewEngines.push(engine);
         resolve(engine);
       },
-      onError: function (errCode) {
+      onError: function(errCode) {
         ok(false, "addEngine failed with error code " + errCode);
         reject();
       },
     });
   });
 
   return Promise.all([addEnginePromise, eventPromise]).then(([newEngine, _]) => {
     return newEngine;
--- a/browser/base/content/test/newtab/content-reflows.js
+++ b/browser/base/content/test/newtab/content-reflows.js
@@ -1,13 +1,13 @@
 /* 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 () {
+(function() {
   "use strict";
 
   const Ci = Components.interfaces;
 
   docShell.addWeakReflowObserver({
     reflow() {
       // Gather information about the current code path.
       let path = (new Error().stack).split("\n").slice(1).join("\n");
--- a/browser/base/content/test/newtab/head.js
+++ b/browser/base/content/test/newtab/head.js
@@ -62,17 +62,17 @@ if (screenHeight < gBrowser.contentWindo
 
 if (screenWidth < gBrowser.contentWindow.outerWidth) {
   info("Warning: Browser outer width is now " +
        gBrowser.contentWindow.outerWidth + ", which is larger than the " +
        "available screen width, " + screenWidth +
        ". That may cause problems.");
 }
 
-registerCleanupFunction(function () {
+registerCleanupFunction(function() {
   while (gWindow.gBrowser.tabs.length > 1)
     gWindow.gBrowser.removeTab(gWindow.gBrowser.tabs[1]);
 
   Object.keys(oldSize).forEach(prop => {
     if (oldSize[prop]) {
       gBrowser.contentWindow[prop] = oldSize[prop];
     }
   });
@@ -166,30 +166,30 @@ function performOnCell(aIndex, aFn) {
  *          {url: "http://example2.com/", title: "site#2"},
  *          {url: "http://example3.com/", title: "site#3"}]
  */
 function setLinks(aLinks) {
   return new Promise(resolve => {
     let links = aLinks;
 
     if (typeof links == "string") {
-      links = aLinks.split(/\s*,\s*/).map(function (id) {
+      links = aLinks.split(/\s*,\s*/).map(function(id) {
         return {url: "http://example" + (id != "-1" ? id : "") + ".com/",
                 title: "site#" + id};
       });
     }
 
     // Call populateCache() once to make sure that all link fetching that is
     // currently in progress has ended. We clear the history, fill it with the
     // given entries and call populateCache() now again to make sure the cache
     // has the desired contents.
-    NewTabUtils.links.populateCache(function () {
+    NewTabUtils.links.populateCache(function() {
       PlacesTestUtils.clearHistory().then(() => {
         fillHistory(links).then(() => {
-          NewTabUtils.links.populateCache(function () {
+          NewTabUtils.links.populateCache(function() {
             NewTabUtils.allPages.update();
             resolve();
           }, true);
         });
       });
     });
   });
 }
@@ -216,18 +216,18 @@ function fillHistory(aLinks) {
         // Links are secondarily sorted by visit date descending, so decrease the
         // visit date as we progress through the array so that links appear in the
         // grid in the order they're present in the array.
         visits: [{visitDate: now - i, transitionType: transitionLink}]
       };
 
       PlacesUtils.asyncHistory.updatePlaces(place, {
         handleError: () => ok(false, "couldn't add visit to history"),
-        handleResult: function () {},
-        handleCompletion: function () {
+        handleResult: function() {},
+        handleCompletion: function() {
           if (--numLinks == 0) {
             resolve();
           }
         }
       });
     }
   });
 }
@@ -240,17 +240,17 @@ function fillHistory(aLinks) {
  * Example: setPinnedLinks("3,,1")
  * Result: 'http://example3.com/' is pinned in the first cell. 'http://example1.com/' is
  *         pinned in the third cell.
  */
 function setPinnedLinks(aLinks) {
   let links = aLinks;
 
   if (typeof links == "string") {
-    links = aLinks.split(/\s*,\s*/).map(function (id) {
+    links = aLinks.split(/\s*,\s*/).map(function(id) {
       if (id)
         return {url: "http://example" + (id != "-1" ? id : "") + ".com/",
                 title: "site#" + id,
                 type: "history"};
       return undefined;
     });
   }
 
@@ -309,17 +309,17 @@ function* addNewTabPageTab() {
   let browser = tab.linkedBrowser;
 
   // Wait for the document to become visible in case it was preloaded.
   yield waitForCondition(() => !browser.contentDocument.hidden)
 
   yield new Promise(resolve => {
     if (NewTabUtils.allPages.enabled) {
       // Continue when the link cache has been populated.
-      NewTabUtils.links.populateCache(function () {
+      NewTabUtils.links.populateCache(function() {
         whenSearchInitDone().then(resolve);
       });
     } else {
       resolve();
     }
   });
 
   return tab;
@@ -337,17 +337,17 @@ function* addNewTabPageTab() {
 function* checkGrid(pattern) {
   let length = pattern.split(",").length;
 
   yield ContentTask.spawn(gWindow.gBrowser.selectedBrowser,
                           { length, pattern }, function* (args) {
     let grid = content.wrappedJSObject.gGrid;
 
     let sites = grid.sites.slice(0, args.length);
-    let foundPattern = sites.map(function (aSite) {
+    let foundPattern = sites.map(function(aSite) {
       if (!aSite)
         return "";
 
       let pinned = aSite.isPinned();
       let hasPinnedAttr = aSite.node.hasAttribute("pinned");
 
       if (pinned != hasPinnedAttr)
         ok(false, "invalid state (site.isPinned() != site[pinned])");
@@ -459,17 +459,17 @@ function whenPagesUpdated() {
 
       update() {
         NewTabUtils.allPages.unregister(this);
         executeSoon(resolve);
       }
     };
 
     NewTabUtils.allPages.register(page);
-    registerCleanupFunction(function () {
+    registerCleanupFunction(function() {
       NewTabUtils.allPages.unregister(page);
     });
   });
 }
 
 /**
  * Waits for the response to the page's initial search state request.
  */
--- a/browser/base/content/test/plugins/blocklist_proxy.js
+++ b/browser/base/content/test/plugins/blocklist_proxy.js
@@ -36,43 +36,43 @@ var BlocklistProxy = {
       Cm.nsIComponentRegistrar.registerFactory(Components.ID(kBlocklistServiceUUID),
                                                "Blocklist Service",
                                                "@mozilla.org/extensions/blocklist;1",
                                                kBlocklistServiceFactory);
       this._uuid = null;
     }
   },
 
-  notify: function (aTimer) {
+  notify: function(aTimer) {
   },
 
-  observe: function (aSubject, aTopic, aData) {
+  observe: function(aSubject, aTopic, aData) {
   },
 
-  isAddonBlocklisted: function (aAddon, aAppVersion, aToolkitVersion) {
+  isAddonBlocklisted: function(aAddon, aAppVersion, aToolkitVersion) {
     return false;
   },
 
-  getAddonBlocklistState: function (aAddon, aAppVersion, aToolkitVersion) {
+  getAddonBlocklistState: function(aAddon, aAppVersion, aToolkitVersion) {
     return 0; // STATE_NOT_BLOCKED
   },
 
-  getPluginBlocklistState: function (aPluginTag, aAppVersion, aToolkitVersion) {
+  getPluginBlocklistState: function(aPluginTag, aAppVersion, aToolkitVersion) {
     return 0; // STATE_NOT_BLOCKED
   },
 
-  getAddonBlocklistURL: function (aAddon, aAppVersion, aToolkitVersion) {
+  getAddonBlocklistURL: function(aAddon, aAppVersion, aToolkitVersion) {
     return "";
   },
 
-  getPluginBlocklistURL: function (aPluginTag) {
+  getPluginBlocklistURL: function(aPluginTag) {
     return "";
   },
 
-  getPluginInfoURL: function (aPluginTag) {
+  getPluginInfoURL: function(aPluginTag) {
     return "";
   },
 }
 
 BlocklistProxy.init();
 addEventListener("unload", () => {
   BlocklistProxy.uninit();
 });
--- a/browser/base/content/test/plugins/browser_CTP_context_menu.js
+++ b/browser/base/content/test/plugins/browser_CTP_context_menu.js
@@ -1,13 +1,13 @@
 var rootDir = getRootDirectory(gTestPath);
 const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
 
 add_task(function* () {
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     clearAllPluginPermissions();
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
     Services.prefs.clearUserPref("plugins.click_to_play");
     Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
     gBrowser.removeCurrentTab();
     window.focus();
   });
--- a/browser/base/content/test/plugins/browser_CTP_data_urls.js
+++ b/browser/base/content/test/plugins/browser_CTP_data_urls.js
@@ -1,15 +1,15 @@
 var rootDir = getRootDirectory(gTestPath);
 const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
 var gPluginHost = Components.classes["@mozilla.org/plugin/host;1"].getService(Components.interfaces.nsIPluginHost);
 var gTestBrowser = null;
 
 add_task(function* () {
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     clearAllPluginPermissions();
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
     Services.prefs.clearUserPref("plugins.click_to_play");
     Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
     gBrowser.removeCurrentTab();
     window.focus();
     gTestBrowser = null;
--- a/browser/base/content/test/plugins/browser_CTP_drag_drop.js
+++ b/browser/base/content/test/plugins/browser_CTP_drag_drop.js
@@ -1,13 +1,13 @@
 var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
 var gNewWindow = null;
 
 add_task(function* () {
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     clearAllPluginPermissions();
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
     Services.prefs.clearUserPref("plugins.click_to_play");
     Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
     gNewWindow.close();
     gNewWindow = null;
     window.focus();
--- a/browser/base/content/test/plugins/browser_CTP_hide_overlay.js
+++ b/browser/base/content/test/plugins/browser_CTP_hide_overlay.js
@@ -1,14 +1,14 @@
 var rootDir = getRootDirectory(gTestPath);
 const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
 var gPluginHost = Components.classes["@mozilla.org/plugin/host;1"].getService(Components.interfaces.nsIPluginHost);
 
 add_task(function* () {
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     clearAllPluginPermissions();
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
     Services.prefs.clearUserPref("plugins.click_to_play");
     Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
     gBrowser.removeCurrentTab();
     window.focus();
   });
--- a/browser/base/content/test/plugins/browser_CTP_iframe.js
+++ b/browser/base/content/test/plugins/browser_CTP_iframe.js
@@ -1,13 +1,13 @@
 var rootDir = getRootDirectory(gTestPath);
 const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
 
 add_task(function* () {
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     clearAllPluginPermissions();
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
     Services.prefs.clearUserPref("plugins.click_to_play");
     Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
     gBrowser.removeCurrentTab();
     window.focus();
   });
--- a/browser/base/content/test/plugins/browser_CTP_multi_allow.js
+++ b/browser/base/content/test/plugins/browser_CTP_multi_allow.js
@@ -1,14 +1,14 @@
 var rootDir = getRootDirectory(gTestPath);
 const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
 var gPluginHost = Components.classes["@mozilla.org/plugin/host;1"].getService(Components.interfaces.nsIPluginHost);
 
 add_task(function* () {
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     clearAllPluginPermissions();
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
     Services.prefs.clearUserPref("plugins.click_to_play");
     Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
     gBrowser.removeCurrentTab();
     window.focus();
   });
--- a/browser/base/content/test/plugins/browser_CTP_nonplugins.js
+++ b/browser/base/content/test/plugins/browser_CTP_nonplugins.js
@@ -1,14 +1,14 @@
 var rootDir = getRootDirectory(gTestPath);
 const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
 var gPluginHost = Components.classes["@mozilla.org/plugin/host;1"].getService(Components.interfaces.nsIPluginHost);
 
 add_task(function* () {
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     clearAllPluginPermissions();
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
     Services.prefs.clearUserPref("plugins.click_to_play");
     Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
     gBrowser.removeCurrentTab();
     window.focus();
   });
--- a/browser/base/content/test/plugins/browser_CTP_notificationBar.js
+++ b/browser/base/content/test/plugins/browser_CTP_notificationBar.js
@@ -1,14 +1,14 @@
 var rootDir = getRootDirectory(gTestPath);
 const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
 var gTestBrowser = null;
 
 add_task(function* () {
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     clearAllPluginPermissions();
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
     Services.prefs.clearUserPref("plugins.click_to_play");
     Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
     gBrowser.removeCurrentTab();
     window.focus();
     gTestBrowser = null;
--- a/browser/base/content/test/plugins/browser_CTP_outsideScrollArea.js
+++ b/browser/base/content/test/plugins/browser_CTP_outsideScrollArea.js
@@ -1,15 +1,15 @@
 var rootDir = getRootDirectory(gTestPath);
 const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
 var gTestBrowser = null;
 var gPluginHost = Components.classes["@mozilla.org/plugin/host;1"].getService(Components.interfaces.nsIPluginHost);
 
 add_task(function* () {
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     clearAllPluginPermissions();
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
     Services.prefs.clearUserPref("plugins.click_to_play");
     Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
     gBrowser.removeCurrentTab();
     window.focus();
     gTestBrowser = null;
--- a/browser/base/content/test/plugins/browser_CTP_remove_navigate.js
+++ b/browser/base/content/test/plugins/browser_CTP_remove_navigate.js
@@ -1,14 +1,14 @@
 const gTestRoot = getRootDirectory(gTestPath);
 const gHttpTestRoot = gTestRoot.replace("chrome://mochitests/content/",
                                         "http://127.0.0.1:8888/");
 
 add_task(function* () {
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     clearAllPluginPermissions();
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
     Services.prefs.clearUserPref("plugins.click_to_play");
     Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
     gBrowser.removeCurrentTab();
     window.focus();
   });
--- a/browser/base/content/test/plugins/browser_CTP_resize.js
+++ b/browser/base/content/test/plugins/browser_CTP_resize.js
@@ -1,14 +1,14 @@
 var rootDir = getRootDirectory(gTestPath);
 const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
 var gTestBrowser = null;
 
 add_task(function* () {
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     clearAllPluginPermissions();
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
     Services.prefs.clearUserPref("plugins.click_to_play");
     Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
     gBrowser.removeCurrentTab();
     window.focus();
     gTestBrowser = null;
--- a/browser/base/content/test/plugins/browser_CTP_zoom.js
+++ b/browser/base/content/test/plugins/browser_CTP_zoom.js
@@ -1,17 +1,17 @@
 "use strict";
 
 var rootDir = getRootDirectory(gTestPath);
 const gTestRoot = rootDir.replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
 
 var gTestBrowser = null;
 
 add_task(function* () {
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     clearAllPluginPermissions();
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
     Services.prefs.clearUserPref("plugins.click_to_play");
     Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
     FullZoom.reset(); // must be called before closing the tab we zoomed!
     gBrowser.removeCurrentTab();
     window.focus();
--- a/browser/base/content/test/plugins/browser_bug744745.js
+++ b/browser/base/content/test/plugins/browser_bug744745.js
@@ -5,17 +5,17 @@ var gNumPluginBindingsAttached = 0;
 function pluginBindingAttached() {
   gNumPluginBindingsAttached++;
   if (gNumPluginBindingsAttached != 1) {
     ok(false, "if we've gotten here, something is quite wrong");
   }
 }
 
 add_task(function* () {
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     gTestBrowser.removeEventListener("PluginBindingAttached", pluginBindingAttached, true, true);
     clearAllPluginPermissions();
     Services.prefs.clearUserPref("plugins.click_to_play");
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
     gBrowser.removeCurrentTab();
     window.focus();
     gTestBrowser = null;
@@ -30,17 +30,17 @@ add_task(function* () {
 
   setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
 
   gTestBrowser.addEventListener("PluginBindingAttached", pluginBindingAttached, true, true);
 
   let testRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
   yield promiseTabLoadEvent(gBrowser.selectedTab, testRoot + "plugin_bug744745.html");
 
-  yield promiseForCondition(function () { return gNumPluginBindingsAttached == 1; });
+  yield promiseForCondition(function() { return gNumPluginBindingsAttached == 1; });
 
   yield ContentTask.spawn(gTestBrowser, {}, function* () {
     let plugin = content.document.getElementById("test");
     if (!plugin) {
       Assert.ok(false, "plugin element not available.");
       return;
     }
     // We can't use MochiKit's routine
--- a/browser/base/content/test/plugins/browser_bug787619.js
+++ b/browser/base/content/test/plugins/browser_bug787619.js
@@ -1,14 +1,14 @@
 var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
 var gTestBrowser = null;
 var gWrapperClickCount = 0;
 
 add_task(function* () {
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     clearAllPluginPermissions();
     Services.prefs.clearUserPref("plugins.click_to_play");
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
     gBrowser.removeCurrentTab();
     window.focus();
     gTestBrowser = null;
   });
--- a/browser/base/content/test/plugins/browser_bug797677.js
+++ b/browser/base/content/test/plugins/browser_bug797677.js
@@ -1,17 +1,17 @@
 var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
 var gTestBrowser = null;
 var gConsoleErrors = 0;
 
 var Cc = Components.classes;
 var Ci = Components.interfaces;
 
 add_task(function* () {
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     clearAllPluginPermissions();
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
     consoleService.unregisterListener(errorListener);
     gBrowser.removeCurrentTab();
     window.focus();
     gTestBrowser = null;
   });
--- a/browser/base/content/test/plugins/browser_bug818118.js
+++ b/browser/base/content/test/plugins/browser_bug818118.js
@@ -1,13 +1,13 @@
 var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
 var gTestBrowser = null;
 
 add_task(function* () {
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     clearAllPluginPermissions();
     Services.prefs.clearUserPref("plugins.click_to_play");
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
     gBrowser.removeCurrentTab();
     window.focus();
     gTestBrowser = null;
   });
--- a/browser/base/content/test/plugins/browser_bug820497.js
+++ b/browser/base/content/test/plugins/browser_bug820497.js
@@ -1,14 +1,14 @@
 var gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
 var gTestBrowser = null;
 var gNumPluginBindingsAttached = 0;
 
 add_task(function* () {
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     clearAllPluginPermissions();
     Services.prefs.clearUserPref("plugins.click_to_play");
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
     gBrowser.removeCurrentTab();
     window.focus();
     gTestBrowser = null;
   });
@@ -18,21 +18,21 @@ add_task(function* () {
   Services.prefs.setBoolPref("plugins.click_to_play", true);
 
   gBrowser.selectedTab = gBrowser.addTab();
   gTestBrowser = gBrowser.selectedBrowser;
 
   setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Test Plug-in");
   setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY, "Second Test Plug-in");
 
-  gTestBrowser.addEventListener("PluginBindingAttached", function () { gNumPluginBindingsAttached++ }, true, true);
+  gTestBrowser.addEventListener("PluginBindingAttached", function() { gNumPluginBindingsAttached++ }, true, true);
 
   yield promiseTabLoadEvent(gBrowser.selectedTab, gTestRoot + "plugin_bug820497.html");
 
-  yield promiseForCondition(function () { return gNumPluginBindingsAttached == 1; });
+  yield promiseForCondition(function() { return gNumPluginBindingsAttached == 1; });
 
   yield ContentTask.spawn(gTestBrowser, null, () => {
     // Note we add the second plugin in the code farther down, so there's
     // no way we got here with anything but one plugin loaded.
     let doc = content.document;
     let testplugin = doc.getElementById("test");
     ok(testplugin, "should have test plugin");
     let secondtestplugin = doc.getElementById("secondtest");
@@ -46,17 +46,17 @@ add_task(function* () {
   yield promiseForNotificationShown(notification);
 
   is(notification.options.pluginData.size, 1, "should be 1 type of plugin in the popup notification");
 
   yield ContentTask.spawn(gTestBrowser, {}, function* () {
     XPCNativeWrapper.unwrap(content).addSecondPlugin();
   });
 
-  yield promiseForCondition(function () { return gNumPluginBindingsAttached == 2; });
+  yield promiseForCondition(function() { return gNumPluginBindingsAttached == 2; });
 
   yield ContentTask.spawn(gTestBrowser, null, () => {
     let doc = content.document;
     let testplugin = doc.getElementById("test");
     ok(testplugin, "should have test plugin");
     let secondtestplugin = doc.getElementById("secondtest");
     ok(secondtestplugin, "should have second test plugin");
   });
--- a/browser/base/content/test/plugins/browser_clearplugindata.js
+++ b/browser/base/content/test/plugins/browser_clearplugindata.js
@@ -29,17 +29,17 @@ function stored(needles) {
   for (let i = 0; i < needles.length; ++i) {
     if (!pluginHost.siteHasData(this.pluginTag, needles[i]))
       return false;
   }
   return true;
 }
 
 add_task(function* () {
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     clearAllPluginPermissions();
     Services.prefs.clearUserPref("plugins.click_to_play");
     Services.prefs.clearUserPref("extensions.blocklist.suppressUI");
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Test Plug-in");
     setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
     if (gTestBrowser) {
       gBrowser.removeCurrentTab();
     }
--- a/browser/base/content/test/popupNotifications/browser_displayURI.js
+++ b/browser/base/content/test/popupNotifications/browser_displayURI.js
@@ -9,17 +9,17 @@ add_task(function* test_displayURI() {
     url: "https://test1.example.com/",
   }, function*(browser) {
     let popupShownPromise = new Promise((resolve, reject) => {
       onPopupEvent("popupshown", function() {
         resolve(this);
       });
     });
     yield ContentTask.spawn(browser, null, function*() {
-      content.navigator.geolocation.getCurrentPosition(function (pos) {
+      content.navigator.geolocation.getCurrentPosition(function(pos) {
         // Do nothing
       });
     });
     let panel = yield popupShownPromise;
     let notification = panel.children[0];
     let body = document.getAnonymousElementByAttribute(notification,
                                                        "class",
                                                        "popup-notification-body");
--- a/browser/base/content/test/popupNotifications/browser_popupNotification.js
+++ b/browser/base/content/test/popupNotifications/browser_popupNotification.js
@@ -13,55 +13,55 @@ function test() {
   ok(PopupNotifications.panel, "PopupNotifications panel exists");
 
   setup();
   goNext();
 }
 
 var tests = [
   { id: "Test#1",
-    run: function () {
+    run: function() {
       this.notifyObj = new BasicNotification(this.id);
       showNotification(this.notifyObj);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       checkPopup(popup, this.notifyObj);
       triggerMainCommand(popup);
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       ok(this.notifyObj.mainActionClicked, "mainAction was clicked");
       ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback wasn't triggered");
       ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
     }
   },
   { id: "Test#2",
-    run: function () {
+    run: function() {
       this.notifyObj = new BasicNotification(this.id);
       showNotification(this.notifyObj);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       checkPopup(popup, this.notifyObj);
       triggerSecondaryCommand(popup, 0);
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       ok(this.notifyObj.secondaryActionClicked, "secondaryAction was clicked");
       ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback wasn't triggered");
       ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
     }
   },
   { id: "Test#3",
-    run: function () {
+    run: function() {
       this.notifyObj = new BasicNotification(this.id);
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       checkPopup(popup, this.notifyObj);
       dismissNotification(popup);
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback triggered");
       this.notification.remove();
       ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
     }
   },
   // test opening a notification for a background browser
   // Note: test 4 to 6 share a tab.
   { id: "Test#4",
@@ -76,28 +76,28 @@ var tests = [
       ok(!wrongBrowserNotificationObject.mainActionClicked, "main action wasn't clicked");
       ok(!wrongBrowserNotificationObject.secondaryActionClicked, "secondary action wasn't clicked");
       ok(!wrongBrowserNotificationObject.dismissalCallbackTriggered, "dismissal callback wasn't called");
       goNext();
     }
   },
   // now select that browser and test to see that the notification appeared
   { id: "Test#5",
-    run: function () {
+    run: function() {
       this.oldSelectedTab = gBrowser.selectedTab;
       gBrowser.selectedTab = gBrowser.tabs[gBrowser.tabs.length - 1];
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       checkPopup(popup, wrongBrowserNotificationObject);
       is(PopupNotifications.isPanelOpen, true, "isPanelOpen getter doesn't lie");
 
       // switch back to the old browser
       gBrowser.selectedTab = this.oldSelectedTab;
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       // actually remove the notification to prevent it from reappearing
       ok(wrongBrowserNotificationObject.dismissalCallbackTriggered, "dismissal callback triggered due to tab switch");
       wrongBrowserNotification.remove();
       ok(wrongBrowserNotificationObject.removedCallbackTriggered, "removed callback triggered");
       wrongBrowserNotification = null;
     }
   },
   // test that the removed notification isn't shown on browser re-select
@@ -109,95 +109,95 @@ var tests = [
       is(PopupNotifications.isPanelOpen, false, "panel isn't open");
       gBrowser.removeTab(gBrowser.selectedTab);
       goNext();
     }
   },
   // Test that two notifications with the same ID result in a single displayed
   // notification.
   { id: "Test#7",
-    run: function () {
+    run: function() {
       this.notifyObj = new BasicNotification(this.id);
       // Show the same notification twice
       this.notification1 = showNotification(this.notifyObj);
       this.notification2 = showNotification(this.notifyObj);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       checkPopup(popup, this.notifyObj);
       this.notification2.remove();
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback wasn't triggered");
       ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
     }
   },
   // Test that two notifications with different IDs are displayed
   { id: "Test#8",
-    run: function () {
+    run: function() {
       this.testNotif1 = new BasicNotification(this.id);
       this.testNotif1.message += " 1";
       showNotification(this.testNotif1);
       this.testNotif2 = new BasicNotification(this.id);
       this.testNotif2.message += " 2";
       this.testNotif2.id += "-2";
       showNotification(this.testNotif2);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       is(popup.childNodes.length, 2, "two notifications are shown");
       // Trigger the main command for the first notification, and the secondary
       // for the second. Need to do mainCommand first since the secondaryCommand
       // triggering is async.
       triggerMainCommand(popup);
       is(popup.childNodes.length, 1, "only one notification left");
       triggerSecondaryCommand(popup, 0);
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       ok(this.testNotif1.mainActionClicked, "main action #1 was clicked");
       ok(!this.testNotif1.secondaryActionClicked, "secondary action #1 wasn't clicked");
       ok(!this.testNotif1.dismissalCallbackTriggered, "dismissal callback #1 wasn't called");
 
       ok(!this.testNotif2.mainActionClicked, "main action #2 wasn't clicked");
       ok(this.testNotif2.secondaryActionClicked, "secondary action #2 was clicked");
       ok(!this.testNotif2.dismissalCallbackTriggered, "dismissal callback #2 wasn't called");
     }
   },
   // Test notification without mainAction
   { id: "Test#9",
-    run: function () {
+    run: function() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.mainAction = null;
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       checkPopup(popup, this.notifyObj);
       dismissNotification(popup);
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       this.notification.remove();
     }
   },
   // Test two notifications with different anchors
   { id: "Test#10",
-    run: function () {
+    run: function() {
       this.notifyObj = new BasicNotification(this.id);
       this.firstNotification = showNotification(this.notifyObj);
       this.notifyObj2 = new BasicNotification(this.id);
       this.notifyObj2.id += "-2";
       this.notifyObj2.anchorID = "addons-notification-icon";
       // Second showNotification() overrides the first
       this.secondNotification = showNotification(this.notifyObj2);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       // This also checks that only one element is shown.
       checkPopup(popup, this.notifyObj2);
       is(document.getElementById("geo-notification-icon").boxObject.width, 0,
          "geo anchor shouldn't be visible");
       dismissNotification(popup);
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       // Remove the notifications
       this.firstNotification.remove();
       this.secondNotification.remove();
       ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
       ok(this.notifyObj2.removedCallbackTriggered, "removed callback triggered");
     }
   }
 ];
--- a/browser/base/content/test/popupNotifications/browser_popupNotification_2.js
+++ b/browser/base/content/test/popupNotifications/browser_popupNotification_2.js
@@ -10,46 +10,46 @@ function test() {
 
   setup();
   goNext();
 }
 
 var tests = [
   // Test optional params
   { id: "Test#1",
-    run: function () {
+    run: function() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.secondaryActions = undefined;
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       checkPopup(popup, this.notifyObj);
       dismissNotification(popup);
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback triggered");
       this.notification.remove();
       ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
     }
   },
   // Test that icons appear
   { id: "Test#2",
-    run: function () {
+    run: function() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.id = "geolocation";
       this.notifyObj.anchorID = "geo-notification-icon";
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       checkPopup(popup, this.notifyObj);
       isnot(document.getElementById("geo-notification-icon").boxObject.width, 0,
             "geo anchor should be visible");
       dismissNotification(popup);
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       let icon = document.getElementById("geo-notification-icon");
       isnot(icon.boxObject.width, 0,
             "geo anchor should be visible after dismissal");
       this.notification.remove();
       is(icon.boxObject.width, 0,
          "geo anchor should not be visible after removal");
     }
   },
@@ -69,17 +69,17 @@ var tests = [
     onShown: function* (popup) {
       this.complete = false;
       yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.org/");
       yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.com/")
       // Next load will remove the notification
       this.complete = true;
       yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.org/");
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       ok(this.complete, "Should only have hidden the notification after 3 page loads");
       ok(this.notifyObj.removedCallbackTriggered, "removal callback triggered");
       gBrowser.removeTab(gBrowser.selectedTab);
       gBrowser.selectedTab = this.oldSelectedTab;
     }
   },
   // Test that a timeout allows the notification to persist across reloads
   { id: "Test#4",
@@ -98,17 +98,17 @@ var tests = [
       this.complete = false;
       yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.org/");
       yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.com/");
       // Next load will hide the notification
       this.notification.options.timeout = Date.now() - 1;
       this.complete = true;
       yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.org/");
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       ok(this.complete, "Should only have hidden the notification after the timeout was passed");
       this.notification.remove();
       gBrowser.removeTab(gBrowser.selectedTab);
       gBrowser.selectedTab = this.oldSelectedTab;
     }
   },
   // Test that setting persistWhileVisible allows a visible notification to
   // persist across location changes
@@ -127,17 +127,17 @@ var tests = [
       this.complete = false;
 
       yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.org/");
       yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.com/");
       // Notification should persist across location changes
       this.complete = true;
       dismissNotification(popup);
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       ok(this.complete, "Should only have hidden the notification after it was dismissed");
       this.notification.remove();
       gBrowser.removeTab(gBrowser.selectedTab);
       gBrowser.selectedTab = this.oldSelectedTab;
     }
   },
 
   // Test that nested icon nodes correctly activate popups
@@ -184,60 +184,60 @@ var tests = [
       yield promiseTopic;
       isnot(document.getElementById("geo-notification-icon").boxObject.width, 0,
             "geo anchor should be visible");
       goNext();
     }
   },
   // Test notification "Not Now" menu item
   { id: "Test#8",
-    run: function () {
+    run: function() {
       this.notifyObj = new BasicNotification(this.id);
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       checkPopup(popup, this.notifyObj);
       triggerSecondaryCommand(popup, 1);
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback triggered");
       this.notification.remove();
       ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
     }
   },
   // Test notification close button
   { id: "Test#9",
-    run: function () {
+    run: function() {
       this.notifyObj = new BasicNotification(this.id);
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       checkPopup(popup, this.notifyObj);
       let notification = popup.childNodes[0];
       EventUtils.synthesizeMouseAtCenter(notification.closebutton, {});
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback triggered");
       this.notification.remove();
       ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
     }
   },
   // Test notification when chrome is hidden
   { id: "Test#10",
-    run: function () {
+    run: function() {
       window.locationbar.visible = false;
       this.notifyObj = new BasicNotification(this.id);
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       checkPopup(popup, this.notifyObj);
       is(popup.anchorNode.className, "tabbrowser-tab", "notification anchored to tab");
       dismissNotification(popup);
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback triggered");
       this.notification.remove();
       ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
       window.locationbar.visible = true;
     }
   },
   // Test that dismissed popupnotifications can be opened on about:blank
   // (where the rest of the identity block is disabled)
--- a/browser/base/content/test/popupNotifications/browser_popupNotification_3.js
+++ b/browser/base/content/test/popupNotifications/browser_popupNotification_3.js
@@ -10,163 +10,163 @@ function test() {
 
   setup();
   goNext();
 }
 
 var tests = [
   // Test notification is removed when dismissed if removeOnDismissal is true
   { id: "Test#1",
-    run: function () {
+    run: function() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.addOptions({
         removeOnDismissal: true
       });
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       checkPopup(popup, this.notifyObj);
       dismissNotification(popup);
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback wasn't triggered");
       ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered");
     }
   },
   // Test multiple notification icons are shown
   { id: "Test#2",
-    run: function () {
+    run: function() {
       this.notifyObj1 = new BasicNotification(this.id);
       this.notifyObj1.id += "_1";
       this.notifyObj1.anchorID = "default-notification-icon";
       this.notification1 = showNotification(this.notifyObj1);
 
       this.notifyObj2 = new BasicNotification(this.id);
       this.notifyObj2.id += "_2";
       this.notifyObj2.anchorID = "geo-notification-icon";
       this.notification2 = showNotification(this.notifyObj2);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       checkPopup(popup, this.notifyObj2);
 
       // check notifyObj1 anchor icon is showing
       isnot(document.getElementById("default-notification-icon").boxObject.width, 0,
             "default anchor should be visible");
       // check notifyObj2 anchor icon is showing
       isnot(document.getElementById("geo-notification-icon").boxObject.width, 0,
             "geo anchor should be visible");
 
       dismissNotification(popup);
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       this.notification1.remove();
       ok(this.notifyObj1.removedCallbackTriggered, "removed callback triggered");
 
       this.notification2.remove();
       ok(this.notifyObj2.removedCallbackTriggered, "removed callback triggered");
     }
   },
   // Test that multiple notification icons are removed when switching tabs
   { id: "Test#3",
-    run: function () {
+    run: function() {
       // show the notification on old tab.
       this.notifyObjOld = new BasicNotification(this.id);
       this.notifyObjOld.anchorID = "default-notification-icon";
       this.notificationOld = showNotification(this.notifyObjOld);
 
       // switch tab
       this.oldSelectedTab = gBrowser.selectedTab;
       gBrowser.selectedTab = gBrowser.addTab("about:blank");
 
       // show the notification on new tab.
       this.notifyObjNew = new BasicNotification(this.id);
       this.notifyObjNew.anchorID = "geo-notification-icon";
       this.notificationNew = showNotification(this.notifyObjNew);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       checkPopup(popup, this.notifyObjNew);
 
       // check notifyObjOld anchor icon is removed
       is(document.getElementById("default-notification-icon").boxObject.width, 0,
          "default anchor shouldn't be visible");
       // check notifyObjNew anchor icon is showing
       isnot(document.getElementById("geo-notification-icon").boxObject.width, 0,
             "geo anchor should be visible");
 
       dismissNotification(popup);
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       this.notificationNew.remove();
       gBrowser.removeTab(gBrowser.selectedTab);
 
       gBrowser.selectedTab = this.oldSelectedTab;
       this.notificationOld.remove();
     }
   },
   // test security delay - too early
   { id: "Test#4",
-    run: function () {
+    run: function() {
       // Set the security delay to 100s
       PopupNotifications.buttonDelay = 100000;
 
       this.notifyObj = new BasicNotification(this.id);
       showNotification(this.notifyObj);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       checkPopup(popup, this.notifyObj);
       triggerMainCommand(popup);
 
       // Wait to see if the main command worked
       executeSoon(function delayedDismissal() {
         dismissNotification(popup);
       });
 
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       ok(!this.notifyObj.mainActionClicked, "mainAction was not clicked because it was too soon");
       ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback was triggered");
     }
   },
   // test security delay - after delay
   { id: "Test#5",
-    run: function () {
+    run: function() {
       // Set the security delay to 10ms
       PopupNotifications.buttonDelay = 10;
 
       this.notifyObj = new BasicNotification(this.id);
       showNotification(this.notifyObj);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       checkPopup(popup, this.notifyObj);
 
       // Wait until after the delay to trigger the main action
       setTimeout(function delayedDismissal() {
         triggerMainCommand(popup);
       }, 500);
 
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       ok(this.notifyObj.mainActionClicked, "mainAction was clicked after the delay");
       ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback was not triggered");
       PopupNotifications.buttonDelay = PREF_SECURITY_DELAY_INITIAL;
     }
   },
   // reload removes notification
   { id: "Test#6",
     run: function* () {
       yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.com/");
       let notifyObj = new BasicNotification(this.id);
-      notifyObj.options.eventCallback = function (eventName) {
+      notifyObj.options.eventCallback = function(eventName) {
         if (eventName == "removed") {
           ok(true, "Notification removed in background tab after reloading");
           goNext();
         }
       };
       showNotification(notifyObj);
-      executeSoon(function () {
+      executeSoon(function() {
         gBrowser.selectedBrowser.reload();
       });
     }
   },
   // location change in background tab removes notification
   { id: "Test#7",
     run: function* () {
       let oldSelectedTab = gBrowser.selectedTab;
@@ -174,27 +174,27 @@ var tests = [
       gBrowser.selectedTab = newTab;
 
       yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.com/");
       gBrowser.selectedTab = oldSelectedTab;
       let browser = gBrowser.getBrowserForTab(newTab);
 
       let notifyObj = new BasicNotification(this.id);
       notifyObj.browser = browser;
-      notifyObj.options.eventCallback = function (eventName) {
+      notifyObj.options.eventCallback = function(eventName) {
         if (eventName == "removed") {
           ok(true, "Notification removed in background tab after reloading");
-          executeSoon(function () {
+          executeSoon(function() {
             gBrowser.removeTab(newTab);
             goNext();
           });
         }
       };
       showNotification(notifyObj);
-      executeSoon(function () {
+      executeSoon(function() {
         browser.reload();
       });
     }
   },
   // Popup notification anchor shouldn't disappear when a notification with the same ID is re-added in a background tab
   { id: "Test#8",
     run: function* () {
       yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.com/");
@@ -231,24 +231,24 @@ var tests = [
       goNext();
     }
   },
   // location change in an embedded frame should not remove a notification
   { id: "Test#9",
     run: function* () {
       yield promiseTabLoadEvent(gBrowser.selectedTab, "data:text/html;charset=utf8,<iframe%20id='iframe'%20src='http://example.com/'>");
       this.notifyObj = new BasicNotification(this.id);
-      this.notifyObj.options.eventCallback = function (eventName) {
+      this.notifyObj.options.eventCallback = function(eventName) {
         if (eventName == "removed") {
           ok(false, "Notification removed from browser when subframe navigated");
         }
       };
       showNotification(this.notifyObj);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       let self = this;
       let progressListener = {
         onLocationChange: function onLocationChange() {
           gBrowser.removeProgressListener(progressListener);
 
 	  executeSoon(() => {
             let notification = PopupNotifications.getNotification(self.notifyObj.id,
                                                                   self.notifyObj.browser);
@@ -260,44 +260,44 @@ var tests = [
         },
       };
 
       info("Adding progress listener and performing navigation");
       gBrowser.addProgressListener(progressListener);
       content.document.getElementById("iframe")
                       .setAttribute("src", "http://example.org/");
     },
-    onHidden: function () {}
+    onHidden: function() {}
   },
   // Popup Notifications should catch exceptions from callbacks
   { id: "Test#10",
-    run: function () {
+    run: function() {
       this.testNotif1 = new BasicNotification(this.id);
       this.testNotif1.message += " 1";
       this.notification1 = showNotification(this.testNotif1);
-      this.testNotif1.options.eventCallback = function (eventName) {
+      this.testNotif1.options.eventCallback = function(eventName) {
         info("notifyObj1.options.eventCallback: " + eventName);
         if (eventName == "dismissed") {
           throw new Error("Oops 1!");
         }
       };
 
       this.testNotif2 = new BasicNotification(this.id);
       this.testNotif2.message += " 2";
       this.testNotif2.id += "-2";
-      this.testNotif2.options.eventCallback = function (eventName) {
+      this.testNotif2.options.eventCallback = function(eventName) {
         info("notifyObj2.options.eventCallback: " + eventName);
         if (eventName == "dismissed") {
           throw new Error("Oops 2!");
         }
       };
       this.notification2 = showNotification(this.testNotif2);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       is(popup.childNodes.length, 2, "two notifications are shown");
       dismissNotification(popup);
     },
-    onHidden: function () {
+    onHidden: function() {
       this.notification1.remove();
       this.notification2.remove();
     }
   }
 ];
--- a/browser/base/content/test/popupNotifications/browser_popupNotification_4.js
+++ b/browser/base/content/test/popupNotifications/browser_popupNotification_4.js
@@ -10,51 +10,51 @@ function test() {
 
   setup();
   goNext();
 }
 
 var tests = [
   // Popup Notifications main actions should catch exceptions from callbacks
   { id: "Test#1",
-    run: function () {
+    run: function() {
       this.testNotif = new ErrorNotification();
       showNotification(this.testNotif);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       checkPopup(popup, this.testNotif);
       triggerMainCommand(popup);
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       ok(this.testNotif.mainActionClicked, "main action has been triggered");
     }
   },
   // Popup Notifications secondary actions should catch exceptions from callbacks
   { id: "Test#2",
-    run: function () {
+    run: function() {
       this.testNotif = new ErrorNotification();
       showNotification(this.testNotif);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       checkPopup(popup, this.testNotif);
       triggerSecondaryCommand(popup, 0);
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       ok(this.testNotif.secondaryActionClicked, "secondary action has been triggered");
     }
   },
   // Existing popup notification shouldn't disappear when adding a dismissed notification
   { id: "Test#3",
-    run: function () {
+    run: function() {
       this.notifyObj1 = new BasicNotification(this.id);
       this.notifyObj1.id += "_1";
       this.notifyObj1.anchorID = "default-notification-icon";
       this.notification1 = showNotification(this.notifyObj1);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       // Now show a dismissed notification, and check that it doesn't clobber
       // the showing one.
       this.notifyObj2 = new BasicNotification(this.id);
       this.notifyObj2.id += "_2";
       this.notifyObj2.anchorID = "geo-notification-icon";
       this.notifyObj2.options.dismissed = true;
       this.notification2 = showNotification(this.notifyObj2);
 
@@ -73,17 +73,17 @@ var tests = [
       this.notification2.remove();
     }
   },
   // Showing should be able to modify the popup data
   { id: "Test#4",
     run: function() {
       this.notifyObj = new BasicNotification(this.id);
       let normalCallback = this.notifyObj.options.eventCallback;
-      this.notifyObj.options.eventCallback = function (eventName) {
+      this.notifyObj.options.eventCallback = function(eventName) {
         if (eventName == "showing") {
           this.mainAction.label = "Alternate Label";
         }
         normalCallback.call(this, eventName);
       };
       showNotification(this.notifyObj);
     },
     onShown: function(popup) {
@@ -118,28 +118,28 @@ var tests = [
   { id: "Test#6",
     run: function* () {
       let originalBrowser = gBrowser.selectedBrowser;
       let originalWindow = window;
 
       gBrowser.selectedTab = gBrowser.addTab("about:blank");
       let notifyObj = new BasicNotification(this.id);
       let originalCallback = notifyObj.options.eventCallback;
-      notifyObj.options.eventCallback = function (eventName) {
+      notifyObj.options.eventCallback = function(eventName) {
         originalCallback(eventName);
         return eventName == "swapping";
       };
 
       let notification = showNotification(notifyObj);
       let win = gBrowser.replaceTabWithWindow(gBrowser.selectedTab);
       yield whenDelayedStartupFinished(win);
 
       yield new Promise(resolve => {
         let originalCallback = notification.options.eventCallback;
-        notification.options.eventCallback = function (eventName) {
+        notification.options.eventCallback = function(eventName) {
           originalCallback(eventName);
           if (eventName == "shown") {
             resolve();
           }
         };
         info("Showing the notification again");
         notification.reshow();
       });
@@ -157,71 +157,71 @@ var tests = [
       yield BrowserTestUtils.waitForCondition(() => fm.activeWindow == originalWindow,
                                               "The window should be active")
 
       goNext();
     }
   },
   // the hideNotNow option
   { id: "Test#7",
-    run: function () {
+    run: function() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.options.hideNotNow = true;
       this.notifyObj.mainAction.dismiss = true;
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       // checkPopup verifies that the Not Now item is hidden, and that no separator is added.
       checkPopup(popup, this.notifyObj);
       triggerMainCommand(popup);
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       this.notification.remove();
     }
   },
   // the main action callback can keep the notification.
   { id: "Test#8",
-    run: function () {
+    run: function() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.mainAction.dismiss = true;
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       checkPopup(popup, this.notifyObj);
       triggerMainCommand(popup);
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback was triggered");
       ok(!this.notifyObj.removedCallbackTriggered, "removed callback wasn't triggered");
       this.notification.remove();
     }
   },
   // a secondary action callback can keep the notification.
   { id: "Test#9",
-    run: function () {
+    run: function() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.secondaryActions[0].dismiss = true;
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       checkPopup(popup, this.notifyObj);
       triggerSecondaryCommand(popup, 0);
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback was triggered");
       ok(!this.notifyObj.removedCallbackTriggered, "removed callback wasn't triggered");
       this.notification.remove();
     }
   },
   // returning true in the showing callback should dismiss the notification.
   { id: "Test#10",
     run: function() {
       let notifyObj = new BasicNotification(this.id);
       let originalCallback = notifyObj.options.eventCallback;
-      notifyObj.options.eventCallback = function (eventName) {
+      notifyObj.options.eventCallback = function(eventName) {
         originalCallback(eventName);
         return eventName == "showing";
       };
 
       let notification = showNotification(notifyObj);
       ok(notifyObj.showingCallbackTriggered, "the showing callback was triggered");
       ok(!notifyObj.shownCallbackTriggered, "the shown callback wasn't triggered");
       notification.remove();
@@ -229,17 +229,17 @@ var tests = [
     }
   },
   // panel updates should fire the showing and shown callbacks again.
   { id: "Test#11",
     run: function() {
       this.notifyObj = new BasicNotification(this.id);
       this.notification = showNotification(this.notifyObj);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       checkPopup(popup, this.notifyObj);
 
       this.notifyObj.showingCallbackTriggered = false;
       this.notifyObj.shownCallbackTriggered = false;
 
       // Force an update of the panel. This is typically called
       // automatically when receiving 'activate' or 'TabSelect' events,
       // but from a setTimeout, which is inconvenient for the test.
@@ -248,33 +248,33 @@ var tests = [
       checkPopup(popup, this.notifyObj);
 
       this.notification.remove();
     },
     onHidden: function() { }
   },
   // A first dismissed notification shouldn't stop _update from showing a second notification
   { id: "Test#12",
-    run: function () {
+    run: function() {
       this.notifyObj1 = new BasicNotification(this.id);
       this.notifyObj1.id += "_1";
       this.notifyObj1.anchorID = "default-notification-icon";
       this.notifyObj1.options.dismissed = true;
       this.notification1 = showNotification(this.notifyObj1);
 
       this.notifyObj2 = new BasicNotification(this.id);
       this.notifyObj2.id += "_2";
       this.notifyObj2.anchorID = "geo-notification-icon";
       this.notifyObj2.options.dismissed = true;
       this.notification2 = showNotification(this.notifyObj2);
 
       this.notification2.dismissed = false;
       PopupNotifications._update();
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       checkPopup(popup, this.notifyObj2);
       this.notification1.remove();
       this.notification2.remove();
     },
     onHidden: function(popup) { }
   },
   // The anchor icon should be shown for notifications in background windows.
   { id: "Test#13",
--- a/browser/base/content/test/popupNotifications/browser_popupNotification_checkbox.js
+++ b/browser/base/content/test/popupNotifications/browser_popupNotification_checkbox.js
@@ -33,54 +33,54 @@ function promiseElementVisible(element) 
                                           "Waiting for element to be visible");
 }
 
 var gNotification;
 
 var tests = [
   // Test that passing the checkbox field shows the checkbox.
   { id: "show_checkbox",
-    run: function () {
+    run: function() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.options.checkbox = {
         label: "This is a checkbox",
       };
       gNotification = showNotification(this.notifyObj);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       checkPopup(popup, this.notifyObj);
       let notification = popup.childNodes[0];
       checkCheckbox(notification.checkbox, "This is a checkbox");
       triggerMainCommand(popup);
     },
-    onHidden: function () { }
+    onHidden: function() { }
   },
 
   // Test checkbox being checked by default
   { id: "checkbox_checked",
-    run: function () {
+    run: function() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.options.checkbox = {
         label: "Check this",
         checked: true,
       };
       gNotification = showNotification(this.notifyObj);
     },
-    onShown: function (popup) {
+    onShown: function(popup) {
       checkPopup(popup, this.notifyObj);
       let notification = popup.childNodes[0];
       checkCheckbox(notification.checkbox, "Check this", true);
       triggerMainCommand(popup);
     },
-    onHidden: function () { }
+    onHidden: function() { }
   },
 
   // Test checkbox passing the checkbox state on mainAction
   { id: "checkbox_passCheckboxChecked_mainAction",
-    run: function () {
+    run: function() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.mainAction.callback = ({checkboxChecked}) => this.mainActionChecked = checkboxChecked;
       this.notifyObj.options.checkbox = {
         label: "This is a checkbox",
       };
       gNotification = showNotification(this.notifyObj);
     },
     onShown: function* (popup) {
@@ -88,24 +88,24 @@ var tests = [
       let notification = popup.childNodes[0];
       let checkbox = notification.checkbox;
       checkCheckbox(checkbox, "This is a checkbox");
       yield promiseElementVisible(checkbox);
       EventUtils.synthesizeMouseAtCenter(checkbox, {});
       checkCheckbox(checkbox, "This is a checkbox", true);
       triggerMainCommand(popup);
     },
-    onHidden: function () {
+    onHidden: function() {
       is(this.mainActionChecked, true, "mainAction callback is passed the correct checkbox value");
     }
   },
 
   // Test checkbox passing the checkbox state on secondaryAction
   { id: "checkbox_passCheckboxChecked_secondaryAction",
-    run: function () {
+    run: function() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.secondaryActions = [{
         label: "Test Secondary",
         accessKey: "T",
         callback: ({checkboxChecked}) => this.secondaryActionChecked = checkboxChecked,
       }];
       this.notifyObj.options.checkbox = {
         label: "This is a checkbox",
@@ -117,24 +117,24 @@ var tests = [
       let notification = popup.childNodes[0];
       let checkbox = notification.checkbox;
       checkCheckbox(checkbox, "This is a checkbox");
       yield promiseElementVisible(checkbox);
       EventUtils.synthesizeMouseAtCenter(checkbox, {});
       checkCheckbox(checkbox, "This is a checkbox", true);
       triggerSecondaryCommand(popup, 0);
     },
-    onHidden: function () {
+    onHidden: function() {
       is(this.secondaryActionChecked, true, "secondaryAction callback is passed the correct checkbox value");
     }
   },
 
   // Test checkbox preserving its state through re-opening the doorhanger
   { id: "checkbox_reopen",
-    run: function () {
+    run: function() {
       this.notifyObj = new BasicNotification(this.id);
       this.notifyObj.options.checkbox = {
         label: "This is a checkbox",
         checkedState: {
           disableMainAction: true,
           warningLabel: "Testing disable",
         },
       };
@@ -144,34 +144,34 @@ var tests = [
       checkPopup(popup, this.notifyObj);
       let notification = popup.childNodes[0];
       let checkbox = notification.checkbox;
       checkCheckbox(checkbox, "This is a checkbox");
       yield promiseElementVisible(checkbox);
       EventUtils.synthesizeMouseAtCenter(checkbox, {});
       dismissNotification(popup);
     },
-    onHidden: function (popup) {
+    onHidden: function(popup) {
       let icon = document.getElementById("default-notification-icon");
       EventUtils.synthesizeMouseAtCenter(icon, {});
       let notification = popup.childNodes[0];
       let checkbox = notification.checkbox;
       checkCheckbox(checkbox, "This is a checkbox", true);
       checkMainAction(notification, true);
       gNotification.remove();
     }
   },
 ];
 
 // Test checkbox disabling the main action in different combinations
-["checkedState", "uncheckedState"].forEach(function (state) {
-  [true, false].forEach(function (checked) {
+["checkedState", "uncheckedState"].forEach(function(state) {
+  [true, false].forEach(function(checked) {
     tests.push(
       { id: `checkbox_disableMainAction_${state}_${checked ? 'checked' : 'unchecked'}`,
-        run: function () {
+        run: function() {
           this.notifyObj = new BasicNotification(this.id);
           this.notifyObj.options.checkbox = {
             label: "This is a checkbox",
             checked: checked,
             [state]: {
               disableMainAction: true,
               warningLabel: "Testing disable",
             },
@@ -196,14 +196,14 @@ var tests = [
           checkMainAction(notification, disabled);
 
           // Unblock the main command if it's currently disabled.
           if (disabled) {
             EventUtils.synthesizeMouseAtCenter(checkbox, {});
           }
           triggerMainCommand(popup);
         },
-        onHidden: function () { }
+        onHidden: function() { }
       }
     );
   });
 });
 
--- a/browser/base/content/test/popupNotifications/head.js
+++ b/browser/base/content/test/popupNotifications/head.js
@@ -86,26 +86,26 @@ function* runNextTest() {
   if (tests.length == 0) {
     executeSoon(finish);
     return;
   }
 
   let nextTest = tests.shift();
   if (nextTest.onShown) {
     let shownState = false;
-    onPopupEvent("popupshowing", function () {
+    onPopupEvent("popupshowing", function() {
       info("[" + nextTest.id + "] popup showing");
     });
-    onPopupEvent("popupshown", function () {
+    onPopupEvent("popupshown", function() {
       shownState = true;
       info("[" + nextTest.id + "] popup shown");
       Task.spawn(() => nextTest.onShown(this))
           .then(undefined, ex => Assert.ok(false, "onShown failed: " + ex));
     });
-    onPopupEvent("popuphidden", function () {
+    onPopupEvent("popuphidden", function() {
       info("[" + nextTest.id + "] popup hidden");
       nextTest.onHidden(this);
       goNext();
     }, () => shownState);
     info("[" + nextTest.id + "] added listeners; panel is open: " + PopupNotifications.isPanelOpen);
   }
 
   info("[" + nextTest.id + "] running test");
@@ -222,17 +222,17 @@ function checkPopup(popup, notifyObj) {
     if (secondaryActions.length)
       is(notification.lastChild.tagName, "menuitem", "no menuseparator");
   }
   else if (secondaryActions.length) {
     is(notification.lastChild.tagName, "menuseparator", "menuseparator exists");
   }
   is(actualSecondaryActionsCount, secondaryActions.length,
     actualSecondaryActions.length + " secondary actions");
-  secondaryActions.forEach(function (a, i) {
+  secondaryActions.forEach(function(a, i) {
     is(actualSecondaryActions[i].getAttribute("label"), a.label,
        "label for secondary action " + i + " matches");
     is(actualSecondaryActions[i].getAttribute("accesskey"), a.accessKey,
        "accessKey for secondary action " + i + " matches");
   });
 }
 
 XPCOMUtils.defineLazyGetter(this, "gActiveListeners", () => {
--- a/browser/base/content/test/social/browser_aboutHome_activation.js
+++ b/browser/base/content/test/social/browser_aboutHome_activation.js
@@ -69,17 +69,17 @@ var gTests = [
 ];
 
 function test()
 {
   waitForExplicitFinish();
   requestLongerTimeout(2);
   ignoreAllUncaughtExceptions();
   PopupNotifications.panel.setAttribute("animate", "false");
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     PopupNotifications.panel.removeAttribute("animate");
   });
 
   Task.spawn(function* () {
     for (let test of gTests) {
       info(test.desc);
 
       // Create a tab to run the test.
@@ -97,17 +97,17 @@ function test()
       yield ContentTask.spawn(tab.linkedBrowser, {}, function*(arg) {
         ok(!!content.document.getElementById("snippets"), "Found snippets element");
         ok(!!content.document.getElementById("activationSnippet"), "The snippet is present.");
       });
 
       yield new Promise(resolve => {
         activateProvider(tab, test.panel).then(() => {
           checkSocialUI();
-          SocialService.uninstallProvider("https://example.com", function () {
+          SocialService.uninstallProvider("https://example.com", function() {
             info("provider uninstalled");
             resolve();
           });
         });
       });
 
       // activation opened a post-activation info tab, close it.
       yield BrowserTestUtils.removeTab(gBrowser.selectedTab);
@@ -169,17 +169,17 @@ function promiseSetupSnippetsMap(aTab, a
     return new Promise(resolve => {
       addEventListener("AboutHomeLoadSnippets", function load(event) {
         removeEventListener("AboutHomeLoadSnippets", load, true);
 
         let cw = content.window.wrappedJSObject;
 
         // The snippets should already be ready by this point. Here we're
         // just obtaining a reference to the snippets map.
-        cw.ensureSnippetsMapThen(function (aSnippetsMap) {
+        cw.ensureSnippetsMapThen(function(aSnippetsMap) {
           aSnippetsMap = Cu.waiveXrays(aSnippetsMap);
           console.log("Got snippets map: " +
                "{ last-update: " + aSnippetsMap.get("snippets-last-update") +
                ", cached-version: " + aSnippetsMap.get("snippets-cached-version") +
                " }");
           // Don't try to update.
           aSnippetsMap.set("snippets-last-update", Date.now());
           aSnippetsMap.set("snippets-cached-version", arg.snippetsVersion);
--- a/browser/base/content/test/social/browser_addons.js
+++ b/browser/base/content/test/social/browser_addons.js
@@ -20,27 +20,27 @@ var manifestUpgrade = { // used for test
   shareURL: "https://test2.example.com/browser/browser/base/content/test/social/social_share.html",
   iconURL: "https://test2.example.com/browser/browser/base/content/test/general/moz.png",
   version: "1.0"
 };
 
 function test() {
   waitForExplicitFinish();
   PopupNotifications.panel.setAttribute("animate", "false");
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     PopupNotifications.panel.removeAttribute("animate");
   });
 
   let prefname = getManifestPrefname(manifest);
   // ensure that manifest2 is NOT showing as builtin
   is(SocialService.getOriginActivationType(manifest.origin), "foreign", "manifest is foreign");
   is(SocialService.getOriginActivationType(manifest2.origin), "foreign", "manifest2 is foreign");
 
   Services.prefs.setBoolPref("social.remote-install.enabled", true);
-  runSocialTests(tests, undefined, undefined, function () {
+  runSocialTests(tests, undefined, undefined, function() {
     Services.prefs.clearUserPref("social.remote-install.enabled");
     ok(!Services.prefs.prefHasUserValue(prefname), "manifest is not in user-prefs");
     // just in case the tests failed, clear these here as well
     Services.prefs.clearUserPref("social.directories");
     finish();
   });
 }
 
--- a/browser/base/content/test/social/browser_blocklist.js
+++ b/browser/base/content/test/social/browser_blocklist.js
@@ -51,21 +51,21 @@ function resetBlocklist() {
     });
   });
 }
 
 function test() {
   waitForExplicitFinish();
   // turn on logging for nsBlocklistService.js
   Services.prefs.setBoolPref("extensions.logging.enabled", true);
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     Services.prefs.clearUserPref("extensions.logging.enabled");
   });
 
-  runSocialTests(tests, undefined, undefined, function () {
+  runSocialTests(tests, undefined, undefined, function() {
     resetBlocklist().then(finish); // restore to original pref
   });
 }
 
 var tests = {
   testSimpleBlocklist: function(next) {
     // this really just tests adding and clearing our blocklist for later tests
     setAndUpdateBlocklist(blocklistURL).then(() => {
--- a/browser/base/content/test/social/browser_share.js
+++ b/browser/base/content/test/social/browser_share.js
@@ -21,17 +21,17 @@ function sendActivationEvent(subframe) {
   EventUtils.synthesizeMouseAtCenter(button, {}, doc.defaultView);
 }
 
 function test() {
   waitForExplicitFinish();
   Services.prefs.setCharPref("social.shareDirectory", activationPage);
 
   let frameScript = "data:,(" + function frame_script() {
-    addEventListener("OpenGraphData", function (aEvent) {
+    addEventListener("OpenGraphData", function(aEvent) {
       sendAsyncMessage("sharedata", aEvent.detail);
     }, true, true);
     /* bug 1042991, ensure history is available by calling history.back on close */
     addMessageListener("closeself", function(e) {
       content.history.back();
       content.close();
     }, true);
     /* if text is entered into field, onbeforeunload will cause a modal dialog
@@ -40,17 +40,17 @@ function test() {
       return 'FAIL.';
     };
   }.toString() + ")();";
   let mm = getGroupMessageManager("social");
   mm.loadFrameScript(frameScript, true);
 
   // Animation on the panel can cause intermittent failures such as bug 1115131.
   SocialShare.panel.setAttribute("animate", "false");
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     SocialShare.panel.removeAttribute("animate");
     mm.removeDelayedFrameScript(frameScript);
     Services.prefs.clearUserPref("social.directories");
     Services.prefs.clearUserPref("social.shareDirectory");
     Services.prefs.clearUserPref("social.share.activationPanelEnabled");
   });
   runSocialTests(tests, undefined, function(next) {
     let shareButton = SocialShare.shareButton;
--- a/browser/base/content/test/social/browser_social_activation.js
+++ b/browser/base/content/test/social/browser_social_activation.js
@@ -159,17 +159,17 @@ var gProviders = [
     shareURL: "https://test2.example.com/browser/browser/base/content/test/social/social_share.html?provider2",
     iconURL: "chrome://branding/content/about-logo.png"
   }
 ];
 
 
 function test() {
   PopupNotifications.panel.setAttribute("animate", "false");
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     PopupNotifications.panel.removeAttribute("animate");
   });
   waitForExplicitFinish();
   SpecialPowers.pushPrefEnv({"set": [["dom.ipc.processCount", 1]]}, () => {
     runSocialTests(tests, undefined, postTestCleanup);
   });
 }
 
--- a/browser/base/content/test/social/head.js
+++ b/browser/base/content/test/social/head.js
@@ -80,23 +80,23 @@ function runSocialTestWithProvider(manif
 
   let finishCount = 0;
   function finishIfDone(callFinish) {
     finishCount++;
     if (finishCount == manifests.length)
       Task.spawn(finishCleanUp).then(finishcallback || defaultFinishChecks);
   }
   function removeAddedProviders(cleanup) {
-    manifests.forEach(function (m) {
+    manifests.forEach(function(m) {
       // If we're "cleaning up", don't call finish when done.
-      let callback = cleanup ? function () {} : finishIfDone;
+      let callback = cleanup ? function() {} : finishIfDone;
       // Similarly, if we're cleaning up, catch exceptions from removeProvider
       let removeProvider = SocialService.disableProvider.bind(SocialService);
       if (cleanup) {
-        removeProvider = function (origin, cb) {
+        removeProvider = function(origin, cb) {
           try {
             SocialService.disableProvider(origin, cb);
           } catch (ex) {
             // Ignore "provider doesn't exist" errors.
             if (ex.message.indexOf("SocialService.disableProvider: no provider with origin") == 0)
               return;
             info("Failed to clean up provider " + origin + ": " + ex);
           }
@@ -106,31 +106,31 @@ function runSocialTestWithProvider(manif
     });
   }
   function finishSocialTest(cleanup) {
     removeAddedProviders(cleanup);
   }
 
   let providersAdded = 0;
 
-  manifests.forEach(function (m) {
+  manifests.forEach(function(m) {
     SocialService.addProvider(m, function(provider) {
 
       providersAdded++;
       info("runSocialTestWithProvider: provider added");
 
       // we want to set the first specified provider as the UI's provider
       if (provider.origin == manifests[0].origin) {
         firstProvider = provider;
       }
 
       // If we've added all the providers we need, call the callback to start
       // the tests (and give it a callback it can call to finish them)
       if (providersAdded == manifests.length) {
-        registerCleanupFunction(function () {
+        registerCleanupFunction(function() {
           finishSocialTest(true);
         });
         BrowserTestUtils.waitForCondition(() => provider.enabled,
                                           "providers added and enabled").then(() => {
           info("provider has been enabled");
           callback(finishSocialTest);
         });
       }
--- a/browser/base/content/test/urlbar/browser_URLBarSetURI.js
+++ b/browser/base/content/test/urlbar/browser_URLBarSetURI.js
@@ -2,62 +2,62 @@
  * 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 test() {
   waitForExplicitFinish();
 
   // avoid prompting about phishing
   Services.prefs.setIntPref(phishyUserPassPref, 32);
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     Services.prefs.clearUserPref(phishyUserPassPref);
   });
 
   nextTest();
 }
 
 const phishyUserPassPref = "network.http.phishy-userpass-length";
 
 function nextTest() {
   let test = tests.shift();
   if (test) {
-    test(function () {
+    test(function() {
       executeSoon(nextTest);
     });
   } else {
     executeSoon(finish);
   }
 }
 
 var tests = [
   function revert(next) {
-    loadTabInWindow(window, function (tab) {
+    loadTabInWindow(window, function(tab) {
       gURLBar.handleRevert();
       is(gURLBar.textValue, "example.com", "URL bar had user/pass stripped after reverting");
       gBrowser.removeTab(tab);
       next();
     });
   },
   function customize(next) {
     // Need to wait for delayedStartup for the customization part of the test,
     // since that's where BrowserToolboxCustomizeDone is set.
     BrowserTestUtils.openNewBrowserWindow().then(function(win) {
-      loadTabInWindow(win, function () {
-        openToolbarCustomizationUI(function () {
-          closeToolbarCustomizationUI(function () {
+      loadTabInWindow(win, function() {
+        openToolbarCustomizationUI(function() {
+          closeToolbarCustomizationUI(function() {
             is(win.gURLBar.textValue, "example.com", "URL bar had user/pass stripped after customize");
             win.close();
             next();
           }, win);
         }, win);
       });
     });
   },
   function pageloaderror(next) {
-    loadTabInWindow(window, function (tab) {
+    loadTabInWindow(window, function(tab) {
       // Load a new URL and then immediately stop it, to simulate a page load
       // error.
       tab.linkedBrowser.loadURI("http://test1.example.com");
       tab.linkedBrowser.stop();
       is(gURLBar.textValue, "example.com", "URL bar had user/pass stripped after load error");
       gBrowser.removeTab(tab);
       next();
     });
--- a/browser/base/content/test/urlbar/browser_autocomplete_a11y_label.js
+++ b/browser/base/content/test/urlbar/browser_autocomplete_a11y_label.js
@@ -21,17 +21,17 @@ add_task(function* switchToTab() {
 });
 
 add_task(function* searchSuggestions() {
   let engine = yield promiseNewSearchEngine(TEST_ENGINE_BASENAME);
   let oldCurrentEngine = Services.search.currentEngine;
   Services.search.currentEngine = engine;
   Services.prefs.setBoolPref(SUGGEST_ALL_PREF, true);
   Services.prefs.setBoolPref(SUGGEST_URLBAR_PREF, true);
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     Services.search.currentEngine = oldCurrentEngine;
     Services.prefs.clearUserPref(SUGGEST_ALL_PREF);
     Services.prefs.clearUserPref(SUGGEST_URLBAR_PREF);
   });
 
   yield promiseAutocompleteResultPopup("foo");
   // Don't assume that the search doesn't match history or bookmarks left around
   // by earlier tests.
--- a/browser/base/content/test/urlbar/browser_autocomplete_enter_race.js
+++ b/browser/base/content/test/urlbar/browser_autocomplete_enter_race.js
@@ -1,11 +1,11 @@
 // The order of these tests matters!
 
-add_task(function* setup () {
+add_task(function* setup() {
   let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser);
   let bm = yield PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid,
                                                 url: "http://example.com/?q=%s",
                                                 title: "test" });
   registerCleanupFunction(function* () {
     yield PlacesUtils.bookmarks.remove(bm);
     yield BrowserTestUtils.removeTab(tab);
   });
--- a/browser/base/content/test/urlbar/browser_bug1003461-switchtab-override.js
+++ b/browser/base/content/test/urlbar/browser_bug1003461-switchtab-override.js
@@ -18,17 +18,17 @@ add_task(function* test_switchtab_overri
   });
 
   info("Wait for autocomplete")
   let deferred = Promise.defer();
   let onSearchComplete = gURLBar.onSearchComplete;
   registerCleanupFunction(() => {
     gURLBar.onSearchComplete = onSearchComplete;
   });
-  gURLBar.onSearchComplete = function () {
+  gURLBar.onSearchComplete = function() {
     ok(gURLBar.popupOpen, "The autocomplete popup is correctly open");
     onSearchComplete.apply(gURLBar);
     deferred.resolve();
   }
 
   gURLBar.focus();
   gURLBar.value = "dummy_pag";
   EventUtils.synthesizeKey("e", {});
--- a/browser/base/content/test/urlbar/browser_bug304198.js
+++ b/browser/base/content/test/urlbar/browser_bug304198.js
@@ -39,17 +39,17 @@ add_task(function* () {
 
     yield BrowserTestUtils.switchTab(gBrowser, fullURLTab);
     is(gURLBar.textValue, testURL, 'gURLBar.textValue should be testURL after switching back to fullURLTab');
   }
 
   function urlbarBackspace() {
     return new Promise((resolve, reject) => {
       gBrowser.selectedBrowser.focus();
-      gURLBar.addEventListener("input", function () {
+      gURLBar.addEventListener("input", function() {
         gURLBar.removeEventListener("input", arguments.callee, false);
         resolve();
       }, false);
       gURLBar.focus();
       EventUtils.synthesizeKey("VK_BACK_SPACE", {});
     });
   }
 
--- a/browser/base/content/test/urlbar/browser_tabMatchesInAwesomebar.js
+++ b/browser/base/content/test/urlbar/browser_tabMatchesInAwesomebar.js
@@ -171,17 +171,17 @@ function checkAutocompleteResults(aExpec
     searchParam: "enable-actions",
     popupOpen: false,
     minResultsForPopup: 0,
     invalidate: function() {},
     disableAutoComplete: false,
     completeDefaultIndex: false,
     get popup() { return this; },
     onSearchBegin: function() {},
-    onSearchComplete:  function ()
+    onSearchComplete:  function()
     {
       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;
         }
--- a/browser/base/content/test/urlbar/browser_urlHighlight.js
+++ b/browser/base/content/test/urlbar/browser_urlHighlight.js
@@ -18,17 +18,17 @@ function testVal(aExpected) {
   result += value;
   is(result, aExpected,
      "Correct part of the urlbar contents is highlighted");
 }
 
 function test() {
   const prefname = "browser.urlbar.formatting.enabled";
 
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     Services.prefs.clearUserPref(prefname);
     URLBarSetURI();
   });
 
   Services.prefs.setBoolPref(prefname, true);
 
   gURLBar.focus();
 
@@ -103,17 +103,17 @@ function test() {
              "[0000:0123:4567:89AB:CDEF:abcd:ef00:0000]",
              "[::192.168.1.1]",
              "[1::0.0.0.0]",
              "[1:2::255.255.255.255]",
              "[1:2:3::255.255.255.255]",
              "[1:2:3:4::255.255.255.255]",
              "[1:2:3:4:5::255.255.255.255]",
              "[1:2:3:4:5:6:255.255.255.255]"];
-  IPs.forEach(function (IP) {
+  IPs.forEach(function(IP) {
     testVal(IP);
     testVal(IP + "</file.ext>");
     testVal(IP + "<:666/file.ext>");
     testVal("<https://>" + IP);
     testVal("<https://>" + IP + "</file.ext>");
     testVal("<https://user:pass@>" + IP + "<:666/file.ext>");
     testVal("<user:pass@>" + IP + "<:666/file.ext>");
   });
--- a/browser/base/content/test/urlbar/browser_urlbarCopying.js
+++ b/browser/base/content/test/urlbar/browser_urlbarCopying.js
@@ -3,17 +3,17 @@
 
 const trimPref = "browser.urlbar.trimURLs";
 const phishyUserPassPref = "network.http.phishy-userpass-length";
 
 function test() {
 
   let tab = gBrowser.selectedTab = gBrowser.addTab();
 
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     gBrowser.removeTab(tab);
     Services.prefs.clearUserPref(trimPref);
     Services.prefs.clearUserPref(phishyUserPassPref);
     URLBarSetURI();
   });
 
   Services.prefs.setBoolPref(trimPref, true);
   Services.prefs.setIntPref(phishyUserPassPref, 32); // avoid prompting about phishing
@@ -168,17 +168,17 @@ function runTest(test, cb) {
     if (test.setURL)
       gURLBar.value = test.setURL;
     doCheck();
   }
 }
 
 function testCopy(copyVal, targetValue, cb) {
   info("Expecting copy of: " + targetValue);
-  waitForClipboard(targetValue, function () {
+  waitForClipboard(targetValue, function() {
     gURLBar.focus();
     if (copyVal) {
       let startBracket = copyVal.indexOf("<");
       let endBracket = copyVal.indexOf(">");
       if (startBracket == -1 || endBracket == -1 ||
           startBracket > endBracket ||
           copyVal.replace("<", "").replace(">", "") != gURLBar.textValue) {
         ok(false, "invalid copyVal: " + copyVal);
--- a/browser/base/content/test/urlbar/browser_urlbarTrimURLs.js
+++ b/browser/base/content/test/urlbar/browser_urlbarTrimURLs.js
@@ -8,17 +8,17 @@ function testVal(originalValue, targetVa
   is(gURLBar.textValue, targetValue || originalValue, "url bar value set");
 }
 
 function test() {
   const prefname = "browser.urlbar.trimURLs";
 
   gBrowser.selectedTab = gBrowser.addTab();
 
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     gBrowser.removeCurrentTab();
     Services.prefs.clearUserPref(prefname);
     URLBarSetURI();
   });
 
   Services.prefs.setBoolPref(prefname, true);
 
   testVal("http://mozilla.org/", "mozilla.org");
@@ -74,32 +74,32 @@ function test() {
   Services.prefs.setBoolPref(prefname, false);
 
   testVal("http://mozilla.org/");
 
   Services.prefs.setBoolPref(prefname, true);
 
   waitForExplicitFinish();
 
-  gBrowser.selectedBrowser.addEventListener("load", function () {
+  gBrowser.selectedBrowser.addEventListener("load", function() {
     gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
 
     is(gBrowser.currentURI.spec, "http://example.com/", "expected page should have loaded");
 
-    testCopy("example.com", "http://example.com/", function () {
+    testCopy("example.com", "http://example.com/", function() {
       SetPageProxyState("invalid");
       gURLBar.valueIsTyped = true;
       testCopy("example.com", "example.com", finish);
     });
   }, true);
 
   gBrowser.loadURI("http://example.com/");
 }
 
 function testCopy(originalValue, targetValue, cb) {
-  waitForClipboard(targetValue, function () {
+  waitForClipboard(targetValue, function() {
     is(gURLBar.textValue, originalValue, "url bar copy value set");
 
     gURLBar.focus();
     gURLBar.select();
     goDoCommand("cmd_copy");
   }, cb, cb);
 }
--- a/browser/base/content/test/urlbar/browser_wyciwyg_urlbarCopying.js
+++ b/browser/base/content/test/urlbar/browser_wyciwyg_urlbarCopying.js
@@ -1,15 +1,15 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 function testURLBarCopy(targetValue) {
   return new Promise((resolve, reject) => {
     info("Expecting copy of: " + targetValue);
-    waitForClipboard(targetValue, function () {
+    waitForClipboard(targetValue, function() {
       gURLBar.focus();
       gURLBar.select();
 
       goDoCommand("cmd_copy");
     }, resolve, () => {
       ok(false, "Clipboard copy failed");
       reject();
     });
--- a/browser/base/content/test/urlbar/head.js
+++ b/browser/base/content/test/urlbar/head.js
@@ -41,17 +41,17 @@ function waitForDocLoadAndStopIt(aExpect
         /* Let the parent know we're done. */
         sendAsyncMessage("Test:WaitForDocLoadAndStopIt", { uri });
       } else {
         setTimeout(stopContent.bind(null, true, uri), 0);
       }
     }
 
     let progressListener = {
-      onStateChange: function (webProgress, req, flags, status) {
+      onStateChange: function(webProgress, req, flags, status) {
         dump("waitForDocLoadAndStopIt: onStateChange " + flags.toString(16) + ": " + req.name + "\n");
 
         if (webProgress.isTopLevel &&
             flags & Ci.nsIWebProgressListener.STATE_START) {
           wp.removeProgressListener(progressListener);
 
           let chan = req.QueryInterface(Ci.nsIChannel);
           dump(`waitForDocLoadAndStopIt: Document start: ${chan.URI.spec}\n`);
@@ -63,17 +63,17 @@ function waitForDocLoadAndStopIt(aExpect
     };
     wp.addProgressListener(progressListener, wp.NOTIFY_STATE_WINDOW);
 
     /**
      * As |this| is undefined and we can't extend |docShell|, adding an unload
      * event handler is the easiest way to ensure the weakly referenced
      * progress listener is kept alive as long as necessary.
      */
-    addEventListener("unload", function () {
+    addEventListener("unload", function() {
       try {
         wp.removeProgressListener(progressListener);
       } catch (e) { /* Will most likely fail. */ }
     });
   }
 
   return new Promise((resolve, reject) => {
     function complete({ data }) {
@@ -185,21 +185,21 @@ function promiseAutocompleteResultPopup(
   return promiseSearchComplete(win);
 }
 
 function promiseNewSearchEngine(basename) {
   return new Promise((resolve, reject) => {
     info("Waiting for engine to be added: " + basename);
     let url = getRootDirectory(gTestPath) + basename;
     Services.search.addEngine(url, null, "", false, {
-      onSuccess: function (engine) {
+      onSuccess: function(engine) {
         info("Search engine added: " + basename);
         registerCleanupFunction(() => Services.search.removeEngine(engine));
         resolve(engine);
       },
-      onError: function (errCode) {
+      onError: function(errCode) {
         Assert.ok(false, "addEngine failed with error code " + errCode);
         reject();
       },
     });
   });
 }
 
--- a/browser/base/content/test/webrtc/head.js
+++ b/browser/base/content/test/webrtc/head.js
@@ -302,17 +302,17 @@ function promiseNoPopupNotification(aNam
 const kActionAlways = 1;
 const kActionDeny = 2;
 const kActionNever = 3;
 
 function activateSecondaryAction(aAction) {
   let notification = PopupNotifications.panel.firstChild;
   notification.button.focus();
   let popup = notification.menupopup;
-  popup.addEventListener("popupshown", function () {
+  popup.addEventListener("popupshown", function() {
     popup.removeEventListener("popupshown", arguments.callee, false);
 
     // Press 'down' as many time as needed to select the requested action.
     while (aAction--)
       EventUtils.synthesizeKey("VK_DOWN", {});
 
     // Activate
     EventUtils.synthesizeKey("VK_RETURN", {});
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -2645,17 +2645,17 @@ file, You can obtain one at http://mozil
           this.setAttribute("active", "true");
 
           let event = document.createEvent("Events");
           event.initEvent("DOMMenuItemActive", true, false);
           this.dispatchEvent(event);
 
           if (this.getAttribute("disabled") != "true") {
             let self = this;
-            setTimeout(function () {
+            setTimeout(function() {
               if (self.getAttribute("active") == "true")
                 self.menu.open = true;
             }, this._menuDelay);
           }
         }
       ]]></handler>
 
       <handler event="popupshowing"><![CDATA[
--- a/browser/base/content/utilityOverlay.js
+++ b/browser/base/content/utilityOverlay.js
@@ -560,17 +560,17 @@ function eventMatchesKey(aEvent, aKey)
       }
     });
     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.
--- a/browser/base/content/web-panels.js
+++ b/browser/base/content/web-panels.js
@@ -8,19 +8,19 @@ const NS_NET_STATUS_READ_FROM = NS_ERROR
 const NS_NET_STATUS_WROTE_TO  = NS_ERROR_MODULE_NETWORK + 9;
 
 function getPanelBrowser()
 {
     return document.getElementById("web-panels-browser");
 }
 
 var panelProgressListener = {
-    onProgressChange : function (aWebProgress, aRequest,
-                                 aCurSelfProgress, aMaxSelfProgress,
-                                 aCurTotalProgress, aMaxTotalProgress) {
+    onProgressChange : function(aWebProgress, aRequest,
+                                aCurSelfProgress, aMaxSelfProgress,
+                                aCurTotalProgress, aMaxTotalProgress) {
     },
 
     onStateChange : function(aWebProgress, aRequest, aStateFlags, aStatus)
     {
         if (!aRequest)
           return;
 
         // ignore local/resource:/chrome: files
--- a/browser/components/contextualidentity/test/browser/browser_broadcastchannel.js
+++ b/browser/components/contextualidentity/test/browser/browser_broadcastchannel.js
@@ -30,20 +30,20 @@ add_task(function* setup() {
 
 add_task(function* test() {
   let receiver = yield* openTabInUserContext(URI, 2);
 
   let channelName = "contextualidentity-broadcastchannel";
 
   // reflect the received message on title
   yield ContentTask.spawn(receiver.browser, channelName,
-    function (name) {
+    function(name) {
       content.window.testPromise = new content.window.Promise(resolve => {
         content.window.bc = new content.window.BroadcastChannel(name);
-        content.window.bc.onmessage = function (e) {
+        content.window.bc.onmessage = function(e) {
           content.document.title += e.data;
           resolve();
         }
       });
     }
   );
 
   let sender1 = yield* openTabInUserContext(URI, 1);
@@ -52,17 +52,17 @@ add_task(function* test() {
   sender2.message = "Message from user context #2";
 
   // send a message from a tab in different user context first
   // then send a message from a tab in the same user context
   for (let sender of [sender1, sender2]) {
     yield ContentTask.spawn(
         sender.browser,
         { name: channelName, message: sender.message },
-        function (opts) {
+        function(opts) {
           let bc = new content.window.BroadcastChannel(opts.name);
           bc.postMessage(opts.message);
         });
   }
 
   // Since sender1 sends before sender2, if the title is exactly
   // sender2's message, sender1's message must've been blocked
   yield ContentTask.spawn(receiver.browser, sender2.message,
--- a/browser/components/contextualidentity/test/browser/browser_favicon.js
+++ b/browser/components/contextualidentity/test/browser/browser_favicon.js
@@ -113,17 +113,17 @@ add_task(function* test() {
 
     // Load the page in 3 different contexts and set a cookie
     // which should only be visible in that context.
 
     // Open our tab in the given user context.
     let tabInfo = yield* openTabInUserContext(testURL, userContextId);
 
     // Write a cookie according to the userContext.
-    yield ContentTask.spawn(tabInfo.browser, { userContext: USER_CONTEXTS[userContextId] }, function (arg) {
+    yield ContentTask.spawn(tabInfo.browser, { userContext: USER_CONTEXTS[userContextId] }, function(arg) {
       content.document.cookie = "userContext=" + arg.userContext;
     });
 
     let pageURI = NetUtil.newURI(testURL);
     let favIconURI = NetUtil.newURI(testFaviconURL);
 
     yield new Promise(resolve => {
       PlacesUtils.favicons.setAndFetchFaviconForPage(pageURI, favIconURI,
--- a/browser/components/contextualidentity/test/browser/browser_forgetaboutsite.js
+++ b/browser/components/contextualidentity/test/browser/browser_forgetaboutsite.js
@@ -93,32 +93,32 @@ function getCacheStorage(where, lci, app
 function OpenCacheEntry(key, where, flags, lci)
 {
   return new Promise(resolve => {
     key = createURI(key);
     function CacheListener() { }
     CacheListener.prototype = {
       _appCache: null,
 
-      QueryInterface: function (iid) {
+      QueryInterface: function(iid) {
         if (iid.equals(Components.interfaces.nsICacheEntryOpenCallback) ||
             iid.equals(Components.interfaces.nsISupports))
           return this;
         throw Components.results.NS_ERROR_NO_INTERFACE;
       },
 
       onCacheEntryCheck: function(entry, appCache) {
         return Ci.nsICacheEntryOpenCallback.ENTRY_WANTED;
       },
 
-      onCacheEntryAvailable: function (entry, isnew, appCache, status) {
+      onCacheEntryAvailable: function(entry, isnew, appCache, status) {
         resolve();
       },
 
-      run: function () {
+      run: function() {
         let storage = getCacheStorage(where, lci, this._appCache);
         storage.asyncOpenURI(key, "", flags, this);
       }
     };
 
     (new CacheListener()).run();
   });
 }
--- a/browser/components/customizableui/CustomizableUI.jsm
+++ b/browser/components/customizableui/CustomizableUI.jsm
@@ -4398,17 +4398,17 @@ OverflowableToolbar.prototype = {
     if (aNode.getAttribute("overflowedItem") == "true") {
       return this._list;
     }
     return this._target;
   },
 
   _hideTimeoutId: null,
   _showWithTimeout: function() {
-    this.show().then(function () {
+    this.show().then(function() {
       let window = this._toolbar.ownerGlobal;
       if (this._hideTimeoutId) {
         window.clearTimeout(this._hideTimeoutId);
       }
       this._hideTimeoutId = window.setTimeout(() => {
         if (!this._panel.firstChild.matches(":hover")) {
           this._panel.hidePopup();
         }
--- a/browser/components/customizableui/CustomizableWidgets.jsm
+++ b/browser/components/customizableui/CustomizableWidgets.jsm
@@ -199,18 +199,18 @@ const CustomizableWidgets = [
 
       // Get all statically placed buttons to supply them with keyboard shortcuts.
       let staticButtons = items.parentNode.getElementsByTagNameNS(kNSXUL, "toolbarbutton");
       for (let i = 0, l = staticButtons.length; i < l; ++i)
         CustomizableUI.addShortcut(staticButtons[i]);
 
       PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
                          .asyncExecuteLegacyQueries([query], 1, options, {
-        handleResult: function (aResultSet) {
-          let onItemCommand = function (aEvent) {
+        handleResult: function(aResultSet) {
+          let onItemCommand = function(aEvent) {
             // Only handle the click event for middle clicks, we're using the command
             // event otherwise.
             if (aEvent.type == "click" && aEvent.button != 1) {
               return;
             }
             let item = aEvent.target;
             win.openUILink(item.getAttribute("targetURI"), aEvent);
             CustomizableUI.hidePanelForNode(item);
@@ -231,20 +231,20 @@ const CustomizableWidgets = [
             if (icon) {
               let iconURL = "moz-anno:favicon:" + icon;
               item.setAttribute("image", iconURL);
             }
             fragment.appendChild(item);
           }
           items.appendChild(fragment);
         },
-        handleError: function (aError) {
+        handleError: function(aError) {
           log.debug("History view tried to show but had an error: " + aError);
         },
-        handleCompletion: function (aReason) {
+        handleCompletion: function(aReason) {
           log.debug("History view is being shown!");
         },
       });
 
       let recentlyClosedTabs = doc.getElementById("PanelUI-recentlyClosedTabs");
       while (recentlyClosedTabs.firstChild) {
         recentlyClosedTabs.removeChild(recentlyClosedTabs.firstChild);
       }
@@ -436,17 +436,17 @@ const CustomizableWidgets = [
         this._tabsList.appendChild(fragment);
       }).catch(err => {
         Cu.reportError(err);
       }).then(() => {
         // an observer for tests.
         Services.obs.notifyObservers(null, "synced-tabs-menu:test:tabs-updated", null);
       });
     },
-    _clearTabList () {
+    _clearTabList() {
       let list = this._tabsList;
       while (list.lastChild) {
         list.lastChild.remove();
       }
     },
     _showNoClientMessage() {
       this._appendMessageLabel("notabslabel");
     },
@@ -456,17 +456,17 @@ const CustomizableWidgets = [
       }
       let message = this._tabsList.getAttribute(messageAttr);
       let doc = this._tabsList.ownerDocument;
       let messageLabel = doc.createElementNS(kNSXUL, "label");
       messageLabel.textContent = message;
       appendTo.appendChild(messageLabel);
       return messageLabel;
     },
-    _appendClient: function (client, attachFragment) {
+    _appendClient: function(client, attachFragment) {
       let doc = attachFragment.ownerDocument;
       // Create the element for the remote client.
       let clientItem = doc.createElementNS(kNSXUL, "label");
       clientItem.setAttribute("itemtype", "client");
       let window = doc.defaultView;
       clientItem.setAttribute("tooltiptext",
         window.gSyncUI.formatLastSyncDate(new Date(client.lastModified)));
       clientItem.textContent = client.name;
@@ -1099,17 +1099,17 @@ const CustomizableWidgets = [
     type: "view",
     viewId: "PanelUI-containers",
     hasObserver: false,
     onCreated: function(aNode) {
       let doc = aNode.ownerDocument;
       let win = doc.defaultView;
       let items = doc.getElementById("PanelUI-containersItems");
 
-      let onItemCommand = function (aEvent) {
+      let onItemCommand = function(aEvent) {
         let item = aEvent.target;
         if (item.hasAttribute("usercontextid")) {
           let userContextId = parseInt(item.getAttribute("usercontextid"));
           win.openUILinkIn(win.BROWSER_NEW_TAB_URL, "tab", {userContextId});
         }
       };
       items.addEventListener("command", onItemCommand);
 
--- a/browser/components/customizableui/content/toolbar.xml
+++ b/browser/components/customizableui/content/toolbar.xml
@@ -284,21 +284,21 @@
       </destructor>
 
       <field name="_inactiveTimeout">null</field>
 
       <field name="_contextMenuListener"><![CDATA[({
         toolbar: this,
         contextMenu: null,
 
-        get active () {
+        get active() {
           return !!this.contextMenu;
         },
 
-        init: function (event) {
+        init: function(event) {
           let node = event.target;
           while (node != this.toolbar) {
             if (node.localName == "menupopup")
               return;
             node = node.parentNode;
           }
 
           let contextMenuId = this.toolbar.getAttribute("context");
@@ -308,17 +308,17 @@
           this.contextMenu = document.getElementById(contextMenuId);
           if (!this.contextMenu)
             return;
 
           this.contextMenu.addEventListener("popupshown", this, false);
           this.contextMenu.addEventListener("popuphiding", this, false);
           this.toolbar.addEventListener("mousemove", this, false);
         },
-        handleEvent: function (event) {
+        handleEvent: function(event) {
           switch (event.type) {
             case "popupshown":
               this.toolbar.removeEventListener("mousemove", this, false);
               break;
             case "popuphiding":
             case "mousemove":
               this.toolbar._setInactiveAsync();
               this.toolbar.removeEventListener("mousemove", this, false);
@@ -333,17 +333,17 @@
       <method name="_setInactive">
         <body><![CDATA[
           this.setAttribute("inactive", "true");
         ]]></body>
       </method>
 
       <method name="_setInactiveAsync">
         <body><![CDATA[
-          this._inactiveTimeout = setTimeout(function (self) {
+          this._inactiveTimeout = setTimeout(function(self) {
             if (self.getAttribute("autohide") == "true") {
               self._inactiveTimeout = null;
               self._setInactive();
             }
           }, 0, this);
         ]]></body>
       </method>
 
--- a/browser/components/customizableui/test/browser_901207_searchbar_in_panel.js
+++ b/browser/components/customizableui/test/browser_901207_searchbar_in_panel.js
@@ -4,17 +4,17 @@
 
 "use strict";
 
 logActiveElement();
 
 function* waitForSearchBarFocus()
 {
   let searchbar = document.getElementById("searchbar");
-  yield waitForCondition(function () {
+  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.
 add_task(function*() {
   let searchbar = document.getElementById("searchbar");
--- a/browser/components/feeds/test/test_bug436801.html
+++ b/browser/components/feeds/test/test_bug436801.html
@@ -14,17 +14,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <p id="display"><iframe id="testFrame" src="bug436801-data.xml"></iframe></p>
 <div id="content" style="display: none">
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 
-addLoadEvent(function () {
+addLoadEvent(function() {
   var doc = SpecialPowers.wrap($("testFrame")).contentDocument;
 
   checkNode(doc.getElementById("feedTitleText"), [
     "ELEMENT", "h1", { "xml:base": "http://www.example.com/foo/bar/" }, [
       ["TEXT", "Example of a "],
       ["ELEMENT", "em", [
         ["TEXT", "special"],
       ]],
--- a/browser/components/migration/ESEDBReader.jsm
+++ b/browser/components/migration/ESEDBReader.jsm
@@ -129,17 +129,17 @@ function convertESEError(errorCode) {
     case -514 /* JET_errBadLogVersion */:
       return "Database log version does not match the version of ESE in use.";
     default:
       return "Unknown error: " + errorCode;
   }
 }
 
 function handleESEError(method, methodName, shouldThrow = true, errorLog = true) {
-  return function () {
+  return function() {
     let rv;
     try {
       rv = method.apply(null, arguments);
     } catch (ex) {
       log.error("Error calling into ctypes method", methodName, ex);
       throw ex;
     }
     let resultCode = parseInt(rv.toString(10), 10);
--- a/browser/components/migration/MSMigrationUtils.jsm
+++ b/browser/components/migration/MSMigrationUtils.jsm
@@ -716,17 +716,17 @@ function getTypedURLs(registryKeyPath) {
     }
     cTypes.finalize();
   }
   return typedURLs;
 }
 
 
 // Migrator for form passwords on Windows 8 and higher.
-function WindowsVaultFormPasswords () {
+function WindowsVaultFormPasswords() {
 }
 
 WindowsVaultFormPasswords.prototype = {
   type: MigrationUtils.resourceTypes.PASSWORDS,
 
   get exists() {
     // work only on windows 8+
     if (AppConstants.isPlatformAndVersionAtLeast("win", "6.2")) {
--- a/browser/components/migration/MigrationUtils.jsm
+++ b/browser/components/migration/MigrationUtils.jsm
@@ -220,17 +220,17 @@ this.MigratorPrototype = {
     let resources = this._getMaybeCachedResources(aProfile);
     if (resources.length == 0)
       throw new Error("migrate called for a non-existent source");
 
     if (aItems != Ci.nsIBrowserProfileMigrator.ALL)
       resources = resources.filter(r => aItems & r.type);
 
     // Used to periodically give back control to the main-thread loop.
-    let unblockMainThread = function () {
+    let unblockMainThread = function() {
       return new Promise(resolve => {
         Services.tm.mainThread.dispatch(resolve, Ci.nsIThread.DISPATCH_NORMAL);
       });
     };
 
     let getHistogramForResourceType = resourceType => {
       if (resourceType == MigrationUtils.resourceTypes.HISTORY) {
         return "FX_MIGRATION_HISTORY_IMPORT_MS";
--- a/browser/components/migration/content/migration.js
+++ b/browser/components/migration/content/migration.js
@@ -17,17 +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: function ()
+  init: function()
   {
     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);
 
@@ -53,30 +53,30 @@ var MigrationWizard = { /* exported Migr
         // easily identifiable way to avoid migration and create a new profile.
         document.getElementById("nothing").hidden = false;
       }
     }
 
     this.onImportSourcePageShow();
   },
 
-  uninit: function ()
+  uninit: function()
   {
     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: function ()
+  onImportSourcePageShow: function()
   {
     // 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";
       }
@@ -132,17 +132,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: function ()
+  onImportSourcePageAdvanced: function()
   {
     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")
@@ -178,17 +178,17 @@ var MigrationWizard = { /* exported Migr
         this._selectedProfile = sourceProfiles[0];
       else
         this._selectedProfile = null;
     }
     return undefined;
   },
 
   // 2 - [Profile Selection]
-  onSelectProfilePageShow: function ()
+  onSelectProfilePageShow: function()
   {
     // 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())
@@ -205,38 +205,38 @@ var MigrationWizard = { /* exported Migr
         item.setAttribute("label", profile.name);
         profiles.appendChild(item);
       }
     }
 
     profiles.selectedItem = this._selectedProfile ? document.getElementById(this._selectedProfile.id) : profiles.firstChild;
   },
 
-  onSelectProfilePageRewound: function ()
+  onSelectProfilePageRewound: function()
   {
     var profiles = document.getElementById("profiles");
     this._selectedProfile = this._migrator.sourceProfiles.find(
       profile => profile.id == profiles.selectedItem.id
     ) || null;
   },
 
-  onSelectProfilePageAdvanced: function ()
+  onSelectProfilePageAdvanced: function()
   {
     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: function ()
+  onImportItemsPageShow: function()
   {
     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;
@@ -247,51 +247,51 @@ var MigrationWizard = { /* exported Migr
           MigrationUtils.getLocalizedString(itemID + "_" + this._source));
         dataSources.appendChild(checkbox);
         if (!this._itemsFlags || this._itemsFlags & itemID)
           checkbox.checked = true;
       }
     }
   },
 
-  onImportItemsPageRewound: function ()
+  onImportItemsPageRewound: function()
   {
     this._wiz.canAdvance = true;
     this.onImportItemsPageAdvanced();
   },
 
-  onImportItemsPageAdvanced: function ()
+  onImportItemsPageAdvanced: function()
   {
     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: function ()
+  onImportItemCommand: function()
   {
     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: function ()
+  onHomePageMigrationPageShow: function()
   {
     // only want this on the first run
     if (!this._autoMigrate) {
       this._wiz.advance();
       return;
     }
 
     var brandBundle = document.getElementById("brandBundle");
@@ -333,42 +333,42 @@ var MigrationWizard = { /* exported Migr
       oldHomePage.removeAttribute("hidden");
     }
     else {
       // if we don't have at least two options, just advance
       this._wiz.advance();
     }
   },
 
-  onHomePageMigrationPageAdvanced: function ()
+  onHomePageMigrationPageAdvanced: function()
   {
     // 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: function ()
+  onMigratingPageShow: function()
   {
     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: function ()
+  onMigratingMigrate: function()
   {
     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;
@@ -378,17 +378,17 @@ var MigrationWizard = { /* exported Migr
           hist.add(this._source, exp);
         }
         items = items >> 1;
         exp++;
       }
     }
   },
 
-  _listItems: function (aID)
+  _listItems: function(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;
@@ -404,17 +404,17 @@ var MigrationWizard = { /* exported Migr
           // 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: function (aSubject, aTopic, aData)
+  observe: function(aSubject, aTopic, aData)
   {
     var label;
     switch (aTopic) {
       case "Migration:Started":
         break;
       case "Migration:ItemBeforeMigrate":
         label = document.getElementById(aData + "_migrated");
         if (label)
@@ -509,17 +509,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: function ()
+  onDonePageShow: function()
   {
     this._wiz.getButton("cancel").disabled = true;
     this._wiz.canRewind = false;
     this._listItems("doneItems");
   },
 
   reportDataRecencyTelemetry() {
     let histogram = Services.telemetry.getKeyedHistogramById("FX_STARTUP_MIGRATION_DATA_RECENCY");
--- a/browser/components/newtab/tests/browser/newtabmessages_places.html
+++ b/browser/components/newtab/tests/browser/newtabmessages_places.html
@@ -28,17 +28,17 @@
                 });
                 window.dispatchEvent(reply);
               }
               break;
           }
         }
       }, true);
 
-      document.onreadystatechange = function () {
+      document.onreadystatechange = function() {
         if (document.readyState === "complete") {
           let msg = new window.CustomEvent("WebChannelMessageToChrome", {
             detail: JSON.stringify({
               id: "newtab",
               message: JSON.stringify({type: "REQUEST_FRECENT"}),
             })
           });
           window.dispatchEvent(msg);
--- a/browser/components/newtab/tests/browser/newtabmessages_prefs.html
+++ b/browser/components/newtab/tests/browser/newtabmessages_prefs.html
@@ -12,17 +12,17 @@
                             id: "newtab",
                             message: JSON.stringify({type: "responseAck"}),
                         })
                     });
                     window.dispatchEvent(reply);
                 }
             }, true);
 
-            document.onreadystatechange = function () {
+            document.onreadystatechange = function() {
                 let msg = new window.CustomEvent("WebChannelMessageToChrome", {
                     detail: JSON.stringify({
                         id: "newtab",
                         message: JSON.stringify({type: "REQUEST_PREFS"}),
                     })
                 });
                 window.dispatchEvent(msg);
             };
--- a/browser/components/newtab/tests/browser/newtabmessages_preview.html
+++ b/browser/components/newtab/tests/browser/newtabmessages_preview.html
@@ -16,17 +16,17 @@
                 message: JSON.stringify({type: "responseAck"}),
               })
             });
             window.dispatchEvent(reply);
           }
         }
       }, true);
 
-      document.onreadystatechange = function () {
+      document.onreadystatechange = function() {
         if (document.readyState === "complete") {
           let msg = new window.CustomEvent("WebChannelMessageToChrome", {
             detail: JSON.stringify({
               id: "newtab",
               message: JSON.stringify({type: "REQUEST_THUMB", data: thumbURL}),
             })
           });
           window.dispatchEvent(msg);
--- a/browser/components/newtab/tests/browser/newtabmessages_search.html
+++ b/browser/components/newtab/tests/browser/newtabmessages_search.html
@@ -57,17 +57,17 @@
                 }
               });
               window.dispatchEvent(reply);
               break;
           }
         }
       }, true);
 
-      document.onreadystatechange = function () {
+      document.onreadystatechange = function() {
         if (document.readyState === "complete") {
           let msg = new window.CustomEvent("WebChannelMessageToChrome", {
             detail: {
               id: "newtab",
               message: JSON.stringify({type: "REQUEST_UISTRINGS"}),
             }
           });
           window.dispatchEvent(msg);
--- a/browser/components/newtab/tests/browser/newtabwebchannel_basic.html
+++ b/browser/components/newtab/tests/browser/newtabwebchannel_basic.html
@@ -1,16 +1,16 @@
 <html>
     <head>
         <meta charset="utf8">
         <title>Newtab WebChannel test</title>
     </head>
     <body>
         <script>
-            document.onreadystatechange = function () {
+            document.onreadystatechange = function() {
                 let msg = new window.CustomEvent("WebChannelMessageToChrome", {
                     detail: JSON.stringify({
                         id: "newtab",
                         message: JSON.stringify({type: "foo", data: "bar"}),
                     })
                 });
                 window.dispatchEvent(msg);
             };
--- a/browser/components/nsBrowserContentHandler.js
+++ b/browser/components/nsBrowserContentHandler.js
@@ -198,17 +198,17 @@ function openWindow(parent, url, target,
     stringArgs = args;
   else if (args) // string
     stringArgs = [args];
 
   if (stringArgs) {
     // put the URIs into argArray
     var uriArray = Components.classes["@mozilla.org/array;1"]
                        .createInstance(Components.interfaces.nsIMutableArray);
-    stringArgs.forEach(function (uri) {
+    stringArgs.forEach(function(uri) {
       var sstring = Components.classes["@mozilla.org/supports-string;1"]
                               .createInstance(nsISupportsString);
       sstring.data = uri;
       uriArray.appendElement(sstring, /* weak = */ false);
     });
     argArray.appendElement(uriArray, /* weak =*/ false);
   } else {
     argArray.appendElement(null, /* weak =*/ false);
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -707,17 +707,17 @@ BrowserGlue.prototype = {
     if (AppConstants.MOZ_CRASHREPORTER) {
       PluginCrashReporter.init();
       UnsubmittedCrashHandler.init();
     }
 
     Services.obs.notifyObservers(null, "browser-ui-startup-complete", "");
   },
 
-  _checkForOldBuildUpdates: function () {
+  _checkForOldBuildUpdates: function() {
     // check for update if our build is old
     if (AppConstants.MOZ_UPDATER &&
         Services.prefs.getBoolPref("app.update.enabled") &&
         Services.prefs.getBoolPref("app.update.checkInstallTime")) {
 
       let buildID = Services.appinfo.appBuildID;
       let today = new Date().getTime();
       let buildDate = new Date(buildID.slice(0, 4),     // year
@@ -759,17 +759,17 @@ BrowserGlue.prototype = {
                        .createInstance(Ci.nsISupportsPRBool);
     Services.obs.notifyObservers(cancelQuit, "quit-application-requested", "restart");
 
     if (!cancelQuit.data) {
       Services.startup.restartInSafeMode(Ci.nsIAppStartup.eAttemptQuit);
     }
   },
 
-  _trackSlowStartup: function () {
+  _trackSlowStartup: function() {
     if (Services.startup.interrupted ||
         Services.prefs.getBoolPref("browser.slowStartup.notificationDisabled"))
       return;
 
     let currentTime = Date.now() - Services.startup.getStartupInfo().process;
     let averageTime = 0;
     let samples = 0;
     try {
@@ -802,39 +802,39 @@ BrowserGlue.prototype = {
     // if the profile was reset, consider the
     // reset date for its age.
     let profileDate = resetDate || creationDate;
 
     const ONE_DAY = 24 * 60 * 60 * 1000;
     return (Date.now() - profileDate) / ONE_DAY;
   }),
 
-  _showSlowStartupNotification: function (profileAge) {
+  _showSlowStartupNotification: function(profileAge) {
     if (profileAge < 90) // 3 months
       return;
 
     let win = RecentWindow.getMostRecentBrowserWindow();
     if (!win)
       return;
 
     let productName = gBrandBundle.GetStringFromName("brandFullName");
     let message = win.gNavigatorBundle.getFormattedString("slowStartup.message", [productName]);
 
     let buttons = [
       {
         label:     win.gNavigatorBundle.getString("slowStartup.helpButton.label"),
         accessKey: win.gNavigatorBundle.getString("slowStartup.helpButton.accesskey"),
-        callback: function () {
+        callback: function() {
           win.openUILinkIn("https://support.mozilla.org/kb/reset-firefox-easily-fix-most-problems", "tab");
         }
       },
       {
         label:     win.gNavigatorBundle.getString("slowStartup.disableNotificationButton.label"),
         accessKey: win.gNavigatorBundle.getString("slowStartup.disableNotificationButton.accesskey"),
-        callback: function () {
+        callback: function() {
           Services.prefs.setBoolPref("browser.slowStartup.notificationDisabled", true);
         }
       }
     ];
 
     let nb = win.document.getElementById("global-notificationbox");
     nb.appendNotification(message, "slow-startup",
                           "chrome://browser/skin/slowStartup-16.png",
@@ -843,17 +843,17 @@ BrowserGlue.prototype = {
 
   /**
    * Show a notification bar offering a reset.
    *
    * @param reason
    *        String of either "unused" or "uninstall", specifying the reason
    *        why a profile reset is offered.
    */
-  _resetProfileNotification: function (reason) {
+  _resetProfileNotification: function(reason) {
     let win = RecentWindow.getMostRecentBrowserWindow();
     if (!win)
       return;
 
     Cu.import("resource://gre/modules/ResetProfile.jsm");
     if (!ResetProfile.resetSupported())
       return;
 
@@ -868,39 +868,39 @@ BrowserGlue.prototype = {
       message = resetBundle.formatStringFromName("resetUninstalled.message", [productName], 1);
     } else {
       throw new Error(`Unknown reason (${reason}) given to _resetProfileNotification.`);
     }
     let buttons = [
       {
         label:     resetBundle.formatStringFromName("refreshProfile.resetButton.label", [productName], 1),
         accessKey: resetBundle.GetStringFromName("refreshProfile.resetButton.accesskey"),
-        callback: function () {
+        callback: function() {
           ResetProfile.openConfirmationDialog(win);
         }
       },
     ];
 
     let nb = win.document.getElementById("global-notificationbox");
     nb.appendNotification(message, "reset-profile-notification",
                           "chrome://global/skin/icons/question-16.png",
                           nb.PRIORITY_INFO_LOW, buttons);
   },
 
-  _notifyUnsignedAddonsDisabled: function () {
+  _notifyUnsignedAddonsDisabled: function() {
     let win = RecentWindow.getMostRecentBrowserWindow();
     if (!win)
       return;
 
     let message = win.gNavigatorBundle.getString("unsignedAddonsDisabled.message");
     let buttons = [
       {
         label:     win.gNavigatorBundle.getString("unsignedAddonsDisabled.learnMore.label"),
         accessKey: win.gNavigatorBundle.getString("unsignedAddonsDisabled.learnMore.accesskey"),
-        callback: function () {
+        callback: function() {
           win.BrowserOpenAddonsMgr("addons://list/extension?unsigned=true");
         }
       },
     ];
 
     let nb = win.document.getElementById("high-priority-global-notificationbox");
     nb.appendNotification(message, "unsigned-addons-disabled", "",
                           nb.PRIORITY_WARNING_MEDIUM, buttons);
@@ -1014,17 +1014,17 @@ BrowserGlue.prototype = {
 
     this._firstWindowTelemetry(aWindow);
     this._firstWindowLoaded();
   },
 
   /**
    * Application shutdown handler.
    */
-  _onQuitApplicationGranted: function () {
+  _onQuitApplicationGranted: function() {
     // This pref must be set here because SessionStore will use its value
     // on quit-application.
     this._setPrefToSaveSession();
 
     // Call trackStartupCrashEnd here in case the delayed call on startup hasn't
     // yet occurred (see trackStartupCrashEnd caller in browser.js).
     try {
       let appStartup = Cc["@mozilla.org/toolkit/app-startup;1"]
@@ -1043,17 +1043,17 @@ BrowserGlue.prototype = {
     FormValidationHandler.uninit();
     AutoCompletePopup.uninit();
     DateTimePickerHelper.uninit();
     if (AppConstants.NIGHTLY_BUILD) {
       AddonWatcher.uninit();
     }
   },
 
-  _initServiceDiscovery: function () {
+  _initServiceDiscovery: function() {
     if (!Services.prefs.getBoolPref("browser.casting.enabled")) {
       return;
     }
     var rokuDevice = {
       id: "roku:ecp",
       target: "roku:ecp",
       factory: function(aService) {
         Cu.import("resource://gre/modules/RokuApp.jsm");
@@ -1208,17 +1208,17 @@ BrowserGlue.prototype = {
           DefaultBrowserCheck.prompt(RecentWindow.getMostRecentBrowserWindow());
         }.bind(this), Ci.nsIThread.DISPATCH_NORMAL);
       }
     }
 
     E10SAccessibilityCheck.onWindowsRestored();
   },
 
-  _createExtraDefaultProfile: function () {
+  _createExtraDefaultProfile: function() {
     if (!AppConstants.MOZ_DEV_EDITION) {
       return;
     }
     // If Developer Edition is the only installed Firefox version and no other
     // profiles are present, create a second one for use by other versions.
     // This helps Firefox versions earlier than 35 avoid accidentally using the
     // unsuitable Developer Edition profile.
     let profileService = Cc["@mozilla.org/toolkit/profile-service;1"]
@@ -1746,17 +1746,17 @@ BrowserGlue.prototype = {
 
     var notifyBox = win.gBrowser.getNotificationBox();
     var notification = notifyBox.appendNotification(text, title, null,
                                                     notifyBox.PRIORITY_CRITICAL_MEDIUM,
                                                     buttons);
     notification.persistence = -1; // Until user closes it
   },
 
-  _showSyncStartedDoorhanger: function () {
+  _showSyncStartedDoorhanger: function() {
     let bundle = Services.strings.createBundle("chrome://browser/locale/accounts.properties");
     let productName = gBrandBundle.GetStringFromName("brandShortName");
     let title = bundle.GetStringFromName("syncStartNotification.title");
     let body = bundle.formatStringFromName("syncStartNotification.body2",
                                             [productName], 1);
 
     let clickCallback = (subject, topic, data) => {
       if (topic != "alertclickcallback")
@@ -2831,17 +2831,17 @@ var E10SAccessibilityCheck = {
       }
       // Restart the browser
       Services.startup.quit(Services.startup.eAttemptQuit | Services.startup.eRestart);
     };
     // main option: an Ok button, keeps running with content accessibility disabled
     let mainAction = {
       label: win.gNavigatorBundle.getString("e10s.accessibilityNotice.acceptButton.label"),
       accessKey: win.gNavigatorBundle.getString("e10s.accessibilityNotice.acceptButton.accesskey"),
-      callback: function () {
+      callback: function() {
         // If the user invoked the button option remove the notification,
         // otherwise keep the alert icon around in the address bar.
         notification.remove();
       },
       dismiss: true
     };
     // secondary option: a restart now button. When we restart e10s will be disabled due to
     // accessibility having been loaded in the previous session.
--- a/browser/components/originattributes/test/browser/browser_blobURLIsolation.js
+++ b/browser/components/originattributes/test/browser/browser_blobURLIsolation.js
@@ -16,34 +16,34 @@ function page_blobify(browser, input) {
 function page_deblobify(browser, blobURL) {
   return ContentTask.spawn(browser, blobURL, function* (blobURL) {
     if ("error" in blobURL) {
       return blobURL;
     }
     blobURL = blobURL.blobURL;
 
     function blobURLtoBlob(blobURL) {
-      return new content.Promise(function (resolve) {
+      return new content.Promise(function(resolve) {
         let xhr = new content.XMLHttpRequest();
         xhr.open("GET", blobURL, true);
-        xhr.onload = function () {
+        xhr.onload = function() {
           resolve(xhr.response);
         };
-        xhr.onerror = function () {
+        xhr.onerror = function() {
           resolve("xhr error");
         };
         xhr.responseType = "blob";
         xhr.send();
       });
     }
 
     function blobToString(blob) {
-      return new content.Promise(function (resolve) {
+      return new content.Promise(function(resolve) {
         let fileReader = new content.FileReader();
-        fileReader.onload = function () {
+        fileReader.onload = function() {
           resolve(fileReader.result);
         };
         fileReader.readAsText(blob);
       });
     }
 
     let blob = yield blobURLtoBlob(blobURL);
     if (blob == "xhr error") {
--- a/browser/components/originattributes/test/browser/browser_cache.js
+++ b/browser/components/originattributes/test/browser/browser_cache.js
@@ -57,41 +57,41 @@ function cacheDataForContext(loadContext
     };
     // Visiting the disk cache also visits memory storage so we do not
     // need to use Services.cache2.memoryCacheStorage() here.
     let storage = Services.cache2.diskCacheStorage(loadContextInfo, false);
     storage.asyncVisitStorage(cacheVisitor, true);
   });
 }
 
-let countMatchingCacheEntries = function (cacheEntries, domain, fileSuffix) {
+let countMatchingCacheEntries = function(cacheEntries, domain, fileSuffix) {
   return cacheEntries.map(entry => entry.uri.asciiSpec)
                      .filter(spec => spec.includes(domain))
                      .filter(spec => spec.includes("file_thirdPartyChild." + fileSuffix))
                      .length;
 };
 
 function observeChannels(onChannel) {
   // We use a dummy proxy filter to catch all channels, even those that do not
   // generate an "http-on-modify-request" notification, such as link preconnects.
   let proxyFilter = {
-    applyFilter : function (aProxyService, aChannel, aProxy) {
+    applyFilter : function(aProxyService, aChannel, aProxy) {
       // We have the channel; provide it to the callback.
       onChannel(aChannel);
       // Pass on aProxy unmodified.
       return aProxy;
     }
   };
   protocolProxyService.registerChannelFilter(proxyFilter, 0);
   // Return the stop() function:
   return () => protocolProxyService.unregisterChannelFilter(proxyFilter);
 }
 
 function startObservingChannels(aMode) {
-  let stopObservingChannels = observeChannels(function (channel) {
+  let stopObservingChannels = observeChannels(function(channel) {
     let originalURISpec = channel.originalURI.spec;
     if (originalURISpec.includes("example.net")) {
       let loadInfo = channel.loadInfo;
 
       switch (aMode) {
         case TEST_MODE_FIRSTPARTY:
           ok(loadInfo.originAttributes.firstPartyDomain === "example.com" ||
              loadInfo.originAttributes.firstPartyDomain === "example.org",
--- a/browser/components/originattributes/test/browser/browser_cookieIsolation.js
+++ b/browser/components/originattributes/test/browser/browser_cookieIsolation.js
@@ -7,17 +7,17 @@ const TEST_PAGE = "http://mochi.test:888
 
 // Use a random key so we don't access it in later tests.
 const key = "key" + Math.random().toString();
 const re = new RegExp(key + "=([0-9\.]+)");
 
 // Define the testing function
 function* doTest(aBrowser) {
   return yield ContentTask.spawn(aBrowser, {key, re},
-                                 function ({key, re}) {
+                                 function({key, re}) {
     let result = re.exec(content.document.cookie);
     if (result) {
       return result[1];
     }
     // No value is found, so we create one.
     let value = Math.random().toString();
     content.document.cookie = key + "=" + value;
     return value;
--- a/browser/components/originattributes/test/browser/browser_firstPartyIsolation.js
+++ b/browser/components/originattributes/test/browser/browser_firstPartyIsolation.js
@@ -1,25 +1,25 @@
 const BASE_URL = "http://mochi.test:8888/browser/browser/components/originattributes/test/browser/";
 const BASE_DOMAIN = "mochi.test";
 
 add_task(function* setup() {
   Services.prefs.setBoolPref("privacy.firstparty.isolate", true);
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     Services.prefs.clearUserPref("privacy.firstparty.isolate");
   });
 });
 
 /**
  * Test for the top-level document and child iframes should have the
  * firstPartyDomain attribute.
  */
 add_task(function* principal_test() {
   let tab = gBrowser.addTab(BASE_URL + "test_firstParty.html");
-  yield BrowserTestUtils.browserLoaded(tab.linkedBrowser, true, function (url) {
+  yield BrowserTestUtils.browserLoaded(tab.linkedBrowser, true, function(url) {
     return url == BASE_URL + "test_firstParty.html";
   });
 
   yield ContentTask.spawn(tab.linkedBrowser, { firstPartyDomain: BASE_DOMAIN }, function* (attrs) {
     info("document principal: " + content.document.nodePrincipal.origin);
     Assert.equal(docShell.getOriginAttributes().firstPartyDomain, "",
                  "top-level docShell shouldn't have firstPartyDomain attribute.");
     Assert.equal(content.document.nodePrincipal.originAttributes.firstPartyDomain,
@@ -124,17 +124,17 @@ add_task(function* redirect_test() {
  */
 add_task(function* postMessage_test() {
   let tab = gBrowser.addTab(BASE_URL + "test_firstParty_postMessage.html");
 
   // The top-level page will post a message to its child iframe, and wait for
   // another message from the iframe, once it receives the message, it will
   // create another iframe, dummy.html.
   // So we wait until dummy.html is loaded
-  yield BrowserTestUtils.browserLoaded(tab.linkedBrowser, true, function (url) {
+  yield BrowserTestUtils.browserLoaded(tab.linkedBrowser, true, function(url) {
     return url == BASE_URL + "dummy.html";
   });
 
   yield ContentTask.spawn(tab.linkedBrowser, {}, function* () {
     info("document principal: " + content.document.nodePrincipal.origin);
     let value = content.document.getElementById("message").textContent;
     Assert.equal(value, "OK");
   });
@@ -143,17 +143,17 @@ add_task(function* postMessage_test() {
 });
 
 /**
  * When the web page calls window.open, the new window should have the same
  * firstPartyDomain attribute.
  */
 add_task(function* openWindow_test() {
   Services.prefs.setIntPref("browser.link.open_newwindow", 2);
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     Services.prefs.clearUserPref("browser.link.open_newwindow");
   });
 
   let tab = gBrowser.addTab(BASE_URL + "window.html");
   let win = yield BrowserTestUtils.waitForNewWindow();
 
   yield ContentTask.spawn(win.gBrowser.selectedBrowser, { firstPartyDomain: "mochi.test" }, function* (attrs) {
     Assert.equal(docShell.getOriginAttributes().firstPartyDomain, attrs.firstPartyDomain,
--- a/browser/components/originattributes/test/browser/browser_localStorageIsolation.js
+++ b/browser/components/originattributes/test/browser/browser_localStorageIsolation.js
@@ -5,17 +5,17 @@
 const TEST_PAGE = "http://mochi.test:8888/browser/browser/components/" +
                   "originattributes/test/browser/file_firstPartyBasic.html";
 
 // Use a random key so we don't access it in later tests.
 const key = Math.random().toString();
 
 // Define the testing function
 function* doTest(aBrowser) {
-  return yield ContentTask.spawn(aBrowser, key, function (key) {
+  return yield ContentTask.spawn(aBrowser, key, function(key) {
     let value = content.localStorage.getItem(key);
     if (value === null) {
       // No value is found, so we create one.
       value = Math.random().toString();
       content.localStorage.setItem(key, value);
     }
     return value;
   });
--- a/browser/components/originattributes/test/browser/browser_sharedworker.js
+++ b/browser/components/originattributes/test/browser/browser_sharedworker.js
@@ -6,17 +6,17 @@ const TEST_DOMAIN = "http://example.net/
 const TEST_PATH = TEST_DOMAIN + "browser/browser/components/originattributes/test/browser/";
 const TEST_PAGE = TEST_PATH + "file_sharedworker.html";
 
 function* getResultFromSharedworker(aBrowser) {
   let response = yield ContentTask.spawn(aBrowser, null, function* () {
     let worker = new content.SharedWorker("file_sharedworker.js", "isolationSharedWorkerTest");
 
     let result = yield new Promise(resolve => {
-      worker.port.onmessage = function (e) {
+      worker.port.onmessage = function(e) {
         content.document.getElementById("display").innerHTML = e.data;
         resolve(e.data);
       };
     });
 
     return result;
   });
 
--- a/browser/components/originattributes/test/browser/file_sharedworker.js
+++ b/browser/components/originattributes/test/browser/file_sharedworker.js
@@ -1,9 +1,9 @@
 self.randomValue = Math.random();
 
 /* global onconnect:true */
 
-onconnect = function (e) {
+onconnect = function(e) {
   let port = e.ports[0];
   port.postMessage(self.randomValue);
   port.start();
 };
--- a/browser/components/originattributes/test/browser/test.html
+++ b/browser/components/originattributes/test/browser/test.html
@@ -1,16 +1,16 @@
 <!DOCTYPE HTML>
 <html>
 <head>
   <meta charset="utf-8">
   <title>Test for Bug 1260931</title>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
   <script>
-  window.onmessage = function (evt) {
+  window.onmessage = function(evt) {
     if (evt.data != "HI") {
       return;
     }
 
     window.parent.postMessage("OK", "http://mochi.test:8888");
   };
   </script>
 </head>
--- a/browser/components/originattributes/test/browser/test_firstParty_postMessage.html
+++ b/browser/components/originattributes/test/browser/test_firstParty_postMessage.html
@@ -6,17 +6,17 @@
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
 </head>
 <script>
 function onload() {
   let iframe1 = document.getElementById("iframe1");
   iframe1.contentWindow.postMessage("HI", "http://mochi.test:8888");
 }
 
-window.onmessage = function (evt) {
+window.onmessage = function(evt) {
   document.getElementById("message").textContent = evt.data;
 
   let iframe2 = document.createElement("iframe");
   iframe2.src = "dummy.html";
   document.body.appendChild(iframe2);
 };
 </script>
 <body onload="onload()">
--- a/browser/components/originattributes/test/browser/worker_blobify.js
+++ b/browser/components/originattributes/test/browser/worker_blobify.js
@@ -1,11 +1,11 @@
 // Wait for a string to be posted to this worker.
 // Create a blob containing this string, and then
 // post back a blob URL pointing to the blob.
-self.addEventListener("message", function (e) {
+self.addEventListener("message", function(e) {
   try {
     var blobURL = URL.createObjectURL(new Blob([e.data]));
     postMessage({ blobURL });
   } catch (e) {
     postMessage({ error: e.message });
   }
 }, false);
--- a/browser/components/originattributes/test/browser/worker_deblobify.js
+++ b/browser/components/originattributes/test/browser/worker_deblobify.js
@@ -1,31 +1,31 @@
 // Wait for a blob URL to be posted to this worker.
 // Obtain the blob, and read the string contained in it.
 // Post back the string.
 
-var postStringInBlob = function (blobObject) {
+var postStringInBlob = function(blobObject) {
   var fileReader = new FileReaderSync();
   var result = fileReader.readAsText(blobObject);
   postMessage(result);
 };
 
-self.addEventListener("message", function (e) {
+self.addEventListener("message", function(e) {
   if ("error" in e.data) {
     postMessage(e.data);
     return;
   }
   var blobURL = e.data.blobURL,
       xhr = new XMLHttpRequest();
   try {
     xhr.open("GET", blobURL, true);
-    xhr.onload = function () {
+    xhr.onload = function() {
       postStringInBlob(xhr.response);
     };
-    xhr.onerror = function () {
+    xhr.onerror = function() {
       postMessage({ error: "xhr error" });
     };
     xhr.responseType = "blob";
     xhr.send();
   } catch (e) {
     postMessage({ error: e.message });
   }
 }, false);
--- a/browser/components/places/PlacesUIUtils.jsm
+++ b/browser/components/places/PlacesUIUtils.jsm
@@ -290,17 +290,17 @@ this.PlacesUIUtils = {
    *
    * @see https://developer.mozilla.org/en/Localization_and_Plurals
    * @return The localized plural string.
    */
   getPluralString: function PUIU_getPluralString(aKey, aNumber, aParams) {
     let str = PluralForm.get(aNumber, bundle.GetStringFromName(aKey));
 
     // Replace #1 with aParams[0], #2 with aParams[1], and so on.
-    return str.replace(/\#(\d+)/g, function (matchedId, matchedNumber) {
+    return str.replace(/\#(\d+)/g, function(matchedId, matchedNumber) {
       let param = aParams[parseInt(matchedNumber, 10) - 1];
       return param !== undefined ? param : matchedId;
     });
   },
 
   getString: function PUIU_getString(key) {
     return bundle.GetStringFromName(key);
   },
@@ -341,17 +341,17 @@ this.PlacesUIUtils = {
     if (aData.lastModified) {
       transactions.push(
         new PlacesEditItemLastModifiedTransaction(null, aData.lastModified)
       );
     }
 
     let annos = [];
     if (aData.annos) {
-      annos = aData.annos.filter(function (aAnno) {
+      annos = aData.annos.filter(function(aAnno) {
         return this._copyableAnnotations.includes(aAnno.name);
       }, this);
     }
 
     // There's no need to copy the keyword since it's bound to the bookmark url.
     return new PlacesCreateBookmarkTransaction(PlacesUtils._uri(aData.uri),
                                                aContainer, aIndex, aData.title,
                                                null, annos, transactions);
@@ -453,17 +453,17 @@ this.PlacesUIUtils = {
     if (aData.lastModified) {
       transactions.push(
         new PlacesEditItemLastModifiedTransaction(null, aData.lastModified)
       );
     }
 
     let annos = [];
     if (aData.annos) {
-      annos = aData.annos.filter(function (aAnno) {
+      annos = aData.annos.filter(function(aAnno) {
         return this._copyableAnnotations.includes(aAnno.name);
       }, this);
     }
 
     return new PlacesCreateFolderTransaction(aData.title, aContainer, aIndex,
                                              annos, transactions);
   },
 
@@ -488,17 +488,17 @@ this.PlacesUIUtils = {
   {
     if (!aData.livemark || !aData.annos) {
       throw new Error("node is not a livemark");
     }
 
     let feedURI, siteURI;
     let annos = [];
     if (aData.annos) {
-      annos = aData.annos.filter(function (aAnno) {
+      annos = aData.annos.filter(function(aAnno) {
         if (aAnno.name == PlacesUtils.LMANNO_FEEDURI) {
           feedURI = PlacesUtils._uri(aAnno.value);
         }
         else if (aAnno.name == PlacesUtils.LMANNO_SITEURI) {
           siteURI = PlacesUtils._uri(aAnno.value);
         }
         return this._copyableAnnotations.includes(aAnno.name)
       }, this);
@@ -792,17 +792,17 @@ this.PlacesUIUtils = {
   /**
    * Check whether or not the given node represents a removable entry (either in
    * history or in bookmarks).
    *
    * @param aNode
    *        a node, except the root node of a query.
    * @return true if the aNode represents a removable entry, false otherwise.
    */
-  canUserRemove: function (aNode) {
+  canUserRemove: function(aNode) {
     let parentNode = aNode.parent;
     if (!parentNode) {
       // canUserRemove doesn't accept root nodes.
       return false;
     }
 
     // If it's not a bookmark, we can remove it unless it's a child of a
     // livemark.
@@ -840,17 +840,17 @@ this.PlacesUIUtils = {
    * Otherwise they are just treated as bookmarks (i.e. false is returned).
    *
    * @param aNodeOrItemId
    *        any item id or result node.
    * @throws if aNodeOrItemId is neither an item id nor a folder result node.
    * @note livemark "folders" are considered read-only (but see bug 1072833).
    * @return true if aItemId points to a read-only folder, false otherwise.
    */
-  isContentsReadOnly: function (aNodeOrItemId) {
+  isContentsReadOnly: function(aNodeOrItemId) {
     let itemId;
     if (typeof(aNodeOrItemId) == "number") {
       itemId = aNodeOrItemId;
     }
     else if (PlacesUtils.nodeIsFolder(aNodeOrItemId)) {
       itemId = PlacesUtils.getConcreteItemId(aNodeOrItemId);
     }
     else {
--- a/browser/components/places/content/browserPlacesViews.js
+++ b/browser/components/places/content/browserPlacesViews.js
@@ -947,19 +947,19 @@ function PlacesToolbar(aPlace) {
   // Add some smart getters for our elements.
   let thisView = this;
   [
     ["_viewElt",              "PlacesToolbar"],
     ["_rootElt",              "PlacesToolbarItems"],
     ["_dropIndicator",        "PlacesToolbarDropIndicator"],
     ["_chevron",              "PlacesChevron"],
     ["_chevronPopup",         "PlacesChevronPopup"]
-  ].forEach(function (elementGlobal) {
+  ].forEach(function(elementGlobal) {
     let [name, id] = elementGlobal;
-    thisView.__defineGetter__(name, function () {
+    thisView.__defineGetter__(name, function() {
       let element = document.getElementById(id);
       if (!element)
         return null;
 
       delete thisView[name];
       return thisView[name] = element;
     });
   });
--- a/browser/components/places/content/controller.js
+++ b/browser/components/places/content/controller.js
@@ -54,17 +54,17 @@ function InsertionPoint(aItemId, aIndex,
   this.dropNearItemId = aDropNearItemId;
 }
 
 InsertionPoint.prototype = {
   set index(val) {
     return this._index = val;
   },
 
-  promiseGuid: function () {
+  promiseGuid: function() {
     return PlacesUtils.promiseItemGuid(this.itemId);
   },
 
   get index() {
     if (this.dropNearItemId > 0) {
       // If dropNearItemId is set up we must calculate the real index of
       // the item near which we will drop.
       var index = PlacesUtils.bookmarks.getItemIndex(this.dropNearItemId);
@@ -82,17 +82,17 @@ InsertionPoint.prototype = {
  * Places Controller
  */
 
 function PlacesController(aView) {
   this._view = aView;
   XPCOMUtils.defineLazyServiceGetter(this, "clipboard",
                                      "@mozilla.org/widget/clipboard;1",
                                      "nsIClipboard");
-  XPCOMUtils.defineLazyGetter(this, "profileName", function () {
+  XPCOMUtils.defineLazyGetter(this, "profileName", function() {
     return Services.dirsvc.get("ProfD", Ci.nsIFile).leafName;
   });
 
   this._cachedLivemarkInfoObjects = new Map();
 }
 
 PlacesController.prototype = {
   /**
@@ -100,17 +100,17 @@ PlacesController.prototype = {
    */
   _view: null,
 
   QueryInterface: XPCOMUtils.generateQI([
     Ci.nsIClipboardOwner
   ]),
 
   // nsIClipboardOwner
-  LosingOwnership: function PC_LosingOwnership (aXferable) {
+  LosingOwnership: function PC_LosingOwnership(aXferable) {
     this.cutNodes = [];
   },
 
   terminate: function PC_terminate() {
     this._releaseClipboardOwnership();
   },
 
   supportsCommand: function PC_supportsCommand(aCommand) {
@@ -1093,17 +1093,17 @@ PlacesController.prototype = {
       }
     }
     finally {
       if (!didSuppressNotifications)
         result.suppressNotifications = false;
     }
   },
 
-  get clipboardAction () {
+  get clipboardAction() {
     let action = {};
     let actionOwner;
     try {
       let xferable = Cc["@mozilla.org/widget/transferable;1"].
                      createInstance(Ci.nsITransferable);
       xferable.init(null);
       xferable.addDataFlavor(PlacesUtils.TYPE_X_MOZ_PLACE_ACTION)
       this.clipboard.getData(xferable, Ci.nsIClipboard.kGlobalClipboard);
@@ -1150,26 +1150,26 @@ PlacesController.prototype = {
       { type: PlacesUtils.TYPE_X_MOZ_URL, entries: [] },
       { type: PlacesUtils.TYPE_HTML, entries: [] },
       { type: PlacesUtils.TYPE_UNICODE, entries: [] },
     ];
 
     // Avoid handling descendants of a copied node, the transactions take care
     // of them automatically.
     let copiedFolders = [];
-    aNodes.forEach(function (node) {
+    aNodes.forEach(function(node) {
       if (this._shouldSkipNode(node, copiedFolders))
         return;
       if (PlacesUtils.nodeIsFolder(node))
         copiedFolders.push(node);
 
       let livemarkInfo = this.getCachedLivemarkInfo(node);
       let feedURI = livemarkInfo && livemarkInfo.feedURI.spec;
 
-      contents.forEach(function (content) {
+      contents.forEach(function(content) {
         content.entries.push(
           PlacesUtils.wrapNode(node, content.type, feedURI)
         );
       });
     }, this);
 
     function addData(type, data) {
       xferable.addDataFlavor(type);
@@ -1178,17 +1178,17 @@ PlacesController.prototype = {
     }
 
     let xferable = Cc["@mozilla.org/widget/transferable;1"].
                    createInstance(Ci.nsITransferable);
     xferable.init(null);
     let hasData = false;
     // This order matters here!  It controls how this and other applications
     // select data to be inserted based on type.
-    contents.forEach(function (content) {
+    contents.forEach(function(content) {
       if (content.entries.length > 0) {
         hasData = true;
         let glue =
           content.type == PlacesUtils.TYPE_X_MOZ_PLACE ? "," : PlacesUtils.endl;
         addData(content.type, content.entries.join(glue));
       }
     });
 
@@ -1207,17 +1207,17 @@ PlacesController.prototype = {
 
   _cutNodes: [],
   get cutNodes() {
     return this._cutNodes;
   },
   set cutNodes(aNodes) {
     let self = this;
     function updateCutNodes(aValue) {
-      self._cutNodes.forEach(function (aNode) {
+      self._cutNodes.forEach(function(aNode) {
         self._view.toggleCutNode(aNode, aValue);
       });
     }
 
     updateCutNodes(false);
     this._cutNodes = aNodes;
     updateCutNodes(true);
     return aNodes;
@@ -1532,17 +1532,17 @@ var PlacesControllerDragHelper = {
 
   /**
    * Determines if an unwrapped node can be moved.
    *
    * @param   aUnwrappedNode
    *          A node unwrapped by PlacesUtils.unwrapNodes().
    * @return True if the node can be moved, false otherwise.
    */
-  canMoveUnwrappedNode: function (aUnwrappedNode) {
+  canMoveUnwrappedNode: function(aUnwrappedNode) {
     return aUnwrappedNode.id > 0 &&
            !PlacesUtils.isRootItem(aUnwrappedNode.id) &&
            (!aUnwrappedNode.parent || !PlacesUIUtils.isContentsReadOnly(aUnwrappedNode.parent)) &&
            aUnwrappedNode.parent != PlacesUtils.tagsFolderId &&
            aUnwrappedNode.grandParentId != PlacesUtils.tagsFolderId;
   },
 
   /**
--- a/browser/components/places/tests/browser/browser_435851_copy_query.js
+++ b/browser/components/places/tests/browser/browser_435851_copy_query.js
@@ -5,24 +5,24 @@
 /* test that copying a non movable query or folder shortcut makes a new query with the same url, not a deep copy */
 
 const SHORTCUT_URL = "place:folder=2";
 const QUERY_URL = "place:sort=8&maxResults=10";
 
 add_task(function* copy_toolbar_shortcut() {
   let library = yield promiseLibrary();
 
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     library.close();
     PlacesUtils.bookmarks.removeFolderChildren(PlacesUtils.unfiledBookmarksFolderId);
   });
 
   library.PlacesOrganizer.selectLeftPaneQuery("BookmarksToolbar");
 
-  yield promiseClipboard(function () { library.PlacesOrganizer._places.controller.copy(); },
+  yield promiseClipboard(function() { library.PlacesOrganizer._places.controller.copy(); },
                          PlacesUtils.TYPE_X_MOZ_PLACE);
 
   library.PlacesOrganizer.selectLeftPaneQuery("UnfiledBookmarks");
   library.ContentTree.view.controller.paste();
 
   let toolbarCopyNode = library.ContentTree.view.view.nodeForTreeIndex(0);
   is(toolbarCopyNode.type,
      Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER_SHORTCUT,
@@ -35,17 +35,17 @@ add_task(function* copy_toolbar_shortcut
      "original is still a folder shortcut");
 });
 
 add_task(function* copy_history_query() {
   let library = yield promiseLibrary();
 
   library.PlacesOrganizer.selectLeftPaneQuery("History");
 
-  yield promiseClipboard(function () { library.PlacesOrganizer._places.controller.copy(); },
+  yield promiseClipboard(function() { library.PlacesOrganizer._places.controller.copy(); },
                          PlacesUtils.TYPE_X_MOZ_PLACE);
 
   library.PlacesOrganizer.selectLeftPaneQuery("UnfiledBookmarks");
   library.ContentTree.view.controller.paste();
 
   let historyCopyNode = library.ContentTree.view.view.nodeForTreeIndex(0);
   is(historyCopyNode.type,
      Ci.nsINavHistoryResultNode.RESULT_TYPE_QUERY,
--- a/browser/components/places/tests/browser/browser_475045.js
+++ b/browser/components/places/tests/browser/browser_475045.js
@@ -52,14 +52,14 @@ add_task(function* test() {
 
     // Verify that we removed the bookmark successfully.
     ok(!PlacesUtils.bookmarks.isBookmarked(uri), "URI should be removed");
   }
 
   // Simulate a bookmark drop for all of the mime types and effects.
   let mimeTypes = ["text/plain", "text/unicode", "text/x-moz-url"];
   let effects = ["move", "copy", "link"];
-  effects.forEach(function (effect) {
-    mimeTypes.forEach(function (mimeType) {
+  effects.forEach(function(effect) {
+    mimeTypes.forEach(function(mimeType) {
       simulateDragDrop(effect, mimeType);
     });
   });
 });
--- a/browser/components/places/tests/browser/browser_bookmarksProperties.js
+++ b/browser/components/places/tests/browser/browser_bookmarksProperties.js
@@ -86,17 +86,17 @@ gTests.push({
     // open tags autocomplete and press enter
     var tagsField = this.window.document.getElementById("editBMPanel_tagsField");
     var self = this;
 
     this.window.addEventListener("unload", function(event) {
       self.window.removeEventListener("unload", arguments.callee, true);
       tagsField.popup.removeEventListener("popuphidden", popupListener, true);
       ok(self._cleanShutdown, "Dialog window should not be closed by pressing Enter on the autocomplete popup");
-      executeSoon(function () {
+      executeSoon(function() {
         self.finish();
       });
     }, true);
 
     var popupListener = {
       handleEvent: function(aEvent) {
         switch (aEvent.type) {
           case "popuphidden":
@@ -188,17 +188,17 @@ gTests.push({
     // open tags autocomplete and press enter
     var tagsField = this.window.document.getElementById("editBMPanel_tagsField");
     var self = this;
 
     this.window.addEventListener("unload", function(event) {
       self.window.removeEventListener("unload", arguments.callee, true);
       tagsField.popup.removeEventListener("popuphidden", popupListener, true);
       ok(self._cleanShutdown, "Dialog window should not be closed by pressing Escape on the autocomplete popup");
-      executeSoon(function () {
+      executeSoon(function() {
         self.finish();
       });
     }, true);
 
     var popupListener = {
       handleEvent: function(aEvent) {
         switch (aEvent.type) {
           case "popuphidden":
@@ -283,26 +283,26 @@ gTests.push({
     // Open folder selector.
     var foldersExpander = this.window.document.getElementById("editBMPanel_foldersExpander");
     var folderTree = this.window.document.getElementById("editBMPanel_folderTree");
     var self = this;
 
     this.window.addEventListener("unload", function(event) {
       self.window.removeEventListener("unload", arguments.callee, true);
       ok(self._cleanShutdown, "Dialog window should not be closed by pressing ESC in folder name textbox");
-      executeSoon(function () {
+      executeSoon(function() {
         self.finish();
       });
     }, true);
 
     folderTree.addEventListener("DOMAttrModified", function onDOMAttrModified(event) {
       if (event.attrName != "place")
         return;
       folderTree.removeEventListener("DOMAttrModified", arguments.callee, false);
-      executeSoon(function () {
+      executeSoon(function() {
         // Create a new folder.
         var newFolderButton = self.window.document.getElementById("editBMPanel_newFolderButton");
         newFolderButton.doCommand();
         ok(folderTree.hasAttribute("editing"),
            "We are editing new folder name in folder tree");
 
         // Press Escape to discard editing new folder name.
         EventUtils.synthesizeKey("VK_ESCAPE", {}, self.window);
@@ -402,17 +402,17 @@ function open_properties_dialog() {
     // Wait for the Properties dialog.
     function windowObserver(aSubject, aTopic, aData) {
       if (aTopic != "domwindowopened")
         return;
       ww.unregisterNotification(windowObserver);
       let win = aSubject.QueryInterface(Ci.nsIDOMWindow);
       waitForFocus(() => {
         // Windows has been loaded, execute our test now.
-        executeSoon(function () {
+        executeSoon(function() {
           // Ensure overlay is loaded
           ok(win.gEditItemOverlay.initialized, "EditItemOverlay is initialized");
           gCurrentTest.window = win;
           try {
             gCurrentTest.run();
           } catch (ex) {
             ok(false, "An error occured during test run: " + ex.message);
           }
--- a/browser/components/places/tests/browser/browser_drag_bookmarks_on_toolbar.js
+++ b/browser/components/places/tests/browser/browser_drag_bookmarks_on_toolbar.js
@@ -153,29 +153,29 @@ var gTests = [
       var element = getToolbarNodeForItemId(folderId);
       isnot(element, null, "Found node on toolbar");
 
       isnot(element._placesNode, null, "Toolbar node has an associated Places node.");
       var expectedData = getExpectedDataForPlacesNode(element._placesNode);
 
       info("Dragging left");
       synthesizeDragWithDirection(element, expectedData, dragDirections.LEFT,
-        function ()
+        function()
         {
           info("Dragging right");
           synthesizeDragWithDirection(element, expectedData, dragDirections.RIGHT,
-            function ()
+            function()
             {
               info("Dragging up");
               synthesizeDragWithDirection(element, expectedData, dragDirections.UP,
-                function ()
+                function()
                 {
                   info("Dragging down");
                   synthesizeDragWithDirection(element, new Array(), dragDirections.DOWN,
-                    function () {
+                    function() {
                       // Cleanup.
                       PlacesUtils.bookmarks.removeItem(folderId);
                       nextTest();
                     });
                 });
             });
         });
     }
@@ -195,29 +195,29 @@ var gTests = [
       var element = getToolbarNodeForItemId(itemId);
       isnot(element, null, "Found node on toolbar");
 
       isnot(element._placesNode, null, "Toolbar node has an associated Places node.");
       var expectedData = getExpectedDataForPlacesNode(element._placesNode);
 
       info("Dragging left");
       synthesizeDragWithDirection(element, expectedData, dragDirections.LEFT,
-        function ()
+        function()
         {
           info("Dragging right");
           synthesizeDragWithDirection(element, expectedData, dragDirections.RIGHT,
-            function ()
+            function()
             {
               info("Dragging up");
               synthesizeDragWithDirection(element, expectedData, dragDirections.UP,
-                function ()
+                function()
                 {
                   info("Dragging down");
                   synthesizeDragWithDirection(element, expectedData, dragDirections.DOWN,
-                    function () {
+                    function() {
                       // Cleanup.
                       PlacesUtils.bookmarks.removeItem(itemId);
                       nextTest();
                     });
                 });
             });
         });
     }
--- a/browser/components/places/tests/browser/browser_history_sidebar_search.js
+++ b/browser/components/places/tests/browser/browser_history_sidebar_search.js
@@ -1,9 +1,9 @@
-add_task(function* test () {
+add_task(function* test() {
   let sidebar = document.getElementById("sidebar");
 
   // Visited pages listed by descending visit date.
   let pages = [
     "http://sidebar.mozilla.org/a",
     "http://sidebar.mozilla.org/b",
     "http://sidebar.mozilla.org/c",
     "http://www.mozilla.org/d",
--- a/browser/components/places/tests/browser/browser_library_batch_delete.js
+++ b/browser/components/places/tests/browser/browser_library_batch_delete.js
@@ -12,17 +12,17 @@ var gLibrary;
 
 // ------------------------------------------------------------------------------
 
 gTests.push({
   desc: "Create and batch remove bookmarks",
   run: function() {
     let testURI = makeURI(TEST_URL);
     PlacesUtils.history.runInBatchMode({
-      runBatched: function (aUserData) {
+      runBatched: function(aUserData) {
         // Create a folder in unserted and populate it with bookmarks.
         let folder = PlacesUtils.bookmarks.createFolder(
           PlacesUtils.unfiledBookmarksFolderId, "deleteme",
           PlacesUtils.bookmarks.DEFAULT_INDEX
         );
         PlacesUtils.bookmarks.createFolder(
           PlacesUtils.unfiledBookmarksFolderId, "keepme",
           PlacesUtils.bookmarks.DEFAULT_INDEX
@@ -87,17 +87,17 @@ gTests.push({
     nextTest();
   }
 });
 
 // ------------------------------------------------------------------------------
 
 function test() {
   waitForExplicitFinish();
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     PlacesUtils.bookmarks
                .removeFolderChildren(PlacesUtils.unfiledBookmarksFolderId);
   });
 
   gLibrary = openLibrary(nextTest);
 }
 
 function nextTest() {
--- a/browser/components/places/tests/browser/browser_library_downloads.js
+++ b/browser/components/places/tests/browser/browser_library_downloads.js
@@ -27,21 +27,21 @@ function test() {
       { uri: NetUtil.newURI("http://en.wikipedia.org"),
         visits: [ new VisitInfo(PlacesUtils.history.TRANSITION_TYPED) ]
       },
       { uri: NetUtil.newURI("http://ubuntu.org"),
         visits: [ new VisitInfo(PlacesUtils.history.TRANSITION_DOWNLOAD) ]
       },
     ]
     PlacesUtils.asyncHistory.updatePlaces(places, {
-      handleResult: function () {},
-      handleError: function () {
+      handleResult: function() {},
+      handleError: function() {
         ok(false, "gHistory.updatePlaces() failed");
       },
-      handleCompletion: function () {
+      handleCompletion: function() {
         // Make sure Downloads is present.
         isnot(win.PlacesOrganizer._places.selectedNode, null,
               "Downloads is present and selected");
 
 
         // Check results.
         let contentRoot = win.ContentArea.currentView.result.root;
         let len = contentRoot.childCount;
--- a/browser/components/places/tests/browser/browser_library_infoBox.js
+++ b/browser/components/places/tests/browser/browser_library_infoBox.js
@@ -119,46 +119,46 @@ gTests.push({
 });
 
 function checkInfoBoxSelected(PO) {
   is(getAndCheckElmtById("detailsDeck").selectedIndex, 1,
      "Selected element in detailsDeck is infoBox.");
 }
 
 function checkAddInfoFieldsCollapsed(PO) {
-  PO._additionalInfoFields.forEach(function (id) {
+  PO._additionalInfoFields.forEach(function(id) {
     ok(getAndCheckElmtById(id).collapsed,
        "Additional info field correctly collapsed: #" + id);
   });
 }
 
 function checkAddInfoFieldsNotCollapsed(PO) {
-  ok(PO._additionalInfoFields.some(function (id) {
+  ok(PO._additionalInfoFields.some(function(id) {
       return !getAndCheckElmtById(id).collapsed;
      }), "Some additional info field correctly not collapsed");
 }
 
 function checkAddInfoFields(PO, nodeName) {
   ok(true, "Checking additional info fields visibiity for node: " + nodeName);
   var expanderButton = getAndCheckElmtById("infoBoxExpander");
 
   // make sure additional fields are hidden by default
-  PO._additionalInfoFields.forEach(function (id) {
+  PO._additionalInfoFields.forEach(function(id) {
     ok(getAndCheckElmtById(id).hidden,
        "Additional info field correctly hidden by default: #" + id);
   });
 
   // toggle fields and make sure they are hidden/unhidden as expected
   expanderButton.click();
-  PO._additionalInfoFields.forEach(function (id) {
+  PO._additionalInfoFields.forEach(function(id) {
     ok(!getAndCheckElmtById(id).hidden,
        "Additional info field correctly unhidden after toggle: #" + id);
   });
   expanderButton.click();
-  PO._additionalInfoFields.forEach(function (id) {
+  PO._additionalInfoFields.forEach(function(id) {
     ok(getAndCheckElmtById(id).hidden,
        "Additional info field correctly hidden after toggle: #" + id);
   });
 }
 
 function getAndCheckElmtById(id) {
   var elmt = gLibrary.document.getElementById(id);
   isnot(elmt, null, "Correctly got element: #" + id);
@@ -184,14 +184,14 @@ function nextTest() {
 
 function test() {
   waitForExplicitFinish();
   // Sanity checks.
   ok(PlacesUtils, "PlacesUtils is running in chrome context");
   ok(PlacesUIUtils, "PlacesUIUtils is running in chrome context");
 
   // Open Library.
-  openLibrary(function (library) {
+  openLibrary(function(library) {
     gLibrary = library;
     gLibrary.PlacesOrganizer._places.focus();
     nextTest(gLibrary);
   });
 }
--- a/browser/components/places/tests/browser/browser_library_middleclick.js
+++ b/browser/components/places/tests/browser/browser_library_middleclick.js
@@ -51,17 +51,17 @@ var gTabsListener = {
     if (this._loadedURIs.length == gCurrentTest.URIs.length) {
       // We have correctly opened all URIs.
 
       // Reset arrays.
       this._loadedURIs.length = 0;
 
       this._openTabsCount = 0;
 
-      executeSoon(function () {
+      executeSoon(function() {
         // Close all tabs.
         while (gBrowser.tabs.length > 1)
           gBrowser.removeCurrentTab();
 
         // Test finished.  This will move to the next one.
         waitForFocus(gCurrentTest.finish, gBrowser.ownerGlobal);
       });
     }
@@ -215,17 +215,17 @@ function test() {
   // Add tabs listeners.
   gBrowser.tabContainer.addEventListener("TabOpen", gTabsListener, false);
   gBrowser.addTabsProgressListener(gTabsListener);
 
   // Temporary disable history, so we won't record pages navigation.
   gPrefService.setBoolPref(ENABLE_HISTORY_PREF, false);
 
   // Open Library window.
-  openLibrary(function (library) {
+  openLibrary(function(library) {
     gLibrary = library;
     // Kick off tests.
     runNextTest();
   });
 }
 
 function runNextTest() {
   // Cleanup from previous test.
--- a/browser/components/places/tests/browser/browser_library_openFlatContainer.js
+++ b/browser/components/places/tests/browser/browser_library_openFlatContainer.js
@@ -13,17 +13,17 @@ add_task(function* () {
                                         "Folder",
                                         PlacesUtils.bookmarks.DEFAULT_INDEX);
   let bookmark = PlacesUtils.bookmarks
                             .insertBookmark(folder, NetUtil.newURI("http://example.com/"),
                                             PlacesUtils.bookmarks.DEFAULT_INDEX,
                                             "Bookmark");
 
   let library = yield promiseLibrary("AllBookmarks");
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     library.close();
     PlacesUtils.bookmarks.removeFolderChildren(PlacesUtils.unfiledBookmarksFolderId);
   });
 
   // Select unfiled later, to ensure it's closed.
   library.PlacesOrganizer.selectLeftPaneQuery("UnfiledBookmarks");
   ok(!library.PlacesOrganizer._places.selectedNode.containerOpen,
      "Unfiled container is closed");
--- a/browser/components/places/tests/browser/browser_library_open_leak.js
+++ b/browser/components/places/tests/browser/browser_library_open_leak.js
@@ -10,14 +10,14 @@
  *
  * Tests for leaks caused by simply opening and closing the Places Library
  * window.  Opens the Places Library window, waits for it to load, closes it,
  * and finishes.
  */
 
 function test() {
   waitForExplicitFinish();
-  openLibrary(function (win) {
+  openLibrary(function(win) {
     ok(true, "Library has been correctly opened");
     win.close();
     finish();
   });
 }
--- a/browser/components/places/tests/browser/browser_library_views_liveupdate.js
+++ b/browser/components/places/tests/browser/browser_library_views_liveupdate.js
@@ -15,17 +15,17 @@ function test() {
   // See Bug 525610.
   requestLongerTimeout(2);
 
   // Sanity checks.
   ok(PlacesUtils, "PlacesUtils in context");
   ok(PlacesUIUtils, "PlacesUIUtils in context");
 
   // Open Library, we will check the left pane.
-  openLibrary(function (library) {
+  openLibrary(function(library) {
     gLibrary = library;
     startTest();
   });
 }
 
 /**
  * Adds bookmarks observer, and executes a bunch of bookmarks operations.
  */
@@ -115,17 +115,17 @@ function startTest() {
   id = bs.insertBookmark(id,
                          PlacesUtils._uri("http://ubf1.mozilla.org/"),
                          bs.DEFAULT_INDEX,
                          "ubf1");
   addedBookmarks.push(id);
   bs.moveItem(id, bs.unfiledBookmarksFolder, 0);
 
   // Remove all added bookmarks.
-  addedBookmarks.forEach(function (aItem) {
+  addedBookmarks.forEach(function(aItem) {
     // If we remove an item after its containing folder has been removed,
     // this will throw, but we can ignore that.
     try {
       bs.removeItem(aItem);
     } catch (ex) {}
   });
 
   // Remove observers.
--- a/browser/components/places/tests/browser/browser_sidebarpanels_click.js
+++ b/browser/components/places/tests/browser/browser_sidebarpanels_click.js
@@ -89,17 +89,17 @@ function test() {
 
         function observer(aSubject, aTopic, aData) {
           info("alert dialog observed as expected");
           Services.obs.removeObserver(observer, "common-dialog-loaded");
           Services.obs.removeObserver(observer, "tabmodal-dialog-loaded");
 
           aSubject.Dialog.ui.button0.click();
 
-          executeSoon(function () {
+          executeSoon(function() {
               SidebarUI.hide();
               currentTest.cleanup(postFunc);
             });
         }
         Services.obs.addObserver(observer, "common-dialog-loaded", false);
         Services.obs.addObserver(observer, "tabmodal-dialog-loaded", false);
 
         let tree = sidebar.contentDocument.getElementById(currentTest.treeName);
--- a/browser/components/places/tests/browser/browser_sort_in_library.js
+++ b/browser/components/places/tests/browser/browser_sort_in_library.js
@@ -193,17 +193,17 @@ function testSortByColAndDir(aOrganizerW
     let expectedSortMode = Ci.nsINavHistoryQueryOptions[sortConst];
     let expectedAnno = SORT_LOOKUP_TABLE[colId].anno || "";
 
     // Test sorting by only a column.
     setSort(aOrganizerWin, aPlaceContentTree, aUnsortFirst, false, col);
     checkSort(aPlaceContentTree, expectedSortMode, expectedAnno);
 
     // Test sorting by both a column and a direction.
-    ["ascending", "descending"].forEach(function (dir) {
+    ["ascending", "descending"].forEach(function(dir) {
       let sortConst =
         "SORT_BY_" + SORT_LOOKUP_TABLE[colId].key + "_" + dir.toUpperCase();
       let expectedSortMode = Ci.nsINavHistoryQueryOptions[sortConst];
       setSort(aOrganizerWin, aPlaceContentTree, aUnsortFirst, false, col, dir);
       checkSort(aPlaceContentTree, expectedSortMode, expectedAnno);
     });
   }
 }
@@ -214,29 +214,29 @@ function testSortByColAndDir(aOrganizerW
  * @param aOrganizerWin
  *        the Places window
  * @param aPlaceContentTree
  *        the placeContent tree in aOrganizerWin
  * @param aUnsortFirst
  *        true if, before each sort we try, we should sort to SORT_BY_NONE
  */
 function testSortByDir(aOrganizerWin, aPlaceContentTree, aUnsortFirst) {
-  ["ascending", "descending"].forEach(function (dir) {
+  ["ascending", "descending"].forEach(function(dir) {
     let key = (aUnsortFirst ? DEFAULT_SORT_KEY : prevSortKey);
     let sortConst = "SORT_BY_" + key + "_" + dir.toUpperCase();
     let expectedSortMode = Ci.nsINavHistoryQueryOptions[sortConst];
     setSort(aOrganizerWin, aPlaceContentTree, aUnsortFirst, false, null, dir);
     checkSort(aPlaceContentTree, expectedSortMode, "");
   });
 }
 
 function test() {
   waitForExplicitFinish();
 
-  openLibrary(function (win) {
+  openLibrary(function(win) {
         let tree = win.document.getElementById("placeContent");
         isnot(tree, null, "sanity check: placeContent tree should exist");
         // Run the tests.
         testSortByColAndDir(win, tree, true);
         testSortByColAndDir(win, tree, false);
         testSortByDir(win, tree, true);
         testSortByDir(win, tree, false);
         testInvalid(win, tree);
--- a/browser/components/places/tests/browser/browser_views_liveupdate.js
+++ b/browser/components/places/tests/browser/browser_views_liveupdate.js
@@ -147,17 +147,17 @@ function startTest() {
                          PlacesUtils._uri("http://ubf1.mozilla.org/"),
                          bs.DEFAULT_INDEX,
                          "bubf1");
   bs.setItemTitle(id, "bubf1_edited");
   addedBookmarks.push(id);
   bs.moveItem(id, bs.unfiledBookmarksFolder, 0);
 
   // Remove all added bookmarks.
-  addedBookmarks.forEach(function (aItem) {
+  addedBookmarks.forEach(function(aItem) {
     // If we remove an item after its containing folder has been removed,
     // this will throw, but we can ignore that.
     try {
       bs.removeItem(aItem);
     } catch (ex) {}
   });
 
   // Remove observers.
--- a/browser/components/places/tests/browser/head.js
+++ b/browser/components/places/tests/browser/head.js
@@ -19,17 +19,17 @@ registerCleanupFunction(function() {
     PlacesUIUtils.__defineGetter__("leftPaneFolderId", cachedLeftPaneFolderIdGetter);
   }
 });
 
 function openLibrary(callback, aLeftPaneRoot) {
   let library = window.openDialog("chrome://browser/content/places/places.xul",
                                   "", "chrome,toolbar=yes,dialog=no,resizable",
                                   aLeftPaneRoot);
-  waitForFocus(function () {
+  waitForFocus(function() {
     callback(library);
   }, library);
 
   return library;
 }
 
 /**
  * Returns a handle to a Library window.
--- a/browser/components/places/tests/unit/test_PUIU_makeTransaction.js
+++ b/browser/components/places/tests/unit/test_PUIU_makeTransaction.js
@@ -1,15 +1,15 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 function waitForBookmarkNotification(aNotification, aCallback, aProperty)
 {
   PlacesUtils.bookmarks.addObserver({
-    validate: function (aMethodName, aData)
+    validate: function(aMethodName, aData)
     {
       if (aMethodName == aNotification &&
           (!aProperty || aProperty == aData.property)) {
         PlacesUtils.bookmarks.removeObserver(this);
         aCallback(aData);
       }
     },
 
--- a/browser/components/places/tests/unit/test_browserGlue_corrupt.js
+++ b/browser/components/places/tests/unit/test_browserGlue_corrupt.js
@@ -16,17 +16,17 @@ function run_test() {
   remove_all_JSON_backups();
 
   // Create our JSON backup from bookmarks.glue.json.
   create_JSON_backup("bookmarks.glue.json");
 
   run_next_test();
 }
 
-do_register_cleanup(function () {
+do_register_cleanup(function() {
   remove_bookmarks_html();
   remove_all_JSON_backups();
   return PlacesUtils.bookmarks.eraseEverything();
 });
 
 add_task(function* test_main() {
   // Create a corrupt database.
   yield createCorruptDB();
--- a/browser/components/places/tests/unit/test_browserGlue_distribution.js
+++ b/browser/components/places/tests/unit/test_browserGlue_distribution.js
@@ -30,17 +30,17 @@ function run_test() {
   let testDistributionFile = gTestDir.clone();
   testDistributionFile.append("distribution.ini");
   testDistributionFile.copyTo(distroDir, "distribution.ini");
   Assert.ok(testDistributionFile.exists());
 
   run_next_test();
 }
 
-do_register_cleanup(function () {
+do_register_cleanup(function() {
   // Remove the distribution file, even if the test failed, otherwise all
   // next tests will import it.
   let iniFile = gProfD.clone();
   iniFile.leafName = "distribution";
   iniFile.append("distribution.ini");
   if (iniFile.exists()) {
     iniFile.remove(false);
   }
--- a/browser/components/places/tests/unit/test_browserGlue_prefs.js
+++ b/browser/components/places/tests/unit/test_browserGlue_prefs.js
@@ -24,17 +24,17 @@ function run_test() {
   remove_all_JSON_backups();
 
   // Create our JSON backup from bookmarks.glue.json.
   create_JSON_backup("bookmarks.glue.json");
 
   run_next_test();
 }
 
-do_register_cleanup(function () {
+do_register_cleanup(function() {
   remove_bookmarks_html();
   remove_all_JSON_backups();
 
   return PlacesUtils.bookmarks.eraseEverything();
 });
 
 function simulatePlacesInit() {
   do_print("Simulate Places init");
--- a/browser/components/places/tests/unit/test_browserGlue_restore.js
+++ b/browser/components/places/tests/unit/test_browserGlue_restore.js
@@ -19,17 +19,17 @@ function run_test() {
   create_JSON_backup("bookmarks.glue.json");
 
   // Remove current database file.
   clearDB();
 
   run_next_test();
 }
 
-do_register_cleanup(function () {
+do_register_cleanup(function() {
   remove_bookmarks_html();
   remove_all_JSON_backups();
   return PlacesUtils.bookmarks.eraseEverything();
 });
 
 add_task(function* test_main() {
   // Initialize nsBrowserGlue before Places.
   Cc["@mozilla.org/browser/browserglue;1"].getService(Ci.nsISupports);
--- a/browser/components/places/tests/unit/test_clearHistory_shutdown.js
+++ b/browser/components/places/tests/unit/test_clearHistory_shutdown.js
@@ -128,21 +128,21 @@ function getFormHistoryCount() {
 }
 
 function storeCache(aURL, aContent) {
   let cache = Services.cache2;
   let storage = cache.diskCacheStorage(LoadContextInfo.default, false);
 
   return new Promise(resolve => {
     let storeCacheListener = {
-      onCacheEntryCheck: function (entry, appcache) {
+      onCacheEntryCheck: function(entry, appcache) {
         return Ci.nsICacheEntryOpenCallback.ENTRY_WANTED;
       },
 
-      onCacheEntryAvailable: function (entry, isnew, appcache, status) {
+      onCacheEntryAvailable: function(entry, isnew, appcache, status) {
         do_check_eq(status, Cr.NS_OK);
 
         entry.setMetaDataElement("servertype", "0");
         var os = entry.openOutputStream(0);
 
         var written = os.write(aContent, aContent.length);
         if (written != aContent.length) {
           do_throw("os.write has not written all data!\n" +
@@ -163,17 +163,17 @@ function storeCache(aURL, aContent) {
 
 
 function checkCache(aURL) {
   let cache = Services.cache2;
   let storage = cache.diskCacheStorage(LoadContextInfo.default, false);
 
   return new Promise(resolve => {
     let checkCacheListener = {
-      onCacheEntryAvailable: function (entry, isnew, appcache, status) {
+      onCacheEntryAvailable: function(entry, isnew, appcache, status) {
         do_check_eq(status, Cr.NS_ERROR_CACHE_KEY_NOT_FOUND);
         resolve();
       }
     };
 
     storage.asyncOpenURI(Services.io.newURI(aURL, null, null), "",
                         Ci.nsICacheStorage.OPEN_READONLY,
                         checkCacheListener);
--- a/browser/components/preferences/blocklists.js
+++ b/browser/components/preferences/blocklists.js
@@ -17,17 +17,17 @@ var gBlocklistManager = {
   _bundle: null,
   _tree: null,
 
   _view: {
     _rowCount: 0,
     get rowCount() {
       return this._rowCount;
     },
-    getCellText: function (row, column) {
+    getCellText: function(row, column) {
       if (column.id == "listCol") {
         let list = gBlocklistManager._blockLists[row];
         let desc = list.description ? list.description : "";
         let text = gBlocklistManager._bundle.getFormattedString("mozNameTemplate",
                                                                 [list.name, desc]);
         return text;
       }
       return "";
@@ -51,31 +51,31 @@ var gBlocklistManager = {
       if (column.id == "selectionCol") {
         return "checkmark";
       }
 
       return "";
     }
   },
 
-  onWindowKeyPress: function (event) {
+  onWindowKeyPress: function(event) {
     if (event.keyCode == KeyEvent.DOM_VK_ESCAPE) {
       window.close();
     } else if (event.keyCode == KeyEvent.DOM_VK_RETURN) {
       gBlocklistManager.onApplyChanges();
     }
   },
 
-  onLoad: function () {
+  onLoad: function() {
     this._bundle = document.getElementById("bundlePreferences");
     let params = window.arguments[0];
     this.init(params);
   },
 
-  init: function (params) {
+  init: function(params) {
     if (this._type) {
       // reusing an open dialog, clear the old observer
       this.uninit();
     }
 
     this._type = "tracking";
     this._brandShortName = params.brandShortName;
 
@@ -92,28 +92,28 @@ var gBlocklistManager = {
       if (event.target.nodeName != "treecol" || event.button != 0) {
         return;
       }
     });
 
     this._loadBlockLists();
   },
 
-  uninit: function () {},
+  uninit: function() {},
 
-  onListSelected: function () {
+  onListSelected: function() {
     for (let list of this._blockLists) {
       list.selected = false;
     }
     this._blockLists[this._tree.currentIndex].selected = true;
 
     this._updateTree();
   },
 
-  onApplyChanges: function () {
+  onApplyChanges: function() {
     let activeList = this._getActiveList();
     let selected = null;
     for (let list of this._blockLists) {
       if (list.selected) {
         selected = list;
         break;
       }
     }
@@ -148,17 +148,17 @@ var gBlocklistManager = {
       }
 
       // Don't close the dialog in case we didn't quit.
       return;
     }
     window.close();
   },
 
-  _loadBlockLists: function () {
+  _loadBlockLists: function() {
     this._blockLists = [];
 
     // Load blocklists into a table.
     let branch = Services.prefs.getBranch(LISTS_PREF_BRANCH);
     let itemArray = branch.getChildList("");
     for (let itemName of itemArray) {
       try {
         this._createOrUpdateBlockList(itemName);
@@ -166,17 +166,17 @@ var gBlocklistManager = {
         // Ignore bogus or missing list name.
         continue;
       }
     }
 
     this._updateTree();
   },
 
-  _createOrUpdateBlockList: function (itemName) {
+  _createOrUpdateBlockList: function(itemName) {
     let branch = Services.prefs.getBranch(LISTS_PREF_BRANCH);
     let key = branch.getCharPref(itemName);
     let value = this._bundle.getString(key);
 
     let suffix = itemName.slice(itemName.lastIndexOf("."));
     let id = itemName.replace(suffix, "");
     let list = this._blockLists.find(el => el.id === id);
     if (!list) {
@@ -187,23 +187,23 @@ var gBlocklistManager = {
 
     // Get the property name from the suffix (e.g. ".name" -> "name").
     let prop = suffix.slice(1);
     list[prop] = value;
 
     return list;
   },
 
-  _updateTree: function () {
+  _updateTree: function() {
     this._tree = document.getElementById("blocklistsTree");
     this._view._rowCount = this._blockLists.length;
     this._tree.view = this._view;
   },
 
-  _getActiveList: function () {
+  _getActiveList: function() {
     let trackingTable = Services.prefs.getCharPref(TRACKING_TABLE_PREF);
     return trackingTable.includes(CONTENT_LIST_ID) ? CONTENT_LIST_ID : BASE_LIST_ID;
   }
 };
 
 function initWithParams(params) {
   gBlocklistManager.init(params);
 }
--- a/browser/components/preferences/connection.js
+++ b/browser/components/preferences/connection.js
@@ -1,15 +1,15 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
 /* 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/. */
 
 var gConnectionsDialog = {
-  beforeAccept: function ()
+  beforeAccept: function()
   {
     var proxyTypePref = document.getElementById("network.proxy.type");
     if (proxyTypePref.value == 2) {
       this.doAutoconfigURLFixup();
       return true;
     }
 
     if (proxyTypePref.value != 1)
@@ -47,23 +47,23 @@ var gConnectionsDialog = {
       }
     }
 
     this.sanitizeNoProxiesPref();
 
     return true;
   },
 
-  checkForSystemProxy: function ()
+  checkForSystemProxy: function()
   {
     if ("@mozilla.org/system-proxy-settings;1" in Components.classes)
       document.getElementById("systemPref").removeAttribute("hidden");
   },
 
-  proxyTypeChanged: function ()
+  proxyTypeChanged: function()
   {
     var proxyTypePref = document.getElementById("network.proxy.type");
 
     // Update http
     var httpProxyURLPref = document.getElementById("network.proxy.http");
     httpProxyURLPref.disabled = proxyTypePref.value != 1;
     var httpProxyPortPref = document.getElementById("network.proxy.http_port");
     httpProxyPortPref.disabled = proxyTypePref.value != 1;
@@ -79,27 +79,27 @@ var gConnectionsDialog = {
     noProxiesPref.disabled = proxyTypePref.value != 1;
 
     var autoconfigURLPref = document.getElementById("network.proxy.autoconfig_url");
     autoconfigURLPref.disabled = proxyTypePref.value != 2;
 
     this.updateReloadButton();
   },
 
-  updateDNSPref: function ()
+  updateDNSPref: function()
   {
     var socksVersionPref = document.getElementById("network.proxy.socks_version");
     var socksDNSPref = document.getElementById("network.proxy.socks_remote_dns");
     var proxyTypePref = document.getElementById("network.proxy.type");
     var isDefinitelySocks4 = !socksVersionPref.disabled && socksVersionPref.value == 4;
     socksDNSPref.disabled = (isDefinitelySocks4 || proxyTypePref.value == 0);
     return undefined;
   },
 
-  updateReloadButton: function ()
+  updateReloadButton: function()
   {
     // Disable the "Reload PAC" button if the selected proxy type is not PAC or
     // if the current value of the PAC textbox does not match the value stored
     // in prefs.  Likewise, disable the reload button if PAC is not configured
     // in prefs.
 
     var typedURL = document.getElementById("networkProxyAutoconfigURL").value;
     var proxyTypeCur = document.getElementById("network.proxy.type").value;
@@ -111,23 +111,23 @@ var gConnectionsDialog = {
     var proxyType = prefs.getIntPref("network.proxy.type");
 
     var disableReloadPref =
         document.getElementById("pref.advanced.proxies.disable_button.reload");
     disableReloadPref.disabled =
         (proxyTypeCur != 2 || proxyType != 2 || typedURL != pacURL);
   },
 
-  readProxyType: function ()
+  readProxyType: function()
   {
     this.proxyTypeChanged();
     return undefined;
   },
 
-  updateProtocolPrefs: function ()
+  updateProtocolPrefs: function()
   {
     var proxyTypePref = document.getElementById("network.proxy.type");
     var shareProxiesPref = document.getElementById("network.proxy.share_proxy_settings");
     var proxyPrefs = ["ssl", "ftp", "socks"];
     for (var i = 0; i < proxyPrefs.length; ++i) {
       var proxyServerURLPref = document.getElementById("network.proxy." + proxyPrefs[i]);
       var proxyPortPref = document.getElementById("network.proxy." + proxyPrefs[i] + "_port");
 
@@ -151,35 +151,35 @@ var gConnectionsDialog = {
       proxyPortPref.disabled = proxyServerURLPref.disabled;
     }
     var socksVersionPref = document.getElementById("network.proxy.socks_version");
     socksVersionPref.disabled = proxyTypePref.value != 1 || shareProxiesPref.value;
     this.updateDNSPref();
     return undefined;
   },
 
-  readProxyProtocolPref: function (aProtocol, aIsPort)
+  readProxyProtocolPref: function(aProtocol, aIsPort)
   {
     var shareProxiesPref = document.getElementById("network.proxy.share_proxy_settings");
     if (shareProxiesPref.value) {
       var pref = document.getElementById("network.proxy.http" + (aIsPort ? "_port" : ""));
       return pref.value;
     }
 
     var backupPref = document.getElementById("network.proxy.backup." + aProtocol + (aIsPort ? "_port" : ""));
     return backupPref.hasUserValue ? backupPref.value : undefined;
   },
 
-  reloadPAC: function ()
+  reloadPAC: function()
   {
     Components.classes["@mozilla.org/network/protocol-proxy-service;1"].
         getService().reloadPAC();
   },
 
-  doAutoconfigURLFixup: function ()
+  doAutoconfigURLFixup: function()
   {
     var autoURL = document.getElementById("networkProxyAutoconfigURL");
     var autoURLPref = document.getElementById("network.proxy.autoconfig_url");
     var URIFixup = Components.classes["@mozilla.org/docshell/urifixup;1"]
                              .getService(Components.interfaces.nsIURIFixup);
     try {
       autoURLPref.value = autoURL.value = URIFixup.createFixupURI(autoURL.value, 0).spec;
     } catch (ex) {}
@@ -190,24 +190,24 @@ var gConnectionsDialog = {
     var noProxiesPref = document.getElementById("network.proxy.no_proxies_on");
     // replace substrings of ; and \n with commas if they're neither immediately
     // preceded nor followed by a valid separator character
     noProxiesPref.value = noProxiesPref.value.replace(/([^, \n;])[;\n]+(?![,\n;])/g, '$1,');
     // replace any remaining ; and \n since some may follow commas, etc.
     noProxiesPref.value = noProxiesPref.value.replace(/[;\n]/g, '');
   },
 
-  readHTTPProxyServer: function ()
+  readHTTPProxyServer: function()
   {
     var shareProxiesPref = document.getElementById("network.proxy.share_proxy_settings");
     if (shareProxiesPref.value)
       this.updateProtocolPrefs();
     return undefined;
   },
 
-  readHTTPProxyPort: function ()
+  readHTTPProxyPort: function()
   {
     var shareProxiesPref = document.getElementById("network.proxy.share_proxy_settings");
     if (shareProxiesPref.value)
       this.updateProtocolPrefs();
     return undefined;
   }
 };
--- a/browser/components/preferences/cookies.js
+++ b/browser/components/preferences/cookies.js
@@ -16,17 +16,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 var gCookiesWindow = {
   _cm               : Components.classes["@mozilla.org/cookiemanager;1"]
                                 .getService(Components.interfaces.nsICookieManager),
   _hosts            : {},
   _hostOrder        : [],
   _tree             : null,
   _bundle           : null,
 
-  init: function () {
+  init: function() {
     var os = Components.classes["@mozilla.org/observer-service;1"]
                        .getService(Components.interfaces.nsIObserverService);
     os.addObserver(this, "cookie-changed", false);
     os.addObserver(this, "perm-changed", false);
 
     this._bundle = document.getElementById("bundlePreferences");
     this._tree = document.getElementById("cookiesList");
 
@@ -34,24 +34,24 @@ var gCookiesWindow = {
 
     document.getElementById("filter").focus();
 
     if (!Services.prefs.getBoolPref("privacy.userContext.enabled")) {
       document.getElementById("userContextRow").hidden = true;
     }
   },
 
-  uninit: function () {
+  uninit: function() {
     var os = Components.classes["@mozilla.org/observer-service;1"]
                        .getService(Components.interfaces.nsIObserverService);
     os.removeObserver(this, "cookie-changed");
     os.removeObserver(this, "perm-changed");
   },
 
-  _populateList: function (aInitialLoad) {
+  _populateList: function(aInitialLoad) {
     this._loadCookies();
     this._tree.view = this._view;
     if (aInitialLoad)
       this.sort("rawHost");
     if (this._view.rowCount > 0)
       this._tree.view.selection.select(0);
 
     if (aInitialLoad) {
@@ -64,34 +64,34 @@ var gCookiesWindow = {
       this.filter();
     }
 
     this._updateRemoveAllButton();
 
     this._saveState();
   },
 
-  _cookieEquals: function (aCookieA, aCookieB, aStrippedHost) {
+  _cookieEquals: function(aCookieA, aCookieB, aStrippedHost) {
     return aCookieA.rawHost == aStrippedHost &&
            aCookieA.name == aCookieB.name &&
            aCookieA.path == aCookieB.path &&
            ChromeUtils.isOriginAttributesEqual(aCookieA.originAttributes,
                                                aCookieB.originAttributes);
   },
 
-  _isPrivateCookie: function (aCookie) {
+  _isPrivateCookie: function(aCookie) {
       let { userContextId } = aCookie.originAttributes;
       if (!userContextId) {
         // Default identity is public.
         return false;
       }
       return !ContextualIdentityService.getIdentityFromId(userContextId).public;
   },
 
-  observe: function (aCookie, aTopic, aData) {
+  observe: function(aCookie, aTopic, aData) {
     if (aTopic != "cookie-changed")
       return;
 
     if (aCookie instanceof Components.interfaces.nsICookie) {
       if (this._isPrivateCookie(aCookie)) {
         return;
       }
 
@@ -118,17 +118,17 @@ var gCookiesWindow = {
       // then, reload the list
       this._populateList(false);
     }
 
     // We don't yet handle aData == "deleted" - it's a less common case
     // and is rather complicated as selection tracking is difficult
   },
 
-  _handleCookieChanged: function (changedCookie, strippedHost) {
+  _handleCookieChanged: function(changedCookie, strippedHost) {
     var rowIndex = 0;
     var cookieItem = null;
     if (!this._view._filtered) {
       for (let host of this._hostOrder) {
         ++rowIndex;
         var hostItem = this._hosts[host];
         if (host == strippedHost) {
           // Host matches, look for the cookie within this Host collection
@@ -167,17 +167,17 @@ var gCookiesWindow = {
 
     // Make sure the tree display is up to date...
     this._tree.treeBoxObject.invalidateRow(rowIndex);
     // ... and if the cookie is selected, update the displayed metadata too
     if (cookieItem != null && this._view.selection.currentIndex == rowIndex)
       this._updateCookieData(cookieItem);
   },
 
-  _handleCookieAdded: function (changedCookie, strippedHost) {
+  _handleCookieAdded: function(changedCookie, strippedHost) {
     var rowCountImpact = 0;
     var addedHost = { value: 0 };
     this._addCookie(strippedHost, changedCookie, addedHost);
     if (!this._view._filtered) {
       // The Host collection for this cookie already exists, and it's not open,
       // so don't increment the rowCountImpact becaues the user is not going to
       // see the additional rows as they're hidden.
       if (addedHost.value || this._hosts[strippedHost].open)
@@ -207,17 +207,17 @@ var gCookiesWindow = {
     _filterValue: "",
     _rowCount   : 0,
     _cacheValid : 0,
     _cacheItems : [],
     get rowCount() {
       return this._rowCount;
     },
 
-    _getItemAtIndex: function (aIndex) {
+    _getItemAtIndex: function(aIndex) {
       if (this._filtered)
         return this._filterSet[aIndex];
 
       var start = 0;
       var count = 0, hostIndex = 0;
 
       var cacheIndex = Math.min(this._cacheValid, aIndex);
       if (cacheIndex > 0) {
@@ -262,17 +262,17 @@ var gCookiesWindow = {
 
         for (let k = cacheStart; k < count; k++)
           this._cacheItems[k] = cacheEntry;
         this._cacheValid = count - 1;
       }
       return null;
     },
 
-    _removeItemAtIndex: function (aIndex, aCount) {
+    _removeItemAtIndex: function(aIndex, aCount) {
       let removeCount = aCount === undefined ? 1 : aCount;
       if (this._filtered) {
         // remove the cookies from the unfiltered set so that they
         // don't reappear when the filter is changed. See bug 410863.
         for (let i = aIndex; i < aIndex + removeCount; ++i) {
           let item = this._filterSet[i];
           let parent = gCookiesWindow._hosts[item.rawHost];
           for (let j = 0; j < parent.cookies.length; ++j) {
@@ -301,21 +301,21 @@ var gCookiesWindow = {
               ChromeUtils.isOriginAttributesEqual(item.originAttributes,
                                                   cookie.originAttributes)) {
             parent.cookies.splice(i, removeCount);
           }
         }
       }
     },
 
-    _invalidateCache: function (aIndex) {
+    _invalidateCache: function(aIndex) {
       this._cacheValid = Math.min(this._cacheValid, aIndex);
     },
 
-    getCellText: function (aIndex, aColumn) {
+    getCellText: function(aIndex, aColumn) {
       if (!this._filtered) {
         var item = this._getItemAtIndex(aIndex);
         if (!item)
           return "";
         if (aColumn.id == "domainCol")
           return item.rawHost;
         else if (aColumn.id == "nameCol")
           return item.name;
@@ -324,62 +324,62 @@ var gCookiesWindow = {
         return this._filterSet[aIndex].rawHost;
       } else if (aColumn.id == "nameCol") {
         return this._filterSet[aIndex].name;
       }
       return "";
     },
 
     _selection: null,
-    get selection () { return this._selection; },
-    set selection (val) { this._selection = val; return val; },
-    getRowProperties: function (aIndex) { return ""; },
-    getCellProperties: function (aIndex, aColumn) { return ""; },
-    getColumnProperties: function (aColumn) { return ""; },
-    isContainer: function (aIndex) {
+    get selection() { return this._selection; },
+    set selection(val) { this._selection = val; return val; },
+    getRowProperties: function(aIndex) { return ""; },
+    getCellProperties: function(aIndex, aColumn) { return ""; },
+    getColumnProperties: function(aColumn) { return ""; },
+    isContainer: function(aIndex) {
       if (!this._filtered) {
         var item = this._getItemAtIndex(aIndex);
         if (!item) return false;
         return item.container;
       }
       return false;
     },
-    isContainerOpen: function (aIndex) {
+    isContainerOpen: function(aIndex) {
       if (!this._filtered) {
         var item = this._getItemAtIndex(aIndex);
         if (!item) return false;
         return item.open;
       }
       return false;
     },
-    isContainerEmpty: function (aIndex) {
+    isContainerEmpty: function(aIndex) {
       if (!this._filtered) {
         var item = this._getItemAtIndex(aIndex);
         if (!item) return false;
         return item.cookies.length == 0;
       }
       return false;
     },
-    isSeparator: function (aIndex) { return false; },
-    isSorted: function (aIndex) { return false; },
-    canDrop: function (aIndex, aOrientation) { return false; },
-    drop: function (aIndex, aOrientation) {},
-    getParentIndex: function (aIndex) {
+    isSeparator: function(aIndex) { return false; },
+    isSorted: function(aIndex) { return false; },
+    canDrop: function(aIndex, aOrientation) { return false; },
+    drop: function(aIndex, aOrientation) {},
+    getParentIndex: function(aIndex) {
       if (!this._filtered) {
         var item = this._getItemAtIndex(aIndex);
         // If an item has no parent index (i.e. it is at the top level) this
         // function MUST return -1 otherwise we will go into an infinite loop.
         // Containers are always top level items in the cookies tree, so make
         // sure to return the appropriate value here.
         if (!item || item.container) return -1;
         return item.parentIndex;
       }
       return -1;
     },
-    hasNextSibling: function (aParentIndex, aIndex) {
+    hasNextSibling: function(aParentIndex, aIndex) {
       if (!this._filtered) {
         // |aParentIndex| appears to be bogus, but we can get the real
         // parent index by getting the entry for |aIndex| and reading the
         // parentIndex field.
         // The index of the last item in this host collection is the
         // index of the parent + the size of the host collection, and
         // aIndex has a next sibling if it is less than this value.
         var item = this._getItemAtIndex(aIndex);
@@ -394,103 +394,103 @@ var gCookiesWindow = {
           }
           var parent = this._getItemAtIndex(item.parentIndex);
           if (parent && parent.container)
             return aIndex < item.parentIndex + parent.cookies.length;
         }
       }
       return aIndex < this.rowCount - 1;
     },
-    hasPreviousSibling: function (aIndex) {
+    hasPreviousSibling: function(aIndex) {
       if (!this._filtered) {
         var item = this._getItemAtIndex(aIndex);
         if (!item) return false;
         var parent = this._getItemAtIndex(item.parentIndex);
         if (parent && parent.container)
           return aIndex > item.parentIndex + 1;
       }
       return aIndex > 0;
     },
-    getLevel: function (aIndex) {
+    getLevel: function(aIndex) {
       if (!this._filtered) {
         var item = this._getItemAtIndex(aIndex);
         if (!item) return 0;
         return item.level;
       }
       return 0;
     },
-    getImageSrc: function (aIndex, aColumn) {},
-    getProgressMode: function (aIndex, aColumn) {},
-    getCellValue: function (aIndex, aColumn) {},
-    setTree: function (aTree) {},
-    toggleOpenState: function (aIndex) {
+    getImageSrc: function(aIndex, aColumn) {},
+    getProgressMode: function(aIndex, aColumn) {},
+    getCellValue: function(aIndex, aColumn) {},
+    setTree: function(aTree) {},
+    toggleOpenState: function(aIndex) {
       if (!this._filtered) {
         var item = this._getItemAtIndex(aIndex);
         if (!item) return;
         this._invalidateCache(aIndex);
         var multiplier = item.open ? -1 : 1;
         var delta = multiplier * item.cookies.length;
         this._rowCount += delta;
         item.open = !item.open;
         gCookiesWindow._tree.treeBoxObject.rowCountChanged(aIndex + 1, delta);
         gCookiesWindow._tree.treeBoxObject.invalidateRow(aIndex);
       }
     },
-    cycleHeader: function (aColumn) {},
-    selectionChanged: function () {},
-    cycleCell: function (aIndex, aColumn) {},
-    isEditable: function (aIndex, aColumn) {
+    cycleHeader: function(aColumn) {},
+    selectionChanged: function() {},
+    cycleCell: function(aIndex, aColumn) {},
+    isEditable: function(aIndex, aColumn) {
       return false;
     },
-    isSelectable: function (aIndex, aColumn) {
+    isSelectable: function(aIndex, aColumn) {
       return false;
     },
-    setCellValue: function (aIndex, aColumn, aValue) {},
-    setCellText: function (aIndex, aColumn, aValue) {},
-    performAction: function (aAction) {},
-    performActionOnRow: function (aAction, aIndex) {},
-    performActionOnCell: function (aAction, aindex, aColumn) {}
+    setCellValue: function(aIndex, aColumn, aValue) {},
+    setCellText: function(aIndex, aColumn, aValue) {},
+    performAction: function(aAction) {},
+    performActionOnRow: function(aAction, aIndex) {},
+    performActionOnCell: function(aAction, aindex, aColumn) {}
   },
 
-  _makeStrippedHost: function (aHost) {
+  _makeStrippedHost: function(aHost) {
     var formattedHost = aHost.charAt(0) == "." ? aHost.substring(1, aHost.length) : aHost;
     return formattedHost.substring(0, 4) == "www." ? formattedHost.substring(4, formattedHost.length) : formattedHost;
   },
 
-  _addCookie: function (aStrippedHost, aCookie, aHostCount) {
+  _addCookie: function(aStrippedHost, aCookie, aHostCount) {
     if (!(aStrippedHost in this._hosts) || !this._hosts[aStrippedHost]) {
       this._hosts[aStrippedHost] = { cookies   : [],
                                      rawHost   : aStrippedHost,
                                      level     : 0,
                                      open      : false,
                                      container : true };
       this._hostOrder.push(aStrippedHost);
       ++aHostCount.value;
     }
 
     var c = this._makeCookieObject(aStrippedHost, aCookie);
     this._hosts[aStrippedHost].cookies.push(c);
   },
 
-  _makeCookieObject: function (aStrippedHost, aCookie) {
+  _makeCookieObject: function(aStrippedHost, aCookie) {
     var c = { name            : aCookie.name,
               value           : aCookie.value,
               isDomain        : aCookie.isDomain,
               host            : aCookie.host,
               rawHost         : aStrippedHost,
               path            : aCookie.path,
               isSecure        : aCookie.isSecure,
               expires         : aCookie.expires,
               level           : 1,
               container       : false,
               originAttributes: aCookie.originAttributes };
     return c;
   },
 
-  _loadCookies: function () {
+  _loadCookies: function() {
     var e = this._cm.enumerator;
     var hostCount = { value: 0 };
     this._hosts = {};
     this._hostOrder = [];
     while (e.hasMoreElements()) {
       var cookie = e.getNext();
       if (cookie && cookie instanceof Components.interfaces.nsICookie) {
         if (this._isPrivateCookie(cookie)) {
@@ -501,17 +501,17 @@ var gCookiesWindow = {
         this._addCookie(strippedHost, cookie, hostCount);
       }
       else
         break;
     }
     this._view._rowCount = hostCount.value;
   },
 
-  formatExpiresString: function (aExpires) {
+  formatExpiresString: function(aExpires) {
     if (aExpires) {
       var date = new Date(1000 * aExpires);
       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);
@@ -522,17 +522,17 @@ var gCookiesWindow = {
   _getUserContextString: function(aUserContextId) {
     if (parseInt(aUserContextId) == 0) {
       return this._bundle.getString("defaultUserContextLabel");
     }
 
     return ContextualIdentityService.getUserContextLabel(aUserContextId);
   },
 
-  _updateCookieData: function (aItem) {
+  _updateCookieData: function(aItem) {
     var seln = this._view.selection;
     var ids = ["name", "value", "host", "path", "isSecure", "expires", "userContext"];
     var properties;
 
     if (aItem && !aItem.container && seln.count > 0) {
       properties = { name: aItem.name, value: aItem.value, host: aItem.host,
                      path: aItem.path, expires: this.formatExpiresString(aItem.expires),
                      isDomain: aItem.isDomain ? this._bundle.getString("domainColon")
@@ -552,17 +552,17 @@ var gCookiesWindow = {
       for (let id of ids) {
         document.getElementById(id).disabled = true;
       }
     }
     for (let property in properties)
       document.getElementById(property).value = properties[property];
   },
 
-  onCookieSelected: function () {
+  onCookieSelected: function() {
     var item;
     var seln = this._tree.view.selection;
     if (!this._view._filtered)
       item = this._view._getItemAtIndex(seln.currentIndex);
     else
       item = this._view._filterSet[seln.currentIndex];
 
     this._updateCookieData(item);
@@ -597,17 +597,17 @@ var gCookiesWindow = {
     if (psvc.prefHasUserValue("network.cookie.blockFutureCookies"))
       blockFutureCookies = psvc.getBoolPref("network.cookie.blockFutureCookies");
     for (let item of deleteItems) {
       this._cm.remove(item.host, item.name, item.path,
                       blockFutureCookies, item.originAttributes);
     }
   },
 
-  deleteCookie: function () {
+  deleteCookie: function() {
     // Selection Notes
     // - Selection always moves to *NEXT* adjacent item unless item
     //   is last child at a given level in which case it moves to *PREVIOUS*
     //   item
     //
     // Selection Cases (Somewhat Complicated)
     //
     // 1) Single cookie selected, host has single child
@@ -723,17 +723,17 @@ var gCookiesWindow = {
     if (nextSelected < 0)
       seln.clearSelection();
     else {
       seln.select(nextSelected);
       this._tree.focus();
     }
   },
 
-  deleteAllCookies: function () {
+  deleteAllCookies: function() {
     if (this._view._filtered) {
       var rowCount = this._view.rowCount;
       var deleteItems = [];
       for (let index = 0; index < rowCount; index++) {
         deleteItems.push(this._view._getItemAtIndex(index));
       }
       this._view._removeItemAtIndex(0, rowCount);
       this._view._rowCount = 0;
@@ -742,28 +742,28 @@ var gCookiesWindow = {
     }
     else {
       this._cm.removeAll();
     }
     this._updateRemoveAllButton();
     this.focusFilterBox();
   },
 
-  onCookieKeyPress: function (aEvent) {
+  onCookieKeyPress: function(aEvent) {
     if (aEvent.keyCode == KeyEvent.DOM_VK_DELETE) {
       this.deleteCookie();
     } else if (AppConstants.platform == "macosx" &&
                aEvent.keyCode == KeyEvent.DOM_VK_BACK_SPACE) {
       this.deleteCookie();
     }
   },
 
   _lastSortProperty : "",
   _lastSortAscending: false,
-  sort: function (aProperty) {
+  sort: function(aProperty) {
     var ascending = (aProperty == this._lastSortProperty) ? !this._lastSortAscending : true;
     // Sort the Non-Filtered Host Collections
     if (aProperty == "rawHost") {
       function sortByHost(a, b) {
         return a.toLowerCase().localeCompare(b.toLowerCase());
       }
       this._hostOrder.sort(sortByHost);
       if (!ascending)
@@ -804,17 +804,17 @@ var gCookiesWindow = {
     this._view.selection.select(0);
     this._tree.treeBoxObject.invalidate();
     this._tree.treeBoxObject.ensureRowIsVisible(0);
 
     this._lastSortAscending = ascending;
     this._lastSortProperty = aProperty;
   },
 
-  clearFilter: function () {
+  clearFilter: function() {
     // Revert to single-select in the tree
     this._tree.setAttribute("seltype", "single");
 
     // Clear the Tree Display
     this._view._filtered = false;
     this._view._rowCount = 0;
     this._tree.treeBoxObject.rowCountChanged(0, -this._view._filterSet.length);
     this._view._filterSet = [];
@@ -846,39 +846,39 @@ var gCookiesWindow = {
       this._view.selection.rangedSelect(range.min, range.max, true);
     }
     this._lastSelectedRanges = [];
 
     document.getElementById("cookiesIntro").value = this._bundle.getString("cookiesAll");
     this._updateRemoveAllButton();
   },
 
-  _cookieMatchesFilter: function (aCookie) {
+  _cookieMatchesFilter: function(aCookie) {
     return aCookie.rawHost.indexOf(this._view._filterValue) != -1 ||
            aCookie.name.indexOf(this._view._filterValue) != -1 ||
            aCookie.value.indexOf(this._view._filterValue) != -1;
   },
 
-  _filterCookies: function (aFilterValue) {
+  _filterCookies: function(aFilterValue) {
     this._view._filterValue = aFilterValue;
     var cookies = [];
     for (let i = 0; i < gCookiesWindow._hostOrder.length; ++i) { // var host in gCookiesWindow._hosts) {
       let currHost = gCookiesWindow._hosts[gCookiesWindow._hostOrder[i]]; // gCookiesWindow._hosts[host];
       if (!currHost) continue;
       for (let cookie of currHost.cookies) {
         if (this._cookieMatchesFilter(cookie))
           cookies.push(cookie);
       }
     }
     return cookies;
   },
 
   _lastSelectedRanges: [],
   _openIndices: [],
-  _saveState: function () {
+  _saveState: function() {
     // Save selection
     var seln = this._view.selection;
     this._lastSelectedRanges = [];
     var rangeCount = seln.getRangeCount();
     for (let i = 0; i < rangeCount; ++i) {
       var min = {}; var max = {};
       seln.getRangeAt(i, min, max);
       this._lastSelectedRanges.push({ min: min.value, max: max.value });
@@ -892,17 +892,17 @@ var gCookiesWindow = {
         this._openIndices.push(i);
     }
   },
 
   _updateRemoveAllButton: function gCookiesWindow__updateRemoveAllButton() {
     document.getElementById("removeAllCookies").disabled = this._view._rowCount == 0;
   },
 
-  filter: function () {
+  filter: function() {
     var filter = document.getElementById("filter").value;
     if (filter == "") {
       gCookiesWindow.clearFilter();
       return;
     }
     var view = gCookiesWindow._view;
     view._filterSet = gCookiesWindow._filterCookies(filter);
     if (!view._filtered) {
@@ -925,24 +925,24 @@ var gCookiesWindow = {
     // if the view is not empty then select the first item
     if (view.rowCount > 0)
       view.selection.select(0);
 
     document.getElementById("cookiesIntro").value = gCookiesWindow._bundle.getString("cookiesFiltered");
     this._updateRemoveAllButton();
   },
 
-  setFilter: function (aFilterString) {
+  setFilter: function(aFilterString) {
     document.getElementById("filter").value = aFilterString;
     this.filter();
   },
 
-  focusFilterBox: function () {
+  focusFilterBox: function() {
     var filter = document.getElementById("filter");
     filter.focus();
     filter.select();
   },
 
-  onWindowKeyPress: function (aEvent) {
+  onWindowKeyPress: function(aEvent) {
     if (aEvent.keyCode == KeyEvent.DOM_VK_ESCAPE)
       window.close();
   }
 };
--- a/browser/components/preferences/fonts.js
+++ b/browser/components/preferences/fonts.js
@@ -14,17 +14,17 @@ const kFontNameFmtMonospace     = "font.
 const kFontNameListFmtSerif     = "font.name-list.serif.%LANG%";
 const kFontNameListFmtSansSerif = "font.name-list.sans-serif.%LANG%";
 const kFontNameListFmtMonospace = "font.name-list.monospace.%LANG%";
 const kFontSizeFmtVariable      = "font.size.variable.%LANG%";
 const kFontSizeFmtFixed         = "font.size.fixed.%LANG%";
 const kFontMinSizeFmt           = "font.minimum-size.%LANG%";
 
 var gFontsDialog = {
-  _selectLanguageGroup: function (aLanguageGroup)
+  _selectLanguageGroup: function(aLanguageGroup)
   {
     var prefs = [{ format: kDefaultFontType,          type: "string",   element: "defaultFontType", fonttype: null},
                  { format: kFontNameFmtSerif,         type: "fontname", element: "serif",      fonttype: "serif"       },
                  { format: kFontNameFmtSansSerif,     type: "fontname", element: "sans-serif", fonttype: "sans-serif"  },
                  { format: kFontNameFmtMonospace,     type: "fontname", element: "monospace",  fonttype: "monospace"   },
                  { format: kFontNameListFmtSerif,     type: "unichar",  element: null,         fonttype: "serif"       },
                  { format: kFontNameListFmtSansSerif, type: "unichar",  element: null,         fonttype: "sans-serif"  },
                  { format: kFontNameListFmtMonospace, type: "unichar",  element: null,         fonttype: "monospace"   },
@@ -53,36 +53,36 @@ var gFontsDialog = {
         if (prefs[i].fonttype)
           FontBuilder.buildFontList(aLanguageGroup, prefs[i].fonttype, element);
 
         preference.setElementValue(element);
       }
     }
   },
 
-  readFontLanguageGroup: function ()
+  readFontLanguageGroup: function()
   {
     var languagePref = document.getElementById("font.language.group");
     this._selectLanguageGroup(languagePref.value);
     return undefined;
   },
 
-  readUseDocumentFonts: function ()
+  readUseDocumentFonts: function()
   {
     var preference = document.getElementById("browser.display.use_document_fonts");
     return preference.value == 1;
   },
 
-  writeUseDocumentFonts: function ()
+  writeUseDocumentFonts: function()
   {
     var useDocumentFonts = document.getElementById("useDocumentFonts");
     return useDocumentFonts.checked ? 1 : 0;
   },
 
-  onBeforeAccept: function ()
+  onBeforeAccept: function()
   {
     let preferences = document.querySelectorAll("preference[id*='font.minimum-size']");
     // It would be good if we could avoid touching languages the pref pages won't use, but
     // unfortunately the language group APIs (deducing language groups from language codes)
     // are C++ - only. So we just check all the things the user touched:
     // Don't care about anything up to 24px, or if this value is the same as set previously:
     preferences = Array.filter(preferences, prefEl => {
       return prefEl.value > 24 && prefEl.value != prefEl.valueFromPreferences;
--- a/browser/components/preferences/in-content/advanced.js
+++ b/browser/components/preferences/in-content/advanced.js
@@ -10,33 +10,33 @@ Components.utils.import("resource://gre/
 const PREF_UPLOAD_ENABLED = "datareporting.healthreport.uploadEnabled";
 
 var gAdvancedPane = {
   _inited: false,
 
   /**
    * Brings the appropriate tab to the front and initializes various bits of UI.
    */
-  init: function ()
+  init: function()
   {
     function setEventListener(aId, aEventType, aCallback)
     {
       document.getElementById(aId)
               .addEventListener(aEventType, aCallback.bind(gAdvancedPane));
     }
 
     this._inited = true;
     var advancedPrefs = document.getElementById("advancedPrefs");
 
     var preference = document.getElementById("browser.preferences.advanced.selectedTabIndex");
     if (preference.value !== null)
         advancedPrefs.selectedIndex = preference.value;
 
     if (AppConstants.MOZ_UPDATER) {
-      let onUnload = function () {
+      let onUnload = function() {
         window.removeEventListener("unload", onUnload, false);
         Services.prefs.removeObserver("app.update.", this);
       }.bind(this);
       window.addEventListener("unload", onUnload, false);
       Services.prefs.addObserver("app.update.", this, false);
       this.updateReadPrefs();
     }
     this.updateOfflineApps();
@@ -98,17 +98,17 @@ var gAdvancedPane = {
       }, true);
     }
   },
 
   /**
    * Stores the identity of the current tab in preferences so that the selected
    * tab can be persisted between openings of the preferences window.
    */
-  tabSelectionChanged: function ()
+  tabSelectionChanged: function()
   {
     if (!this._inited)
       return;
     var advancedPrefs = document.getElementById("advancedPrefs");
     var preference = document.getElementById("browser.preferences.advanced.selectedTabIndex");
     preference.valueFromPreferences = advancedPrefs.selectedIndex;
   },
 
@@ -150,59 +150,59 @@ var gAdvancedPane = {
    */
   _storedSpellCheck: 0,
 
   /**
    * Returns true if any spellchecking is enabled and false otherwise, caching
    * the current value to enable proper pref restoration if the checkbox is
    * never changed.
    */
-  readCheckSpelling: function ()
+  readCheckSpelling: function()
   {
     var pref = document.getElementById("layout.spellcheckDefault");
     this._storedSpellCheck = pref.value;
 
     return (pref.value != 0);
   },
 
   /**
    * Returns the value of the spellchecking preference represented by UI,
    * preserving the preference's "hidden" value if the preference is
    * unchanged and represents a value not strictly allowed in UI.
    */
-  writeCheckSpelling: function ()
+  writeCheckSpelling: function()
   {
     var checkbox = document.getElementById("checkSpelling");
     if (checkbox.checked) {
       if (this._storedSpellCheck == 2) {
         return 2;
       }
       return 1;
     }
     return 0;
   },
 
   /**
    * security.OCSP.enabled is an integer value for legacy reasons.
    * A value of 1 means OCSP is enabled. Any other value means it is disabled.
    */
-  readEnableOCSP: function ()
+  readEnableOCSP: function()
   {
     var preference = document.getElementById("security.OCSP.enabled");
     // This is the case if the preference is the default value.
     if (preference.value === undefined) {
       return true;
     }
     return preference.value == 1;
   },
 
   /**
    * See documentation for readEnableOCSP.
    */
-  writeEnableOCSP: function ()
+  writeEnableOCSP: function()
   {
     var checkbox = document.getElementById("enableOCSP");
     return checkbox.checked ? 1 : 0;
   },
 
   /**
    * When the user toggles the layers.acceleration.disabled pref,
    * sync its new value to the gfx.direct2d.disabled pref too.
@@ -216,71 +216,71 @@ var gAdvancedPane = {
     }
   },
 
   // DATA CHOICES TAB
 
   /**
    * Set up or hide the Learn More links for various data collection options
    */
-  _setupLearnMoreLink: function (pref, element) {
+  _setupLearnMoreLink: function(pref, element) {
     // set up the Learn More link with the correct URL
     let url = Services.prefs.getCharPref(pref);
     let el = document.getElementById(element);
 
     if (url) {
       el.setAttribute("href", url);
     } else {
       el.setAttribute("hidden", "true");
     }
   },
 
   /**
    *
    */
-  initSubmitCrashes: function ()
+  initSubmitCrashes: function()
   {
     this._setupLearnMoreLink("toolkit.crashreporter.infoURL",
                              "crashReporterLearnMore");
   },
 
   /**
    * The preference/checkbox is configured in XUL.
    *
    * In all cases, set up the Learn More link sanely.
    */
-  initTelemetry: function ()
+  initTelemetry: function()
   {
     if (AppConstants.MOZ_TELEMETRY_REPORTING) {
       this._setupLearnMoreLink("toolkit.telemetry.infoURL", "telemetryLearnMore");
     }
   },
 
   /**
    * Set the status of the telemetry controls based on the input argument.
    * @param {Boolean} aEnabled False disables the controls, true enables them.
    */
-  setTelemetrySectionEnabled: function (aEnabled)
+  setTelemetrySectionEnabled: function(aEnabled)
   {
     if (AppConstants.MOZ_TELEMETRY_REPORTING) {
       // If FHR is disabled, additional data sharing should be disabled as well.
       let disabled = !aEnabled;
       document.getElementById("submitTelemetryBox").disabled = disabled;
       if (disabled) {
         // If we disable FHR, untick the telemetry checkbox.
         Services.prefs.setBoolPref("toolkit.telemetry.enabled", false);
       }
       document.getElementById("telemetryDataDesc").disabled = disabled;
     }
   },
 
   /**
    * Initialize the health report service reference and checkbox.
    */
-  initSubmitHealthReport: function () {
+  initSubmitHealthReport: function() {
     if (AppConstants.MOZ_TELEMETRY_REPORTING) {
       this._setupLearnMoreLink("datareporting.healthreport.infoURL", "FHRLearnMore");
 
       let checkbox = document.getElementById("submitHealthReportBox");
 
       if (Services.prefs.prefIsLocked(PREF_UPLOAD_ENABLED)) {
         checkbox.setAttribute("disabled", "true");
         return;
@@ -289,17 +289,17 @@ var gAdvancedPane = {
       checkbox.checked = Services.prefs.getBoolPref(PREF_UPLOAD_ENABLED);
       this.setTelemetrySectionEnabled(checkbox.checked);
     }
   },
 
   /**
    * Update the health report preference with state from checkbox.
    */
-  updateSubmitHealthReport: function () {
+  updateSubmitHealthReport: function() {
     if (AppConstants.MOZ_TELEMETRY_REPORTING) {
       let checkbox = document.getElementById("submitHealthReportBox");
       Services.prefs.setBoolPref(PREF_UPLOAD_ENABLED, checkbox.checked);
       this.setTelemetrySectionEnabled(checkbox.checked);
     }
   },
 
   updateOnScreenKeyboardVisibility() {
@@ -319,23 +319,23 @@ var gAdvancedPane = {
    * browser.cache.disk.capacity
    * - the size of the browser cache in KB
    * - Only used if browser.cache.disk.smart_size.enabled is disabled
    */
 
   /**
    * Displays a dialog in which proxy settings may be changed.
    */
-  showConnections: function ()
+  showConnections: function()
   {
     gSubDialog.open("chrome://browser/content/preferences/connection.xul");
   },
 
   // Retrieves the amount of space currently used by disk cache
-  updateActualCacheSize: function ()
+  updateActualCacheSize: function()
   {
     var actualSizeLabel = document.getElementById("actualDiskCacheSize");
     var prefStrBundle = document.getElementById("bundlePreferences");
 
     // Needs to root the observer since cache service keeps only a weak reference.
     this.observer = {
       onNetworkCacheDiskConsumption: function(consumption) {
         var size = DownloadUtils.convertByteUnits(consumption);
@@ -359,20 +359,20 @@ var gAdvancedPane = {
       var cacheService =
         Components.classes["@mozilla.org/netwerk/cache-storage-service;1"]
                   .getService(Components.interfaces.nsICacheStorageService);
       cacheService.asyncGetDiskConsumption(this.observer);
     } catch (e) {}
   },
 
   // Retrieves the amount of space currently used by offline cache
-  updateActualAppCacheSize: function ()
+  updateActualAppCacheSize: function()
   {
     var visitor = {
-      onCacheStorageInfo: function (aEntryCount, aConsumption, aCapacity, aDiskDirectory)
+      onCacheStorageInfo: function(aEntryCount, aConsumption, aCapacity, aDiskDirectory)
       {
         var actualSizeLabel = document.getElementById("actualAppCacheSize");
         var sizeStrings = DownloadUtils.convertByteUnits(aConsumption);
         var prefStrBundle = document.getElementById("bundlePreferences");
         // The XBL binding for the string bundle may have been destroyed if
         // the page was closed before this callback was executed.
         if (!prefStrBundle.getFormattedString) {
           return;
@@ -386,24 +386,24 @@ var gAdvancedPane = {
       var cacheService =
         Components.classes["@mozilla.org/netwerk/cache-storage-service;1"]
                   .getService(Components.interfaces.nsICacheStorageService);
       var storage = cacheService.appCacheStorage(LoadContextInfo.default, null);
       storage.asyncVisitStorage(visitor, false);
     } catch (e) {}
   },
 
-  updateCacheSizeUI: function (smartSizeEnabled)
+  updateCacheSizeUI: function(smartSizeEnabled)
   {
     document.getElementById("useCacheBefore").disabled = smartSizeEnabled;
     document.getElementById("cacheSize").disabled = smartSizeEnabled;
     document.getElementById("useCacheAfter").disabled = smartSizeEnabled;
   },
 
-  readSmartSizeEnabled: function ()
+  readSmartSizeEnabled: function()
   {
     // The smart_size.enabled preference element is inverted="true", so its
     // value is the opposite of the actual pref value
     var disabled = document.getElementById("browser.cache.disk.smart_size.enabled").value;
     this.updateCacheSizeUI(!disabled);
   },
 
   /**
@@ -432,30 +432,30 @@ var gAdvancedPane = {
     // Converts the cache size as specified in UI (in MB) to KB.
     let intValue = parseInt(cacheSizeElem.value, 10);
     cachePref.value = isNaN(intValue) ? 0 : intValue * 1024;
   },
 
   /**
    * Clears the cache.
    */
-  clearCache: function ()
+  clearCache: function()
   {
     try {
       var cache = Components.classes["@mozilla.org/netwerk/cache-storage-service;1"]
                             .getService(Components.interfaces.nsICacheStorageService);
       cache.clear();
     } catch (ex) {}
     this.updateActualCacheSize();
   },
 
   /**
    * Clears the application cache.
    */
-  clearOfflineAppCache: function ()
+  clearOfflineAppCache: function()
   {
     Components.utils.import("resource:///modules/offlineAppCache.jsm");
     OfflineAppCacheHelper.clear();
 
     this.updateActualAppCacheSize();
     this.updateOfflineApps();
   },
 
@@ -504,17 +504,17 @@ var gAdvancedPane = {
     }
 
     return usage;
   },
 
   /**
    * Updates the list of offline applications
    */
-  updateOfflineApps: function ()
+  updateOfflineApps: function()
   {
     var pm = Components.classes["@mozilla.org/permissionmanager;1"]
                        .getService(Components.interfaces.nsIPermissionManager);
 
     var list = document.getElementById("offlineAppsList");
     while (list.firstChild) {
       list.removeChild(list.firstChild);
     }
@@ -637,17 +637,17 @@ var gAdvancedPane = {
    *
    * Disabled states:
    * Element           pref  value  locked  disabled
    * radiogroup        i     t/f    f       false
    *                   i     t/f    *t*     *true*
    *                   ii    t/f    f       false
    *                   ii    t/f    *t*     *true*
    */
-  updateReadPrefs: function ()
+  updateReadPrefs: function()
   {
     if (AppConstants.MOZ_UPDATER) {
       var enabledPref = document.getElementById("app.update.enabled");
       var autoPref = document.getElementById("app.update.auto");
       var radiogroup = document.getElementById("updateRadioGroup");
 
       if (!enabledPref.value)   // Don't care for autoPref.value in this case.
         radiogroup.value = "manual";    // 3. Never check for updates.
@@ -683,17 +683,17 @@ var gAdvancedPane = {
         }
       }
     }
   },
 
   /**
    * Sets the pref values based on the selected item of the radiogroup.
    */
-  updateWritePrefs: function ()
+  updateWritePrefs: function()
   {
     if (AppConstants.MOZ_UPDATER) {
       var enabledPref = document.getElementById("app.update.enabled");
       var autoPref = document.getElementById("app.update.auto");
       var radiogroup = document.getElementById("updateRadioGroup");
       switch (radiogroup.value) {
         case "auto":      // 1. Automatically install updates for Desktop only
           enabledPref.value = true;
@@ -708,17 +708,17 @@ var gAdvancedPane = {
           autoPref.value = false;
       }
     }
   },
 
   /**
    * Displays the history of installed updates.
    */
-  showUpdates: function ()
+  showUpdates: function()
   {
     gSubDialog.open("chrome://mozapps/content/update/history.xul");
   },
 
   // ENCRYPTION TAB
 
   /*
    * Preferences:
@@ -730,30 +730,30 @@ var gAdvancedPane = {
    *     "Ask Every Time"         present a dialog to the user so he can select
    *                              the certificate to use on a site which
    *                              requests one
    */
 
   /**
    * Displays the user's certificates and associated options.
    */
-  showCertificates: function ()
+  showCertificates: function()
   {
     gSubDialog.open("chrome://pippki/content/certManager.xul");
   },
 
   /**
    * Displays a dialog from which the user can manage his security devices.
    */
-  showSecurityDevices: function ()
+  showSecurityDevices: function()
   {
     gSubDialog.open("chrome://pippki/content/device_manager.xul");
   },
 
-  observe: function (aSubject, aTopic, aData) {
+  observe: function(aSubject, aTopic, aData) {
     if (AppConstants.MOZ_UPDATER) {
       switch (aTopic) {
         case "nsPref:changed":
           this.updateReadPrefs();
           break;
       }
     }
   },
--- a/browser/components/preferences/in-content/applications.js
+++ b/browser/components/preferences/in-content/applications.js
@@ -982,17 +982,17 @@ var gApplicationsPane = {
       return this;
 
     throw Cr.NS_ERROR_NO_INTERFACE;
   },
 
 
   // nsIObserver
 
-  observe: function (aSubject, aTopic, aData) {
+  observe: function(aSubject, aTopic, aData) {
     // Rebuild the list when there are changes to preferences that influence
     // whether or not to show certain entries in the list.
     if (aTopic == "nsPref:changed" && !this._storingAction) {
       // These two prefs alter the list of visible types, so we have to rebuild
       // that list when they change.
       if (aData == PREF_SHOW_PLUGINS_IN_LIST ||
           aData == PREF_HIDE_PLUGINS_WITHOUT_EXTENSIONS) {
         this._rebuildVisibleTypes();
@@ -1534,17 +1534,17 @@ var gApplicationsPane = {
 
   // Sorting & Filtering
 
   _sortColumn: null,
 
   /**
    * Sort the list when the user clicks on a column header.
    */
-  sort: function (event) {
+  sort: function(event) {
     var column = event.target;
 
     // If the user clicked on a new sort column, remove the direction indicator
     // from the old column.
     if (this._sortColumn && this._sortColumn != column)
       this._sortColumn.removeAttribute("sortDirection");
 
     this._sortColumn = column;
--- a/browser/components/preferences/in-content/containers.js
+++ b/browser/components/preferences/in-content/containers.js
@@ -10,17 +10,17 @@ const containersBundle = Services.string
 const defaultContainerIcon = "fingerprint";
 const defaultContainerColor = "blue";
 
 let gContainersPane = {
 
   init() {
     this._list = document.getElementById("containersView");
 
-    document.getElementById("backContainersLink").addEventListener("click", function () {
+    document.getElementById("backContainersLink").addEventListener("click", function() {
       gotoPref("privacy");
     });
 
     this._rebuildView();
   },
 
   _rebuildView() {
     const containers = ContextualIdentityService.getIdentities();
--- a/browser/components/preferences/in-content/content.js
+++ b/browser/components/preferences/in-content/content.js
@@ -1,27 +1,27 @@
 /* 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/. */
 
-XPCOMUtils.defineLazyGetter(this, "AlertsServiceDND", function () {
+XPCOMUtils.defineLazyGetter(this, "AlertsServiceDND", function() {
   try {
     let alertsService = Cc["@mozilla.org/alerts-service;1"]
                           .getService(Ci.nsIAlertsService)
                           .QueryInterface(Ci.nsIAlertsDoNotDisturb);
     // This will throw if manualDoNotDisturb isn't implemented.
     alertsService.manualDoNotDisturb;
     return alertsService;
   } catch (ex) {
     return undefined;
   }
 });
 
 var gContentPane = {
-  init: function ()
+  init: function()
   {
     function setEventListener(aId, aEventType, aCallback)
     {
       document.getElementById(aId)
               .addEventListener(aEventType, aCallback.bind(gContentPane));
     }
 
     // Initializes the fonts dropdowns displayed in this pane.
@@ -94,17 +94,17 @@ var gContentPane = {
   },
 
   // UTILITY FUNCTIONS
 
   /**
    * Utility function to enable/disable the button specified by aButtonID based
    * on the value of the Boolean preference specified by aPreferenceID.
    */
-  updateButtons: function (aButtonID, aPreferenceID)
+  updateButtons: function(aButtonID, aPreferenceID)
   {
     var button = document.getElementById(aButtonID);
     var preference = document.getElementById(aPreferenceID);
     button.disabled = preference.value != true;
     return undefined;
   },
 
   // BEGIN UI CODE
@@ -140,49 +140,49 @@ var gContentPane = {
 
 
   // POP-UPS
 
   /**
    * Displays the popup exceptions dialog where specific site popup preferences
    * can be set.
    */
-  showPopupExceptions: function ()
+  showPopupExceptions: function()
   {
     var bundlePreferences = document.getElementById("bundlePreferences");
     var params = { blockVisible: false, sessionVisible: false, allowVisible: true,
                    prefilledHost: "", permissionType: "popup" }
     params.windowTitle = bundlePreferences.getString("popuppermissionstitle");
     params.introText = bundlePreferences.getString("popuppermissionstext");
 
     gSubDialog.open("chrome://browser/content/preferences/permissions.xul",
                     "resizable=yes", params);
   },
 
   // FONTS
 
   /**
    * Populates the default font list in UI.
    */
-  _rebuildFonts: function ()
+  _rebuildFonts: function()
   {
     var preferences = document.getElementById("contentPreferences");
     // Ensure preferences are "visible" to ensure bindings work.
     preferences.hidden = false;
     // Force flush:
     preferences.clientHeight;
     var langGroupPref = document.getElementById("font.language.group");
     this._selectDefaultLanguageGroup(langGroupPref.value,
                                      this._readDefaultFontTypeForLanguage(langGroupPref.value) == "serif");
   },
 
   /**
    *
    */
-  _selectDefaultLanguageGroup: function (aLanguageGroup, aIsSerif)
+  _selectDefaultLanguageGroup: function(aLanguageGroup, aIsSerif)
   {
     const kFontNameFmtSerif         = "font.name.serif.%LANG%";
     const kFontNameFmtSansSerif     = "font.name.sans-serif.%LANG%";
     const kFontNameListFmtSerif     = "font.name-list.serif.%LANG%";
     const kFontNameListFmtSansSerif = "font.name-list.sans-serif.%LANG%";
     const kFontSizeFmtVariable      = "font.size.variable.%LANG%";
 
     var preferences = document.getElementById("contentPreferences");
@@ -223,17 +223,17 @@ var gContentPane = {
       }
     }
   },
 
   /**
    * Returns the type of the current default font for the language denoted by
    * aLanguageGroup.
    */
-  _readDefaultFontTypeForLanguage: function (aLanguageGroup)
+  _readDefaultFontTypeForLanguage: function(aLanguageGroup)
   {
     const kDefaultFontType = "font.default.%LANG%";
     var defaultFontTypePref = kDefaultFontType.replace(/%LANG%/, aLanguageGroup);
     var preference = document.getElementById(defaultFontTypePref);
     if (!preference) {
       preference = document.createElement("preference");
       preference.id = defaultFontTypePref;
       preference.setAttribute("name", defaultFontTypePref);
@@ -243,52 +243,52 @@ var gContentPane = {
     }
     return preference.value;
   },
 
   /**
    * Displays the fonts dialog, where web page font names and sizes can be
    * configured.
    */
-  configureFonts: function ()
+  configureFonts: function()
   {
     gSubDialog.open("chrome://browser/content/preferences/fonts.xul", "resizable=no");
   },
 
   /**
    * Displays the colors dialog, where default web page/link/etc. colors can be
    * configured.
    */
-  configureColors: function ()
+  configureColors: function()
   {
     gSubDialog.open("chrome://browser/content/preferences/colors.xul", "resizable=no");
   },
 
   // LANGUAGES
 
   /**
    * Shows a dialog in which the preferred language for web content may be set.
    */
-  showLanguages: function ()
+  showLanguages: function()
   {
     gSubDialog.open("chrome://browser/content/preferences/languages.xul");
   },
 
   /**
    * Displays the translation exceptions dialog where specific site and language
    * translation preferences can be set.
    */
-  showTranslationExceptions: function ()
+  showTranslationExceptions: function()
   {
     gSubDialog.open("chrome://browser/content/preferences/translation.xul");
   },
 
-  openTranslationProviderAttribution: function ()
+  openTranslationProviderAttribution: function()
   {
     Components.utils.import("resource:///modules/translation/Translation.jsm");
     Translation.openProviderAttribution();
   },
 
-  toggleDoNotDisturbNotifications: function (event)
+  toggleDoNotDisturbNotifications: function(event)
   {
     AlertsServiceDND.manualDoNotDisturb = event.target.checked;
   },
 };
--- a/browser/components/preferences/in-content/main.js
+++ b/browser/components/preferences/in-content/main.js
@@ -15,17 +15,17 @@ if (AppConstants.E10S_TESTING_ONLY) {
   XPCOMUtils.defineLazyModuleGetter(this, "UpdateUtils",
                                     "resource://gre/modules/UpdateUtils.jsm");
 }
 
 var gMainPane = {
   /**
    * Initialization of this.
    */
-  init: function ()
+  init: function()
   {
     function setEventListener(aId, aEventType, aCallback)
     {
       document.getElementById(aId)
               .addEventListener(aEventType, aCallback.bind(gMainPane));
     }
 
     if (AppConstants.HAVE_SHELL_SERVICE) {
@@ -116,17 +116,17 @@ var gMainPane = {
     }
 
     // Notify observers that the UI is now ready
     Components.classes["@mozilla.org/observer-service;1"]
               .getService(Components.interfaces.nsIObserverService)
               .notifyObservers(window, "main-pane-loaded", null);
   },
 
-  enableE10SChange: function ()
+  enableE10SChange: function()
   {
     if (AppConstants.E10S_TESTING_ONLY) {
       let e10sCheckbox = document.getElementById("e10sAutoStart");
       let e10sPref = document.getElementById("browser.tabs.remote.autostart");
       let e10sTempPref = document.getElementById("e10sTempPref");
 
       let prefsToChange;
       if (e10sCheckbox.checked) {
@@ -150,17 +150,17 @@ var gMainPane = {
         Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit |  Ci.nsIAppStartup.eRestart);
       }
 
       // Revert the checkbox in case we didn't quit
       e10sCheckbox.checked = e10sPref.value || e10sTempPref.value;
     }
   },
 
-  separateProfileModeChange: function ()
+  separateProfileModeChange: function()
   {
     if (AppConstants.MOZ_DEV_EDITION) {
       function quitApp() {
         Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit |  Ci.nsIAppStartup.eRestartNotSameProfile);
       }
       function revertCheckbox(error) {
         separateProfileModeCheckbox.checked = !separateProfileModeCheckbox.checked;
         if (error) {
@@ -201,17 +201,17 @@ var gMainPane = {
           return;
         case CONFIRM_RESTART_PROMPT_RESTART_LATER:
           createOrRemoveSpecialDevEditionFile();
           return;
       }
     }
   },
 
-  onGetStarted: function (aEvent) {
+  onGetStarted: function(aEvent) {
     if (AppConstants.MOZ_DEV_EDITION) {
       const Cc = Components.classes, Ci = Components.interfaces;
       let wm = Cc["@mozilla.org/appshell/window-mediator;1"]
                   .getService(Ci.nsIWindowMediator);
       let win = wm.getMostRecentWindow("navigator:browser");
 
       if (win) {
         let accountsTab = win.gBrowser.addTab("about:accounts?action=signin&entrypoint=dev-edition-setup");
@@ -236,17 +236,17 @@ var gMainPane = {
    *     2: the last page the user visited (DEPRECATED)
    *     3: windows and tabs from the last session (a.k.a. session restore)
    *
    *   The deprecated option is not exposed in UI; however, if the user has it
    *   selected and doesn't change the UI for this preference, the deprecated
    *   option is preserved.
    */
 
-  syncFromHomePref: function ()
+  syncFromHomePref: function()
   {
     let homePref = document.getElementById("browser.startup.homepage");
 
     // If the pref is set to about:home, set the value to "" to show the
     // placeholder text (about:home title).
     if (homePref.value.toLowerCase() == "about:home")
       return "";
 
@@ -255,32 +255,32 @@ var gMainPane = {
     // to be shown.
     if (homePref.value == "")
       return "about:blank";
 
     // Otherwise, show the actual pref value.
     return undefined;
   },
 
-  syncToHomePref: function (value)
+  syncToHomePref: function(value)
   {
     // If the value is "", use about:home.
     if (value == "")
       return "about:home";
 
     // Otherwise, use the actual textbox value.
     return undefined;
   },
 
   /**
    * Sets the home page to the current displayed page (or frontmost tab, if the
    * most recent browser window contains multiple tabs), updating preference
    * window UI to reflect this.
    */
-  setHomePageToCurrent: function ()
+  setHomePageToCurrent: function()
   {
     let homePage = document.getElementById("browser.startup.homepage");
     let tabs = this._getTabsForHomePage();
     function getTabURI(t) {
       return t.linkedBrowser.currentURI.spec;
     }
 
     // FIXME Bug 244192: using dangerous "|" joiner!
@@ -288,17 +288,17 @@ var gMainPane = {
       homePage.value = tabs.map(getTabURI).join("|");
   },
 
   /**
    * Displays a dialog in which the user can select a bookmark to use as home
    * page.  If the user selects a bookmark, that bookmark's name is displayed in
    * UI and the bookmark's address is stored to the home page preference.
    */
-  setHomePageToBookmark: function ()
+  setHomePageToBookmark: function()
   {
     var rv = { urls: null, names: null };
     gSubDialog.open("chrome://browser/content/preferences/selectBookmark.xul",
                     "resizable=yes, modal=yes", rv,
                     this._setHomePageToBookmarkClosed.bind(this, rv));
   },
 
   _setHomePageToBookmarkClosed: function(rv, aEvent) {
@@ -311,17 +311,17 @@ var gMainPane = {
       homePage.value = rv.urls.join("|");
     }
   },
 
   /**
    * Switches the "Use Current Page" button between its singular and plural
    * forms.
    */
-  _updateUseCurrentButton: function () {
+  _updateUseCurrentButton: function() {
     let useCurrent = document.getElementById("useCurrent");
 
 
     let tabs = this._getTabsForHomePage();
 
     if (tabs.length > 1)
       useCurrent.label = useCurrent.getAttribute("label2");
     else
@@ -330,17 +330,17 @@ var gMainPane = {
     // In this case, the button's disabled state is set by preferences.xml.
     let prefName = "pref.browser.homepage.disable_button.current_page";
     if (document.getElementById(prefName).locked)
       return;
 
     useCurrent.disabled = !tabs.length
   },
 
-  _getTabsForHomePage: function ()
+  _getTabsForHomePage: function()
   {
     var win;
     var tabs = [];
 
     const Cc = Components.classes, Ci = Components.interfaces;
     var wm = Cc["@mozilla.org/appshell/window-mediator;1"]
                 .getService(Ci.nsIWindowMediator);
     win = wm.getMostRecentWindow("navigator:browser");
@@ -354,25 +354,25 @@ var gMainPane = {
     }
 
     return tabs;
   },
 
   /**
    * Check to see if a tab is not about:preferences
    */
-  isNotAboutPreferences: function (aElement, aIndex, aArray)
+  isNotAboutPreferences: function(aElement, aIndex, aArray)
   {
     return !aElement.linkedBrowser.currentURI.spec.startsWith("about:preferences");
   },
 
   /**
    * Restores the default home page as the user's home page.
    */
-  restoreDefaultHomePage: function ()
+  restoreDefaultHomePage: function()
   {
     var homePage = document.getElementById("browser.startup.homepage");
     homePage.value = homePage.defaultValue;
   },
 
   // DOWNLOADS
 
   /*
@@ -404,17 +404,17 @@ var gMainPane = {
    * browser.download.defaultFolder
    *   deprecated.
    */
 
   /**
    * Enables/disables the folder field and Browse button based on whether a
    * default download directory is being used.
    */
-  readUseDownloadDir: function ()
+  readUseDownloadDir: function()
   {
     var downloadFolder = document.getElementById("downloadFolder");
     var chooseFolder = document.getElementById("chooseFolder");
     var preference = document.getElementById("browser.download.useDownloadDir");
     downloadFolder.disabled = !preference.value || preference.locked;
     chooseFolder.disabled = !preference.value || preference.locked;
 
     // don't override the preference's value in UI
@@ -517,17 +517,17 @@ var gMainPane = {
       iconUrlSpec = fph.getURLSpecFromFile(yield this._getDownloadsFolder("Desktop"));
     }
     downloadFolder.image = "moz-icon://" + iconUrlSpec + "?size=16";
   }),
 
   /**
    * Returns the textual path of a folder in readable form.
    */
-  _getDisplayNameOfFile: function (aFolder)
+  _getDisplayNameOfFile: function(aFolder)
   {
     // TODO: would like to add support for 'Downloads on Macintosh HD'
     //       for OS X users.
     return aFolder ? aFolder.path : "";
   },
 
   /**
    * Returns the Downloads folder.  If aFolder is "Desktop", then the Downloads
--- a/browser/components/preferences/in-content/privacy.js
+++ b/browser/components/preferences/in-content/privacy.js
@@ -21,17 +21,17 @@ var gPrivacyPane = {
    * Whether the prompt to restart Firefox should appear when changing the autostart pref.
    */
   _shouldPromptForRestart: true,
 
   /**
    * Show the Tracking Protection UI depending on the
    * privacy.trackingprotection.ui.enabled pref, and linkify its Learn More link
    */
-  _initTrackingProtection: function () {
+  _initTrackingProtection: function() {
     if (!Services.prefs.getBoolPref("privacy.trackingprotection.ui.enabled")) {
       return;
     }
 
     let link = document.getElementById("trackingProtectionLearnMore");
     let url = Services.urlFormatter.formatURLPref("app.support.baseURL") + "tracking-protection";
     link.setAttribute("href", url);
 
@@ -40,34 +40,34 @@ var gPrivacyPane = {
     document.getElementById("trackingprotectionbox").hidden = false;
     document.getElementById("trackingprotectionpbmbox").hidden = true;
   },
 
   /**
    * Linkify the Learn More link of the Private Browsing Mode Tracking
    * Protection UI.
    */
-  _initTrackingProtectionPBM: function () {
+  _initTrackingProtectionPBM: function() {
     let link = document.getElementById("trackingProtectionPBMLearnMore");
     let url = Services.urlFormatter.formatURLPref("app.support.baseURL") + "tracking-protection-pbm";
     link.setAttribute("href", url);
   },
 
   /**
    * Initialize autocomplete to ensure prefs are in sync.
    */
-  _initAutocomplete: function () {
+  _initAutocomplete: function() {
     Components.classes["@mozilla.org/autocomplete/search;1?name=unifiedcomplete"]
               .getService(Components.interfaces.mozIPlacesAutoComplete);
   },
 
   /**
    * Show the Containers UI depending on the privacy.userContext.ui.enabled pref.
    */
-  _initBrowserContainers: function () {
+  _initBrowserContainers: function() {
     if (!Services.prefs.getBoolPref("privacy.userContext.ui.enabled")) {
       return;
     }
 
     let link = document.getElementById("browserContainersLearnMore");
     link.href = Services.urlFormatter.formatURLPref("app.support.baseURL") + "containers";
 
     document.getElementById("browserContainersbox").hidden = false;
@@ -111,17 +111,17 @@ var gPrivacyPane = {
 
     checkbox.checked = true;
   },
 
   /**
    * Sets up the UI for the number of days of history to keep, and updates the
    * label of the "Clear Now..." button.
    */
-  init: function ()
+  init: function()
   {
     function setEventListener(aId, aEventType, aCallback)
     {
       document.getElementById(aId)
               .addEventListener(aEventType, aCallback.bind(gPrivacyPane));
     }
 
     this._updateSanitizeSettingsButton();
@@ -133,35 +133,35 @@ var gPrivacyPane = {
     this._initTrackingProtectionPBM();
     this._initAutocomplete();
     this._initBrowserContainers();
 
     setEventListener("privacy.sanitize.sanitizeOnShutdown", "change",
                      gPrivacyPane._updateSanitizeSettingsButton);
     setEventListener("browser.privatebrowsing.autostart", "change",
                      gPrivacyPane.updatePrivacyMicroControls);
-    setEventListener("historyMode", "command", function () {
+    setEventListener("historyMode", "command", function() {
       gPrivacyPane.updateHistoryModePane();
       gPrivacyPane.updateHistoryModePrefs();
       gPrivacyPane.updatePrivacyMicroControls();
       gPrivacyPane.updateAutostart();
     });
-    setEventListener("historyRememberClear", "click", function () {
+    setEventListener("historyRememberClear", "click", function() {
       gPrivacyPane.clearPrivateDataNow(false);
       return false;
     });
-    setEventListener("historyRememberCookies", "click", function () {
+    setEventListener("historyRememberCookies", "click", function() {
       gPrivacyPane.showCookies();
       return false;
     });
-    setEventListener("historyDontRememberClear", "click", function () {
+    setEventListener("historyDontRememberClear", "click", function() {
       gPrivacyPane.clearPrivateDataNow(true);
       return false;
     });
-    setEventListener("doNotTrackSettings", "click", function () {
+    setEventListener("doNotTrackSettings", "click", function() {
       gPrivacyPane.showDoNotTrackSettings();
       return false;
     });
     setEventListener("privateBrowsingAutoStart", "command",
                      gPrivacyPane.updateAutostart);
     setEventListener("cookieExceptions", "command",
                      gPrivacyPane.showCookieExceptions);
     setEventListener("showCookiesButton", "command",
@@ -358,17 +358,17 @@ var gPrivacyPane = {
    * Update the privacy micro-management controls based on the
    * value of the private browsing auto-start checkbox.
    */
   updatePrivacyMicroControls: function PPP_updatePrivacyMicroControls()
   {
     if (document.getElementById("historyMode").value == "custom") {
       let disabled = this._autoStartPrivateBrowsing =
         document.getElementById("privateBrowsingAutoStart").checked;
-      this.dependentControls.forEach(function (aElement) {
+      this.dependentControls.forEach(function(aElement) {
         let control = document.getElementById(aElement);
         let preferenceId = control.getAttribute("preference");
         if (!preferenceId) {
           let dependentControlId = control.getAttribute("control");
           if (dependentControlId) {
             let dependentControl = document.getElementById(dependentControlId);
             preferenceId = dependentControl.getAttribute("preference");
           }
@@ -482,17 +482,17 @@ var gPrivacyPane = {
    */
   showContainerSettings() {
     gotoPref("containers");
   },
 
   /**
    * Displays the available block lists for tracking protection.
    */
-  showBlockLists: function ()
+  showBlockLists: function()
   {
     var bundlePreferences = document.getElementById("bundlePreferences");
     let brandName = document.getElementById("bundleBrand")
                             .getString("brandShortName");
     var params = { brandShortName: brandName,
                    windowTitle: bundlePreferences.getString("blockliststitle"),
                    introText: bundlePreferences.getString("blockliststext") };
     gSubDialog.open("chrome://browser/content/preferences/blocklists.xul",
@@ -537,17 +537,17 @@ var gPrivacyPane = {
    *     2   means keep cookies until the browser is closed
    */
 
   /**
    * Reads the network.cookie.cookieBehavior preference value and
    * enables/disables the rest of the cookie UI accordingly, returning true
    * if cookies are enabled.
    */
-  readAcceptCookies: function ()
+  readAcceptCookies: function()
   {
     var pref = document.getElementById("network.cookie.cookieBehavior");
     var acceptThirdPartyLabel = document.getElementById("acceptThirdPartyLabel");
     var acceptThirdPartyMenu = document.getElementById("acceptThirdPartyMenu");
     var keepUntil = document.getElementById("keepUntil");
     var menu = document.getElementById("keepCookiesUntil");
 
     // enable the rest of the UI for anything other than "disable all cookies"
@@ -558,32 +558,32 @@ var gPrivacyPane = {
 
     return acceptCookies;
   },
 
   /**
    * Enables/disables the "keep until" label and menulist in response to the
    * "accept cookies" checkbox being checked or unchecked.
    */
-  writeAcceptCookies: function ()
+  writeAcceptCookies: function()
   {
     var accept = document.getElementById("acceptCookies");
     var acceptThirdPartyMenu = document.getElementById("acceptThirdPartyMenu");
 
     // if we're enabling cookies, automatically select 'accept third party always'
     if (accept.checked)
       acceptThirdPartyMenu.selectedIndex = 0;
 
     return accept.checked ? 0 : 2;
   },
 
   /**
    * Converts between network.cookie.cookieBehavior and the third-party cookie UI
    */
-  readAcceptThirdPartyCookies: function ()
+  readAcceptThirdPartyCookies: function()
   {
     var pref = document.getElementById("network.cookie.cookieBehavior");
     switch (pref.value)
     {
       case 0:
         return "always";
       case 1:
         return "never";
@@ -591,17 +591,17 @@ var gPrivacyPane = {
         return "never";
       case 3:
         return "visited";
       default:
         return undefined;
     }
   },
 
-  writeAcceptThirdPartyCookies: function ()
+  writeAcceptThirdPartyCookies: function()
   {
     var accept = document.getElementById("acceptThirdPartyMenu").selectedItem;
     switch (accept.value)
     {
       case "always":
         return 0;
       case "visited":
         return 3;
@@ -610,34 +610,34 @@ var gPrivacyPane = {
       default:
         return undefined;
     }
   },
 
   /**
    * Displays fine-grained, per-site preferences for cookies.
    */
-  showCookieExceptions: function ()
+  showCookieExceptions: function()
   {
     var bundlePreferences = document.getElementById("bundlePreferences");
     var params = { blockVisible   : true,
                    sessionVisible : true,
                    allowVisible   : true,
                    prefilledHost  : "",
                    permissionType : "cookie",
                    windowTitle    : bundlePreferences.getString("cookiepermissionstitle"),
                    introText      : bundlePreferences.getString("cookiepermissionstext") };
     gSubDialog.open("chrome://browser/content/preferences/permissions.xul",
                     null, params);
   },
 
   /**
    * Displays all the user's cookies in a dialog.
    */
-  showCookies: function (aCategory)
+  showCookies: function(aCategory)
   {
     gSubDialog.open("chrome://browser/content/preferences/cookies.xul");
   },
 
   // CLEAR PRIVATE DATA
 
   /*
    * Preferences:
@@ -645,27 +645,27 @@ var gPrivacyPane = {
    * privacy.sanitize.sanitizeOnShutdown
    * - true if the user's private data is cleared on startup according to the
    *   Clear Private Data settings, false otherwise
    */
 
   /**
    * Displays the Clear Private Data settings dialog.
    */
-  showClearPrivateDataSettings: function ()
+  showClearPrivateDataSettings: function()
   {
     gSubDialog.open("chrome://browser/content/preferences/sanitize.xul", "resizable=no");
   },
 
 
   /**
    * Displays a dialog from which individual parts of private data may be
    * cleared.
    */
-  clearPrivateDataNow: function (aClearEverything) {
+  clearPrivateDataNow: function(aClearEverything) {
     var ts = document.getElementById("privacy.sanitize.timeSpan");
     var timeSpanOrig = ts.value;
 
     if (aClearEverything) {
       ts.value = 0;
     }
 
     gSubDialog.open("chrome://browser/content/sanitize.xul", "resizable=no", null, () => {
@@ -677,17 +677,17 @@ var gPrivacyPane = {
       Services.obs.notifyObservers(null, "clear-private-data", null);
     });
   },
 
   /**
    * Enables or disables the "Settings..." button depending
    * on the privacy.sanitize.sanitizeOnShutdown preference value
    */
-  _updateSanitizeSettingsButton: function () {
+  _updateSanitizeSettingsButton: function() {
     var settingsButton = document.getElementById("clearDataSettings");
     var sanitizeOnShutdownPref = document.getElementById("privacy.sanitize.sanitizeOnShutdown");
 
     settingsButton.disabled = !sanitizeOnShutdownPref.value;
    },
 
   // CONTAINERS
 
@@ -696,17 +696,17 @@ var gPrivacyPane = {
    *
    * privacy.userContext.enabled
    * - true if containers is enabled
    */
 
    /**
     * Enables/disables the Settings button used to configure containers
     */
-   readBrowserContainersCheckbox: function ()
+   readBrowserContainersCheckbox: function()
    {
      var pref = document.getElementById("privacy.userContext.enabled");
      var settings = document.getElementById("browserContainersSettings");
 
      settings.disabled = !pref.value;
    }
 
 };
--- a/browser/components/preferences/in-content/search.js
+++ b/browser/components/preferences/in-content/search.js
@@ -12,22 +12,22 @@ const ENGINE_FLAVOR = "text/x-moz-search
 
 var gEngineView = null;
 
 var gSearchPane = {
 
   /**
    * Initialize autocomplete to ensure prefs are in sync.
    */
-  _initAutocomplete: function () {
+  _initAutocomplete: function() {
     Components.classes["@mozilla.org/autocomplete/search;1?name=unifiedcomplete"]
               .getService(Components.interfaces.mozIPlacesAutoComplete);
   },
 
-  init: function ()
+  init: function()
   {
     gEngineView = new EngineView(new EngineStore());
     document.getElementById("engineList").view = gEngineView;
     this.buildDefaultEngineDropDown();
 
     let addEnginesLink = document.getElementById("addEngines");
     let searchEnginesURL = Services.wm.getMostRecentWindow('navigator:browser')
                                       .BrowserSearch.searchEnginesURL;
@@ -284,27 +284,27 @@ var gSearchPane = {
       }
     }
 
     gEngineView._engineStore.changeEngine(aEngine, "alias", keyword);
     gEngineView.invalidate();
     return true;
   }),
 
-  saveOneClickEnginesList: function () {
+  saveOneClickEnginesList: function() {
     let hiddenList = [];
     for (let engine of gEngineView._engineStore.engines) {
       if (!engine.shown)
         hiddenList.push(engine.name);
     }
     document.getElementById("browser.search.hiddenOneOffs").value =
       hiddenList.join(",");
   },
 
-  setDefaultEngine: function () {
+  setDefaultEngine: function() {
     Services.search.currentEngine =
       document.getElementById("defaultEngine").selectedItem.engine;
   }
 };
 
 function onDragEngineStart(event) {
   var selectedIndex = gEngineView.selectedIndex;
   var tree = document.getElementById("engineList");
@@ -436,17 +436,17 @@ EngineStore.prototype = {
     if (index == -1)
       throw new Error("invalid engine?");
 
     this._engines[index][aProp] = aNewValue;
     aEngine.originalEngine[aProp] = aNewValue;
   },
 
   reloadIcons: function ES_reloadIcons() {
-    this._engines.forEach(function (e) {
+    this._engines.forEach(function(e) {
       e.uri = e.originalEngine.uri;
     });
   }
 };
 
 function EngineView(aEngineStore) {
   this._engineStore = aEngineStore;
 }
@@ -466,29 +466,29 @@ EngineView.prototype = {
     }
     return -1;
   },
   get selectedEngine() {
     return this._engineStore.engines[this.selectedIndex];
   },
 
   // Helpers
-  rowCountChanged: function (index, count) {
+  rowCountChanged: function(index, count) {
     this.tree.rowCountChanged(index, count);
   },
 
-  invalidate: function () {
+  invalidate: function() {
     this.tree.invalidate();
   },
 
-  ensureRowIsVisible: function (index) {
+  ensureRowIsVisible: function(index) {
     this.tree.ensureRowIsVisible(index);
   },
 
-  getSourceIndexFromDrag: function (dataTransfer) {
+  getSourceIndexFromDrag: function(dataTransfer) {
     return parseInt(dataTransfer.getData(ENGINE_FLAVOR));
   },
 
   isCheckBox: function(index, column) {
     return column.id == "engineShown";
   },
 
   isEngineSelectedAndRemovable: function() {
--- a/browser/components/preferences/in-content/security.js
+++ b/browser/components/preferences/in-content/security.js
@@ -8,17 +8,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
 
 var gSecurityPane = {
   _pane: null,
 
   /**
    * Initializes master password UI.
    */
-  init: function ()
+  init: function()
   {
     function setEventListener(aId, aEventType, aCallback)
     {
       document.getElementById(aId)
               .addEventListener(aEventType, aCallback.bind(gSecurityPane));
     }
 
     this._pane = document.getElementById("paneSecurity");
@@ -47,31 +47,31 @@ var gSecurityPane = {
    *   provided by the site may be installed from it, false if the extension
    *   may be directly installed after a confirmation dialog
    */
 
   /**
    * Enables/disables the add-ons Exceptions button depending on whether
    * or not add-on installation warnings are displayed.
    */
-  readWarnAddonInstall: function ()
+  readWarnAddonInstall: function()
   {
     var warn = document.getElementById("xpinstall.whitelist.required");
     var exceptions = document.getElementById("addonExceptions");
 
     exceptions.disabled = !warn.value;
 
     // don't override the preference value
     return undefined;
   },
 
   /**
    * Displays the exceptions lists for add-on installation warnings.
    */
-  showAddonExceptions: function ()
+  showAddonExceptions: function()
   {
     var bundlePrefs = document.getElementById("bundlePreferences");
 
     var params = this._addonParams;
     if (!params.windowTitle || !params.introText) {
       params.windowTitle = bundlePrefs.getString("addons_permissions_title");
       params.introText = bundlePrefs.getString("addonspermissionstext");
     }
@@ -101,17 +101,17 @@ var gSecurityPane = {
    * - true if passwords are remembered, false otherwise
    */
 
   /**
    * Enables/disables the Exceptions button used to configure sites where
    * passwords are never saved. When browser is set to start in Private
    * Browsing mode, the "Remember passwords" UI is useless, so we disable it.
    */
-  readSavePasswords: function ()
+  readSavePasswords: function()
   {
     var pref = document.getElementById("signon.rememberSignons");
     var excepts = document.getElementById("passwordExceptions");
 
     if (PrivateBrowsingUtils.permanentPrivateBrowsing) {
       document.getElementById("savePasswords").disabled = true;
       excepts.disabled = true;
       return false;
@@ -120,17 +120,17 @@ var gSecurityPane = {
     // don't override pref value in UI
     return undefined;
   },
 
   /**
    * Displays a dialog in which the user can view and modify the list of sites
    * where passwords are never saved.
    */
-  showPasswordExceptions: function ()
+  showPasswordExceptions: function()
   {
     var bundlePrefs = document.getElementById("bundlePreferences");
     var params = {
       blockVisible: true,
       sessionVisible: false,
       allowVisible: false,
       hideStatusColumn: true,
       prefilledHost: "",
@@ -144,17 +144,17 @@ var gSecurityPane = {
   },
 
   /**
    * Initializes master password UI: the "use master password" checkbox, selects
    * the master password button to show, and enables/disables it as necessary.
    * The master password is controlled by various bits of NSS functionality, so
    * the UI for it can't be controlled by the normal preference bindings.
    */
-  _initMasterPasswordUI: function ()
+  _initMasterPasswordUI: function()
   {
     var noMP = !LoginHelper.isMasterPasswordSet();
 
     var button = document.getElementById("changeMasterPassword");
     button.disabled = noMP;
 
     var checkbox = document.getElementById("useMasterPassword");
     checkbox.checked = !noMP;
@@ -233,17 +233,17 @@ var gSecurityPane = {
     blockUncommonUnwanted.checked = blockUnwantedPref.value && blockUncommonPref.value;
   },
 
   /**
    * Enables/disables the master password button depending on the state of the
    * "use master password" checkbox, and prompts for master password removal if
    * one is set.
    */
-  updateMasterPasswordButton: function ()
+  updateMasterPasswordButton: function()
   {
     var checkbox = document.getElementById("useMasterPassword");
     var button = document.getElementById("changeMasterPassword");
     button.disabled = !checkbox.checked;
 
     // unchecking the checkbox should try to immediately remove the master
     // password, because it's impossible to non-destructively remove the master
     // password used to encrypt all the passwords without providing it (by
@@ -257,17 +257,17 @@ var gSecurityPane = {
     this._initMasterPasswordUI();
   },
 
   /**
    * Displays the "remove master password" dialog to allow the user to remove
    * the current master password.  When the dialog is dismissed, master password
    * UI is automatically updated.
    */
-  _removeMasterPassword: function ()
+  _removeMasterPassword: function()
   {
     var secmodDB = Cc["@mozilla.org/security/pkcs11moduledb;1"].
                    getService(Ci.nsIPKCS11ModuleDB);
     if (secmodDB.isFIPSEnabled) {
       var promptService = Cc["@mozilla.org/embedcomp/prompt-service;1"].
                           getService(Ci.nsIPromptService);
       var bundle = document.getElementById("bundlePreferences");
       promptService.alert(window,
@@ -279,24 +279,24 @@ var gSecurityPane = {
       gSubDialog.open("chrome://mozapps/content/preferences/removemp.xul",
                       null, null, this._initMasterPasswordUI.bind(this));
     }
   },
 
   /**
    * Displays a dialog in which the master password may be changed.
    */
-  changeMasterPassword: function ()
+  changeMasterPassword: function()
   {
     gSubDialog.open("chrome://mozapps/content/preferences/changemp.xul",
                     "resizable=no", null, this._initMasterPasswordUI.bind(this));
   },
 
   /**
    * Shows the sites where the user has saved passwords and the associated login
    * information.
    */
-  showPasswords: function ()
+  showPasswords: function()
   {
     gSubDialog.open("chrome://passwordmgr/content/passwordManager.xul");
   }
 
 };
--- a/browser/components/preferences/in-content/sync.js
+++ b/browser/components/preferences/in-content/sync.js
@@ -1,16 +1,16 @@
 /* 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://services-sync/main.js");
 Components.utils.import("resource://gre/modules/Services.jsm");
 
-XPCOMUtils.defineLazyGetter(this, "FxAccountsCommon", function () {
+XPCOMUtils.defineLazyGetter(this, "FxAccountsCommon", function() {
   return Components.utils.import("resource://gre/modules/FxAccountsCommon.js", {});
 });
 
 XPCOMUtils.defineLazyModuleGetter(this, "fxAccounts",
   "resource://gre/modules/FxAccounts.jsm");
 
 const PAGE_NO_ACCOUNT = 0;
 const PAGE_HAS_ACCOUNT = 1;
@@ -37,60 +37,60 @@ var gSyncPane = {
   set page(val) {
     document.getElementById("weavePrefsDeck").selectedIndex = val;
   },
 
   get _usingCustomServer() {
     return Weave.Svc.Prefs.isSet("serverURL");
   },
 
-  needsUpdate: function () {
+  needsUpdate: function() {
     this.page = PAGE_NEEDS_UPDATE;
     let label = document.getElementById("loginError");
     label.textContent = Weave.Utils.getErrorString(Weave.Status.login);
     label.className = "error";
   },
 
-  init: function () {
+  init: function() {
     this._setupEventListeners();
 
     // If the Service hasn't finished initializing, wait for it.
     let xps = Components.classes["@mozilla.org/weave/service;1"]
                                 .getService(Components.interfaces.nsISupports)
                                 .wrappedJSObject;
 
     if (xps.ready) {
       this._init();
       return;
     }
 
     // it may take some time before we can determine what provider to use
     // and the state of that provider, so show the "please wait" page.
     this._showLoadPage(xps);
 
-    let onUnload = function () {
+    let onUnload = function() {
       window.removeEventListener("unload", onUnload, false);
       try {
         Services.obs.removeObserver(onReady, "weave:service:ready");
       } catch (e) {}
     };
 
-    let onReady = function () {
+    let onReady = function() {
       Services.obs.removeObserver(onReady, "weave:service:ready");
       window.removeEventListener("unload", onUnload, false);
       this._init();
     }.bind(this);
 
     Services.obs.addObserver(onReady, "weave:service:ready", false);
     window.addEventListener("unload", onUnload, false);
 
     xps.ensureLoaded();
   },
 
-  _showLoadPage: function (xps) {
+  _showLoadPage: function(xps) {
     let username;
     try {
       username = Services.prefs.getCharPref("services.sync.username");
     } catch (e) {}
     if (!username) {
       this.page = FXA_PAGE_LOGGED_OUT;
     } else if (xps.fxAccountsEnabled) {
       // Use cached values while we wait for the up-to-date values
@@ -104,35 +104,35 @@ var gSyncPane = {
       document.getElementById("fxaEmailAddress1").textContent = username;
       this._populateComputerName(cachedComputerName);
       this.page = FXA_PAGE_LOGGED_IN;
     } else { // Old Sync
       this.page = PAGE_HAS_ACCOUNT;
     }
   },
 
-  _init: function () {
+  _init: function() {
     let topics = ["weave:service:login:error",
                   "weave:service:login:finish",
                   "weave:service:start-over:finish",
                   "weave:service:setup-complete",
                   "weave:service:logout:finish",
                   FxAccountsCommon.ONVERIFIED_NOTIFICATION,
                   FxAccountsCommon.ONLOGIN_NOTIFICATION,
                   FxAccountsCommon.ON_PROFILE_CHANGE_NOTIFICATION,
                   ];
     // Add the observers now and remove them on unload
     // XXXzpao This should use Services.obs.* but Weave's Obs does nice handling
     //        of `this`. Fix in a followup. (bug 583347)
-    topics.forEach(function (topic) {
+    topics.forEach(function(topic) {
       Weave.Svc.Obs.add(topic, this.updateWeavePrefs, this);
     }, this);
 
     window.addEventListener("unload", function() {
-      topics.forEach(function (topic) {
+      topics.forEach(function(topic) {
         Weave.Svc.Obs.remove(topic, this.updateWeavePrefs, this);
       }, gSyncPane);
     }, false);
 
     XPCOMUtils.defineLazyGetter(this, '_stringBundle', () => {
       return Services.strings.createBundle("chrome://browser/locale/preferences/preferences.properties");
     });
 
@@ -197,117 +197,117 @@ var gSyncPane = {
 
   _setupEventListeners: function() {
     function setEventListener(aId, aEventType, aCallback)
     {
       document.getElementById(aId)
               .addEventListener(aEventType, aCallback.bind(gSyncPane));
     }
 
-    setEventListener("noAccountSetup", "click", function (aEvent) {
+    setEventListener("noAccountSetup", "click", function(aEvent) {
       aEvent.stopPropagation();
       gSyncPane.openSetup(null);
     });
-    setEventListener("noAccountPair", "click", function (aEvent) {
+    setEventListener("noAccountPair", "click", function(aEvent) {
       aEvent.stopPropagation();
       gSyncPane.openSetup('pair');
     });
     setEventListener("syncChangePassword", "command",
       () => gSyncUtils.changePassword());
     setEventListener("syncResetPassphrase", "command",
       () => gSyncUtils.resetPassphrase());
     setEventListener("syncReset", "command", gSyncPane.resetSync);
-    setEventListener("syncAddDeviceLabel", "click", function () {
+    setEventListener("syncAddDeviceLabel", "click", function() {
       gSyncPane.openAddDevice();
       return false;
     });
-    setEventListener("syncEnginesList", "select", function () {
+    setEventListener("syncEnginesList", "select", function() {
       if (this.selectedCount)
         this.clearSelection();
     });
-    setEventListener("syncComputerName", "change", function (e) {
+    setEventListener("syncComputerName", "change", function(e) {
       gSyncUtils.changeName(e.target);
     });
-    setEventListener("fxaChangeDeviceName", "command", function () {
+    setEventListener("fxaChangeDeviceName", "command", function() {
       this._toggleComputerNameControls(true);
       this._focusComputerNameTextbox();
     });
-    setEventListener("fxaCancelChangeDeviceName", "command", function () {
+    setEventListener("fxaCancelChangeDeviceName", "command", function() {
       // We explicitly blur the textbox because of bug 75324, then after
       // changing the state of the buttons, force focus to whatever the focus
       // manager thinks should be next (which on the mac, depends on an OSX
       // keyboard access preference)
       this._blurComputerNameTextbox();
       this._toggleComputerNameControls(false);
       this._updateComputerNameValue(false);
       this._focusAfterComputerNameTextbox();
     });
-    setEventListener("fxaSaveChangeDeviceName", "command", function () {
+    setEventListener("fxaSaveChangeDeviceName", "command", function() {
       // Work around bug 75324 - see above.
       this._blurComputerNameTextbox();
       this._toggleComputerNameControls(false);
       this._updateComputerNameValue(true);
       this._focusAfterComputerNameTextbox();
     });
-    setEventListener("unlinkDevice", "click", function () {
+    setEventListener("unlinkDevice", "click", function() {
       gSyncPane.startOver(true);
       return false;
     });
-    setEventListener("loginErrorUpdatePass", "click", function () {
+    setEventListener("loginErrorUpdatePass", "click", function() {
       gSyncPane.updatePass();
       return false;
     });
-    setEventListener("loginErrorResetPass", "click", function () {
+    setEventListener("loginErrorResetPass", "click", function() {
       gSyncPane.resetPass();
       return false;
     });
-    setEventListener("loginErrorStartOver", "click", function () {
+    setEventListener("loginErrorStartOver", "click", function() {
       gSyncPane.startOver(true);
       return false;
     });
-    setEventListener("noFxaSignUp", "command", function () {
+    setEventListener("noFxaSignUp", "command", function() {
       gSyncPane.signUp();
       return false;
     });
-    setEventListener("noFxaSignIn", "command", function () {
+    setEventListener("noFxaSignIn", "command", function() {
       gSyncPane.signIn();
       return false;
     });
-    setEventListener("fxaUnlinkButton", "command", function () {
+    setEventListener("fxaUnlinkButton", "command", function() {
       gSyncPane.unlinkFirefoxAccount(true);
     });
     setEventListener("verifyFxaAccount", "command",
       gSyncPane.verifyFirefoxAccount);
-    setEventListener("unverifiedUnlinkFxaAccount", "command", function () {
+    setEventListener("unverifiedUnlinkFxaAccount", "command", function() {
       /* no warning as account can't have previously synced */
       gSyncPane.unlinkFirefoxAccount(false);
     });
     setEventListener("rejectReSignIn", "command",
       gSyncPane.reSignIn);
-    setEventListener("rejectUnlinkFxaAccount", "command", function () {
+    setEventListener("rejectUnlinkFxaAccount", "command", function() {
       gSyncPane.unlinkFirefoxAccount(true);
     });
-    setEventListener("fxaSyncComputerName", "keypress", function (e) {
+    setEventListener("fxaSyncComputerName", "keypress", function(e) {
       if (e.keyCode == KeyEvent.DOM_VK_RETURN) {
         document.getElementById("fxaSaveChangeDeviceName").click();
       } else if (e.keyCode == KeyEvent.DOM_VK_ESCAPE) {
         document.getElementById("fxaCancelChangeDeviceName").click();
       }
     });
   },
 
-  _initProfileImageUI: function () {
+  _initProfileImageUI: function() {
     try {
       if (Services.prefs.getBoolPref("identity.fxaccounts.profile_image.enabled")) {
         document.getElementById("fxaProfileImage").hidden = false;
       }
     } catch (e) { }
   },
 
-  updateWeavePrefs: function () {
+  updateWeavePrefs: function() {
     let service = Components.classes["@mozilla.org/weave/service;1"]
                   .getService(Components.interfaces.nsISupports)
                   .wrappedJSObject;
     // service.fxAccountsEnabled is false iff sync is already configured for
     // the legacy provider.
     if (service.fxAccountsEnabled) {
       let displayNameLabel = document.getElementById("fxaDisplayName");
       let fxaEmailAddress1Label = document.getElementById("fxaEmailAddress1");
@@ -422,17 +422,17 @@ var gSyncPane = {
     } else {
       this.page = PAGE_HAS_ACCOUNT;
       document.getElementById("accountName").textContent = Weave.Service.identity.account;
       document.getElementById("syncComputerName").value = Weave.Service.clientsEngine.localName;
       document.getElementById("tosPP-normal").hidden = this._usingCustomServer;
     }
   },
 
-  startOver: function (showDialog) {
+  startOver: function(showDialog) {
     if (showDialog) {
       let flags = Services.prompt.BUTTON_POS_0 * Services.prompt.BUTTON_TITLE_IS_STRING +
                   Services.prompt.BUTTON_POS_1 * Services.prompt.BUTTON_TITLE_CANCEL +
                   Services.prompt.BUTTON_POS_1_DEFAULT;
       let buttonChoice =
         Services.prompt.confirmEx(window,
                                   this._stringBundle.GetStringFromName("syncUnlink.title"),
                                   this._stringBundle.GetStringFromName("syncUnlink.label"),
@@ -444,31 +444,31 @@ var gSyncPane = {
       if (buttonChoice == 1)
         return;
     }
 
     Weave.Service.startOver();
     this.updateWeavePrefs();
   },
 
-  updatePass: function () {
+  updatePass: function() {
     if (Weave.Status.login == Weave.LOGIN_FAILED_LOGIN_REJECTED)
       gSyncUtils.changePassword();
     else
       gSyncUtils.updatePassphrase();
   },
 
-  resetPass: function () {
+  resetPass: function() {
     if (Weave.Status.login == Weave.LOGIN_FAILED_LOGIN_REJECTED)
       gSyncUtils.resetPassword();
     else
       gSyncUtils.resetPassphrase();
   },
 
-  _getEntryPoint: function () {
+  _getEntryPoint: function() {
     let params = new URLSearchParams(document.URL.split("#")[0].split("?")[1] || "");
     return params.get("entrypoint") || "preferences";
   },
 
   _openAboutAccounts: function(action) {
     let entryPoint = this._getEntryPoint();
     let params = new URLSearchParams();
     if (action) {
@@ -483,17 +483,17 @@ var gSyncPane = {
    * Invoke the Sync setup wizard.
    *
    * @param wizardType
    *        Indicates type of wizard to launch:
    *          null    -- regular set up wizard
    *          "pair"  -- pair a device first
    *          "reset" -- reset sync
    */
-  openSetup: function (wizardType) {
+  openSetup: function(wizardType) {
     let service = Components.classes["@mozilla.org/weave/service;1"]
                   .getService(Components.interfaces.nsISupports)
                   .wrappedJSObject;
 
     if (service.fxAccountsEnabled) {
       this._openAboutAccounts();
     } else {
       let win = Services.wm.getMostRecentWindow("Weave:AccountSetup");
@@ -641,29 +641,29 @@ var gSyncPane = {
         return;
       }
     }
     fxAccounts.signOut().then(() => {
       this.updateWeavePrefs();
     });
   },
 
-  openAddDevice: function () {
+  openAddDevice: function() {
     if (!Weave.Utils.ensureMPUnlocked())
       return;
 
     let win = Services.wm.getMostRecentWindow("Sync:AddDevice");
     if (win)
       win.focus();
     else
       window.openDialog("chrome://browser/content/sync/addDevice.xul",
                         "syncAddDevice", "centerscreen,chrome,resizable=no");
   },
 
-  resetSync: function () {
+  resetSync: function() {
     this.openSetup("reset");
   },
 
   _populateComputerName(value) {
     let textbox = document.getElementById("fxaSyncComputerName");
     if (!textbox.hasAttribute("placeholder")) {
       textbox.setAttribute("placeholder",
                            Weave.Utils.getDefaultDeviceName());
--- a/browser/components/preferences/in-content/tests/browser_advanced_update.js
+++ b/browser/components/preferences/in-content/tests/browser_advanced_update.js
@@ -22,37 +22,37 @@ const mockUpdateManager = {
 
   createInstance: function(outer, iiD) {
     if (outer) {
       throw Cr.NS_ERROR_NO_AGGREGATION;
     }
     return this.QueryInterface(iiD);
   },
 
-  register: function () {
+  register: function() {
     let registrar = Cm.QueryInterface(Ci.nsIComponentRegistrar);
     if (!registrar.isCIDRegistered(this._mockClassId)) {
       this._originalClassId = registrar.contractIDToCID(this.contractId);
       this._originalFactory = Cm.getClassObject(Cc[this.contractId], Ci.nsIFactory);
       registrar.unregisterFactory(this._originalClassId, this._originalFactory);
       registrar.registerFactory(this._mockClassId, "Unregister after testing", this.contractId, this);
     }
   },
 
-  unregister: function () {
+  unregister: function() {
     let registrar = Cm.QueryInterface(Ci.nsIComponentRegistrar);
     registrar.unregisterFactory(this._mockClassId, this);
     registrar.registerFactory(this._originalClassId, "", this.contractId, this._originalFactory);
   },
 
   get updateCount() {
     return this._updates.length;
   },
 
-  getUpdateAt: function (index) {
+  getUpdateAt: function(index) {
     return this._updates[index];
   },
 
   _updates: [
     {
       name: "Firefox Developer Edition 49.0a2",
       statusText: "The Update was successfully installed",
       buildID: "20160728004010",
--- a/browser/components/preferences/in-content/tests/head.js
+++ b/browser/components/preferences/in-content/tests/head.js
@@ -27,17 +27,17 @@ function is_element_visible(aElement, aM
 function is_element_hidden(aElement, aMsg) {
   isnot(aElement, null, "Element should not be null, when checking visibility");
   ok(is_hidden(aElement), aMsg);
 }
 
 function open_preferences(aCallback) {
   gBrowser.selectedTab = gBrowser.addTab("about:preferences");
   let newTabBrowser = gBrowser.getBrowserForTab(gBrowser.selectedTab);
-  newTabBrowser.addEventListener("Initialized", function () {
+  newTabBrowser.addEventListener("Initialized", function() {
     newTabBrowser.removeEventListener("Initialized", arguments.callee, true);
     aCallback(gBrowser.contentWindow);
   }, true);
 }
 
 function openAndLoadSubDialog(aURL, aFeatures = null, aParams = null, aClosingCallback = null) {
   let promise = promiseLoadSubDialog(aURL);
   content.gSubDialog.open(aURL, aFeatures, aParams, aClosingCallback);
@@ -97,17 +97,17 @@ function waitForEvent(aSubject, aEventNa
   let eventDeferred = Promise.defer();
   let timeoutMs = aTimeoutMs || kDefaultWait;
   let stack = new Error().stack;
   let timerID = setTimeout(function wfe_canceller() {
     aSubject.removeEventListener(aEventName, listener);
     eventDeferred.reject(new Error(aEventName + " event timeout at " + stack));
   }, timeoutMs);
 
-  var listener = function (aEvent) {
+  var listener = function(aEvent) {
     if (aTarget && aTarget !== aEvent.target)
         return;
 
     // stop the timeout clock and resume
     clearTimeout(timerID);
     eventDeferred.resolve(aEvent);
   };
 
--- a/browser/components/preferences/languages.js
+++ b/browser/components/preferences/languages.js
@@ -5,41 +5,41 @@
 
 var gLanguagesDialog = {
 
   _availableLanguagesList : [],
   _acceptLanguages        : { },
 
   _selectedItemID         : null,
 
-  init: function ()
+  init: function()
   {
     if (!this._availableLanguagesList.length)
       this._loadAvailableLanguages();
   },
 
   // Ugly hack used to trigger extra reflow in order to work around XUL bug 1194844;
   // see bug 1194346.
-  forceReflow: function ()
+  forceReflow: function()
   {
     this._activeLanguages.style.fontKerning = "none";
     setTimeout("gLanguagesDialog._activeLanguages.style.removeProperty('font-kerning')", 0);
   },
 
   get _activeLanguages()
   {
     return document.getElementById("activeLanguages");
   },
 
   get _availableLanguages()
   {
     return document.getElementById("availableLanguages");
   },
 
-  _loadAvailableLanguages: function ()
+  _loadAvailableLanguages: function()
   {
     // This is a parser for: resource://gre/res/language.properties
     // The file is formatted like so:
     // ab[-cd].accept=true|false
     //  ab = language
     //  cd = region
     var bundleAccepted    = document.getElementById("bundleAccepted");
     var bundleRegions     = document.getElementById("bundleRegions");
@@ -97,41 +97,41 @@ var gLanguagesDialog = {
             this._availableLanguagesList.push(li);
           }
         }
       }
     }
     this._buildAvailableLanguageList();
   },
 
-  _buildAvailableLanguageList: function ()
+  _buildAvailableLanguageList: function()
   {
     var availableLanguagesPopup = document.getElementById("availableLanguagesPopup");
     while (availableLanguagesPopup.hasChildNodes())
       availableLanguagesPopup.removeChild(availableLanguagesPopup.firstChild);
 
     // Sort the list of languages by name
-    this._availableLanguagesList.sort(function (a, b) {
+    this._availableLanguagesList.sort(function(a, b) {
                                         return a.name.localeCompare(b.name);
                                       });
 
     // Load the UI with the data
     for (var i = 0; i < this._availableLanguagesList.length; ++i) {
       var abCD = this._availableLanguagesList[i].abcd;
       if (this._availableLanguagesList[i].isVisible &&
           (!(abCD in this._acceptLanguages) || !this._acceptLanguages[abCD])) {
         var menuitem = document.createElement("menuitem");
         menuitem.id = this._availableLanguagesList[i].abcd;
         availableLanguagesPopup.appendChild(menuitem);
         menuitem.setAttribute("label", this._availableLanguagesList[i].name);
       }
     }
   },
 
-  readAcceptLanguages: function ()
+  readAcceptLanguages: function()
   {
     while (this._activeLanguages.hasChildNodes())
       this._activeLanguages.removeChild(this._activeLanguages.firstChild);
 
     var selectedIndex = 0;
     var preference = document.getElementById("intl.accept_languages");
     if (preference.value == "")
       return undefined;
@@ -155,30 +155,30 @@ var gLanguagesDialog = {
     if (this._activeLanguages.childNodes.length > 0) {
       this._activeLanguages.ensureIndexIsVisible(selectedIndex);
       this._activeLanguages.selectedIndex = selectedIndex;
     }
 
     return undefined;
   },
 
-  writeAcceptLanguages: function ()
+  writeAcceptLanguages: function()
   {
     return undefined;
   },
 
-  onAvailableLanguageSelect: function ()
+  onAvailableLanguageSelect: function()
   {
     var addButton = document.getElementById("addButton");
     addButton.disabled = false;
 
     this._availableLanguages.removeAttribute("accesskey");
   },
 
-  addLanguage: function ()
+  addLanguage: function()
   {
     var selectedID = this._availableLanguages.selectedItem.id;
     var preference = document.getElementById("intl.accept_languages");
     var arrayOfPrefs = preference.value.toLowerCase().split(/\s*,\s*/);
     for (var i = 0; i < arrayOfPrefs.length; ++i ) {
       if (arrayOfPrefs[i] == selectedID)
         return;
     }
@@ -196,17 +196,17 @@ var gLanguagesDialog = {
     this._availableLanguages.selectedItem = null;
 
     // Rebuild the available list with the added item removed...
     this._buildAvailableLanguageList();
 
     this._availableLanguages.setAttribute("label", this._availableLanguages.getAttribute("label2"));
   },
 
-  removeLanguage: function ()
+  removeLanguage: function()
   {
     // Build the new preference value string.
     var languagesArray = [];
     for (var i = 0; i < this._activeLanguages.childNodes.length; ++i) {
       var item = this._activeLanguages.childNodes[i];
       if (!item.selected)
         languagesArray.push(item.id);
       else
@@ -224,28 +224,28 @@ var gLanguagesDialog = {
 
     // Update the preference and force a UI rebuild
     var preference = document.getElementById("intl.accept_languages");
     preference.value = string;
 
     this._buildAvailableLanguageList();
   },
 
-  _getLanguageName: function (aABCD)
+  _getLanguageName: function(aABCD)
   {
     if (!this._availableLanguagesList.length)
       this._loadAvailableLanguages();
     for (var i = 0; i < this._availableLanguagesList.length; ++i) {
       if (aABCD == this._availableLanguagesList[i].abcd)
         return this._availableLanguagesList[i].name;
     }
     return "";
   },
 
-  moveUp: function ()
+  moveUp: function()
   {
     var selectedItem = this._activeLanguages.selectedItems[0];
     var previousItem = selectedItem.previousSibling;
 
     var string = "";
     for (var i = 0; i < this._activeLanguages.childNodes.length; ++i) {
       var item = this._activeLanguages.childNodes[i];
       string += (i == 0 ? "" : ",");
@@ -259,17 +259,17 @@ var gLanguagesDialog = {
 
     this._selectedItemID = selectedItem.id;
 
     // Update the preference and force a UI rebuild
     var preference = document.getElementById("intl.accept_languages");
     preference.value = string;
   },
 
-  moveDown: function ()
+  moveDown: function()
   {
     var selectedItem = this._activeLanguages.selectedItems[0];
     var nextItem = selectedItem.nextSibling;
 
     var string = "";
     for (var i = 0; i < this._activeLanguages.childNodes.length; ++i) {
       var item = this._activeLanguages.childNodes[i];
       string += (i == 0 ? "" : ",");
@@ -283,17 +283,17 @@ var gLanguagesDialog = {
 
     this._selectedItemID = selectedItem.id;
 
     // Update the preference and force a UI rebuild
     var preference = document.getElementById("intl.accept_languages");
     preference.value = string;
   },
 
-  onLanguageSelect: function ()
+  onLanguageSelect: function()
   {
     var upButton = document.getElementById("up");
     var downButton = document.getElementById("down");
     var removeButton = document.getElementById("remove");
     switch (this._activeLanguages.selectedCount) {
     case 0:
       upButton.disabled = downButton.disabled = removeButton.disabled = true;
       break;
--- a/browser/components/preferences/permissions.js
+++ b/browser/components/preferences/permissions.js
@@ -27,17 +27,17 @@ var gPermissionManager = {
   _observerRemoved      : false,
 
   _view: {
     _rowCount: 0,
     get rowCount()
     {
       return this._rowCount;
     },
-    getCellText: function (aRow, aColumn)
+    getCellText: function(aRow, aColumn)
     {
       if (aColumn.id == "siteCol")
         return gPermissionManager._permissions[aRow].origin;
       else if (aColumn.id == "statusCol")
         return gPermissionManager._permissions[aRow].capability;
       return "";
     },
 
@@ -54,17 +54,17 @@ var gPermissionManager = {
     getCellProperties: function(row, column) {
       if (column.element.getAttribute("id") == "siteCol")
         return "ltr";
 
       return "";
     }
   },
 
-  _getCapabilityString: function (aCapability)
+  _getCapabilityString: function(aCapability)
   {
     var stringKey = null;
     switch (aCapability) {
     case nsIPermissionManager.ALLOW_ACTION:
       stringKey = "can";
       break;
     case nsIPermissionManager.DENY_ACTION:
       stringKey = "cannot";
@@ -74,17 +74,17 @@ var gPermissionManager = {
       break;
     case nsICookiePermission.ACCESS_SESSION:
       stringKey = "canSession";
       break;
     }
     return this._bundle.getString(stringKey);
   },
 
-  addPermission: function (aCapability)
+  addPermission: function(aCapability)
   {
     var textbox = document.getElementById("url");
     var input_url = textbox.value.replace(/^\s*/, ""); // trim any leading space
     let principal;
     try {
       // The origin accessor on the principal object will throw if the
       // principal doesn't have a canonical origin representation. This will
       // help catch cases where the URI parser parsed something like
@@ -157,17 +157,17 @@ var gPermissionManager = {
     let isNewPermission = this._permissionsToAdd.delete(aPermission.principal.origin);
 
     if (!isNewPermission) {
       this._permissionsToDelete.set(aPermission.principal.origin, aPermission);
     }
 
   },
 
-  _handleCapabilityChange: function ()
+  _handleCapabilityChange: function()
   {
     // Re-do the sort, if the status changed from Block to Allow
     // or vice versa, since if we're sorted on status, we may no
     // longer be in order.
     if (this._lastPermissionSortColumn == "statusCol") {
       this._resortPermissions();
     }
     this._tree.treeBoxObject.invalidate();
@@ -186,43 +186,43 @@ var gPermissionManager = {
   {
     gTreeUtils.sort(this._tree, this._view, this._permissions,
                     this._lastPermissionSortColumn,
                     this._permissionsComparator,
                     this._lastPermissionSortColumn,
                     !this._lastPermissionSortAscending); // keep sort direction
   },
 
-  onHostInput: function (aSiteField)
+  onHostInput: function(aSiteField)
   {
     document.getElementById("btnSession").disabled = !aSiteField.value;
     document.getElementById("btnBlock").disabled = !aSiteField.value;
     document.getElementById("btnAllow").disabled = !aSiteField.value;
   },
 
-  onWindowKeyPress: function (aEvent)
+  onWindowKeyPress: function(aEvent)
   {
     if (aEvent.keyCode == KeyEvent.DOM_VK_ESCAPE)
       window.close();
   },
 
-  onHostKeyPress: function (aEvent)
+  onHostKeyPress: function(aEvent)
   {
     if (aEvent.keyCode == KeyEvent.DOM_VK_RETURN)
       document.getElementById("btnAllow").click();
   },
 
-  onLoad: function ()
+  onLoad: function()
   {
     this._bundle = document.getElementById("bundlePreferences");
     var params = window.arguments[0];
     this.init(params);
   },
 
-  init: function (aParams)
+  init: function(aParams)
   {
     if (this._type) {
       // reusing an open dialog, clear the old observer
       this.uninit();
     }
 
     this._type = aParams.permissionType;
     this._manageCapability = aParams.manageCapability;
@@ -270,26 +270,26 @@ var gPermissionManager = {
     Services.obs.notifyObservers(null, NOTIFICATION_FLUSH_PERMISSIONS, this._type);
     Services.obs.addObserver(this, "perm-changed", false);
 
     this._loadPermissions();
 
     urlField.focus();
   },
 
-  uninit: function ()
+  uninit: function()
   {
     if (!this._observerRemoved) {
       Services.obs.removeObserver(this, "perm-changed");
 
       this._observerRemoved = true;
     }
   },
 
-  observe: function (aSubject, aTopic, aData)
+  observe: function(aSubject, aTopic, aData)
   {
     if (aTopic == "perm-changed") {
       var permission = aSubject.QueryInterface(Components.interfaces.nsIPermission);
 
       // Ignore unrelated permission types.
       if (permission.type != this._type)
         return;
 
@@ -306,71 +306,71 @@ var gPermissionManager = {
         this._handleCapabilityChange();
       }
       else if (aData == "deleted") {
         this._removePermissionFromList(permission.principal);
       }
     }
   },
 
-  onPermissionSelected: function ()
+  onPermissionSelected: function()
   {
     var hasSelection = this._tree.view.selection.count > 0;
     var hasRows = this._tree.view.rowCount > 0;
     document.getElementById("removePermission").disabled = !hasRows || !hasSelection;
     document.getElementById("removeAllPermissions").disabled = !hasRows;
   },
 
-  onPermissionDeleted: function ()
+  onPermissionDeleted: function()
   {
     if (!this._view.rowCount)
       return;
     var removedPermissions = [];
     gTreeUtils.deleteSelectedItems(this._tree, this._view, this._permissions, removedPermissions);
     for (var i = 0; i < removedPermissions.length; ++i) {
       var p = removedPermissions[i];
       this._removePermission(p);
     }
     document.getElementById("removePermission").disabled = !this._permissions.length;
     document.getElementById("removeAllPermissions").disabled = !this._permissions.length;
   },
 
-  onAllPermissionsDeleted: function ()
+  onAllPermissionsDeleted: function()
   {
     if (!this._view.rowCount)
       return;
     var removedPermissions = [];
     gTreeUtils.deleteAll(this._tree, this._view, this._permissions, removedPermissions);
     for (var i = 0; i < removedPermissions.length; ++i) {
       var p = removedPermissions[i];
       this._removePermission(p);
     }
     document.getElementById("removePermission").disabled = true;
     document.getElementById("removeAllPermissions").disabled = true;
   },
 
-  onPermissionKeyPress: function (aEvent)
+  onPermissionKeyPress: function(aEvent)
   {
     if (aEvent.keyCode == KeyEvent.DOM_VK_DELETE) {
       this.onPermissionDeleted();
     } else if (AppConstants.platform == "macosx" &&
                aEvent.keyCode == KeyEvent.DOM_VK_BACK_SPACE) {
       this.onPermissionDeleted();
     }
   },
 
   _lastPermissionSortColumn: "",
   _lastPermissionSortAscending: false,
-  _permissionsComparator : function (a, b)
+  _permissionsComparator : function(a, b)
   {
     return a.toLowerCase().localeCompare(b.toLowerCase());
   },
 
 
-  onPermissionSort: function (aColumn)
+  onPermissionSort: function(aColumn)
   {
     this._lastPermissionSortAscending = gTreeUtils.sort(this._tree,
                                                         this._view,
                                                         this._permissions,
                                                         aColumn,
                                                         this._permissionsComparator,
                                                         this._lastPermissionSortColumn,
                                                         this._lastPermissionSortAscending);
@@ -390,17 +390,17 @@ var gPermissionManager = {
 
     for (let p of this._permissionsToDelete.values()) {
       Services.perms.removeFromPrincipal(p.principal, p.type);
     }
 
     window.close();
   },
 
-  _loadPermissions: function ()
+  _loadPermissions: function()
   {
     this._tree = document.getElementById("permissionsTree");
     this._permissions = [];
 
     // load permissions into a table
     var enumerator = Services.perms.enumerator;
     while (enumerator.hasMoreElements()) {
       var nextPermission = enumerator.getNext().QueryInterface(Components.interfaces.nsIPermission);
@@ -412,45 +412,45 @@ var gPermissionManager = {
     // sort and display the table
     this._tree.view = this._view;
     this.onPermissionSort("origin");
 
     // disable "remove all" button if there are none
     document.getElementById("removeAllPermissions").disabled = this._permissions.length == 0;
   },
 
-  _addPermissionToList: function (aPermission)
+  _addPermissionToList: function(aPermission)
   {
     if (aPermission.type == this._type &&
         (!this._manageCapability ||
          (aPermission.capability == this._manageCapability))) {
 
       var principal = aPermission.principal;
       var capabilityString = this._getCapabilityString(aPermission.capability);
       var p = new Permission(principal,
                              aPermission.type,
                              capabilityString);
       this._permissions.push(p);
     }
   },
 
-  _removePermissionFromList: function (aPrincipal)
+  _removePermissionFromList: function(aPrincipal)
   {
     for (let i = 0; i < this._permissions.length; ++i) {
       if (this._permissions[i].principal.equals(aPrincipal)) {
         this._permissions.splice(i, 1);
         this._view._rowCount--;
         this._tree.treeBoxObject.rowCountChanged(this._view.rowCount - 1, -1);
         this._tree.treeBoxObject.invalidate();
         break;
       }
     }
   },
 
-  setOrigin: function (aOrigin)
+  setOrigin: function(aOrigin)
   {
     document.getElementById("url").value = aOrigin;
   }
 };
 
 function setOrigin(aOrigin)
 {
   gPermissionManager.setOrigin(aOrigin);
--- a/browser/components/preferences/sanitize.js
+++ b/browser/components/preferences/sanitize.js
@@ -8,14 +8,14 @@ var gSanitizeDialog = Object.freeze({
     let customWidthElements = document.getElementsByAttribute("dialogWidth", "*");
     let isInSubdialog = document.documentElement.hasAttribute("subdialog");
     for (let element of customWidthElements) {
       element.style.width = element.getAttribute(isInSubdialog ? "subdialogWidth" : "dialogWidth");
     }
     this.onClearHistoryChanged();
   },
 
-  onClearHistoryChanged: function () {
+  onClearHistoryChanged: function() {
     let downloadsPref = document.getElementById("privacy.clearOnShutdown.downloads");
     let historyPref = document.getElementById("privacy.clearOnShutdown.history");
     downloadsPref.value = historyPref.value;
   }
 });
--- a/browser/components/preferences/translation.js
+++ b/browser/components/preferences/translation.js
@@ -46,17 +46,17 @@ Tree.prototype = {
 
     return result;
   },
 
   // nsITreeView implementation
   get rowCount() {
     return this._data.length;
   },
-  getCellText: function (aRow, aColumn) {
+  getCellText: function(aRow, aColumn) {
     return this._data[aRow];
   },
   isSeparator: function(aIndex) {
     return false;
   },
   isSorted: function() {
     return false;
   },
--- a/browser/components/safebrowsing/content/test/browser_bug400731.js
+++ b/browser/components/safebrowsing/content/test/browser_bug400731.js
@@ -5,17 +5,17 @@ function onDOMContentLoaded(callback) {
     mm.removeMessageListener("Test:DOMContentLoaded", complete);
     callback(data);
   }
 
   let mm = gBrowser.selectedBrowser.messageManager;
   mm.addMessageListener("Test:DOMContentLoaded", complete);
 
   function contentScript() {
-    let listener = function () {
+    let listener = function() {
       removeEventListener("DOMContentLoaded", listener);
 
       let button = content.document.getElementById("ignoreWarningButton");
 
       sendAsyncMessage("Test:DOMContentLoaded", { buttonPresent: !!button });
     };
     addEventListener("DOMContentLoaded", listener);
   }
--- a/browser/components/search/content/search.xml
+++ b/browser/components/search/content/search.xml
@@ -811,17 +811,17 @@
           return aCommand == "cmd_clearhistory" ||
                  aCommand == "cmd_togglesuggest";
         },
 
         isCommandEnabled: function(aCommand) {
           return true;
         },
 
-        doCommand: function (aCommand) {
+        doCommand: function(aCommand) {
           switch (aCommand) {
             case "cmd_clearhistory":
               var param = this._self.getAttribute("autocompletesearchparam");
 
               BrowserSearch.searchBar.FormHistory.update({ op : "remove", fieldname : param }, null);
               this._self.value = "";
               break;
             case "cmd_togglesuggest":
--- a/browser/components/search/test/browser_abouthome_behavior.js
+++ b/browser/components/search/test/browser_abouthome_behavior.js
@@ -35,17 +35,17 @@ function test() {
           event.target.location.href == "about:blank") {
         info("skipping spurious load event");
         return;
       }
       tab.linkedBrowser.removeEventListener("load", load, true);
 
       // Observe page setup
       let doc = gBrowser.contentDocument;
-      gMutationObserver = new MutationObserver(function (mutations) {
+      gMutationObserver = new MutationObserver(function(mutations) {
         for (let mutation of mutations) {
           if (mutation.attributeName == "searchEngineName") {
             // Re-add the listener, and perform a search
             gBrowser.addProgressListener(listener);
             gMutationObserver.disconnect()
             gMutationObserver = null;
             executeSoon(function() {
               doc.getElementById("searchText").value = "foo";
@@ -59,38 +59,38 @@ function test() {
   }
   waitForExplicitFinish();
 
   let gCurrTest;
   let gTests = [
     {
       name: "Search with Bing from about:home",
       searchURL: replaceUrl("http://www.bing.com/search?q=foo&pc=MOZI&form=MOZSPG"),
-      run: function () {
+      run: function() {
         verify_about_home_search("Bing");
       }
     },
     {
       name: "Search with Yahoo from about:home",
       searchURL: replaceUrl("https://search.yahoo.com/search?p=foo&ei=UTF-8&fr=moz35"),
-      run: function () {
+      run: function() {
         verify_about_home_search("Yahoo");
       }
     },
     {
       name: "Search with Google from about:home",
       searchURL: replaceUrl("https://www.google.com/search?q=foo&ie=utf-8&oe=utf-8"),
-      run: function () {
+      run: function() {
         verify_about_home_search("Google");
       }
     },
     {
       name: "Search with Amazon.com from about:home",
       searchURL: replaceUrl("https://www.amazon.com/exec/obidos/external-search/?field-keywords=foo&mode=blended&tag=mozilla-20&sourceid=Mozilla-search"),
-      run: function () {
+      run: function() {
         verify_about_home_search("Amazon.com");
       }
     }
   ];
 
   function nextTest() {
     if (gTests.length) {
       gCurrTest = gTests.shift();
@@ -123,17 +123,17 @@ function test() {
       info("Actual URI: " + req.URI.spec);
 
       req.cancel(Components.results.NS_ERROR_FAILURE);
 
       executeSoon(nextTest);
     }
   }
 
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     Services.search.currentEngine = previouslySelectedEngine;
     gBrowser.removeProgressListener(listener);
     gBrowser.removeTab(tab);
     if (gMutationObserver)
       gMutationObserver.disconnect();
   });
 
   tab.linkedBrowser.addEventListener("load", function load() {
--- a/browser/components/search/test/browser_addEngine.js
+++ b/browser/components/search/test/browser_addEngine.js
@@ -41,44 +41,44 @@ var gTests = [
   {
     name: "opensearch install",
     engine: {
       name: "Foo",
       alias: null,
       description: "Foo Search",
       searchForm: "http://mochi.test:8888/browser/browser/components/search/test/"
     },
-    run: function () {
+    run: function() {
       Services.obs.addObserver(observer, "browser-search-engine-modified", false);
 
       gSS.addEngine("http://mochi.test:8888/browser/browser/components/search/test/testEngine.xml",
                     null, "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABGklEQVQoz2NgGB6AnZ1dUlJSXl4eSDIyMhLW4Ovr%2B%2Fr168uXL69Zs4YoG%2BLi4i5dusTExMTGxsbNzd3f37937976%2BnpmZmagbHR09J49e5YvX66kpATVEBYW9ubNm2nTphkbG7e2tp44cQLIuHfvXm5urpaWFlDKysqqu7v73LlzECMYIiIiHj58mJCQoKKicvXq1bS0NKBgW1vbjh074uPjgeqAXE1NzSdPnvDz84M0AEUvXLgAsW379u1z5swBen3jxo2zZ892cHB4%2BvQp0KlAfwI1cHJyghQFBwfv2rULokFXV%2FfixYu7d%2B8GGqGgoMDKyrpu3br9%2B%2FcDuXl5eVA%2FAEWBfoWHAdAYoNuAYQ0XAeoUERFhGDYAAPoUaT2dfWJuAAAAAElFTkSuQmCC",
                     false);
     },
-    added: function (engine) {
+    added: function(engine) {
       ok(engine, "engine was added.");
 
       checkEngine(this.engine, engine);
 
       let engineFromSS = gSS.getEngineByName(this.engine.name);
       is(engine, engineFromSS, "engine is obtainable via getEngineByName");
 
       let aEngine = gSS.getEngineByAlias("fooalias");
       ok(!aEngine, "Alias was not parsed from engine description");
 
       gSS.currentEngine = engine;
     },
-    current: function (engine) {
+    current: function(engine) {
       let currentEngine = gSS.currentEngine;
       is(engine, currentEngine, "engine is current");
       is(engine.name, this.engine.name, "current engine was changed successfully");
 
       gSS.removeEngine(engine);
     },
-    removed: function (engine) {
+    removed: function(engine) {
       // Remove the observer before calling the currentEngine getter,
       // as that getter will set the currentEngine to the original default
       // which will trigger a notification causing the test to loop over all
       // engines.
       Services.obs.removeObserver(observer, "browser-search-engine-modified");
 
       let currentEngine = gSS.currentEngine;
       ok(currentEngine, "An engine is present.");
--- a/browser/components/search/test/browser_amazon_behavior.js
+++ b/browser/components/search/test/browser_amazon_behavior.js
@@ -27,57 +27,57 @@ function test() {
 
   waitForExplicitFinish();
 
   var gCurrTest;
   var gTests = [
     {
       name: "context menu search",
       searchURL: base,
-      run: function () {
+      run: function() {
         // Simulate a contextmenu search
         // FIXME: This is a bit "low-level"...
         BrowserSearch.loadSearch("foo", false, "contextmenu");
       }
     },
     {
       name: "keyword search",
       searchURL: base,
-      run: function () {
+      run: function() {
         gURLBar.value = "? foo";
         gURLBar.focus();
         EventUtils.synthesizeKey("VK_RETURN", {});
       }
     },
     {
       name: "keyword search",
       searchURL: base,
-      run: function () {
+      run: function() {
         gURLBar.value = "a foo";
         gURLBar.focus();
         EventUtils.synthesizeKey("VK_RETURN", {});
       }
     },
     {
       name: "search bar search",
       searchURL: base,
-      run: function () {
+      run: function() {
         let sb = BrowserSearch.searchBar;
         sb.focus();
         sb.value = "foo";
-        registerCleanupFunction(function () {
+        registerCleanupFunction(function() {
           sb.value = "";
         });
         EventUtils.synthesizeKey("VK_RETURN", {});
       }
     },
     {
       name: "new tab search",
       searchURL: base,
-      run: function () {
+      run: function() {
         function doSearch(doc) {
           // Re-add the listener, and perform a search
           gBrowser.addProgressListener(listener);
           doc.getElementById("newtab-search-text").value = "foo";
           doc.getElementById("newtab-search-submit").click();
         }
 
         // load about:newtab, but remove the listener first so it doesn't
@@ -146,17 +146,17 @@ function test() {
       info("Actual URI: " + req.URI.spec);
 
       req.cancel(Components.results.NS_ERROR_FAILURE);
 
       executeSoon(nextTest);
     }
   }
 
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     engine.alias = undefined;
     gBrowser.removeProgressListener(listener);
     gBrowser.removeTab(tab);
     Services.search.currentEngine = previouslySelectedEngine;
   });
 
   tab.linkedBrowser.addEventListener("load", function load() {
     tab.linkedBrowser.removeEventListener("load", load, true);
--- a/browser/components/search/test/browser_bing_behavior.js
+++ b/browser/components/search/test/browser_bing_behavior.js
@@ -27,57 +27,57 @@ function test() {
 
   waitForExplicitFinish();
 
   var gCurrTest;
   var gTests = [
     {
       name: "context menu search",
       searchURL: base + "&form=MOZCON",
-      run: function () {
+      run: function() {
         // Simulate a contextmenu search
         // FIXME: This is a bit "low-level"...
         BrowserSearch.loadSearch("foo", false, "contextmenu");
       }
     },
     {
       name: "keyword search",
       searchURL: base + "&form=MOZLBR",
-      run: function () {
+      run: function() {
         gURLBar.value = "? foo";
         gURLBar.focus();
         EventUtils.synthesizeKey("VK_RETURN", {});
       }
     },
     {
       name: "keyword search with alias",
       searchURL: base + "&form=MOZLBR",
-      run: function () {
+      run: function() {
         gURLBar.value = "b foo";
         gURLBar.focus();
         EventUtils.synthesizeKey("VK_RETURN", {});
       }
     },
     {
       name: "search bar search",
       searchURL: base + "&form=MOZSBR",
-      run: function () {
+      run: function() {
         let sb = BrowserSearch.searchBar;
         sb.focus();
         sb.value = "foo";
-        registerCleanupFunction(function () {
+        registerCleanupFunction(function() {
           sb.value = "";
         });
         EventUtils.synthesizeKey("VK_RETURN", {});
       }
     },
     {
       name: "new tab search",
       searchURL: base + "&form=MOZTSB",
-      run: function () {
+      run: function() {
         function doSearch(doc) {
           // Re-add the listener, and perform a search
           gBrowser.addProgressListener(listener);
           doc.getElementById("newtab-search-text").value = "foo";
           doc.getElementById("newtab-search-submit").click();
         }
 
         // load about:newtab, but remove the listener first so it doesn't
@@ -146,17 +146,17 @@ function test() {
       info("Actual URI: " + req.URI.spec);
 
       req.cancel(Components.results.NS_ERROR_FAILURE);
 
       executeSoon(nextTest);
     }
   }
 
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     engine.alias = undefined;
     gBrowser.removeProgressListener(listener);
     gBrowser.removeTab(tab);
     Services.search.currentEngine = previouslySelectedEngine;
   });
 
   tab.linkedBrowser.addEventListener("load", function load() {
     tab.linkedBrowser.removeEventListener("load", load, true);
--- a/browser/components/search/test/browser_google_behavior.js
+++ b/browser/components/search/test/browser_google_behavior.js
@@ -25,57 +25,57 @@ function test() {
 
   waitForExplicitFinish();
 
   var gCurrTest;
   var gTests = [
     {
       name: "context menu search",
       searchURL: base,
-      run: function () {
+      run: function() {
         // Simulate a contextmenu search
         // FIXME: This is a bit "low-level"...
         BrowserSearch.loadSearch("foo", false, "contextmenu");
       }
     },
     {
       name: "keyword search",
       searchURL: base,
-      run: function () {
+      run: function() {
         gURLBar.value = "? foo";
         gURLBar.focus();
         EventUtils.synthesizeKey("VK_RETURN", {});
       }
     },
     {
       name: "keyword search",
       searchURL: base,
-      run: function () {
+      run: function() {
         gURLBar.value = "g foo";
         gURLBar.focus();
         EventUtils.synthesizeKey("VK_RETURN", {});
       }
     },
     {
       name: "search bar search",
       searchURL: base,
-      run: function () {
+      run: function() {
         let sb = BrowserSearch.searchBar;
         sb.focus();
         sb.value = "foo";
-        registerCleanupFunction(function () {
+        registerCleanupFunction(function() {
           sb.value = "";
         });
         EventUtils.synthesizeKey("VK_RETURN", {});
       }
     },
     {
       name: "new tab search",
       searchURL: base,
-      run: function () {
+      run: function() {
         function doSearch(doc) {
           // Re-add the listener, and perform a search
           gBrowser.addProgressListener(listener);
           doc.getElementById("newtab-search-text").value = "foo";
           doc.getElementById("newtab-search-submit").click();
         }
 
         // load about:newtab, but remove the listener first so it doesn't
@@ -144,17 +144,17 @@ function test() {
       info("Actual URI: " + req.URI.spec);
 
       req.cancel(Components.results.NS_ERROR_FAILURE);
 
       executeSoon(nextTest);
     }
   }
 
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     engine.alias = undefined;
     gBrowser.removeProgressListener(listener);
     gBrowser.removeTab(tab);
     Services.search.currentEngine = previouslySelectedEngine;
   });
 
   tab.linkedBrowser.addEventListener("load", function load() {
     tab.linkedBrowser.removeEventListener("load", load, true);
--- a/browser/components/search/test/browser_hiddenOneOffs_cleanup.js
+++ b/browser/components/search/test/browser_hiddenOneOffs_cleanup.js
@@ -5,21 +5,21 @@ const testPref = "Foo,FooDupe";
 
 function promiseNewEngine(basename) {
   return new Promise((resolve, reject) => {
     info("Waiting for engine to be added: " + basename);
     Services.search.init({
       onInitComplete: function() {
         let url = getRootDirectory(gTestPath) + basename;
         Services.search.addEngine(url, null, "", false, {
-          onSuccess: function (engine) {
+          onSuccess: function(engine) {
             info("Search engine added: " + basename);
             resolve(engine);
           },
-          onError: function (errCode) {
+          onError: function(errCode) {
             ok(false, "addEngine failed with error code " + errCode);
             reject();
           }
         });
       }
     });
   });
 }
--- a/browser/components/search/test/browser_yahoo_behavior.js
+++ b/browser/components/search/test/browser_yahoo_behavior.js
@@ -27,57 +27,57 @@ function test() {
 
   waitForExplicitFinish();
 
   var gCurrTest;
   var gTests = [
     {
       name: "context menu search",
       searchURL: base + "&hsimp=yhs-005",
-      run: function () {
+      run: function() {
         // Simulate a contextmenu search
         // FIXME: This is a bit "low-level"...
         BrowserSearch.loadSearch("foo", false, "contextmenu");
       }
     },
     {
       name: "keyword search",
       searchURL: base + "&hsimp=yhs-002",
-      run: function () {
+      run: function() {
         gURLBar.value = "? foo";
         gURLBar.focus();
         EventUtils.synthesizeKey("VK_RETURN", {});
       }
     },
     {
       name: "keyword search with alias",
       searchURL: base + "&hsimp=yhs-002",
-      run: function () {
+      run: function() {
         gURLBar.value = "y foo";
         gURLBar.focus();
         EventUtils.synthesizeKey("VK_RETURN", {});
       }
     },
     {
       name: "search bar search",
       searchURL: base + "&hsimp=yhs-001",
-      run: function () {
+      run: function() {
         let sb = BrowserSearch.searchBar;
         sb.focus();
         sb.value = "foo";
-        registerCleanupFunction(function () {
+        registerCleanupFunction(function() {
           sb.value = "";
         });
         EventUtils.synthesizeKey("VK_RETURN", {});
       }
     },
     {
       name: "new tab search",
       searchURL: base + "&hsimp=yhs-004",
-      run: function () {
+      run: function() {
         function doSearch(doc) {
           // Re-add the listener, and perform a search
           gBrowser.addProgressListener(listener);
           doc.getElementById("newtab-search-text").value = "foo";
           doc.getElementById("newtab-search-submit").click();
         }
 
         // load about:newtab, but remove the listener first so it doesn't
@@ -146,17 +146,17 @@ function test() {
       info("Actual URI: " + req.URI.spec);
 
       req.cancel(Components.results.NS_ERROR_FAILURE);
 
       executeSoon(nextTest);
     }
   }
 
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     engine.alias = undefined;
     gBrowser.removeProgressListener(listener);
     gBrowser.removeTab(tab);
     Services.search.currentEngine = previouslySelectedEngine;
   });
 
   tab.linkedBrowser.addEventListener("load", function load() {
     tab.linkedBrowser.removeEventListener("load", load, true);
--- a/browser/components/search/test/head.js
+++ b/browser/components/search/test/head.js
@@ -57,31 +57,31 @@ function promiseNewEngine(basename, opti
     let setAsCurrent =
       options.setAsCurrent == undefined ? true : options.setAsCurrent;
     info("Waiting for engine to be added: " + basename);
     Services.search.init({
       onInitComplete: function() {
         let url = getRootDirectory(gTestPath) + basename;
         let current = Services.search.currentEngine;
         Services.search.addEngine(url, null, options.iconURL || "", false, {
-          onSuccess: function (engine) {
+          onSuccess: function(engine) {
             info("Search engine added: " + basename);
             if (setAsCurrent) {
               Services.search.currentEngine = engine;
             }
             registerCleanupFunction(() => {
               if (setAsCurrent) {
                 Services.search.currentEngine = current;
               }
               Services.search.removeEngine(engine);
               info("Search engine removed: " + basename);
             });
             resolve(engine);
           },
-          onError: function (errCode) {
+          onError: function(errCode) {
             ok(false, "addEngine failed with error code " + errCode);
             reject();
           }
         });
       }
     });
   });
 }
--- a/browser/components/selfsupport/SelfSupportService.js
+++ b/browser/components/selfsupport/SelfSupportService.js
@@ -25,17 +25,17 @@ function MozSelfSupportInterface() {
 MozSelfSupportInterface.prototype = {
   classDescription: "MozSelfSupport",
   classID: Components.ID("{d30aae8b-f352-4de3-b936-bb9d875df0bb}"),
   contractID: "@mozilla.org/mozselfsupport;1",
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIDOMGlobalPropertyInitializer]),
 
   _window: null,
 
-  init: function (window) {
+  init: function(window) {
     this._window = window;
   },
 
   get healthReportDataSubmissionEnabled() {
     return Preferences.get(PREF_FHR_UPLOAD_ENABLED, false);
   },
 
   set healthReportDataSubmissionEnabled(enabled) {
--- a/browser/components/shell/content/setDesktopBackground.js
+++ b/browser/components/shell/content/setDesktopBackground.js
@@ -15,17 +15,17 @@ var gSetBackground = {
   _canvas          : null,
 
   get _shell()
   {
     return Components.classes["@mozilla.org/browser/shell-service;1"]
                      .getService(Ci.nsIShellService);
   },
 
-  load: function ()
+  load: function()
   {
     this._canvas = document.getElementById("screen");
     this._screenWidth = screen.width;
     this._screenHeight = screen.height;
     if (AppConstants.platform == "macosx") {
       document.documentElement.getButton("accept").hidden = true;
     }
     if (this._screenWidth / this._screenHeight >= 1.6)
@@ -44,17 +44,17 @@ var gSetBackground = {
     }
 
     // make sure that the correct dimensions will be used
     setTimeout(function(self) {
       self.init(window.arguments[0]);
     }, 0, this);
   },
 
-  init: function (aImage)
+  init: function(aImage)
   {
     this._image = aImage;
 
     // set the size of the coordinate space
     this._canvas.width = this._canvas.clientWidth;
     this._canvas.height = this._canvas.clientHeight;
 
     var ctx = this._canvas.getContext("2d");
@@ -71,17 +71,17 @@ var gSetBackground = {
       setDesktopBackground.label = bundle.getString("DesktopBackgroundSet");
       setDesktopBackground.disabled = false;
 
       document.getElementById("showDesktopPreferences").hidden = true;
     }
     this.updatePosition();
   },
 
-  setDesktopBackground: function ()
+  setDesktopBackground: function()
   {
     if (AppConstants.platform != "macosx") {
       document.persist("menuPosition", "value");
       this._shell.desktopBackgroundColor = this._hexStringToLong(this._backgroundColor);
     } else {
       Components.classes["@mozilla.org/observer-service;1"]
                 .getService(Ci.nsIObserverService)
                 .addObserver(this, "shell:desktop-background-changed", false);
@@ -90,17 +90,17 @@ var gSetBackground = {
       var setDesktopBackground = document.getElementById("setDesktopBackground");
       setDesktopBackground.disabled = true;
       setDesktopBackground.label = bundle.getString("DesktopBackgroundDownloading");
     }
     this._shell.setDesktopBackground(this._image,
                                      Ci.nsIShellService["BACKGROUND_" + this._position]);
   },
 
-  updatePosition: function ()
+  updatePosition: function()
   {
     var ctx = this._canvas.getContext("2d");
     ctx.clearRect(0, 0, this._screenWidth, this._screenHeight);
 
     if (AppConstants.platform != "macosx") {
       this._position = document.getElementById("menuPosition").value;
     }
 
@@ -154,53 +154,53 @@ var gSetBackground = {
         ctx.drawImage(this._image, x, y, width, height);
         break;
       }
     }
   }
 };
 
 if (AppConstants.platform != "macosx") {
-  gSetBackground["_initColor"] = function ()
+  gSetBackground["_initColor"] = function()
   {
     var color = this._shell.desktopBackgroundColor;
 
     const rMask = 4294901760;
     const gMask = 65280;
     const bMask = 255;
     var r = (color & rMask) >> 16;
     var g = (color & gMask) >> 8;
     var b = (color & bMask);
     this.updateColor(this._rgbToHex(r, g, b));
 
     var colorpicker = document.getElementById("desktopColor");
     colorpicker.color = this._backgroundColor;
   };
 
-  gSetBackground["updateColor"] = function (aColor)
+  gSetBackground["updateColor"] = function(aColor)
   {
     this._backgroundColor = aColor;
     this._canvas.style.backgroundColor = aColor;
   };
 
   // Converts a color string in the format "#RRGGBB" to an integer.
-  gSetBackground["_hexStringToLong"] = function (aString)
+  gSetBackground["_hexStringToLong"] = function(aString)
   {
     return parseInt(aString.substring(1, 3), 16) << 16 |
            parseInt(aString.substring(3, 5), 16) << 8 |
            parseInt(aString.substring(5, 7), 16);
   };
 
-  gSetBackground["_rgbToHex"] = function (aR, aG, aB)
+  gSetBackground["_rgbToHex"] = function(aR, aG, aB)
   {
     return "#" + [aR, aG, aB].map(aInt => aInt.toString(16).replace(/^(.)$/, "0$1"))
                              .join("").toUpperCase();
   };
 } else {
-  gSetBackground["observe"] = function (aSubject, aTopic, aData)
+  gSetBackground["observe"] = function(aSubject, aTopic, aData)
   {
     if (aTopic == "shell:desktop-background-changed") {
       document.getElementById("setDesktopBackground").hidden = true;
       document.getElementById("showDesktopPreferences").hidden = false;
 
       Components.classes["@mozilla.org/observer-service;1"]
                 .getService(Ci.nsIObserverService)
                 .removeObserver(this, "shell:desktop-background-changed");
--- a/browser/components/syncedtabs/EventEmitter.jsm
+++ b/browser/components/syncedtabs/EventEmitter.jsm
@@ -6,17 +6,17 @@
 
 const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
 
 this.EXPORTED_SYMBOLS = [
   "EventEmitter"
 ];
 
 // Simple event emitter abstraction for storage objects to use.
-function EventEmitter () {
+function EventEmitter() {
   this._events = new Map();
 }
 
 EventEmitter.prototype = {
   on(event, listener) {
     if (this._events.has(event)) {
       this._events.get(event).add(listener);
     } else {
--- a/browser/components/syncedtabs/SyncedTabsDeckComponent.js
+++ b/browser/components/syncedtabs/SyncedTabsDeckComponent.js
@@ -11,17 +11,17 @@ Cu.import("resource://gre/modules/Servic
 
 Cu.import("resource:///modules/syncedtabs/SyncedTabsDeckStore.js");
 Cu.import("resource:///modules/syncedtabs/SyncedTabsDeckView.js");
 Cu.import("resource:///modules/syncedtabs/SyncedTabsListStore.js");
 Cu.import("resource:///modules/syncedtabs/TabListComponent.js");
 Cu.import("resource:///modules/syncedtabs/TabListView.js");
 let { getChromeWindow } = Cu.import("resource:///modules/syncedtabs/util.js", {});
 
-XPCOMUtils.defineLazyGetter(this, "FxAccountsCommon", function () {
+XPCOMUtils.defineLazyGetter(this, "FxAccountsCommon", function() {
   return Components.utils.import("resource://gre/modules/FxAccountsCommon.js", {});
 });
 
 let log = Cu.import("resource://gre/modules/Log.jsm", {})
             .Log.repository.getLogger("Sync.RemoteTabs");
 
 this.EXPORTED_SYMBOLS = [
   "SyncedTabsDeckComponent"
--- a/browser/components/syncedtabs/SyncedTabsDeckView.js
+++ b/browser/components/syncedtabs/SyncedTabsDeckView.js
@@ -18,17 +18,17 @@ this.EXPORTED_SYMBOLS = [
 /**
  * SyncedTabsDeckView
  *
  * Instances of SyncedTabsDeckView render DOM nodes from a given state.
  * No state is kept internaly and the DOM will completely
  * rerender unless the state flags `isUpdatable`, which helps
  * make small changes without the overhead of a full rerender.
  */
-const SyncedTabsDeckView = function (window, tabListComponent, props) {
+const SyncedTabsDeckView = function(window, tabListComponent, props) {
   this.props = props;
 
   this._window = window;
   this._doc = window.document;
 
   this._tabListComponent = tabListComponent;
   this._deckTemplate = this._doc.getElementById("deck-template");
   this.container = this._doc.createElement("div");
--- a/browser/components/syncedtabs/test/xpcshell/head.js
+++ b/browser/components/syncedtabs/test/xpcshell/head.js
@@ -1,14 +1,14 @@
 const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 
-XPCOMUtils.defineLazyGetter(this, "FxAccountsCommon", function () {
+XPCOMUtils.defineLazyGetter(this, "FxAccountsCommon", function() {
   return Components.utils.import("resource://gre/modules/FxAccountsCommon.js", {});
 });
 
 Cu.import("resource://gre/modules/Timer.jsm");
 
 do_get_profile(); // fxa needs a profile directory for storage.
 
 // Create a window polyfill so sinon can load
--- a/browser/components/tests/browser/browser_bug538331.js
+++ b/browser/components/tests/browser/browser_bug538331.js
@@ -143,37 +143,37 @@ var gWindowCatcher = {
     Services.ww.unregisterNotification(this);
     this.finishFunc = aFunc;
     if (this.windowsOpen > 0)
       return;
 
     this.finishFunc();
   },
 
-  closeWindow: function (win) {
+  closeWindow: function(win) {
     info("window catcher closing window: " + win.document.documentURI);
     win.close();
     this.windowsOpen--;
     if (this.finishFunc) {
       this.finish(this.finishFunc);
     }
   },
 
-  windowLoad: function (win) {
+  windowLoad: function(win) {
     executeSoon(this.closeWindow.bind(this, win));
   },
 
   observe: function(subject, topic, data) {
     if (topic != "domwindowopened")
       return;
 
     this.windowsOpen++;
     let win = subject.QueryInterface(Ci.nsIDOMWindow);
     info("window catcher caught window opening: " + win.document.documentURI);
-    win.addEventListener("load", function () {
+    win.addEventListener("load", function() {
       win.removeEventListener("load", arguments.callee, false);
       gWindowCatcher.windowLoad(win);
     }, false);
   }
 };
 
 function finish_test()
 {
@@ -355,17 +355,17 @@ function testShowNotification()
                "notification box button should have the accesskey " +
                "provided by the update");
           }
         }
         // The last test opens an url and verifies the url from the updates.xml
         // is correct.
         if (i == (BG_NOTIFY_TESTS.length - 1)) {
           // Wait for any windows caught by the windowcatcher to close
-          gWindowCatcher.finish(function () {
+          gWindowCatcher.finish(function() {
             BrowserTestUtils.waitForNewTab(gBrowser).then(testNotificationURL);
             button.click();
           });
         } else {
           notifyBox.removeAllNotifications(true);
         }
       } else if (i == (BG_NOTIFY_TESTS.length - 1)) {
         // If updateBox is null the test has already reported errors so bail
--- a/browser/components/tests/unit/test_distribution.js
+++ b/browser/components/tests/unit/test_distribution.js
@@ -74,17 +74,17 @@ function run_test() {
   testDistributionFile.copyTo(distroDir, "distribution.ini");
   Assert.ok(testDistributionFile.exists());
 
   installDistributionEngine();
 
   run_next_test();
 }
 
-do_register_cleanup(function () {
+do_register_cleanup(function() {
   // Remove the distribution dir, even if the test failed, otherwise all
   // next tests will use it.
   let distDir = gProfD.clone();
   distDir.append("distribution");
   distDir.remove(true);
   Assert.ok(!distDir.exists());
 });
 
--- a/browser/components/translation/Translation.jsm
+++ b/browser/components/translation/Translation.jsm
@@ -293,17 +293,17 @@ TranslationUI.prototype = {
 /**
  * Uses telemetry histograms for collecting statistics on the usage of the
  * translation component.
  *
  * NOTE: Metrics are only recorded if the user enabled the telemetry option.
  */
 this.TranslationTelemetry = {
 
-  init: function () {
+  init: function() {
     // Constructing histograms.
     const plain = (id) => Services.telemetry.getHistogramById(id);
     const keyed = (id) => Services.telemetry.getKeyedHistogramById(id);
     this.HISTOGRAMS = {
       OPPORTUNITIES         : () => plain("TRANSLATION_OPPORTUNITIES"),
       OPPORTUNITIES_BY_LANG : () => keyed("TRANSLATION_OPPORTUNITIES_BY_LANGUAGE"),
       PAGES                 : () => plain("TRANSLATED_PAGES"),
       PAGES_BY_LANG         : () => keyed("TRANSLATED_PAGES_BY_LANGUAGE"),
@@ -321,56 +321,56 @@ this.TranslationTelemetry = {
     this.recordPreferences();
   },
 
   /**
    * Record a translation opportunity in the health report.
    * @param language
    *        The language of the page.
    */
-  recordTranslationOpportunity: function (language) {
+  recordTranslationOpportunity: function(language) {
     return this._recordOpportunity(language, true);
   },
 
   /**
    * Record a missed translation opportunity in the health report.
    * A missed opportunity is when the language detected is not part
    * of the supported languages.
    * @param language
    *        The language of the page.
    */
-  recordMissedTranslationOpportunity: function (language) {
+  recordMissedTranslationOpportunity: function(language) {
     return this._recordOpportunity(language, false);
   },
 
   /**
    * Record an automatically rejected translation offer in the health
    * report. A translation offer is automatically rejected when a user
    * has previously clicked "Never translate this language" or "Never
    * translate this site", which results in the infobar not being shown for
    * the translation opportunity.
    *
    * These translation opportunities should still be recorded in addition to
    * recording the automatic rejection of the offer.
    */
-  recordAutoRejectedTranslationOffer: function () {
+  recordAutoRejectedTranslationOffer: function() {
     if (!this._canRecord) return;
     this.HISTOGRAMS.AUTO_REJECTED().add();
   },
 
    /**
    * Record a translation in the health report.
    * @param langFrom
    *        The language of the page.
    * @param langTo
    *        The language translated to
    * @param numCharacters
    *        The number of characters that were translated
    */
-  recordTranslation: function (langFrom, langTo, numCharacters) {
+  recordTranslation: function(langFrom, langTo, numCharacters) {
     if (!this._canRecord) return;
     this.HISTOGRAMS.PAGES().add();
     this.HISTOGRAMS.PAGES_BY_LANG().add(langFrom + " -> " + langTo);
     this.HISTOGRAMS.CHARACTERS().add(numCharacters);
   },
 
   /**
    * Record a change of the detected language in the health report. This should
@@ -379,51 +379,51 @@ this.TranslationTelemetry = {
    *
    * @param beforeFirstTranslation
    *        A boolean indicating if we are recording a change of detected
    *        language before translating the page for the first time. If we
    *        have already translated the page from the detected language and
    *        the user has manually adjusted the detected language false should
    *        be passed.
    */
-  recordDetectedLanguageChange: function (beforeFirstTranslation) {
+  recordDetectedLanguageChange: function(beforeFirstTranslation) {
     if (!this._canRecord) return;
     this.HISTOGRAMS.DETECTION_CHANGES().add(beforeFirstTranslation);
   },
 
   /**
    * Record a change of the target language in the health report. This should
    * only be called when actually executing a translation, not every time the
    * user changes in the language in the UI.
    */
-  recordTargetLanguageChange: function () {
+  recordTargetLanguageChange: function() {
     if (!this._canRecord) return;
     this.HISTOGRAMS.TARGET_CHANGES().add();
   },
 
   /**
    * Record a denied translation offer.
    */
-  recordDeniedTranslationOffer: function () {
+  recordDeniedTranslationOffer: function() {
     if (!this._canRecord) return;
     this.HISTOGRAMS.DENIED().add();
   },
 
   /**
    * Record a "Show Original" command use.
    */
-  recordShowOriginalContent: function () {
+  recordShowOriginalContent: function() {
     if (!this._canRecord) return;
     this.HISTOGRAMS.SHOW_ORIGINAL().add();
   },
 
   /**
    * Record the state of translation preferences.
    */
-  recordPreferences: function () {
+  recordPreferences: function() {
     if (!this._canRecord) return;
     if (Services.prefs.getBoolPref(TRANSLATION_PREF_SHOWUI)) {
       this.HISTOGRAMS.SHOW_UI().add(1);
     }
     if (Services.prefs.getBoolPref(TRANSLATION_PREF_DETECT_LANG)) {
       this.HISTOGRAMS.DETECT_LANG().add(1);
     }
   },
@@ -433,14 +433,14 @@ this.TranslationTelemetry = {
     this.HISTOGRAMS.OPPORTUNITIES().add(success);
     this.HISTOGRAMS.OPPORTUNITIES_BY_LANG().add(language, success);
   },
 
   /**
    * A shortcut for reading the telemetry preference.
    *
    */
-  _canRecord: function () {
+  _canRecord: function() {
     return Services.prefs.getBoolPref("toolkit.telemetry.enabled");
   }
 };
 
 this.TranslationTelemetry.init();
--- a/browser/components/translation/test/browser_translation_bing.js
+++ b/browser/components/translation/test/browser_translation_bing.js
@@ -12,17 +12,17 @@ const kClientSecretPref = "browser.trans
 const {BingTranslator} = Cu.import("resource:///modules/translation/BingTranslator.jsm", {});
 const {TranslationDocument} = Cu.import("resource:///modules/translation/TranslationDocument.jsm", {});
 const {Promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
 
 add_task(function* setup() {
   Services.prefs.setCharPref(kClientIdPref, "testClient");
   Services.prefs.setCharPref(kClientSecretPref, "testSecret");
 
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     Services.prefs.clearUserPref(kClientIdPref);
     Services.prefs.clearUserPref(kClientSecretPref);
   });
 });
 
 /**
  * Checks if the translation is happening.
  */
--- a/browser/components/translation/test/browser_translation_exceptions.js
+++ b/browser/components/translation/test/browser_translation_exceptions.js
@@ -13,17 +13,17 @@ const kLanguagesPref = "browser.translat
 const kShowUIPref = "browser.translation.ui.show";
 
 function test() {
   waitForExplicitFinish();
 
   Services.prefs.setBoolPref(kShowUIPref, true);
   let tab = gBrowser.addTab();
   gBrowser.selectedTab = tab;
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     gBrowser.removeTab(tab);
     Services.prefs.clearUserPref(kShowUIPref);
   });
   tab.linkedBrowser.addEventListener("load", function onload() {
     tab.linkedBrowser.removeEventListener("load", onload, true);
     Task.spawn(function* () {
       for (let test of gTests) {
         info(test.desc);
--- a/browser/components/translation/test/browser_translation_infobar.js
+++ b/browser/components/translation/test/browser_translation_infobar.js
@@ -75,17 +75,17 @@ function test() {
   waitForExplicitFinish();
 
   Services.prefs.setBoolPref(kShowUIPref, true);
   let tab = gBrowser.addTab();
   gBrowser.selectedTab = tab;
   tab.linkedBrowser.addEventListener("load", function onload() {
     tab.linkedBrowser.removeEventListener("load", onload, true);
     TranslationStub.browser = gBrowser.selectedBrowser;
-    registerCleanupFunction(function () {
+    registerCleanupFunction(function() {
       gBrowser.removeTab(tab);
       Services.prefs.clearUserPref(kShowUIPref);
     });
     run_tests(() => {
       finish();
     });
   }, true);
 
--- a/browser/components/translation/test/browser_translation_telemetry.js
+++ b/browser/components/translation/test/browser_translation_telemetry.js
@@ -26,17 +26,17 @@ var MetricsChecker = {
 
   reset: function() {
     for (let i of Object.keys(this.HISTOGRAMS)) {
       this.HISTOGRAMS[i].clear();
     }
     this.updateMetrics();
   },
 
-  updateMetrics: function () {
+  updateMetrics: function() {
     this._metrics = {
       opportunitiesCount: this.HISTOGRAMS.OPPORTUNITIES.snapshot().sum || 0,
       pageCount: this.HISTOGRAMS.PAGES.snapshot().sum || 0,
       charCount: this.HISTOGRAMS.CHARACTERS.snapshot().sum || 0,
       deniedOffers: this.HISTOGRAMS.DENIED.snapshot().sum || 0,
       autoRejectedOffers: this.HISTOGRAMS.AUTO_REJECTED.snapshot().sum || 0,
       showOriginal: this.HISTOGRAMS.SHOW_ORIGINAL.snapshot().sum || 0,
       detectedLanguageChangedBefore: this.HISTOGRAMS.DETECTION_CHANGES.snapshot().counts[1] || 0,
@@ -60,29 +60,29 @@ var MetricsChecker = {
         this._metrics.pageCountByLang[key] = pages[key] ? pages[key].sum : 0;
       }
     }
   },
 
   /**
    * A recurrent loop for making assertions about collected metrics.
    */
-  _assertionLoop: function (prevMetrics, metrics, additions) {
+  _assertionLoop: function(prevMetrics, metrics, additions) {
     for (let metric of Object.keys(additions)) {
       let addition = additions[metric];
       // Allows nesting metrics. Useful for keyed histograms.
       if (typeof addition === 'object') {
         this._assertionLoop(prevMetrics[metric], metrics[metric], addition);
         continue;
       }
       Assert.equal(prevMetrics[metric] + addition, metrics[metric]);
     }
   },
 
-  checkAdditions: function (additions) {
+  checkAdditions: function(additions) {
     let prevMetrics = this._metrics;
     this.updateMetrics();
     this._assertionLoop(prevMetrics, this._metrics, additions);
   }
 
 };
 
 function getInfobarElement(browser, anonid) {
--- a/browser/components/translation/test/browser_translation_yandex.js
+++ b/browser/components/translation/test/browser_translation_yandex.js
@@ -13,17 +13,17 @@ const kShowUIPref = "browser.translation
 const {Promise} = Cu.import("resource://gre/modules/Promise.jsm", {});
 const {Translation} = Cu.import("resource:///modules/translation/Translation.jsm", {});
 
 add_task(function* setup() {
   Services.prefs.setCharPref(kEnginePref, "yandex");
   Services.prefs.setCharPref(kApiKeyPref, "yandexValidKey");
   Services.prefs.setBoolPref(kShowUIPref, true);
 
-  registerCleanupFunction(function () {
+  registerCleanupFunction(function() {
     Services.prefs.clearUserPref(kEnginePref);
     Services.prefs.clearUserPref(kApiKeyPref);
     Services.prefs.clearUserPref(kShowUIPref);
   });
 });
 
 /**
  * Ensure that the translation engine behaives as expected when translating
--- a/browser/components/uitour/UITour.jsm
+++ b/browser/components/uitour/UITour.jsm
@@ -220,17 +220,17 @@ this.UITour = {
     // in a test.
     delete this.seenPageIDs;
     Object.defineProperty(this, "seenPageIDs", {
       get: this.restoreSeenPageIDs.bind(this),
       configurable: true,
     });
 
     delete this.url;
-    XPCOMUtils.defineLazyGetter(this, "url", function () {
+    XPCOMUtils.defineLazyGetter(this, "url", function() {
       return Services.urlFormatter.formatURLPref("browser.uitour.url");
     });
 
     // Clear the availableTargetsCache on widget changes.
     let listenerMethods = [
       "onWidgetAdded",
       "onWidgetMoved",
       "onWidgetRemoved",
@@ -1296,17 +1296,17 @@ this.UITour = {
 
       // Style it.
       let starIndex = numStars - i;
       ratingElement.className = "plain star-x";
       ratingElement.id = "star" + starIndex;
       ratingElement.setAttribute("data-score", starIndex);
 
       // Add the click handler.
-      ratingElement.addEventListener("click", function (evt) {
+      ratingElement.addEventListener("click", function(evt) {
         let rating = Number(evt.target.getAttribute("data-score"), 10);
 
         // Let the consumer know user voted.
         maybeNotifyHeartbeat("Heartbeat:Voted", { score: rating });
 
         // Append the score data to the engagement URL.
         userEngaged(new Map([
           ["type", "stars"],
@@ -1927,31 +1927,31 @@ this.UITour = {
     }.bind(this)).catch(err => {
       log.error(err);
       this.sendPageCallback(aMessageManager, aCallbackID, {
         targets: [],
       });
     });
   },
 
-  startSubTour: function (aFeature) {
+  startSubTour: function(aFeature) {
     if (aFeature != "string") {
       log.error("startSubTour: No feature option specified");
       return;
     }
 
     if (aFeature == "readinglist") {
       ReaderParent.showReaderModeInfoPanel(browser);
     } else {
       log.error("startSubTour: Unknown feature option specified");
       return;
     }
   },
 
-  addNavBarWidget: function (aTarget, aMessageManager, aCallbackID) {
+  addNavBarWidget: function(aTarget, aMessageManager, aCallbackID) {
     if (aTarget.node) {
       log.error("addNavBarWidget: can't add a widget already present:", aTarget);
       return;
     }
     if (!aTarget.allowAdd) {
       log.error("addNavBarWidget: not allowed to add this widget:", aTarget);
       return;
     }
--- a/browser/components/uitour/content-UITour.js
+++ b/browser/components/uitour/content-UITour.js
@@ -3,17 +3,17 @@
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
 
 const PREF_TEST_WHITELIST = "browser.uitour.testingOrigins";
 const UITOUR_PERMISSION   = "uitour";
 
 var UITourListener = {
-  handleEvent: function (event) {
+  handleEvent: function(event) {
     if (!Services.prefs.getBoolPref("browser.uitour.enabled")) {
       return;
     }
     if (!this.ensureTrustedOrigin()) {
       return;
     }
     addMessageListener("UITour:SendPageCallback", this);
     addMessageListener("UITour:SendPageNotification", this);
@@ -80,17 +80,17 @@ var UITourListener = {
         this.sendPageEvent("Response", aMessage.data);
         break;
       case "UITour:SendPageNotification":
         this.sendPageEvent("Notification", aMessage.data);
         break;
       }
   },
 
-  sendPageEvent: function (type, detail) {
+  sendPageEvent: function(type, detail) {
     if (!this.ensureTrustedOrigin()) {
       return;
     }
 
     let doc = content.document;
     let eventName = "mozUITour" + type;
     let event = new doc.defaultView.CustomEvent(eventName, {
       bubbles: true,
--- a/browser/components/uitour/test/browser_UITour.js
+++ b/browser/components/uitour/test/browser_UITour.js
@@ -147,17 +147,17 @@ var tests = [
       isnot(PanelUI.panel.state, "closed", "Panel should have opened");
       gContentAPI.showHighlight("customize");
 
       waitForElementToBeVisible(highlight, function checkPanelIsStillOpen() {
         isnot(PanelUI.panel.state, "closed", "Panel should still be open");
 
         // Move the highlight outside which shouldn't close the app menu since it was manually opened.
         gContentAPI.showHighlight("appMenu");
-        waitForElementToBeVisible(highlight, function () {
+        waitForElementToBeVisible(highlight, function() {
           isnot(PanelUI.panel.state, "closed",
                 "Panel should remain open since UITour didn't open it in the first place");
           gContentAPI.hideMenu("appMenu");
           done();
         }, "Highlight should move to the appMenu button");
       }, "Highlight should be shown after showHighlight() for fixed panel items");
     }).then(null, Components.utils.reportError);
   },
@@ -352,17 +352,17 @@ var tests = [
            "Engines should be as expected");
 
         is(data.searchEngineIdentifier, defaultEngine.identifier,
            "the searchEngineIdentifier property should contain the defaultEngine's identifier");
 
         let someOtherEngineID = data.engines.filter(t => t != "searchEngine-" + defaultEngine.identifier)[0];
         someOtherEngineID = someOtherEngineID.replace(/^searchEngine-/, "");
 
-        let observe = function (subject, topic, verb) {
+        let observe = function(subject, topic, verb) {
           info("browser-search-engine-modified: " + verb);
           if (verb == "engine-current") {
             is(Services.search.defaultEngine.identifier, someOtherEngineID, "correct engine was switched to");
             done();
           }
         };
         Services.obs.addObserver(observe, "browser-search-engine-modified", false);
         registerCleanupFunction(() => {
--- a/browser/components/uitour/test/browser_UITour_modalDialog.js
+++ b/browser/components/uitour/test/browser_UITour_modalDialog.js
@@ -17,26 +17,26 @@ function startCallbackTimer() {
 
     // Use a timer to invoke a callback to twiddle the authentication dialog
     timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
     timer.init(observer, dialogDelay, Ci.nsITimer.TYPE_ONE_SHOT);
 }
 
 
 var observer = SpecialPowers.wrapCallbackObject({
-    QueryInterface : function (iid) {
+    QueryInterface : function(iid) {
         const interfaces = [Ci.nsIObserver,
                             Ci.nsISupports, Ci.nsISupportsWeakReference];
 
         if (!interfaces.some( function(v) { return iid.equals(v) } ))
             throw SpecialPowers.Components.results.NS_ERROR_NO_INTERFACE;
         return this;
     },
 
-    observe : function (subject, topic, data) {
+    observe : function(subject, topic, data) {
         var doc = getDialogDoc();
         if (doc)
             handleDialog(doc);
         else
             startCallbackTimer(); // try again in a bit
     }
 });
 
--- a/browser/components/uitour/test/browser_trackingProtection_tour.js
+++ b/browser/components/uitour/test/browser_trackingProtection_tour.js
@@ -36,17 +36,17 @@ add_UITour_task(function* test_block_tar
   yield* checkToggleTarget("controlCenter-trackingBlock");
   TrackingProtection.enableForCurrentPage();
 });
 
 
 function* checkToggleTarget(targetID) {
   let popup = document.getElementById("UITourTooltip");
 
-  yield ContentTask.spawn(gBrowser.selectedBrowser, {}, function () {
+  yield ContentTask.spawn(gBrowser.selectedBrowser, {}, function() {
     let doc = content.document;
     let iframe = doc.createElement("iframe");
     iframe.setAttribute("id", "tracking-element");
     iframe.setAttribute("src", "https://tracking.example.com/");
     doc.body.insertBefore(iframe, doc.body.firstChild);
   });
 
   let testTargetAvailability = function* (expectedAvailable) {
@@ -66,12 +66,12 @@ function* checkToggleTarget(targetID) {
   let hideMenuPromise =
         promisePanelElementHidden(window, gIdentityHandler._identityPopup);
   yield gContentAPI.hideMenu("controlCenter");
   yield hideMenuPromise;
 
   ok(!is_visible(popup), "The tooltip should now be hidden.");
   yield testTargetAvailability(false);
 
-  yield ContentTask.spawn(gBrowser.selectedBrowser, {}, function () {
+  yield ContentTask.spawn(gBrowser.selectedBrowser, {}, function() {
     content.document.getElementById("tracking-element").remove();
   });
 }
--- a/browser/experiments/Experiments.jsm
+++ b/browser/experiments/Experiments.jsm
@@ -211,74 +211,74 @@ function uninstallAddons(addons) {
 /**
  * The experiments module.
  */
 
 var Experiments = {
   /**
    * Provides access to the global `Experiments.Experiments` instance.
    */
-  instance: function () {
+  instance: function() {
     if (!gExperiments) {
       gExperiments = new Experiments.Experiments();
     }
 
     return gExperiments;
   },
 };
 
 /*
  * The policy object allows us to inject fake enviroment data from the
  * outside by monkey-patching.
  */
 
-Experiments.Policy = function () {
+Experiments.Policy = function() {
   this._log = Log.repository.getLoggerWithMessagePrefix(
     "Browser.Experiments.Policy",
     "Policy #" + gPolicyCounter++ + "::");
 
   // Set to true to ignore hash verification on downloaded XPIs. This should
   // not be used outside of testing.
   this.ignoreHashes = false;
 };
 
 Experiments.Policy.prototype = {
-  now: function () {
+  now: function() {
     return new Date();
   },
 
-  random: function () {
+  random: function() {
     let pref = gPrefs.get(PREF_FORCE_SAMPLE);
     if (pref !== undefined) {
       let val = Number.parseFloat(pref);
       this._log.debug("random sample forced: " + val);
       if (isNaN(val) || val < 0) {
         return 0;
       }
       if (val > 1) {
         return 1;
       }
       return val;
     }
     return Math.random();
   },
 
-  futureDate: function (offset) {
+  futureDate: function(offset) {
     return new Date(this.now().getTime() + offset);
   },
 
-  oneshotTimer: function (callback, timeout, thisObj, name) {
+  oneshotTimer: function(callback, timeout, thisObj, name) {
     return CommonUtils.namedTimer(callback, timeout, thisObj, name);
   },
 
-  updatechannel: function () {
+  updatechannel: function() {
     return UpdateUtils.UpdateChannel;
   },
 
-  locale: function () {
+  locale: function() {
     let chrome = Cc["@mozilla.org/chrome/chrome-registry;1"].getService(Ci.nsIXULChromeRegistry);
     return chrome.getSelectedLocale("global");
   },
 
   /**
    * For testing a race condition, one of the tests delays the callback of
    * writing the cache by replacing this policy function.
    */
@@ -306,17 +306,17 @@ function CacheWriteError(message = "Erro
 }
 CacheWriteError.prototype = Object.create(Error.prototype);
 CacheWriteError.prototype.constructor = CacheWriteError;
 
 /**
  * Manages the experiments and provides an interface to control them.
  */
 
-Experiments.Experiments = function (policy = new Experiments.Policy()) {
+Experiments.Experiments = function(policy = new Experiments.Policy()) {
   let log = Log.repository.getLoggerWithMessagePrefix(
       "Browser.Experiments.Experiments",
       "Experiments #" + gExperimentsCounter++ + "::");
 
   // At the time of this writing, Experiments.jsm has severe
   // crashes. For forensics purposes, keep the last few log
   // messages in memory and upload them in case of crash.
   this._forensicsLogs = [];
@@ -373,17 +373,17 @@ Experiments.Experiments.prototype = {
   /**
    * `true` if the experiments manager is currently setup (has been fully initialized
    * and not uninitialized yet).
    */
   get isReady() {
     return !this._shutdown;
   },
 
-  init: function () {
+  init: function() {
     this._shutdown = false;
     configureLogging();
 
     gExperimentsEnabled = gPrefs.get(PREF_ENABLED, false) && TelemetryUtils.isTelemetryEnabled;
     this._log.trace("enabled=" + gExperimentsEnabled + ", " + this.enabled);
 
     gPrefs.observe(PREF_LOGGING, configureLogging);
     gPrefs.observe(PREF_MANIFEST_URI, this.updateManifest, this);
@@ -497,23 +497,23 @@ Experiments.Experiments.prototype = {
         };
       } else {
         state.latestError = "" + this._latestError;
       }
     }
     return state;
   },
 
-  _addToForensicsLog: function (what, string) {
+  _addToForensicsLog: function(what, string) {
     this._forensicsLogs.shift();
     let timeInSec = Math.floor(Services.telemetry.msSinceProcessStart() / 1000);
     this._forensicsLogs.push(`${timeInSec}: ${what} - ${string}`);
   },
 
-  _registerWithAddonManager: function (previousExperimentsProvider) {
+  _registerWithAddonManager: function(previousExperimentsProvider) {
     this._log.trace("Registering instance with Addon Manager.");
 
     AddonManager.addAddonListener(this);
     AddonManager.addInstallListener(this);
 
     if (!gAddonProvider) {
       // The properties of this AddonType should be kept in sync with the
       // experiment AddonType registered in XPIProvider.
@@ -526,17 +526,17 @@ Experiments.Experiments.prototype = {
                                             AddonManager.VIEW_TYPE_LIST,
                                             11000,
                                             AddonManager.TYPE_UI_HIDE_EMPTY),
       ]);
     }
 
   },
 
-  _unregisterWithAddonManager: function () {
+  _unregisterWithAddonManager: function() {
     this._log.trace("Unregistering instance with Addon Manager.");
 
     this._log.trace("Removing install listener from add-on manager.");
     AddonManager.removeInstallListener(this);
     this._log.trace("Removing addon listener from add-on manager.");
     AddonManager.removeAddonListener(this);
     this._log.trace("Finished unregistering with addon manager.");
 
@@ -546,17 +546,17 @@ Experiments.Experiments.prototype = {
       gAddonProvider = null;
     }
   },
 
   /*
    * Change the PreviousExperimentsProvider that this instance uses.
    * For testing only.
    */
-  _setPreviousExperimentsProvider: function (provider) {
+  _setPreviousExperimentsProvider: function(provider) {
     this._unregisterWithAddonManager();
     this._registerWithAddonManager(provider);
   },
 
   /**
    * Throws an exception if we've already shut down.
    */
   _checkForShutdown: function() {
@@ -594,17 +594,17 @@ Experiments.Experiments.prototype = {
     } else {
       yield this.disableExperiment(TELEMETRY_LOG.TERMINATION.SERVICE_DISABLED);
       if (this._timer) {
         this._timer.clear();
       }
     }
   }),
 
-  _telemetryStatusChanged: function () {
+  _telemetryStatusChanged: function() {
     this._toggleExperimentsEnabled(gExperimentsEnabled);
   },
 
   /**
    * Returns a promise that is resolved with an array of `ExperimentInfo` objects,
    * which provide info on the currently and recently active experiments.
    * The array is in chronological order.
    *
@@ -616,17 +616,17 @@ Experiments.Experiments.prototype = {
    *   active: <boolean>,
    *   endDate: <integer>, // epoch ms
    *   detailURL: <string>,
    *   ... // possibly extended later
    * }
    *
    * @return Promise<Array<ExperimentInfo>> Array of experiment info objects.
    */
-  getExperiments: function () {
+  getExperiments: function() {
     return Task.spawn(function*() {
       yield this._loadTask;
       let list = [];
 
       for (let [id, experiment] of this._experiments) {
         if (!experiment.startDate) {
           // We only collect experiments that are or were active.
           continue;
@@ -648,17 +648,17 @@ Experiments.Experiments.prototype = {
       return list;
     }.bind(this));
   },
 
   /**
    * Returns the ExperimentInfo for the active experiment, or null
    * if there is none.
    */
-  getActiveExperiment: function () {
+  getActiveExperiment: function() {
     let experiment = this._getActiveExperiment();
     if (!experiment) {
       return null;
     }
 
     let info = {
       id: experiment.id,
       name: experiment._name,
@@ -718,33 +718,33 @@ Experiments.Experiments.prototype = {
       }
     }
     return e.branch;
   }),
 
   /**
    * Determine whether another date has the same UTC day as now().
    */
-  _dateIsTodayUTC: function (d) {
+  _dateIsTodayUTC: function(d) {
     let now = this._policy.now();
 
     return stripDateToMidnight(now).getTime() == stripDateToMidnight(d).getTime();
   },
 
   /**
    * Obtain the entry of the most recent active experiment that was active
    * today.
    *
    * If no experiment was active today, this resolves to nothing.
    *
    * Assumption: Only a single experiment can be active at a time.
    *
    * @return Promise<object>
    */
-  lastActiveToday: function () {
+  lastActiveToday: function() {
     return Task.spawn(function* getMostRecentActiveExperimentTask() {
       let experiments = yield this.getExperiments();
 
       // Assumption: Ordered chronologically, descending, with active always
       // first.
       for (let experiment of experiments) {
         if (experiment.active) {
           return experiment;
@@ -833,57 +833,57 @@ Experiments.Experiments.prototype = {
 
   /**
    * Fetch an updated list of experiments and trigger experiment updates.
    * Do only use when experiments are enabled.
    *
    * @return Promise<>
    *         The promise is resolved when the manifest and experiment list is updated.
    */
-  updateManifest: function () {
+  updateManifest: function() {
     this._log.trace("updateManifest()");
 
     if (!gExperimentsEnabled) {
       return Promise.reject(new Error("experiments are disabled"));
     }
 
     if (this._shutdown) {
       return Promise.reject(Error("uninit() alrady called"));
     }
 
     this._refresh = true;
     return this._run();
   },
 
-  notify: function (timer) {
+  notify: function(timer) {
     this._log.trace("notify()");
     this._checkForShutdown();
     return this._run();
   },
 
   // START OF ADD-ON LISTENERS
 
-  onUninstalled: function (addon) {
+  onUninstalled: function(addon) {
     this._log.trace("onUninstalled() - addon id: " + addon.id);
     if (gActiveUninstallAddonIDs.has(addon.id)) {
       this._log.trace("matches pending uninstall");
       return;
     }
     let activeExperiment = this._getActiveExperiment();
     if (!activeExperiment || activeExperiment._addonId != addon.id) {
       return;
     }
 
     this.disableExperiment(TELEMETRY_LOG.TERMINATION.ADDON_UNINSTALLED);
   },
 
   /**
    * @returns {Boolean} returns false when we cancel the install.
    */
-  onInstallStarted: function (install) {
+  onInstallStarted: function(install) {
     if (install.addon.type != "experiment") {
       return true;
     }
 
     this._log.trace("onInstallStarted() - " + install.addon.id);
     if (install.addon.appDisabled) {
       // This is a PreviousExperiment
       return true;
@@ -917,31 +917,31 @@ Experiments.Experiments.prototype = {
 
     this._log.warn("onInstallStarted cancelling install of unknown " +
                    "experiment add-on: " + install.addon.id);
     return false;
   },
 
   // END OF ADD-ON LISTENERS.
 
-  _getExperimentByAddonId: function (addonId) {
+  _getExperimentByAddonId: function(addonId) {
     for (let [, entry] of this._experiments) {
       if (entry._addonId === addonId) {
         return entry;
       }
     }
 
     return null;
   },
 
   /*
    * Helper function to make HTTP GET requests. Returns a promise that is resolved with
    * the responseText when the request is complete.
    */
-  _httpGetRequest: function (url) {
+  _httpGetRequest: function(url) {
     this._log.trace("httpGetRequest(" + url + ")");
     let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Ci.nsIXMLHttpRequest);
 
     this._networkRequest = xhr;
     let deferred = Promise.defer();
 
     let log = this._log;
     let errorhandler = (evt) => {
@@ -1029,17 +1029,17 @@ Experiments.Experiments.prototype = {
         // No cached manifest yet.
         this._experiments = new Map();
       } else {
         throw e;
       }
     }
   }),
 
-  _populateFromCache: function (data) {
+  _populateFromCache: function(data) {
     this._log.trace("populateFromCache() - data: " + JSON.stringify(data));
 
     // If the user has a newer cache version than we can understand, we fail
     // hard; no experiments should be active in this older client.
     if (CACHE_VERSION !== data.version) {
       throw new Error("Experiments::_populateFromCache() - invalid cache version");
     }
 
@@ -1062,17 +1062,17 @@ Experiments.Experiments.prototype = {
 
     this._experiments = experiments;
   },
 
   /*
    * Update the experiment entries from the experiments
    * array in the manifest
    */
-  _updateExperiments: function (manifestObject) {
+  _updateExperiments: function(manifestObject) {
     this._log.trace("_updateExperiments() - experiments: " + JSON.stringify(manifestObject));
 
     if (manifestObject.version !== MANIFEST_VERSION) {
       this._log.warning("updateExperiments() - unsupported version " + manifestObject.version);
     }
 
     let experiments = new Map(); // The new experiments map
 
@@ -1135,17 +1135,17 @@ Experiments.Experiments.prototype = {
     }
     let e = this._getActiveExperiment();
     if (!e) {
       return null;
     }
     return e.branch;
   },
 
-  _getActiveExperiment: function () {
+  _getActiveExperiment: function() {
     let enabled = [...this._experiments.values()].filter(experiment => experiment._enabled);
 
     if (enabled.length == 1) {
       return enabled[0];
     }
 
     if (enabled.length > 1) {
       this._log.error("getActiveExperimentId() - should not have more than 1 active experiment");
@@ -1155,17 +1155,17 @@ Experiments.Experiments.prototype = {
     return null;
   },
 
   /**
    * Disables all active experiments.
    *
    * @return Promise<> Promise that will get resolved once the task is done or failed.
    */
-  disableExperiment: function (reason) {
+  disableExperiment: function(reason) {
     if (!reason) {
       throw new Error("Must specify a termination reason.");
     }
 
     this._log.trace("disableExperiment()");
     this._terminateReason = reason;
     return this._run();
   },
@@ -1317,17 +1317,17 @@ Experiments.Experiments.prototype = {
         // It's ok if crash reporting is disabled.
       }
     }
   },
 
   /*
    * Schedule the soonest re-check of experiment applicability that is needed.
    */
-  _scheduleNextRun: function () {
+  _scheduleNextRun: function() {
     this._checkForShutdown();
 
     if (this._timer) {
       this._timer.clear();
     }
 
     if (!gExperimentsEnabled || this._experiments.length == 0) {
       return;
@@ -1361,17 +1361,17 @@ Experiments.Experiments.prototype = {
   },
 };
 
 
 /*
  * Represents a single experiment.
  */
 
-Experiments.ExperimentEntry = function (policy) {
+Experiments.ExperimentEntry = function(policy) {
   this._policy = policy || new Experiments.Policy();
   let log = Log.repository.getLoggerWithMessagePrefix(
     "Browser.Experiments.Experiments",
     "ExperimentEntry #" + gExperimentEntryCounter++ + "::");
   this._log = Object.create(log);
   this._log.log = (level, string, params) => {
     if (gExperiments) {
       gExperiments._addToForensicsLog("ExperimentEntry", string);
@@ -1462,17 +1462,17 @@ Experiments.ExperimentEntry.prototype = 
   ADDON_CHANGE_UNINSTALL: 2,
   ADDON_CHANGE_ENABLE: 4,
 
   /*
    * Initialize entry from the manifest.
    * @param data The experiment data from the manifest.
    * @return boolean Whether initialization succeeded.
    */
-  initFromManifestData: function (data) {
+  initFromManifestData: function(data) {
     if (!this._isManifestDataValid(data)) {
       return false;
     }
 
     this._manifestData = data;
 
     this._randomValue = this._policy.random();
     this._lastChangedDate = this._policy.now();
@@ -1522,17 +1522,17 @@ Experiments.ExperimentEntry.prototype = 
     return this._needsUpdate;
   },
 
   /*
    * Initialize entry from the cache.
    * @param data The entry data from the cache.
    * @return boolean Whether initialization succeeded.
    */
-  initFromCacheData: function (data) {
+  initFromCacheData: function(data) {
     for (let [key, dval] of this.UPGRADE_KEYS) {
       if (!(key in data)) {
         data[key] = dval;
       }
     }
 
     for (let key of this.SERIALIZE_KEYS) {
       if (!(key in data) && !this.DATE_KEYS.has(key)) {
@@ -1567,17 +1567,17 @@ Experiments.ExperimentEntry.prototype = 
     this._lastChangedDate = this._endDate ? this._endDate : this._policy.now();
 
     return true;
   },
 
   /*
    * Returns a JSON representation of this object.
    */
-  toJSON: function () {
+  toJSON: function() {
     let obj = {};
 
     // Dates are serialized separately as epoch ms.
 
     this.SERIALIZE_KEYS.forEach(key => {
       if (!this.DATE_KEYS.has(key)) {
         obj[key] = this[key];
       }
@@ -1592,17 +1592,17 @@ Experiments.ExperimentEntry.prototype = 
     return obj;
   },
 
   /*
    * Update from the experiment data from the manifest.
    * @param data The experiment data from the manifest.
    * @return boolean Whether updating succeeded.
    */
-  updateFromManifestData: function (data) {
+  updateFromManifestData: function(data) {
     let old = this._manifestData;
 
     if (!this._isManifestDataValid(data)) {
       return false;
     }
 
     if (this._enabled) {
       if (old.xpiHash !== data.xpiHash) {
@@ -1624,17 +1624,17 @@ Experiments.ExperimentEntry.prototype = 
   },
 
   /*
    * Is this experiment applicable?
    * @return Promise<> Resolved if the experiment is applicable.
    *                   If it is not applicable it is rejected with
    *                   a Promise<string> which contains the reason.
    */
-  isApplicable: function () {
+  isApplicable: function() {
     let versionCmp = Cc["@mozilla.org/xpcom/version-comparator;1"]
                               .getService(Ci.nsIVersionComparator);
     let app = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo);
     let runtime = Cc["@mozilla.org/xre/app-info;1"]
                     .getService(Ci.nsIXULRuntime);
 
     let locale = this._policy.locale();
     let channel = this._policy.updatechannel();
@@ -2015,17 +2015,17 @@ Experiments.ExperimentEntry.prototype = 
     return changes;
    }),
 
   /**
    * Obtain the underlying Addon from the Addon Manager.
    *
    * @return Promise<Addon|null>
    */
-  _getAddon: function () {
+  _getAddon: function() {
     if (!this._addonId) {
       return Promise.resolve(null);
     }
 
     let deferred = Promise.defer();
 
     AddonManager.getAddonByID(this._addonId, (addon) => {
       if (addon && addon.appDisabled) {
@@ -2034,17 +2034,17 @@ Experiments.ExperimentEntry.prototype = 
       }
 
       deferred.resolve(addon);
     });
 
     return deferred.promise;
   },
 
-  _logTermination: function (terminationKind, terminationReason) {
+  _logTermination: function(terminationKind, terminationReason) {
     if (terminationKind === undefined) {
       return;
     }
 
     if (!(terminationKind in TELEMETRY_LOG.TERMINATION)) {
       this._log.warn("stop() - unknown terminationKind " + terminationKind);
       return;
     }
@@ -2055,61 +2055,61 @@ Experiments.ExperimentEntry.prototype = 
     }
 
     TelemetryLog.log(TELEMETRY_LOG.TERMINATION_KEY, data);
   },
 
   /**
    * Determine whether an active experiment should be stopped.
    */
-  shouldStop: function () {
+  shouldStop: function() {
     if (!this._enabled) {
       throw new Error("shouldStop must not be called on disabled experiments.");
     }
 
     let deferred = Promise.defer();
     this.isApplicable().then(
       () => deferred.resolve({shouldStop: false}),
       reason => deferred.resolve({shouldStop: true, reason: reason})
     );
 
     return deferred.promise;
   },
 
   /*
    * Should this be discarded from the cache due to age?
    */
-  shouldDiscard: function () {
+  shouldDiscard: function() {
     let limit = this._policy.now();
     limit.setDate(limit.getDate() - KEEP_HISTORY_N_DAYS);
     return (this._lastChangedDate < limit);
   },
 
   /*
    * Get next date (in epoch-ms) to schedule a re-evaluation for this.
    * Returns 0 if it doesn't need one.
    */
-  getScheduleTime: function () {
+  getScheduleTime: function() {
     if (this._enabled) {
       let startTime = this._startDate.getTime();
       let maxActiveTime = startTime + 1000 * this._manifestData.maxActiveSeconds;
       return Math.min(1000 * this._manifestData.endTime,  maxActiveTime);
     }
 
     if (this._endDate) {
       return this._endDate.getTime();
     }
 
     return 1000 * this._manifestData.startTime;
   },
 
   /*
    * Perform sanity checks on the experiment data.
    */
-  _isManifestDataValid: function (data) {
+  _isManifestDataValid: function(data) {
     this._log.trace("isManifestDataValid() - data: " + JSON.stringify(data));
 
     for (let key of this.MANIFEST_REQUIRED_FIELDS) {
       if (!(key in data)) {
         this._log.error("isManifestDataValid() - missing required key: " + key);
         return false;
       }
     }
@@ -2126,85 +2126,85 @@ Experiments.ExperimentEntry.prototype = 
   },
 };
 
 /**
  * Strip a Date down to its UTC midnight.
  *
  * This will return a cloned Date object. The original is unchanged.
  */
-var stripDateToMidnight = function (d) {
+var stripDateToMidnight = function(d) {
   let m = new Date(d);
   m.setUTCHours(0, 0, 0, 0);
 
   return m;
 };
 
 /**
  * An Add-ons Manager provider that knows about old experiments.
  *
  * This provider exposes read-only add-ons corresponding to previously-active
  * experiments. The existence of this provider (and the add-ons it knows about)
  * facilitates the display of old experiments in the Add-ons Manager UI with
  * very little custom code in that component.
  */
-this.Experiments.PreviousExperimentProvider = function (experiments) {
+this.Experiments.PreviousExperimentProvider = function(experiments) {
   this._experiments = experiments;
   this._experimentList = [];
   this._log = Log.repository.getLoggerWithMessagePrefix(
     "Browser.Experiments.Experiments",
     "PreviousExperimentProvider #" + gPreviousProviderCounter++ + "::");
 }
 
 this.Experiments.PreviousExperimentProvider.prototype = Object.freeze({
   name: "PreviousExperimentProvider",
 
-  startup: function () {
+  startup: function() {
     this._log.trace("startup()");
     Services.obs.addObserver(this, EXPERIMENTS_CHANGED_TOPIC, false);
   },
 
-  shutdown: function () {
+  shutdown: function() {
     this._log.trace("shutdown()");
     try {
       Services.obs.removeObserver(this, EXPERIMENTS_CHANGED_TOPIC);
     } catch (e) {
       // Prevent crash in mochitest-browser3 on Mulet
     }
   },
 
-  observe: function (subject, topic, data) {
+  observe: function(subject, topic, data) {
     switch (topic) {
       case EXPERIMENTS_CHANGED_TOPIC:
         this._updateExperimentList();
         break;
     }
   },
 
-  getAddonByID: function (id, cb) {
+  getAddonByID: function(id, cb) {
     for (let experiment of this._experimentList) {
       if (experiment.id == id) {
         cb(new PreviousExperimentAddon(experiment));
         return;
       }
     }
 
     cb(null);
   },
 
-  getAddonsByTypes: function (types, cb) {
+  getAddonsByTypes: function(types, cb) {
     if (types && types.length > 0 && types.indexOf("experiment") == -1) {
       cb([]);
       return;
     }
 
     cb(this._experimentList.map(e => new PreviousExperimentAddon(e)));
   },
 
-  _updateExperimentList: function () {
+  _updateExperimentList: function() {
     return this._experiments.getExperiments().then((experiments) => {
       let list = experiments.filter(e => !e.active);
 
       let newMap = new Map(list.map(e => [e.id, e]));
       let oldMap = new Map(this._experimentList.map(e => [e.id, e]));
 
       let added = [...newMap.keys()].filter(id => !oldMap.has(id));
       let removed = [...oldMap.keys()].filter(id => !newMap.has(id));
@@ -2327,21 +2327,21 @@ PreviousExperimentAddon.prototype = Obje
   get updateDate() {
     return new Date(this._endDate);
   },
 
   // END OPTIONAL PROPERTIES
 
   // BEGIN REQUIRED METHODS
 
-  isCompatibleWith: function (appVersion, platformVersion) {
+  isCompatibleWith: function(appVersion, platformVersion) {
     return true;
   },
 
-  findUpdates: function (listener, reason, appVersion, platformVersion) {
+  findUpdates: function(listener, reason, appVersion, platformVersion) {
     AddonManagerPrivate.callNoUpdateListeners(this, listener, reason,
                                               appVersion, platformVersion);
   },
 
   // END REQUIRED METHODS
 
   /**
    * The end-date of the experiment, required for the Addon Manager UI.
--- a/browser/experiments/ExperimentsService.js
+++ b/browser/experiments/ExperimentsService.js
@@ -49,37 +49,37 @@ function ExperimentsService() {
   this._initialized = false;
   this._delayedInitTimer = null;
 }
 
 ExperimentsService.prototype = {
   classID: Components.ID("{f7800463-3b97-47f9-9341-b7617e6d8d49}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsITimerCallback, Ci.nsIObserver]),
 
-  notify: function (timer) {
+  notify: function(timer) {
     if (!gExperimentsEnabled) {
       return;
     }
     if (OS.Constants.Path.profileDir === undefined) {
       throw Error("Update timer fired before profile was initialized?");
     }
     let instance = Experiments.instance();
     if (instance.isReady) {
       instance.updateManifest();
     }
   },
 
-  _delayedInit: function () {
+  _delayedInit: function() {
     if (!this._initialized) {
       this._initialized = true;
       Experiments.instance(); // for side effects
     }
   },
 
-  observe: function (subject, topic, data) {
+  observe: function(subject, topic, data) {
     switch (topic) {
       case "profile-after-change":
         if (gExperimentsEnabled) {
           Services.obs.addObserver(this, "quit-application", false);
           Services.obs.addObserver(this, "sessionstore-state-finalized", false);
           Services.obs.addObserver(this, "EM-loaded", false);
 
           if (gActiveExperiment) {
--- a/browser/extensions/pocket/bootstrap.js
+++ b/browser/extensions/pocket/bootstrap.js
@@ -59,17 +59,17 @@ function setDefaultPrefs() {
         branch.setCharPref(key, val);
         break;
     }
   }
 }
 
 function createElementWithAttrs(document, type, attrs) {
   let element = document.createElement(type);
-  Object.keys(attrs).forEach(function (attr) {
+  Object.keys(attrs).forEach(function(attr) {
     element.setAttribute(attr, attrs[attr]);
   })
   return element;
 }
 
 function CreatePocketWidget(reason) {
   let id = "pocket-button"
   let widget = CustomizableUI.getWidget(id);
--- a/browser/extensions/pocket/content/panels/js/saved.js
+++ b/browser/extensions/pocket/content/panels/js/saved.js
@@ -1,13 +1,13 @@
 /*
 PKT_SAVED_OVERLAY is the view itself and contains all of the methods to manipute the overlay and messaging.
 It does not contain any logic for saving or communication with the extension or server.
 */
-var PKT_SAVED_OVERLAY = function (options)
+var PKT_SAVED_OVERLAY = function(options)
 {
     var myself = this;
     this.inited = false;
     this.active = false;
     this.wrapper = null;
     this.pockethost = "getpocket.com";
     this.savedItemId = 0;
     this.savedUrl = '';
@@ -422,17 +422,17 @@ var PKT_SAVED_OVERLAY = function (option
             ">": "&gt;",
             '"': '&quot;',
             "'": '&#39;'
         };
         if (typeof s !== 'string')
         {
             return '';
         }
-        return String(s).replace(/[&<>"']/g, function (str) {
+        return String(s).replace(/[&<>"']/g, function(str) {
             return sanitizeMap[str];
         });
     };
     this.showStateFinalMsg = function(msg) {
         this.wrapper.find('.pkt_ext_tag_detail').one('webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd', function(e)
         {
             $(this).off('webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd');
             myself.preventCloseTimerCancel = true;
@@ -502,20 +502,20 @@ PKT_SAVED_OVERLAY.prototype = {
             $('body').append(Handlebars.templates.saved_premiumshell(this.dictJSON));
             $('.pkt_ext_initload').append(Handlebars.templates.saved_premiumextras(this.dictJSON));
         }
     }
 };
 
 
 // Layer between Bookmarklet and Extensions
-var PKT_SAVED = function () {};
+var PKT_SAVED = function() {};
 
 PKT_SAVED.prototype = {
-    init: function () {
+    init: function() {
         if (this.inited) {
             return;
         }
         this.panelId = pktPanelMessaging.panelIdFromURL(window.location.href);
         this.overlay = new PKT_SAVED_OVERLAY();
 
         this.inited = true;
     },
--- a/browser/extensions/pocket/content/panels/js/signup.js
+++ b/browser/extensions/pocket/content/panels/js/signup.js
@@ -1,13 +1,13 @@
 /*
 PKT_SIGNUP_OVERLAY is the view itself and contains all of the methods to manipute the overlay and messaging.
 It does not contain any logic for saving or communication with the extension or server.
 */
-var PKT_SIGNUP_OVERLAY = function (options)
+var PKT_SIGNUP_OVERLAY = function(options)
 {
     var myself = this;
     this.inited = false;
     this.active = false;
     this.delayedStateSaved = false;
     this.wrapper = null;
     this.variant = window.___PKT__SIGNUP_VARIANT;
     this.tagline = window.___PKT__SIGNUP_TAGLINE || '';
@@ -44,17 +44,17 @@ var PKT_SIGNUP_OVERLAY = function (optio
             ">": "&gt;",
             '"': '&quot;',
             "'": '&#39;'
         };
         if (typeof s !== 'string')
         {
             return '';
         }
-        return String(s).replace(/[&<>"']/g, function (str) {
+        return String(s).replace(/[&<>"']/g, function(str) {
             return sanitizeMap[str];
         });
     };
     this.getTranslations = function()
     {
         this.dictJSON = window.pocketStrings;
     };
 
@@ -137,20 +137,20 @@ PKT_SIGNUP_OVERLAY.prototype = {
 
         // close events
         this.initCloseTabEvents();
     }
 };
 
 
 // Layer between Bookmarklet and Extensions
-var PKT_SIGNUP = function () {};
+var PKT_SIGNUP = function() {};
 
 PKT_SIGNUP.prototype = {
-    init: function () {
+    init: function() {
         if (this.inited) {
             return;
         }
         this.panelId = pktPanelMessaging.panelIdFromURL(window.location.href);
         this.overlay = new PKT_SIGNUP_OVERLAY();
 
         this.inited = true;
     },
--- a/browser/modules/BrowserUITelemetry.jsm
+++ b/browser/modules/BrowserUITelemetry.jsm
@@ -638,17 +638,17 @@ this.BrowserUITelemetry = {
   },
 
   countSidebarEvent: function(sidebarID, action) {
     // sidebarID is the ID of the sidebar (duh!)
     // action will be "hide" or "show"
     this._countEvent(["sidebar", sidebarID, action]);
   },
 
-  _logAwesomeBarSearchResult: function (url) {
+  _logAwesomeBarSearchResult: function(url) {
     let spec = Services.search.parseSubmissionURL(url);
     if (spec.engine) {
       let matchedEngine = "default";
       if (spec.engine.name !== Services.search.currentEngine.name) {
         matchedEngine = "other";
       }
       this.countSearchEvent("autocomplete-" + matchedEngine);
     }
--- a/browser/modules/CastingApps.jsm
+++ b/browser/modules/CastingApps.jsm
@@ -7,27 +7,27 @@ this.EXPORTED_SYMBOLS = ["CastingApps"];
 
 const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
 
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/SimpleServiceDiscovery.jsm");
 
 
 var CastingApps = {
-  _sendEventToVideo: function (element, data) {
+  _sendEventToVideo: function(element, data) {
     let event = element.ownerDocument.createEvent("CustomEvent");
     event.initCustomEvent("media-videoCasting", false, true, JSON.stringify(data));
     element.dispatchEvent(event);
   },
 
-  makeURI: function (url, charset, baseURI) {
+  makeURI: function(url, charset, baseURI) {
     return Services.io.newURI(url, charset, baseURI);
   },
 
-  getVideo: function (element) {
+  getVideo: function(element) {
     if (!element) {
       return null;
     }
 
     let extensions = SimpleServiceDiscovery.getSupportedExtensions();
     let types = SimpleServiceDiscovery.getSupportedMimeTypes();
 
     // Grab the poster attribute from the <video>
@@ -60,17 +60,17 @@ var CastingApps = {
       if (this.allowableMimeType(sourceNode.type, types) || this.allowableExtension(sourceURI, extensions)) {
         return { element: element, source: sourceURI.spec, poster: posterURL, sourceURI: sourceURI, type: sourceNode.type };
       }
     }
 
     return null;
   },
 
-  sendVideoToService: function (videoElement, service) {
+  sendVideoToService: function(videoElement, service) {
     if (!service)
       return;
 
     let video = this.getVideo(videoElement);
     if (!video) {
       return;
     }
 
@@ -111,54 +111,54 @@ var CastingApps = {
             },
             videoRef: Cu.getWeakReference(video.element)
           };
         }, this);
       });
     });
   },
 
-  getServicesForVideo: function (videoElement) {
+  getServicesForVideo: function(videoElement) {
     let video = this.getVideo(videoElement);
     if (!video) {
       return {};
     }
 
     let filteredServices = SimpleServiceDiscovery.services.filter(service => {
       return this.allowableExtension(video.sourceURI, service.extensions) ||
              this.allowableMimeType(video.type, service.types);
     });
 
     return filteredServices;
   },
 
-  getServicesForMirroring: function () {
+  getServicesForMirroring: function() {
     return SimpleServiceDiscovery.services.filter(service => service.mirror);
   },
 
   // RemoteMedia callback API methods
-  onRemoteMediaStart: function (remoteMedia) {
+  onRemoteMediaStart: function(remoteMedia) {
     if (!this.session) {
       return;
     }
 
     remoteMedia.load(this.session.data);
 
     let video = this.session.videoRef.get();
     if (video) {
       this._sendEventToVideo(video, { active: true });
     }
   },
 
-  onRemoteMediaStop: function (remoteMedia) {
+  onRemoteMediaStop: function(remoteMedia) {
   },
 
-  onRemoteMediaStatus: function (remoteMedia) {
+  onRemoteMediaStatus: function(remoteMedia) {
   },
 
-  allowableExtension: function (uri, extensions) {
+  allowableExtension: function(uri, extensions) {
     return (uri instanceof Ci.nsIURL) && extensions.indexOf(uri.fileExtension) != -1;
   },
 
-  allowableMimeType: function (type, types) {
+  allowableMimeType: function(type, types) {
     return types.indexOf(type) != -1;
   }
 };
--- a/browser/modules/ContentClick.jsm
+++ b/browser/modules/ContentClick.jsm
@@ -16,25 +16,25 @@ Cu.import("resource://gre/modules/Privat
 Cu.import("resource://gre/modules/Services.jsm");
 
 var ContentClick = {
   init: function() {
     let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager);
     mm.addMessageListener("Content:Click", this);
   },
 
-  receiveMessage: function (message) {
+  receiveMessage: function(message) {
     switch (message.name) {
       case "Content:Click":
         this.contentAreaClick(message.json, message.target)
         break;
     }
   },
 
-  contentAreaClick: function (json, browser) {
+  contentAreaClick: function(json, browser) {
     // This is heavily based on contentAreaClick from browser.js (Bug 903016)
     // The json is set up in a way to look like an Event.
     let window = browser.ownerGlobal;
 
     if (!json.href) {
       // Might be middle mouse navigation.
       if (Services.prefs.getBoolPref("middlemouse.contentLoadURL") &&
           !Services.prefs.getBoolPref("general.autoScroll")) {
--- a/browser/modules/ContentCrashHandlers.jsm
+++ b/browser/modules/ContentCrashHandlers.jsm
@@ -50,17 +50,17 @@ this.TabCrashHandler = {
   unseenCrashedChildIDs: [],
   crashedBrowserQueues: new Map(),
 
   get prefs() {
     delete this.prefs;
     return this.prefs = Services.prefs.getBranch("browser.tabs.crashReporting.");
   },
 
-  init: function () {
+  init: function() {
     if (this.initialized)
       return;
     this.initialized = true;
 
     Services.obs.addObserver(this, "ipc:content-shutdown", false);
     Services.obs.addObserver(this, "oop-frameloader-crashed", false);
 
     this.pageListener = new RemotePages("about:tabcrashed");
@@ -69,17 +69,17 @@ this.TabCrashHandler = {
     // finished running.
     this.pageListener.addMessageListener("Load", this.receiveMessage.bind(this));
     this.pageListener.addMessageListener("RemotePage:Unload", this.receiveMessage.bind(this));
     this.pageListener.addMessageListener("closeTab", this.receiveMessage.bind(this));
     this.pageListener.addMessageListener("restoreTab", this.receiveMessage.bind(this));
     this.pageListener.addMessageListener("restoreAll", this.receiveMessage.bind(this));
   },
 
-  observe: function (aSubject, aTopic, aData) {
+  observe: function(aSubject, aTopic, aData) {
     switch (aTopic) {
       case "ipc:content-shutdown": {
         aSubject.QueryInterface(Ci.nsIPropertyBag2);
 
         if (!aSubject.get("abnormal")) {
           return;
         }
 
@@ -417,17 +417,17 @@ this.TabCrashHandler = {
             // assume sending to the first port is sufficient.
             ports[0].sendAsyncMessage("CrashReportSent");
           }
         }
       }
     }
   },
 
-  onAboutTabCrashedLoad: function (message) {
+  onAboutTabCrashedLoad: function(message) {
     this._crashedTabCount++;
 
     // Broadcast to all about:tabcrashed pages a count of
     // how many about:tabcrashed pages exist, so that they
     // can decide whether or not to display the "Restore All
     // Crashed Tabs" button.
     this.pageListener.sendAsyncMessage("UpdateCount", {
       count: this._crashedTabCount,
--- a/browser/modules/ContentSearch.jsm
+++ b/browser/modules/ContentSearch.jsm
@@ -103,17 +103,17 @@ this.ContentSearch = {
 
   // Resolved when we finish shutting down.
   _destroyedPromise: null,
 
   // The current controller and browser in _onMessageGetSuggestions.  Allows
   // fetch cancellation from _cancelSuggestions.
   _currentSuggestion: null,
 
-  init: function () {
+  init: function() {
     Cc["@mozilla.org/globalmessagemanager;1"].
       getService(Ci.nsIMessageListenerManager).
       addMessageListener(INBOUND_MESSAGE, this);
     Services.obs.addObserver(this, "browser-search-engine-modified", false);
     Services.obs.addObserver(this, "shutdown-leaks-before-check", false);
     Services.prefs.addObserver("browser.search.hiddenOneOffs", this, false);
     this._stringBundle = Services.strings.createBundle("chrome://global/locale/autocomplete.properties");
   },
@@ -128,17 +128,17 @@ this.ContentSearch = {
                        "searchWithHeader", "searchSettings"];
 
     for (let name of stringNames) {
       this._searchSuggestionUIStrings[name] = searchBundle.GetStringFromName(name);
     }
     return this._searchSuggestionUIStrings;
   },
 
-  destroy: function () {
+  destroy: function() {
     if (this._destroyedPromise) {
       return this._destroyedPromise;
     }
 
     Cc["@mozilla.org/globalmessagemanager;1"].
       getService(Ci.nsIMessageListenerManager).
       removeMessageListener(INBOUND_MESSAGE, this);
     Services.obs.removeObserver(this, "browser-search-engine-modified");
@@ -149,23 +149,23 @@ this.ContentSearch = {
     return this._destroyedPromise;
   },
 
   /**
    * Focuses the search input in the page with the given message manager.
    * @param  messageManager
    *         The MessageManager object of the selected browser.
    */
-  focusInput: function (messageManager) {
+  focusInput: function(messageManager) {
     messageManager.sendAsyncMessage(OUTBOUND_MESSAGE, {
       type: "FocusInput"
     });
   },
 
-  receiveMessage: function (msg) {
+  receiveMessage: function(msg) {
     // Add a temporary event handler that exists only while the message is in
     // the event queue.  If the message's source docshell changes browsers in
     // the meantime, then we need to update msg.target.  event.detail will be
     // the docshell's new parent <xul:browser> element.
     msg.handleEvent = event => {
       let browserData = this._suggestionMap.get(msg.target);
       if (browserData) {
         this._suggestionMap.delete(msg.target);
@@ -185,47 +185,47 @@ this.ContentSearch = {
 
     this._eventQueue.push({
       type: "Message",
       data: msg,
     });
     this._processEventQueue();
   },
 
-  observe: function (subj, topic, data) {
+  observe: function(subj, topic, data) {
     switch (topic) {
     case "nsPref:changed":
     case "browser-search-engine-modified":
       this._eventQueue.push({
         type: "Observe",
         data: data,
       });
       this._processEventQueue();
       break;
     case "shutdown-leaks-before-check":
       subj.wrappedJSObject.client.addBlocker(
         "ContentSearch: Wait until the service is destroyed", () => this.destroy());
       break;
     }
   },
 
-  removeFormHistoryEntry: function (msg, entry) {
+  removeFormHistoryEntry: function(msg, entry) {
     let browserData = this._suggestionDataForBrowser(msg.target);
     if (browserData && browserData.previousFormHistoryResult) {
       let { previousFormHistoryResult } = browserData;
       for (let i = 0; i < previousFormHistoryResult.matchCount; i++) {
         if (previousFormHistoryResult.getValueAt(i) === entry) {
           previousFormHistoryResult.removeValueAt(i, true);
           break;
         }
       }
     }
   },
 
-  performSearch: function (msg, data) {
+  performSearch: function(msg, data) {
     this._ensureDataHasProperties(data, [
       "engineName",
       "searchString",
       "healthReportKey",
       "searchPurpose",
     ]);
     let engine = Services.search.getEngineByName(data.engineName);
     let submission = engine.getSubmission(data.searchString, "", data.searchPurpose);
@@ -346,17 +346,17 @@ this.ContentSearch = {
         name: engine.name,
         iconBuffer,
         hidden: hiddenList.indexOf(engine.name) !== -1,
       });
     }
     return state;
   }),
 
-  _processEventQueue: function () {
+  _processEventQueue: function() {
     if (this._currentEventPromise || !this._eventQueue.length) {
       return;
     }
 
     let event = this._eventQueue.shift();
 
     this._currentEventPromise = Task.spawn(function* () {
       try {
@@ -365,17 +365,17 @@ this.ContentSearch = {
         Cu.reportError(err);
       } finally {
         this._currentEventPromise = null;
         this._processEventQueue();
       }
     }.bind(this));
   },
 
-  _cancelSuggestions: function (msg) {
+  _cancelSuggestions: function(msg) {
     let cancelled = false;
     // cancel active suggestion request
     if (this._currentSuggestion && this._currentSuggestion.target === msg.target) {
       this._currentSuggestion.controller.stop();
       cancelled = true;
     }
     // cancel queued suggestion requests
     for (let i = 0; i < this._eventQueue.length; i++) {
@@ -397,35 +397,35 @@ this.ContentSearch = {
       yield this._initService();
       yield this[methodName](msg, msg.data.data);
       if (!Cu.isDeadWrapper(msg.target)) {
         msg.target.removeEventListener("SwapDocShells", msg, true);
       }
     }
   }),
 
-  _onMessageGetState: function (msg, data) {
+  _onMessageGetState: function(msg, data) {
     return this.currentStateObj().then(state => {
       this._reply(msg, "State", state);
     });
   },
 
-  _onMessageGetStrings: function (msg, data) {
+  _onMessageGetStrings: function(msg, data) {
     this._reply(msg, "Strings", this.searchSuggestionUIStrings);
   },
 
-  _onMessageSearch: function (msg, data) {
+  _onMessageSearch: function(msg, data) {
     this.performSearch(msg, data);
   },
 
-  _onMessageSetCurrentEngine: function (msg, data) {
+  _onMessageSetCurrentEngine: function(msg, data) {
     Services.search.currentEngine = Services.search.getEngineByName(data);
   },
 
-  _onMessageManageEngines: function (msg, data) {
+  _onMessageManageEngines: function(msg, data) {
     let browserWin = msg.target.ownerGlobal;
     browserWin.openPreferences("paneSearch");
   },
 
   _onMessageGetSuggestions: Task.async(function* (msg, data) {
     this._ensureDataHasProperties(data, [
       "engineName",
       "searchString",
@@ -440,21 +440,21 @@ this.ContentSearch = {
       remote: suggestions.remote,
     });
   }),
 
   _onMessageAddFormHistoryEntry: Task.async(function* (msg, entry) {
     yield this.addFormHistoryEntry(msg, entry);
   }),
 
-  _onMessageRemoveFormHistoryEntry: function (msg, entry) {
+  _onMessageRemoveFormHistoryEntry: function(msg, entry) {
     this.removeFormHistoryEntry(msg, entry);
   },
 
-  _onMessageSpeculativeConnect: function (msg, engineName) {
+  _onMessageSpeculativeConnect: function(msg, engineName) {
     let engine = Services.search.getEngineByName(engineName);
     if (!engine) {
       throw new Error("Unknown engine name: " + engineName);
     }
     if (msg.target.contentWindow) {
       engine.speculativeConnect({
         window: msg.target.contentWindow,
       });
@@ -469,45 +469,45 @@ this.ContentSearch = {
     else if (data !== "engine-default") {
       // engine-default is always sent with engine-current and isn't otherwise
       // relevant to content searches.
       let state = yield this.currentStateObj();
       this._broadcast("CurrentState", state);
     }
   }),
 
-  _suggestionDataForBrowser: function (browser, create = false) {
+  _suggestionDataForBrowser: function(browser, create = false) {
     let data = this._suggestionMap.get(browser);
     if (!data && create) {
       // Since one SearchSuggestionController instance is meant to be used per
       // autocomplete widget, this means that we assume each xul:browser has at
       // most one such widget.
       data = {
         controller: new SearchSuggestionController(),
       };
       this._suggestionMap.set(browser, data);
     }
     return data;
   },
 
-  _reply: function (msg, type, data) {
+  _reply: function(msg, type, data) {
     // We reply asyncly to messages, and by the time we reply the browser we're
     // responding to may have been destroyed.  messageManager is null then.
     if (!Cu.isDeadWrapper(msg.target) && msg.target.messageManager) {
       msg.target.messageManager.sendAsyncMessage(...this._msgArgs(type, data));
     }
   },
 
-  _broadcast: function (type, data) {
+  _broadcast: function(type, data) {
     Cc["@mozilla.org/globalmessagemanager;1"].
       getService(Ci.nsIMessageListenerManager).
       broadcastAsyncMessage(...this._msgArgs(type, data));
   },
 
-  _msgArgs: function (type, data) {
+  _msgArgs: function(type, data) {
     return [OUTBOUND_MESSAGE, {
       type: type,
       data: data,
     }];
   },
 
   _currentEngineObj: Task.async(function* () {
     let engine = Services.search.currentEngine;
@@ -517,17 +517,17 @@ this.ContentSearch = {
     let obj = {
       name: engine.name,
       placeholder: placeholder,
       iconBuffer: yield this._arrayBufferFromDataURI(favicon),
     };
     return obj;
   }),
 
-  _arrayBufferFromDataURI: function (uri) {
+  _arrayBufferFromDataURI: function(uri) {
     if (!uri) {
       return Promise.resolve(null);
     }
     let deferred = Promise.defer();
     let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].
               createInstance(Ci.nsIXMLHttpRequest);
     xhr.open("GET", uri, true);
     xhr.responseType = "arraybuffer";
@@ -542,25 +542,25 @@ this.ContentSearch = {
       xhr.send();
     }
     catch (err) {
       return Promise.resolve(null);
     }
     return deferred.promise;
   },
 
-  _ensureDataHasProperties: function (data, requiredProperties) {
+  _ensureDataHasProperties: function(data, requiredProperties) {
     for (let prop of requiredProperties) {
       if (!(prop in data)) {
         throw new Error("Message data missing required property: " + prop);
       }
     }
   },
 
-  _initService: function () {
+  _initService: function() {
     if (!this._initServicePromise) {
       let deferred = Promise.defer();
       this._initServicePromise = deferred.promise;
       Services.search.init(() => deferred.resolve());
     }
     return this._initServicePromise;
   },
 };
--- a/browser/modules/ContentWebRTC.jsm
+++ b/browser/modules/ContentWebRTC.jsm
@@ -126,26 +126,26 @@ function handlePCRequest(aSubject, aTopi
 
 function handleGUMRequest(aSubject, aTopic, aData) {
   let constraints = aSubject.getConstraints();
   let secure = aSubject.isSecure;
   let contentWindow = Services.wm.getOuterWindowWithId(aSubject.windowID);
 
   contentWindow.navigator.mozGetUserMediaDevices(
     constraints,
-    function (devices) {
+    function(devices) {
       // If the window has been closed while we were waiting for the list of
       // devices, there's nothing to do in the callback anymore.
       if (contentWindow.closed)
         return;
 
       prompt(contentWindow, aSubject.windowID, aSubject.callID,
              constraints, devices, secure);
     },
-    function (error) {
+    function(error) {
       // bug 827146 -- In the future, the UI should catch NotFoundError
       // and allow the user to plug in a device, instead of immediately failing.
       denyGUMRequest({callID: aSubject.callID}, error);
     },
     aSubject.innerWindowID,
     aSubject.callID);
 }
 
--- a/browser/modules/DirectoryLinksProvider.jsm
+++ b/browser/modules/DirectoryLinksProvider.jsm
@@ -29,20 +29,20 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 XPCOMUtils.defineLazyModuleGetter(this, "UpdateUtils",
   "resource://gre/modules/UpdateUtils.jsm");
 XPCOMUtils.defineLazyServiceGetter(this, "eTLD",
   "@mozilla.org/network/effective-tld-service;1",
   "nsIEffectiveTLDService");
 XPCOMUtils.defineLazyGetter(this, "gTextDecoder", () => {
   return new TextDecoder();
 });
-XPCOMUtils.defineLazyGetter(this, "gCryptoHash", function () {
+XPCOMUtils.defineLazyGetter(this, "gCryptoHash", function() {
   return Cc["@mozilla.org/security/hash;1"].createInstance(Ci.nsICryptoHash);
 });
-XPCOMUtils.defineLazyGetter(this, "gUnicodeConverter", function () {
+XPCOMUtils.defineLazyGetter(this, "gUnicodeConverter", function() {
   let converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"]
                     .createInstance(Ci.nsIScriptableUnicodeConverter);
   converter.charset = 'utf8';
   return converter;
 });
 
 
 // The filename where directory links are stored locally
@@ -356,17 +356,17 @@ var DirectoryLinksProvider = {
 
     // download is not needed
     return Promise.resolve();
   },
 
   /**
    * @return true if download is needed, false otherwise
    */
-  get _needsDownload () {
+  get _needsDownload() {
     // fail if last download occured less then 24 hours ago
     if ((Date.now() - this._lastDownloadMS) > this._downloadIntervalMS) {
       return true;
     }
     return false;
   },
 
   /**
@@ -763,17 +763,17 @@ var DirectoryLinksProvider = {
     // and there are tiles configured to avoid it
     if (this._avoidInadjacentSites && this._isInadjacentLink(aLink)) {
       return true;
     }
 
     return false;
   },
 
-  _populatePlacesLinks: function () {
+  _populatePlacesLinks: function() {
     NewTabUtils.links.populateProviderCache(NewTabUtils.placesProvider, () => {
       this._handleManyLinksChanged();
     });
   },
 
   onDeleteURI: function(aProvider, aLink) {
     let {url} = aLink;
     // remove clicked flag for that url and
@@ -785,26 +785,26 @@ var DirectoryLinksProvider = {
 
   onClearHistory: function() {
     // remove all clicked flags and call observers upon file write
     this._removeAllTileClicks().then(() => {
       this._callObservers("onClearHistory");
     });
   },
 
-  onLinkChanged: function (aProvider, aLink) {
+  onLinkChanged: function(aProvider, aLink) {
     // Make sure NewTabUtils.links handles the notification first.
     setTimeout(() => {
       if (this._handleLinkChanged(aLink) || this._shouldUpdateSuggestedTile()) {
         this._updateSuggestedTile();
       }
     }, 0);
   },
 
-  onManyLinksChanged: function () {
+  onManyLinksChanged: function() {
     // Make sure NewTabUtils.links handles the notification first.
     setTimeout(() => {
       this._handleManyLinksChanged();
     }, 0);
   },
 
   _getCurrentTopSiteCount: function() {
     let visibleTopSiteCount = 0;
--- a/browser/modules/FormSubmitObserver.jsm
+++ b/browser/modules/FormSubmitObserver.jsm
@@ -67,17 +67,17 @@ FormSubmitObserver.prototype =
     this._content = null;
     this._tab = null;
   },
 
   /*
    * Events
    */
 
-  handleEvent: function (aEvent) {
+  handleEvent: function(aEvent) {
     switch (aEvent.type) {
       case "pageshow":
         if (this._isRootDocumentEvent(aEvent)) {
           this._hidePopup();
         }
         break;
       case "unload":
         this.uninit();
@@ -90,17 +90,17 @@ FormSubmitObserver.prototype =
         break;
     }
   },
 
   /*
    * nsIFormSubmitObserver
    */
 
-  notifyInvalidSubmit : function (aFormElement, aInvalidElements)
+  notifyInvalidSubmit : function(aFormElement, aInvalidElements)
   {
     // We are going to handle invalid form submission attempt by focusing the
     // first invalid element and show the corresponding validation message in a
     // panel attached to the element.
     if (!aInvalidElements.length) {
       return;
     }
 
@@ -144,17 +144,17 @@ FormSubmitObserver.prototype =
    * Internal
    */
 
   /*
    * Handles input changes on the form element we've associated a popup
    * with. Updates the validation message or closes the popup if form data
    * becomes valid.
    */
-  _onInput: function (aEvent) {
+  _onInput: function(aEvent) {
     let element = aEvent.originalTarget;
 
     // If the form input is now valid, hide the popup.
     if (element.validity.valid) {
       this._hidePopup();
       return;
     }
 
@@ -165,29 +165,29 @@ FormSubmitObserver.prototype =
       this._showPopup(element);
     }
   },
 
   /*
    * Blur event handler in which we disconnect from the form element and
    * hide the popup.
    */
-  _onBlur: function (aEvent) {
+  _onBlur: function(aEvent) {
     aEvent.originalTarget.removeEventListener("input", this, false);
     aEvent.originalTarget.removeEventListener("blur", this, false);
     this._element = null;
     this._hidePopup();
   },
 
   /*
    * Send the show popup message to chrome with appropriate position
    * information. Can be called repetitively to update the currently
    * displayed popup position and text.
    */
-  _showPopup: function (aElement) {
+  _showPopup: function(aElement) {
     // Collect positional information and show the popup
     let panelData = {};
 
     panelData.message = this._validationMessage;
 
     // Note, this is relative to the browser and needs to be translated
     // in chrome.
     panelData.contentRect = BrowserUtils.getElementBoundingRect(aElement);
@@ -209,25 +209,25 @@ FormSubmitObserver.prototype =
       }
       let zoomFactor = this._getWindowUtils().fullZoom;
       panelData.offset = Math.round(offset * zoomFactor);
       panelData.position = "after_start";
     }
     this._mm.sendAsyncMessage("FormValidation:ShowPopup", panelData);
   },
 
-  _hidePopup: function () {
+  _hidePopup: function() {
     this._mm.sendAsyncMessage("FormValidation:HidePopup", {});
   },
 
-  _getWindowUtils: function () {
+  _getWindowUtils: function() {
     return this._content.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
   },
 
-  _isRootDocumentEvent: function (aEvent) {
+  _isRootDocumentEvent: function(aEvent) {
     if (this._content == null) {
       return true;
     }
     let target = aEvent.originalTarget;
     return (target == this._content.document ||
             (target.ownerDocument && target.ownerDocument == this._content.document));
   },
 
--- a/browser/modules/FormValidationHandler.jsm
+++ b/browser/modules/FormValidationHandler.jsm
@@ -20,39 +20,39 @@ var FormValidationHandler =
 {
   _panel: null,
   _anchor: null,
 
   /*
    * Public apis
    */
 
-  init: function () {
+  init: function() {
     let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager);
     mm.addMessageListener("FormValidation:ShowPopup", this);
     mm.addMessageListener("FormValidation:HidePopup", this);
   },
 
-  uninit: function () {
+  uninit: function() {
     let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager);
     mm.removeMessageListener("FormValidation:ShowPopup", this);
     mm.removeMessageListener("FormValidation:HidePopup", this);
     this._panel = null;
     this._anchor = null;
   },
 
-  hidePopup: function () {
+  hidePopup: function() {
     this._hidePopup();
   },
 
   /*
    * Events
    */
 
-  receiveMessage: function (aMessage) {
+  receiveMessage: function(aMessage) {
     let window = aMessage.target.ownerGlobal;
     let json = aMessage.json;
     let tabBrowser = window.gBrowser;
     switch (aMessage.name) {
       case "FormValidation:ShowPopup":
         // target is the <browser>, make sure we're receiving a message
         // from the foreground tab.
         if (tabBrowser && aMessage.target != tabBrowser.selectedBrowser) {
@@ -61,21 +61,21 @@ var FormValidationHandler =
         this._showPopup(window, json);
         break;
       case "FormValidation:HidePopup":
         this._hidePopup();
         break;
     }
   },
 
-  observe: function (aSubject, aTopic, aData) {
+  observe: function(aSubject, aTopic, aData) {
     this._hidePopup();
   },
 
-  handleEvent: function (aEvent) {
+  handleEvent: function(aEvent) {
     switch (aEvent.type) {
       case "FullZoomChange":
       case "TextZoomChange":
       case "ZoomChangeUsingMouseWheel":
       case "scroll":
         this._hidePopup();
         break;
       case "popuphiding":
@@ -83,17 +83,17 @@ var FormValidationHandler =
         break;
     }
   },
 
   /*
    * Internal
    */
 
-  _onPopupHiding: function (aEvent) {
+  _onPopupHiding: function(aEvent) {
     aEvent.originalTarget.removeEventListener("popuphiding", this, true);
     let tabBrowser = aEvent.originalTarget.ownerDocument.getElementById("content");
     tabBrowser.selectedBrowser.removeEventListener("scroll", this, true);
     tabBrowser.selectedBrowser.removeEventListener("FullZoomChange", this, false);
     tabBrowser.selectedBrowser.removeEventListener("TextZoomChange", this, false);
     tabBrowser.selectedBrowser.removeEventListener("ZoomChangeUsingMouseWheel", this, false);
 
     this._panel.hidden = true;
@@ -110,17 +110,17 @@ var FormValidationHandler =
    * @aPanelData - Object that contains popup information
    *  aPanelData stucture detail:
    *   contentRect - the bounding client rect of the target element. If
    *    content is remote, this is relative to the browser, otherwise its
    *    relative to the window.
    *   position - popup positional string constants.
    *   message - the form element validation message text.
    */
-  _showPopup: function (aWindow, aPanelData) {
+  _showPopup: function(aWindow, aPanelData) {
     let previouslyShown = !!this._panel;
     this._panel = aWindow.document.getElementById("invalid-form-popup");
     this._panel.firstChild.textContent = aPanelData.message;
     this._panel.hidden = false;
 
     let tabBrowser = aWindow.gBrowser;
     this._anchor = tabBrowser.popupAnchor;
     this._anchor.left = aPanelData.contentRect.left;
@@ -144,14 +144,14 @@ var FormValidationHandler =
       this._panel.openPopup(this._anchor, aPanelData.position, 0, 0, false);
     }
   },
 
   /*
    * Hide the popup if currently displayed. Will fire an event to onPopupHiding
    * above if visible.
    */
-  _hidePopup: function () {
+  _hidePopup: function() {
     if (this._panel) {
       this._panel.hidePopup();
     }
   }
 };
--- a/browser/modules/HiddenFrame.jsm
+++ b/browser/modules/HiddenFrame.jsm
@@ -34,50 +34,50 @@ HiddenFrame.prototype = {
     return this.hiddenDOMDocument.readyState === "complete";
   },
 
   /**
    * Gets the |contentWindow| of the hidden frame. Creates the frame if needed.
    * @returns Promise Returns a promise which is resolved when the hidden frame has finished
    *          loading.
    */
-  get: function () {
+  get: function() {
     if (!this._deferred) {
       this._deferred = PromiseUtils.defer();
       this._create();
     }
 
     return this._deferred.promise;
   },
 
-  destroy: function () {
+  destroy: function() {
     clearTimeout(this._retryTimerId);
 
     if (this._frame) {
       if (!Cu.isDeadWrapper(this._frame)) {
         this._frame.removeEventListener("load", this, true);
         this._frame.remove();
       }
 
       this._frame = null;
       this._deferred = null;
     }
   },
 
-  handleEvent: function () {
+  handleEvent: function() {
     let contentWindow = this._frame.contentWindow;
     if (contentWindow.location.href === XUL_PAGE) {
       this._frame.removeEventListener("load", this, true);
       this._deferred.resolve(contentWindow);
     } else {
       contentWindow.location = XUL_PAGE;
     }
   },
 
-  _create: function () {
+  _create: function() {
     if (this.isReady) {
       let doc = this.hiddenDOMDocument;
       this._frame = doc.createElementNS(HTML_NS, "iframe");
       this._frame.addEventListener("load", this, true);
       doc.documentElement.appendChild(this._frame);
     } else {
       // Check again if |hiddenDOMDocument| is ready as soon as possible.
       this._retryTimerId = setTimeout(this._create.bind(this), 0);
--- a/browser/modules/NetworkPrioritizer.jsm
+++ b/browser/modules/NetworkPrioritizer.jsm
@@ -82,17 +82,17 @@ var BrowserHelper = {
     let windowEntry = WindowHelper.getEntry(aBrowser.ownerGlobal);
     if (windowEntry.lastSelectedBrowser)
       this.decreasePriority(windowEntry.lastSelectedBrowser);
     this.increasePriority(aBrowser);
 
     windowEntry.lastSelectedBrowser = aBrowser;
   },
 
-  onRemotenessChange: function (aBrowser) {
+  onRemotenessChange: function(aBrowser) {
     aBrowser.setPriority(_priorityBackup.get(aBrowser.permanentKey));
   },
 
   increasePriority: function NP_BH_increasePriority(aBrowser) {
     aBrowser.adjustPriority(PRIORITY_DELTA);
     _priorityBackup.set(aBrowser.permanentKey,
                         _priorityBackup.get(aBrowser.permanentKey) + PRIORITY_DELTA);
   },
--- a/browser/modules/PluginContent.jsm
+++ b/browser/modules/PluginContent.jsm
@@ -18,25 +18,25 @@ Cu.import("resource://gre/modules/Browse
 XPCOMUtils.defineLazyGetter(this, "gNavigatorBundle", function() {
   const url = "chrome://browser/locale/browser.properties";
   return Services.strings.createBundle(url);
 });
 
 XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
   "resource://gre/modules/AppConstants.jsm");
 
-this.PluginContent = function (global) {
+this.PluginContent = function(global) {
   this.init(global);
 }
 
 const FLASH_MIME_TYPE = "application/x-shockwave-flash";
 const REPLACEMENT_STYLE_SHEET = Services.io.newURI("chrome://pluginproblem/content/pluginReplaceBinding.css", null, null);
 
 PluginContent.prototype = {
-  init: function (global) {
+  init: function(global) {
     this.global = global;
     // Need to hold onto the content window or else it'll get destroyed
     this.content = this.global.content;
     // Cache of plugin actions for the current page.
     this.pluginData = new Map();
     // Cache of plugin crash information sent from the parent
     this.pluginCrashData = new Map();
 
@@ -84,17 +84,17 @@ PluginContent.prototype = {
     global.removeMessageListener("BrowserPlugins:Test:ClearCrashData", this);
 
     Services.obs.removeObserver(this, "decoder-doctor-notification");
 
     delete this.global;
     delete this.content;
   },
 
-  receiveMessage: function (msg) {
+  receiveMessage: function(msg) {
     switch (msg.name) {
       case "BrowserPlugins:ActivatePlugins":
         this.activatePlugins(msg.data.pluginInfo, msg.data.newState);
         break;
       case "BrowserPlugins:NotificationShown":
         setTimeout(() => this.updateNotificationUI(), 0);
         break;
       case "BrowserPlugins:ContextMenuCommand":
@@ -142,47 +142,47 @@ PluginContent.prototype = {
                                        { plugins: [...this.pluginData.values()],
                                          showNow: true,
                                          location: location,
                                        }, null, principal);
         }
     }
   },
 
-  onPageShow: function (event) {
+  onPageShow: function(event) {
     // Ignore events that aren't from the main document.
     if (!this.content || event.target != this.content.document) {
       return;
     }
 
     // The PluginClickToPlay events are not fired when navigating using the
     // BF cache. |persisted| is true when the page is loaded from the
     // BF cache, so this code reshows the notification if necessary.
     if (event.persisted) {
       this.reshowClickToPlayNotification();
     }
   },
 
-  onPageHide: function (event) {
+  onPageHide: function(event) {
     // Ignore events that aren't from the main document.
     if (!this.content || event.target != this.content.document) {
       return;
     }
 
     this._finishRecordingFlashPluginTelemetry();
     this.clearPluginCaches();
     this.haveShownNotification = false;
   },
 
-  getPluginUI: function (plugin, anonid) {
+  getPluginUI: function(plugin, anonid) {
     return plugin.ownerDocument.
            getAnonymousElementByAttribute(plugin, "anonid", anonid);
   },
 
-  _getPluginInfo: function (pluginElement) {
+  _getPluginInfo: function(pluginElement) {
     if (pluginElement instanceof Ci.nsIDOMHTMLAnchorElement) {
       // Anchor elements are our place holders, and we only have them for Flash
       let pluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
       return {
         pluginName: "Shockwave Flash",
         mimetype: FLASH_MIME_TYPE,
         permissionString: pluginHost.getPermissionStringForType(FLASH_MIME_TYPE)
       };
@@ -230,17 +230,17 @@ PluginContent.prototype = {
              pluginName: pluginName,
              pluginTag: pluginTag,
              permissionString: permissionString,
              fallbackType: fallbackType,
              blocklistState: blocklistState,
            };
   },
 
-  _getPluginInfoForTag: function (pluginTag, tagMimetype) {
+  _getPluginInfoForTag: function(pluginTag, tagMimetype) {
     let pluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
 
     let pluginName = gNavigatorBundle.GetStringFromName("pluginInfo.unknownPlugin");
     let permissionString = null;
     let blocklistState = null;
 
     if (pluginTag) {
       pluginName = BrowserUtils.makeNicePluginName(pluginTag.name);
@@ -272,32 +272,32 @@ PluginContent.prototype = {
              fallbackType: null,
              blocklistState: blocklistState,
            };
   },
 
   /**
    * Update the visibility of the plugin overlay.
    */
-  setVisibility : function (plugin, overlay, shouldShow) {
+  setVisibility : function(plugin, overlay, shouldShow) {
     overlay.classList.toggle("visible", shouldShow);
     if (shouldShow) {
       overlay.removeAttribute("dismissed");
     }
   },
 
   /**
    * Check whether the plugin should be visible on the page. A plugin should
    * not be visible if the overlay is too big, or if any other page content
    * overlays it.
    *
    * This function will handle showing or hiding the overlay.
    * @returns true if the plugin is invisible.
    */
-  shouldShowOverlay : function (plugin, overlay) {
+  shouldShowOverlay : function(plugin, overlay) {
     // If the overlay size is 0, we haven't done layout yet. Presume that
     // plugins are visible until we know otherwise.
     if (overlay.scrollWidth == 0) {
       return true;
     }
 
     // Is the <object>'s size too small to hold what we want to show?
     let pluginRect = plugin.getBoundingClientRect();
@@ -336,17 +336,17 @@ PluginContent.prototype = {
       if (el !== plugin) {
         return false;
       }
     }
 
     return true;
   },
 
-  addLinkClickCallback: function (linkNode, callbackName /* callbackArgs...*/) {
+  addLinkClickCallback: function(linkNode, callbackName /* callbackArgs...*/) {
     // XXX just doing (callback)(arg) was giving a same-origin error. bug?
     let self = this;
     let callbackArgs = Array.prototype.slice.call(arguments).slice(2);
     linkNode.addEventListener("click",
                               function(evt) {
                                 if (!evt.isTrusted)
                                   return;
                                 evt.preventDefault();
@@ -392,17 +392,17 @@ PluginContent.prototype = {
       case Ci.nsIObjectLoadingContent.PLUGIN_VULNERABLE_NO_UPDATE:
         return "PluginVulnerableNoUpdate";
       default:
         // Not all states map to a handler
         return null;
     }
   },
 
-  handleEvent: function (event) {
+  handleEvent: function(event) {
     let eventType = event.type;
 
     if (eventType == "unload") {
       this.uninit();
       return;
     }
 
     if (eventType == "pagehide") {
@@ -572,17 +572,17 @@ PluginContent.prototype = {
       }, true);
     }
 
     if (shouldShowNotification) {
       this._showClickToPlayNotification(plugin, false);
     }
   },
 
-  _recordFlashPluginTelemetry: function (eventType, plugin) {
+  _recordFlashPluginTelemetry: function(eventType, plugin) {
     if (!Services.telemetry.canRecordExtended) {
       return;
     }
 
     if (!this.flashPluginStats) {
       this.flashPluginStats = {
         instancesCount: 0,
         plugins: new WeakSet()
@@ -607,30 +607,30 @@ PluginContent.prototype = {
       if (state === null) {
         state = Ci.nsIObjectLoadingContent.PLUGIN_UNSUPPORTED;
       }
       Services.telemetry.getHistogramById('FLASH_PLUGIN_STATES')
                        .add(state);
     }
   },
 
-  _finishRecordingFlashPluginTelemetry: function () {
+  _finishRecordingFlashPluginTelemetry: function() {
     if (this.flashPluginStats) {
       Services.telemetry.getHistogramById('FLASH_PLUGIN_INSTANCES_ON_PAGE')
                         .add(this.flashPluginStats.instancesCount);
     delete this.flashPluginStats;
     }
   },
 
-  isKnownPlugin: function (objLoadingContent) {
+  isKnownPlugin: function(objLoadingContent) {
     return (objLoadingContent.getContentTypeForMIMEType(objLoadingContent.actualType) ==
             Ci.nsIObjectLoadingContent.TYPE_PLUGIN);
   },
 
-  canActivatePlugin: function (objLoadingContent) {
+  canActivatePlugin: function(objLoadingContent) {
     // if this isn't a known plugin, we can't activate it
     // (this also guards pluginHost.getPermissionStringForType against
     // unexpected input)
     if (!this.isKnownPlugin(objLoadingContent))
       return false;
 
     let pluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
     let permissionString = pluginHost.getPermissionStringForType(objLoadingContent.actualType);
@@ -641,25 +641,25 @@ PluginContent.prototype = {
       objLoadingContent.pluginFallbackType >= Ci.nsIObjectLoadingContent.PLUGIN_CLICK_TO_PLAY &&
       objLoadingContent.pluginFallbackType <= Ci.nsIObjectLoadingContent.PLUGIN_VULNERABLE_NO_UPDATE;
 
     return !objLoadingContent.activated &&
            pluginPermission != Ci.nsIPermissionManager.DENY_ACTION &&
            isFallbackTypeValid;
   },
 
-  hideClickToPlayOverlay: function (plugin) {
+  hideClickToPlayOverlay: function(plugin) {
     let overlay = this.getPluginUI(plugin, "main");
     if (overlay) {
       overlay.classList.remove("visible");
     }
   },
 
   // Forward a link click callback to the chrome process.
-  forwardCallback: function (name, pluginTag) {
+  forwardCallback: function(name, pluginTag) {
     this.global.sendAsyncMessage("PluginContent:LinkClickCallback",
       { name, pluginTag });
   },
 
   submitReport: function submitReport(plugin) {
     if (!AppConstants.MOZ_CRASHREPORTER) {
       return;
     }
@@ -681,22 +681,22 @@ PluginContent.prototype = {
       keyVals.PluginUserComment = userComment;
     if (submitURLOptIn)
       keyVals.PluginContentURL = plugin.ownerDocument.URL;
 
     this.global.sendAsyncMessage("PluginContent:SubmitReport",
                                  { runID, keyVals, submitURLOptIn });
   },
 
-  reloadPage: function () {
+  reloadPage: function() {
     this.global.content.location.reload();
   },
 
   // Event listener for click-to-play plugins.
-  _handleClickToPlayEvent: function (plugin) {
+  _handleClickToPlayEvent: function(plugin) {
     let doc = plugin.ownerDocument;
     let pluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
     let permissionString;
     if (plugin instanceof Ci.nsIDOMHTMLAnchorElement) {
       // We only have replacement content for Flash installs
       permissionString = pluginHost.getPermissionStringForType(FLASH_MIME_TYPE);
     } else {
       let objLoadingContent = plugin.QueryInterface(Ci.nsIObjectLoadingContent);
@@ -719,34 +719,34 @@ PluginContent.prototype = {
       return;
     }
 
     if (overlay) {
       overlay.addEventListener("click", this, true);
     }
   },
 
-  onOverlayClick: function (event) {
+  onOverlayClick: function(event) {
     let document = event.target.ownerDocument;
     let plugin = document.getBindingParent(event.target);
     let contentWindow = plugin.ownerGlobal.top;
     let overlay = this.getPluginUI(plugin, "main");
     // Have to check that the target is not the link to update the plugin
     if (!(event.originalTarget instanceof contentWindow.HTMLAnchorElement) &&
         (event.originalTarget.getAttribute('anonid') != 'closeIcon') &&
         !overlay.hasAttribute('dismissed') &&
         event.button == 0 &&
         event.isTrusted) {
       this._showClickToPlayNotification(plugin, true);
     event.stopPropagation();
     event.preventDefault();
     }
   },
 
-  reshowClickToPlayNotification: function () {
+  reshowClickToPlayNotification: function() {
     let contentWindow = this.global.content;
     let cwu = contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                            .getInterface(Ci.nsIDOMWindowUtils);
     let plugins = cwu.plugins;
     for (let plugin of plugins) {
       let overlay = this.getPluginUI(plugin, "main");
       if (overlay)
         overlay.removeEventListener("click", this, true);
@@ -755,17 +755,17 @@ PluginContent.prototype = {
         this._handleClickToPlayEvent(plugin);
     }
     this._showClickToPlayNotification(null, false);
   },
 
   /**
    * Activate the plugins that the user has specified.
    */
-  activatePlugins: function (pluginInfo, newState) {
+  activatePlugins: function(pluginInfo, newState) {
     let contentWindow = this.global.content;
     let cwu = contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                            .getInterface(Ci.nsIDOMWindowUtils);
     let plugins = cwu.plugins;
     let pluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
 
     let pluginFound = false;
     let placeHolderFound = false;
@@ -801,17 +801,17 @@ PluginContent.prototype = {
     // needs to be refreshed for it to insert its plugins
     if (newState != "block" &&
        (!pluginFound || placeHolderFound || contentWindow.pluginRequiresReload)) {
       this.reloadPage();
     }
     this.updateNotificationUI();
   },
 
-  _showClickToPlayNotification: function (plugin, showNow) {
+  _showClickToPlayNotification: function(plugin, showNow) {
     let plugins = [];
 
     // If plugin is null, that means the user has navigated back to a page with
     // plugins, and we need to collect all the plugins.
     if (plugin === null) {
       let contentWindow = this.content;
       let cwu = contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                              .getInterface(Ci.nsIDOMWindowUtils);
@@ -877,17 +877,17 @@ PluginContent.prototype = {
    * @param document (optional)
    *        Specify the document that is causing the update.
    *        This is useful when the document is possibly no longer
    *        the current loaded document (for example, if we're
    *        responding to a PluginRemoved event for an unloading
    *        document). If this parameter is omitted, it defaults
    *        to the current top-level document.
    */
-  updateNotificationUI: function (document) {
+  updateNotificationUI: function(document) {
     document = document || this.content.document;
 
     // We're only interested in the top-level document, since that's
     // the one that provides the Principal that we send back to the
     // parent.
     let principal = document.defaultView.top.document.nodePrincipal;
     let location = document.location.href;
 
@@ -948,35 +948,35 @@ PluginContent.prototype = {
     // plugins that need a notification bar.
     this.global.sendAsyncMessage("PluginContent:UpdateHiddenPluginUI", {
       haveInsecure: haveInsecure,
       actions: [...actions.values()],
       location: location,
     }, null, principal);
   },
 
-  removeNotification: function (name) {
+  removeNotification: function(name) {
     this.global.sendAsyncMessage("PluginContent:RemoveNotification", { name: name });
   },
 
-  clearPluginCaches: function () {
+  clearPluginCaches: function() {
     this.pluginData.clear();
     this.pluginCrashData.clear();
   },
 
-  hideNotificationBar: function (name) {
+  hideNotificationBar: function(name) {
     this.global.sendAsyncMessage("PluginContent:HideNotificationBar", { name: name });
   },
 
   /**
    * The PluginCrashed event handler. Note that the PluginCrashed event is
    * fired for both NPAPI and Gecko Media plugins. In the latter case, the
    * target of the event is the document that the GMP is being used in.
    */
-  onPluginCrashed: function (target, aEvent) {
+  onPluginCrashed: function(target, aEvent) {
     if (!(aEvent instanceof this.content.PluginCrashedEvent))
       return;
 
     if (aEvent.gmpPlugin) {
       this.GMPCrashed(aEvent);
       return;
     }
 
@@ -998,17 +998,17 @@ PluginContent.prototype = {
 
     this.setCrashedNPAPIPluginState({
       plugin: target,
       state: crashData.state,
       message: crashData.message,
     });
   },
 
-  NPAPIPluginProcessCrashed: function ({pluginName, runID, state}) {
+  NPAPIPluginProcessCrashed: function({pluginName, runID, state}) {
     let message =
       gNavigatorBundle.formatStringFromName("crashedpluginsMessage.title",
                                             [pluginName], 1);
 
     let contentWindow = this.global.content;
     let cwu = contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                            .getInterface(Ci.nsIDOMWindowUtils);
     let plugins = cwu.plugins;
@@ -1039,17 +1039,17 @@ PluginContent.prototype = {
           }
           let crashData = this.pluginCrashData.get(runID);
           crashData.instances.add(plugin);
         }
       }
     }
   },
 
-  setCrashedNPAPIPluginState: function ({plugin, state, message}) {
+  setCrashedNPAPIPluginState: function({plugin, state, message}) {
     // Force a layout flush so the binding is attached.
     plugin.clientTop;
     let overlay = this.getPluginUI(plugin, "main");
     let statusDiv = this.getPluginUI(plugin, "submitStatus");
     let optInCB = this.getPluginUI(plugin, "submitURLOptIn");
 
     this.getPluginUI(plugin, "submitButton")
         .addEventListener("click", (event) => {
--- a/browser/modules/ProcessHangMonitor.jsm
+++ b/browser/modules/ProcessHangMonitor.jsm
@@ -90,17 +90,17 @@ var ProcessHangMonitor = {
   terminatePlugin: function(win) {
     this.handleUserInput(win, report => report.terminatePlugin());
   },
 
   /**
    * Dismiss the browser notification and invoke an appropriate action based on
    * the hang type.
    */
-  stopIt: function (win) {
+  stopIt: function(win) {
     let report = this.findActiveReport(win.gBrowser.selectedBrowser);
     if (!report) {
       return;
     }
 
     switch (report.hangType) {
       case report.SLOW_SCRIPT:
         this.terminateScript(win);
--- a/browser/modules/SelfSupportBackend.jsm
+++ b/browser/modules/SelfSupportBackend.jsm
@@ -48,21 +48,21 @@ const UITOUR_FRAME_SCRIPT = "chrome://br
 
 // Whether the FHR/Telemetry unification features are enabled.
 // Changing this pref requires a restart.
 const IS_UNIFIED_TELEMETRY = Preferences.get(PREF_TELEMETRY_UNIFIED, false);
 
 var gLogAppenderDump = null;
 
 this.SelfSupportBackend = Object.freeze({
-  init: function () {
+  init: function() {
     SelfSupportBackendInternal.init();
   },
 
-  uninit: function () {
+  uninit: function() {
     SelfSupportBackendInternal.uninit();
   },
 });
 
 var SelfSupportBackendInternal = {
   // The browser element that will load the SelfSupport page.
   _browser: null,
   // The Id of the timer triggering delayed SelfSupport page load.
@@ -70,17 +70,17 @@ var SelfSupportBackendInternal = {
   // The HiddenFrame holding the _browser element.
   _frame: null,
   _log: null,
   _progressListener: null,
 
   /**
    * Initializes the self support backend.
    */
-  init: function () {
+  init: function() {
     this._configureLogging();
 
     this._log.trace("init");
 
     Preferences.observe(PREF_BRANCH_LOG, this._configureLogging, this);
 
     // Only allow to use SelfSupport if Unified Telemetry is enabled.
     let reportingEnabled = IS_UNIFIED_TELEMETRY;
@@ -103,17 +103,17 @@ var SelfSupportBackendInternal = {
     }
 
     Services.obs.addObserver(this, "sessionstore-windows-restored", false);
   },
 
   /**
    * Shut down the self support backend, if active.
    */
-  uninit: function () {
+  uninit: function() {
     this._log.trace("uninit");
 
     Preferences.ignore(PREF_BRANCH_LOG, this._configureLogging, this);
 
     // Cancel delayed loading, if still active, when shutting down.
     clearTimeout(this._delayedLoadTimerId);
 
     // Dispose of the hidden browser.
@@ -137,17 +137,17 @@ var SelfSupportBackendInternal = {
       this._frame = null;
     }
   },
 
   /**
    * Handle notifications. Once all windows are created, we wait a little bit more
    * since tabs might still be loading. Then, we open the self support.
    */
-  observe: function (aSubject, aTopic, aData) {
+  observe: function(aSubject, aTopic, aData) {
     this._log.trace("observe - Topic " + aTopic);
 
     if (aTopic === "sessionstore-windows-restored") {
       Services.obs.removeObserver(this, "sessionstore-windows-restored");
       this._delayedLoadTimerId = setTimeout(this._loadSelfSupport.bind(this), STARTUP_DELAY_MS);
     }
   },
 
@@ -307,25 +307,25 @@ ProgressListener.prototype = {
       // when frequently failing.
       this._reloadTimerId = setTimeout(() => {
         this._log.debug("onLocationChange - Reloading SelfSupport URL in the hidden browser.");
         aWebProgress.DOMWindow.location.reload();
       }, RETRY_INTERVAL_MS * this._loadAttempts);
     }
   },
 
-  onStateChange: function (aWebProgress, aRequest, aFlags, aStatus) {
+  onStateChange: function(aWebProgress, aRequest, aFlags, aStatus) {
     if (aFlags & Ci.nsIWebProgressListener.STATE_STOP &&
         aFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK &&
         aFlags & Ci.nsIWebProgressListener.STATE_IS_WINDOW &&
         Components.isSuccessCode(aStatus)) {
       this._loadSuccessCallback();
     }
   },
 
-  destroy: function () {
+  destroy: function() {
     // Make sure we don't try to reload self support when shutting down.
     clearTimeout(this._reloadTimerId);
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener,
                                          Ci.nsISupportsWeakReference]),
 };
--- a/browser/modules/SitePermissions.jsm
+++ b/browser/modules/SitePermissions.jsm
@@ -22,17 +22,17 @@ this.SitePermissions = {
    * - state: a constant representing the current permission state
    *   (e.g. SitePermissions.ALLOW)
    *
    * To receive a more detailed, albeit less performant listing see
    * SitePermissions.getPermissionDetailsByURI().
    *
    * install addon permission is excluded, check bug 1303108
    */
-  getAllByURI: function (aURI) {
+  getAllByURI: function(aURI) {
     let result = [];
     if (!this.isSupportedURI(aURI)) {
       return result;
     }
 
     let permissions = Services.perms.getAllForURI(aURI);
     while (permissions.hasMoreElements()) {
       let permission = permissions.getNext();
@@ -59,126 +59,126 @@ this.SitePermissions = {
    * - label: the localized label
    * - state: a constant representing the aState permission state
    *   (e.g. SitePermissions.ALLOW), or the default if aState is omitted
    * - availableStates: an array of all available states for that permission,
    *   represented as objects with the keys:
    *   - id: the state constant
    *   - label: the translated label of that state
    */
-  getPermissionItem: function (aId, aState) {
+  getPermissionItem: function(aId, aState) {
     let availableStates = this.getAvailableStates(aId).map(state => {
       return { id: state, label: this.getStateLabel(aId, state) };
     });
     if (aState == undefined)
       aState = this.getDefault(aId);
     return {id: aId, label: this.getPermissionLabel(aId),
             state: aState, availableStates};
   },
 
   /* Returns a list of objects representing all permissions that are currently
    * set for the given URI. See getPermissionItem for the content of each object.
    */
-  getPermissionDetailsByURI: function (aURI) {
+  getPermissionDetailsByURI: function(aURI) {
     let permissions = [];
     for (let {state, id} of this.getAllByURI(aURI)) {
       permissions.push(this.getPermissionItem(id, state));
     }
 
     return permissions;
   },
 
   /* Checks whether a UI for managing permissions should be exposed for a given
    * URI. This excludes file URIs, for instance, as they don't have a host,
    * even though nsIPermissionManager can still handle them.
    */
-  isSupportedURI: function (aURI) {
+  isSupportedURI: function(aURI) {
     return aURI.schemeIs("http") || aURI.schemeIs("https");
   },
 
   /* Returns an array of all permission IDs.
    */
-  listPermissions: function () {
+  listPermissions: function() {
     return kPermissionIDs;
   },
 
   /* Returns an array of permission states to be exposed to the user for a
    * permission with the given ID.
    */
-  getAvailableStates: function (aPermissionID) {
+  getAvailableStates: function(aPermissionID) {
     if (aPermissionID in gPermissionObject &&
         gPermissionObject[aPermissionID].states)
       return gPermissionObject[aPermissionID].states;
 
     if (this.getDefault(aPermissionID) == this.UNKNOWN)
       return [ SitePermissions.UNKNOWN, SitePermissions.ALLOW, SitePermissions.BLOCK ];
 
     return [ SitePermissions.ALLOW, SitePermissions.BLOCK ];
   },
 
   /* Returns the default state of a particular permission.
    */
-  getDefault: function (aPermissionID) {
+  getDefault: function(aPermissionID) {
     if (aPermissionID in gPermissionObject &&
         gPermissionObject[aPermissionID].getDefault)
       return gPermissionObject[aPermissionID].getDefault();
 
     return this.UNKNOWN;
   },
 
   /* Returns the state of a particular permission for a given URI.
    */
-  get: function (aURI, aPermissionID) {
+  get: function(aURI, aPermissionID) {
     if (!this.isSupportedURI(aURI))
       return this.UNKNOWN;
 
     let state;
     if (aPermissionID in gPermissionObject &&
         gPermissionObject[aPermissionID].exactHostMatch)
       state = Services.perms.testExactPermission(aURI, aPermissionID);
     else
       state = Services.perms.testPermission(aURI, aPermissionID);
     return state;
   },
 
   /* Sets the state of a particular permission for a given URI.
    */
-  set: function (aURI, aPermissionID, aState) {
+  set: function(aURI, aPermissionID, aState) {
     if (!this.isSupportedURI(aURI))
       return;
 
     if (aState == this.UNKNOWN) {
       this.remove(aURI, aPermissionID);
       return;
     }
 
     Services.perms.add(aURI, aPermissionID, aState);
   },
 
   /* Removes the saved state of a particular permission for a given URI.
    */
-  remove: function (aURI, aPermissionID) {
+  remove: function(aURI, aPermissionID) {
     if (!this.isSupportedURI(aURI))
       return;
 
     Services.perms.remove(aURI, aPermissionID);
   },
 
   /* Returns the localized label for the permission with the given ID, to be
    * used in a UI for managing permissions.
    */
-  getPermissionLabel: function (aPermissionID) {
+  getPermissionLabel: function(aPermissionID) {
     let labelID = gPermissionObject[aPermissionID].labelID || aPermissionID;
     return gStringBundle.GetStringFromName("permission." + labelID + ".label");
   },
 
   /* Returns the localized label for the given permission state, to be used in
    * a UI for managing permissions.
    */
-  getStateLabel: function (aPermissionID, aState, aInUse = false) {
+  getStateLabel: function(aPermissionID, aState, aInUse = false) {
     switch (aState) {
       case this.UNKNOWN:
         if (aInUse)
           return gStringBundle.GetStringFromName("allowTemporarily");
         return gStringBundle.GetStringFromName("alwaysAsk");
       case this.ALLOW:
         return gStringBundle.GetStringFromName("allow");
       case this.SESSION:
@@ -210,25 +210,25 @@ var gPermissionObject = {
    *    e.g. "desktop-notification2" to use permission.desktop-notification2.label
    *
    *  - states
    *    Array of permission states to be exposed to the user.
    *    Defaults to ALLOW, BLOCK and the default state (see getDefault).
    */
 
   "image": {
-    getDefault: function () {
+    getDefault: function() {
       return Services.prefs.getIntPref("permissions.default.image") == 2 ?
                SitePermissions.BLOCK : SitePermissions.ALLOW;
     }
   },
 
   "cookie": {
     states: [ SitePermissions.ALLOW, SitePermissions.SESSION, SitePermissions.BLOCK ],
-    getDefault: function () {
+    getDefault: function() {
       if (Services.prefs.getIntPref("network.cookie.cookieBehavior") == 2)
         return SitePermissions.BLOCK;
 
       if (Services.prefs.getIntPref("network.cookie.lifetimePolicy") == 2)
         return SitePermissions.SESSION;
 
       return SitePermissions.ALLOW;
     }
@@ -241,24 +241,24 @@ var gPermissionObject = {
 
   "camera": {},
   "microphone": {},
   "screen": {
     states: [ SitePermissions.UNKNOWN, SitePermissions.BLOCK ],
   },
 
   "popup": {
-    getDefault: function () {
+    getDefault: function() {
       return Services.prefs.getBoolPref("dom.disable_open_during_load") ?
                SitePermissions.BLOCK : SitePermissions.ALLOW;
     }
   },
 
   "install": {
-    getDefault: function () {
+    getDefault: function() {
       return Services.prefs.getBoolPref("xpinstall.whitelist.required") ?
                SitePermissions.BLOCK : SitePermissions.ALLOW;
     }
   },
 
   "geo": {
     exactHostMatch: true
   },
--- a/browser/modules/Social.jsm
+++ b/browser/modules/Social.jsm
@@ -45,17 +45,17 @@ this.Social = {
       deferred.resolve(true);
       return deferred.promise;
     }
     this.initialized = true;
     // if SocialService.hasEnabledProviders, retreive the providers so the
     // front-end can generate UI
     if (SocialService.hasEnabledProviders) {
       // Retrieve the current set of providers, and set the current provider.
-      SocialService.getOrderedProviderList(function (providers) {
+      SocialService.getOrderedProviderList(function(providers) {
         Social._updateProviderCache(providers);
         Social._updateEnabledState(SocialService.enabled);
         deferred.resolve(false);
       });
     } else {
       deferred.resolve(false);
     }
 
@@ -94,26 +94,26 @@ this.Social = {
 
   _updateEnabledState: function(enable) {
     for (let p of Social.providers) {
       p.enabled = enable;
     }
   },
 
   // Called to update our cache of providers and set the current provider
-  _updateProviderCache: function (providers) {
+  _updateProviderCache: function(providers) {
     this.providers = providers;
     Services.obs.notifyObservers(null, "social:providers-changed", null);
   },
 
   get enabled() {
     return !this._disabledForSafeMode && this.providers.length > 0;
   },
 
-  _getProviderFromOrigin: function (origin) {
+  _getProviderFromOrigin: function(origin) {
     for (let p of this.providers) {
       if (p.origin == origin) {
         return p;
       }
     }
     return null;
   },
 
@@ -125,17 +125,17 @@ this.Social = {
     SocialService.installProvider(data, installCallback, options);
   },
 
   uninstallProvider: function(origin, aCallback) {
     SocialService.uninstallProvider(origin, aCallback);
   },
 
   // Activation functionality
-  activateFromOrigin: function (origin, callback) {
+  activateFromOrigin: function(origin, callback) {
     // It's OK if the provider has already been activated - we still get called
     // back with it.
     SocialService.enableProvider(origin, callback);
   }
 };
 
 function sizeSocialPanelToContent(panel, iframe, requestedSize) {
   let doc = iframe.contentDocument;
@@ -228,17 +228,17 @@ this.OpenGraphBuilder = {
   generateEndpointURL: function(URLTemplate, pageData) {
     // support for existing oexchange style endpoints by supporting their
     // querystring arguments. parse the query string template and do
     // replacements where necessary the query names may be different than ours,
     // so we could see u=%{url} or url=%{url}
     let [endpointURL, queryString] = URLTemplate.split("?");
     let query = {};
     if (queryString) {
-      queryString.split('&').forEach(function (val) {
+      queryString.split('&').forEach(function(val) {
         let [name, value] = val.split('=');
         let p = /%\{(.+)\}/.exec(value);
         if (!p) {
           // preserve non-template query vars
           query[name] = value;
         } else if (pageData[p[1]]) {
           if (p[1] == "previews")
             query[name] = pageData[p[1]][0];
--- a/browser/modules/SocialService.jsm
+++ b/browser/modules/SocialService.jsm
@@ -74,17 +74,17 @@ var SocialServiceInternal = {
                        ", exception: " + err);
       }
     }
     let originUri = Services.io.newURI(origin, null, null);
     return originUri.hostPort.replace('.', '-');
   },
   orderedProviders: function(aCallback) {
     if (SocialServiceInternal.providerArray.length < 2) {
-      schedule(function () {
+      schedule(function() {
         aCallback(SocialServiceInternal.providerArray);
       });
       return;
     }
     // query moz_hosts for frecency.  since some providers may not have a
     // frecency entry, we need to later sort on our own. We use the providers
     // object below as an easy way to later record the frecency on the provider
     // object from the query results.
@@ -127,17 +127,17 @@ var SocialServiceInternal = {
         }
       });
     } finally {
       stmt.finalize();
     }
   }
 };
 
-XPCOMUtils.defineLazyGetter(SocialServiceInternal, "providers", function () {
+XPCOMUtils.defineLazyGetter(SocialServiceInternal, "providers", function() {
   initService();
   let providers = {};
   for (let manifest of this.manifests) {
     try {
       if (ActiveProviders.has(manifest.origin)) {
         // enable the api when a provider is enabled
         let provider = new SocialProvider(manifest);
         providers[provider.origin] = provider;
@@ -172,41 +172,41 @@ var ActiveProviders = {
     try {
       let pref = Services.prefs.getComplexValue("social.activeProviders",
                                                 Ci.nsISupportsString);
       this._providers = JSON.parse(pref);
     } catch (ex) {}
     return this._providers;
   },
 
-  has: function (origin) {
+  has: function(origin) {
     return (origin in this._providers);
   },
 
-  add: function (origin) {
+  add: function(origin) {
     this._providers[origin] = 1;
     this._deferredTask.arm();
   },
 
-  delete: function (origin) {
+  delete: function(origin) {
     delete this._providers[origin];
     this._deferredTask.arm();
   },
 
-  flush: function () {
+  flush: function() {
     this._deferredTask.disarm();
     this._persist();
   },
 
   get _deferredTask() {
     delete this._deferredTask;
     return this._deferredTask = new DeferredTask(this._persist.bind(this), 0);
   },
 
-  _persist: function () {
+  _persist: function() {
     let string = Cc["@mozilla.org/supports-string;1"].
                  createInstance(Ci.nsISupportsString);
     string.data = JSON.stringify(this._providers);
     Services.prefs.setComplexValue("social.activeProviders",
                                    Ci.nsISupportsString, string);
   }
 };
 
@@ -400,17 +400,17 @@ this.SocialService = {
     if (SocialServiceInternal.providers[manifest.origin])
       throw new Error("SocialService.addProvider: provider with this origin already exists");
 
     // enable the api when a provider is enabled
     let provider = new SocialProvider(manifest);
     SocialServiceInternal.providers[provider.origin] = provider;
     ActiveProviders.add(provider.origin);
 
-    this.getOrderedProviderList(function (providers) {
+    this.getOrderedProviderList(function(providers) {
       this._notifyProviderListeners("provider-enabled", provider.origin, providers);
       if (onDone)
         onDone(provider);
     }.bind(this));
   },
 
   // Removes a provider with the given origin, and notifies when the removal is
   // complete.
@@ -433,34 +433,34 @@ this.SocialService = {
 
     if (addon) {
       // we have to do this now so the addon manager ui will update an uninstall
       // correctly.
       addon.pendingOperations -= AddonManager.PENDING_DISABLE;
       AddonManagerPrivate.callAddonListeners("onDisabled", addon);
     }
 
-    this.getOrderedProviderList(function (providers) {
+    this.getOrderedProviderList(function(providers) {
       this._notifyProviderListeners("provider-disabled", origin, providers);
       if (onDone)
         onDone();
     }.bind(this));
   },
 
   // Returns a single provider object with the specified origin.  The provider
   // must be "installed" (ie, in ActiveProviders)
   getProvider: function getProvider(origin, onDone) {
-    schedule((function () {
+    schedule((function() {
       onDone(SocialServiceInternal.providers[origin] || null);
     }).bind(this));
   },
 
   // Returns an unordered array of installed providers
   getProviderList: function(onDone) {
-    schedule(function () {
+    schedule(function() {
       onDone(SocialServiceInternal.providerArray);
     });
   },
 
   getManifestByOrigin: function(origin) {
     for (let manifest of SocialServiceInternal.manifests) {
       if (origin == manifest.origin) {
         return manifest;
@@ -469,29 +469,29 @@ this.SocialService = {
     return null;
   },
 
   // Returns an array of installed providers, sorted by frecency
   getOrderedProviderList: function(onDone) {
     SocialServiceInternal.orderedProviders(onDone);
   },
 
-  getOriginActivationType: function (origin) {
+  getOriginActivationType: function(origin) {
     return getOriginActivationType(origin);
   },
 
   _providerListeners: new Map(),
   registerProviderListener: function registerProviderListener(listener) {
     this._providerListeners.set(listener, 1);
   },
   unregisterProviderListener: function unregisterProviderListener(listener) {
     this._providerListeners.delete(listener);
   },
 
-  _notifyProviderListeners: function (topic, origin, providers) {
+  _notifyProviderListeners: function(topic, origin, providers) {
     for (let [listener, ] of this._providerListeners) {
       try {
         listener(topic, origin, providers);
       } catch (ex) {
         Components.utils.reportError("SocialService: provider listener threw an exception: " + ex);
       }
     }
   },
@@ -591,17 +591,17 @@ this.SocialService = {
     // origin on the manifest.
     data.manifest = manifest;
     let id = getAddonIDFromOrigin(manifest.origin);
     AddonManager.getAddonByID(id, function(aAddon) {
       if (aAddon && aAddon.userDisabled) {
         aAddon.cancelUninstall();
         aAddon.userDisabled = false;
       }
-      schedule(function () {
+      schedule(function() {
         try {
           this._installProvider(data, options, aManifest => {
               this._notifyProviderListeners("provider-installed", aManifest.origin);
               installCallback(aManifest);
           });
         } catch (e) {
           Cu.reportError("Activation failed: " + e);
           installCallback(null);
--- a/browser/modules/TransientPrefs.jsm
+++ b/browser/modules/TransientPrefs.jsm
@@ -10,15 +10,15 @@ Components.utils.import("resource://gre/
 
 var prefVisibility = new Map;
 
 /* Use for preferences that should only be visible when they've been modified.
    When reset to their default state, they remain visible until restarting the
    application. */
 
 this.TransientPrefs = {
-  prefShouldBeVisible: function (prefName) {
+  prefShouldBeVisible: function(prefName) {
     if (Preferences.isSet(prefName))
       prefVisibility.set(prefName, true);
 
     return !!prefVisibility.get(prefName);
   }
 };
--- a/browser/modules/WindowsJumpLists.jsm
+++ b/browser/modules/WindowsJumpLists.jsm
@@ -269,17 +269,17 @@ this.WinTaskbarJumpList =
     if (!this._hasPendingStatements() && !this._builder.commitListBuild()) {
       this._builder.abortListBuild();
     }
   },
 
   _buildTasks: function WTBJL__buildTasks() {
     var items = Cc["@mozilla.org/array;1"].
                 createInstance(Ci.nsIMutableArray);
-    this._tasks.forEach(function (task) {
+    this._tasks.forEach(function(task) {
       if ((this._shuttingDown && !task.close) || (!this._shuttingDown && !task.open))
         return;
       var item = this._getHandlerAppItem(task.title, task.description,
                                          task.args, task.iconIndex, null);
       items.appendElement(item, false);
     }, this);
 
     if (items.length > 0)
@@ -306,17 +306,17 @@ this.WinTaskbarJumpList =
                 createInstance(Ci.nsIMutableArray);
     // track frequent items so that we don't add them to
     // the recent list.
     this._frequentHashList = [];
 
     this._pendingStatements[LIST_TYPE.FREQUENT] = this._getHistoryResults(
       Ci.nsINavHistoryQueryOptions.SORT_BY_VISITCOUNT_DESCENDING,
       this._maxItemCount,
-      function (aResult) {
+      function(aResult) {
         if (!aResult) {
           delete this._pendingStatements[LIST_TYPE.FREQUENT];
           // The are no more results, build the list.
           this._buildCustom(_getString("taskbar.frequent.label"), items);
           this._commitBuild();
           return;
         }
 
@@ -341,17 +341,17 @@ this.WinTaskbarJumpList =
                 createInstance(Ci.nsIMutableArray);
     // Frequent items will be skipped, so we select a double amount of
     // entries and stop fetching results at _maxItemCount.
     var count = 0;
 
     this._pendingStatements[LIST_TYPE.RECENT] = this._getHistoryResults(
       Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_DESCENDING,
       this._maxItemCount * 2,
-      function (aResult) {
+      function(aResult) {
         if (!aResult) {
           // The are no more results, build the list.
           this._buildCustom(_getString("taskbar.recent.label"), items);
           delete this._pendingStatements[LIST_TYPE.RECENT];
           this._commitBuild();
           return;
         }
 
@@ -421,31 +421,31 @@ this.WinTaskbarJumpList =
     var options = PlacesUtils.history.getNewQueryOptions();
     options.maxResults = aLimit;
     options.sortingMode = aSortingMode;
     var query = PlacesUtils.history.getNewQuery();
 
     // Return the pending statement to the caller, to allow cancelation.
     return PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase)
                               .asyncExecuteLegacyQueries([query], 1, options, {
-      handleResult: function (aResultSet) {
+      handleResult: function(aResultSet) {
         for (let row; (row = aResultSet.getNextRow());) {
           try {
             aCallback.call(aScope,
                            { uri: row.getResultByIndex(1)
                            , title: row.getResultByIndex(2)
                            });
           } catch (e) {}
         }
       },
-      handleError: function (aError) {
+      handleError: function(aError) {
         Components.utils.reportError(
           "Async execution error (" + aError.result + "): " + aError.message);
       },
-      handleCompletion: function (aReason) {
+      handleCompletion: function(aReason) {
         aCallback.call(WinTaskbarJumpList, null);
       },
     });
   },
 
   _clearHistory: function WTBJL__clearHistory(items) {
     if (!items)
       return;
--- a/browser/modules/WindowsPreviewPerTab.jsm
+++ b/browser/modules/WindowsPreviewPerTab.jsm
@@ -142,50 +142,50 @@ function snapRectAtScale(r, scale) {
 function PreviewController(win, tab) {
   this.win = win;
   this.tab = tab;
   this.linkedBrowser = tab.linkedBrowser;
   this.preview = this.win.createTabPreview(this);
 
   this.tab.addEventListener("TabAttrModified", this, false);
 
-  XPCOMUtils.defineLazyGetter(this, "canvasPreview", function () {
+  XPCOMUtils.defineLazyGetter(this, "canvasPreview", function() {
     let canvas = PageThumbs.createCanvas();
     canvas.mozOpaque = true;
     return canvas;
   });
 }
 
 PreviewController.prototype = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsITaskbarPreviewController,
                                          Ci.nsIDOMEventListener]),
 
-  destroy: function () {
+  destroy: function() {
     this.tab.removeEventListener("TabAttrModified", this, false);
 
     // Break cycles, otherwise we end up leaking the window with everything
     // attached to it.
     delete this.win;
     delete this.preview;
   },
 
   get wrappedJSObject() {
     return this;
   },
 
   // Resizes the canvasPreview to 0x0, essentially freeing its memory.
-  resetCanvasPreview: function () {
+  resetCanvasPreview: function() {
     this.canvasPreview.width = 0;
     this.canvasPreview.height = 0;
   },
 
   /**
    * Set the canvas dimensions.
    */
-  resizeCanvasPreview: function (aRequestedWidth, aRequestedHeight) {
+  resizeCanvasPreview: function(aRequestedWidth, aRequestedHeight) {
     this.canvasPreview.width = aRequestedWidth;
     this.canvasPreview.height = aRequestedHeight;
   },
 
 
   get zoom() {
     // Note that winutils.fullZoom accounts for "quantization" of the zoom factor
     // from nsIContentViewer due to conversion through appUnits.
@@ -199,44 +199,44 @@ PreviewController.prototype = {
     let windowUtils = chromeWin.getInterface(Ci.nsIDOMWindowUtils);
     return windowUtils.screenPixelsPerCSSPixel;
   },
 
   get browserDims() {
     return this.tab.linkedBrowser.getBoundingClientRect();
   },
 
-  cacheBrowserDims: function () {
+  cacheBrowserDims: function() {
     let dims = this.browserDims;
     this._cachedWidth = dims.width;
     this._cachedHeight = dims.height;
   },
 
-  testCacheBrowserDims: function () {
+  testCacheBrowserDims: function() {
     let dims = this.browserDims;
     return this._cachedWidth == dims.width &&
       this._cachedHeight == dims.height;
   },
 
   /**
    * Capture a new thumbnail image for this preview. Called by the controller
    * in response to a request for a new thumbnail image.
    */
-  updateCanvasPreview: function (aFullScale, aCallback) {
+  updateCanvasPreview: function(aFullScale, aCallback) {
     // Update our cached browser dims so that delayed resize
     // events don't trigger another invalidation if this tab becomes active.
     this.cacheBrowserDims();
     PageThumbs.captureToCanvas(this.linkedBrowser, this.canvasPreview,
                                aCallback, { fullScale: aFullScale });
     // If we're updating the canvas, then we're in the middle of a peek so
     // don't discard the cache of previews.
     AeroPeek.resetCacheTimer();
   },
 
-  updateTitleAndTooltip: function () {
+  updateTitleAndTooltip: function() {
     let title = this.win.tabbrowser.getWindowTitleForBrowser(this.linkedBrowser);
     this.preview.title = title;
     this.preview.tooltip = title;
   },
 
   // nsITaskbarPreviewController
 
   // window width and height, not browser
@@ -259,17 +259,17 @@ PreviewController.prototype = {
   },
 
   /**
    * Responds to taskbar requests for window previews. Returns the results asynchronously
    * through updateCanvasPreview.
    *
    * @param aTaskbarCallback nsITaskbarPreviewCallback results callback
    */
-  requestPreview: function (aTaskbarCallback) {
+  requestPreview: function(aTaskbarCallback) {
     // Grab a high res content preview
     this.resetCanvasPreview();
     this.updateCanvasPreview(true, (aPreviewCanvas) => {
       let winWidth = this.win.width;
       let winHeight = this.win.height;
 
       let composite = PageThumbs.createCanvas();
 
@@ -290,66 +290,66 @@ PreviewController.prototype = {
       ctx.drawWindow(this.win.win, 0, 0, winWidth, winHeight, "rgba(0,0,0,0)");
 
       // Draw the content are into the composite canvas at the right location.
       ctx.drawImage(aPreviewCanvas, this.browserDims.x, this.browserDims.y,
                     aPreviewCanvas.width, aPreviewCanvas.height);
       ctx.restore();
 
       // Deliver the resulting composite canvas to Windows
-      this.win.tabbrowser.previewTab(this.tab, function () {
+      this.win.tabbrowser.previewTab(this.tab, function() {
         aTaskbarCallback.done(composite, false);
       });
     });
   },
 
   /**
    * Responds to taskbar requests for tab thumbnails. Returns the results asynchronously
    * through updateCanvasPreview.
    *
    * Note Windows requests a specific width and height here, if the resulting thumbnail
    * does not match these dimensions thumbnail display will fail.
    *
    * @param aTaskbarCallback nsITaskbarPreviewCallback results callback
    * @param aRequestedWidth width of the requested thumbnail
    * @param aRequestedHeight height of the requested thumbnail
    */
-  requestThumbnail: function (aTaskbarCallback, aRequestedWidth, aRequestedHeight) {
+  requestThumbnail: function(aTaskbarCallback, aRequestedWidth, aRequestedHeight) {
     this.resizeCanvasPreview(aRequestedWidth, aRequestedHeight);
     this.updateCanvasPreview(false, (aThumbnailCanvas) => {
       aTaskbarCallback.done(aThumbnailCanvas, false);
     });
   },
 
   // Event handling
 
-  onClose: function () {
+  onClose: function() {
     this.win.tabbrowser.removeTab(this.tab);
   },
 
-  onActivate: function () {
+  onActivate: function() {
     this.win.tabbrowser.selectedTab = this.tab;
 
     // Accept activation - this will restore the browser window
     // if it's minimized
     return true;
   },
 
   // nsIDOMEventListener
-  handleEvent: function (evt) {
+  handleEvent: function(evt) {
     switch (evt.type) {
       case "TabAttrModified":
         this.updateTitleAndTooltip();
         break;
     }
   }
 };
 
 XPCOMUtils.defineLazyGetter(PreviewController.prototype, "canvasPreviewFlags",
-  function () { let canvasInterface = Ci.nsIDOMCanvasRenderingContext2D;
+  function() { let canvasInterface = Ci.nsIDOMCanvasRenderingContext2D;
                 return canvasInterface.DRAWWINDOW_DRAW_VIEW
                      | canvasInterface.DRAWWINDOW_DRAW_CARET
                      | canvasInterface.DRAWWINDOW_ASYNC_DECODE_IMAGES
                      | canvasInterface.DRAWWINDOW_DO_NOT_FLUSH;
 });
 
 // TabWindow
 
@@ -384,17 +384,17 @@ function TabWindow(win) {
 
 TabWindow.prototype = {
   _enabled: false,
   _cachedWidth: 0,
   _cachedHeight: 0,
   tabEvents: ["TabOpen", "TabClose", "TabSelect", "TabMove"],
   winEvents: ["resize"],
 
-  destroy: function () {
+  destroy: function() {
     this._destroying = true;
 
     let tabs = this.tabbrowser.tabs;
 
     this.tabbrowser.removeTabsProgressListener(this);
 
     for (let i = 0; i < this.winEvents.length; i++)
       this.win.removeEventListener(this.winEvents[i], this, false);
@@ -405,89 +405,89 @@ TabWindow.prototype = {
     for (let i = 0; i < tabs.length; i++)
       this.removeTab(tabs[i]);
 
     let idx = AeroPeek.windows.indexOf(this.win.gTaskbarTabGroup);
     AeroPeek.windows.splice(idx, 1);
     AeroPeek.checkPreviewCount();
   },
 
-  get width () {
+  get width() {
     return this.win.innerWidth;
   },
-  get height () {
+  get height() {
     return this.win.innerHeight;
   },
 
-  cacheDims: function () {
+  cacheDims: function() {
     this._cachedWidth = this.width;
     this._cachedHeight = this.height;
   },
 
-  testCacheDims: function () {
+  testCacheDims: function() {
     return this._cachedWidth == this.width && this._cachedHeight == this.height;
   },
 
   // Invoked when the given tab is added to this window
-  newTab: function (tab) {
+  newTab: function(tab) {
     let controller = new PreviewController(this, tab);
     // It's OK to add the preview now while the favicon still loads.
     this.previews.set(tab, controller.preview);
     AeroPeek.addPreview(controller.preview);
     // updateTitleAndTooltip relies on having controller.preview which is lazily resolved.
     // Now that we've updated this.previews, it will resolve successfully.
     controller.updateTitleAndTooltip();
   },
 
-  createTabPreview: function (controller) {
+  createTabPreview: function(controller) {
     let docShell = this.win
                   .QueryInterface(Ci.nsIInterfaceRequestor)
                   .getInterface(Ci.nsIWebNavigation)
                   .QueryInterface(Ci.nsIDocShell);
     let preview = AeroPeek.taskbar.createTaskbarTabPreview(docShell, controller);
     preview.visible = AeroPeek.enabled;
     preview.active = this.tabbrowser.selectedTab == controller.tab;
     this.onLinkIconAvailable(controller.tab.linkedBrowser,
                              controller.tab.getAttribute("image"));
     return preview;
   },
 
   // Invoked when the given tab is closed
-  removeTab: function (tab) {
+  removeTab: function(tab) {
     let preview = this.previewFromTab(tab);
     preview.active = false;
     preview.visible = false;
     preview.move(null);
     preview.controller.wrappedJSObject.destroy();
 
     this.previews.delete(tab);
     AeroPeek.removePreview(preview);
   },
 
-  get enabled () {
+  get enabled() {
     return this._enabled;
   },
 
-  set enabled (enable) {
+  set enabled(enable) {
     this._enabled = enable;
     // Because making a tab visible requires that the tab it is next to be
     // visible, it is far simpler to unset the 'next' tab and recreate them all
     // at once.
     for (let [, preview] of this.previews) {
       preview.move(null);
       preview.visible = enable;
     }
     this.updateTabOrdering();
   },
 
-  previewFromTab: function (tab) {
+  previewFromTab: function(tab) {
     return this.previews.get(tab);
   },
 
-  updateTabOrdering: function () {
+  updateTabOrdering: function() {
     let previews = this.previews;
     let tabs = this.tabbrowser.tabs;
 
     // Previews are internally stored using a map, so we need to iterate the
     // tabbrowser's array of tabs to retrieve previews in the same order.
     let inorder = [];
     for (let t of tabs) {
       if (previews.has(t)) {
@@ -500,17 +500,17 @@ TabWindow.prototype = {
     // the local array backwards, otherwise we would send move requests in the
     // wrong order.  See bug 522610 for details.
     for (let i = inorder.length - 1; i >= 0; i--) {
       inorder[i].move(inorder[i + 1] || null);
     }
   },
 
   // nsIDOMEventListener
-  handleEvent: function (evt) {
+  handleEvent: function(evt) {
     let tab = evt.originalTarget;
     switch (evt.type) {
       case "TabOpen":
         this.newTab(tab);
         this.updateTabOrdering();
         break;
       case "TabClose":
         this.removeTab(tab);
@@ -526,37 +526,37 @@ TabWindow.prototype = {
         if (!AeroPeek._prefenabled)
           return;
         this.onResize();
         break;
     }
   },
 
   // Set or reset a timer that will invalidate visible thumbnails soon.
-  setInvalidationTimer: function () {
+  setInvalidationTimer: function() {
     if (!this.invalidateTimer) {
       this.invalidateTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
     }
     this.invalidateTimer.cancel();
 
     // delay 1 second before invalidating
     this.invalidateTimer.initWithCallback(() => {
       // invalidate every preview. note the internal implementation of
       // invalidate ignores thumbnails that aren't visible.
-      this.previews.forEach(function (aPreview) {
+      this.previews.forEach(function(aPreview) {
         let controller = aPreview.controller.wrappedJSObject;
         if (!controller.testCacheBrowserDims()) {
           controller.cacheBrowserDims();
           aPreview.invalidate();
         }
       });
     }, 1000, Ci.nsITimer.TYPE_ONE_SHOT);
   },
 
-  onResize: function () {
+  onResize: function() {
     // Specific to a window.
 
     // Call invalidate on each tab thumbnail so that Windows will request an
     // updated image. However don't do this repeatedly across multiple resize
     // events triggered during window border drags.
 
     if (this.testCacheDims()) {
       return;
@@ -575,33 +575,33 @@ TabWindow.prototype = {
         preview.invalidate();
         break;
       }
     }
   },
 
   // Browser progress listener
 
-  onLocationChange: function (aBrowser) {
+  onLocationChange: function(aBrowser) {
     // I'm not sure we need this, onStateChange does a really good job
     // of picking up page changes.
     // this.invalidateTabPreview(aBrowser);
   },
 
-  onStateChange: function (aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
+  onStateChange: function(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) {
     if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP &&
         aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK) {
       this.invalidateTabPreview(aBrowser);
     }
   },
 
   directRequestProtocols: new Set([
     "file", "chrome", "resource", "about"
   ]),
-  onLinkIconAvailable: function (aBrowser, aIconURL) {
+  onLinkIconAvailable: function(aBrowser, aIconURL) {
     let requestURL = null;
     if (aIconURL) {
       let shouldRequestFaviconURL = true;
       try {
         let urlObject = NetUtil.newURI(aIconURL);
         shouldRequestFaviconURL =
           !this.directRequestProtocols.has(urlObject.scheme);
       } catch (ex) {}
@@ -657,17 +657,17 @@ this.AeroPeek = {
   taskbar: null,
 
   // Maximum number of previews
   maxpreviews: 20,
 
   // Length of time in seconds that previews are cached
   cacheLifespan: 20,
 
-  initialize: function () {
+  initialize: function() {
     if (!(WINTASKBAR_CONTRACTID in Cc))
       return;
     this.taskbar = Cc[WINTASKBAR_CONTRACTID].getService(Ci.nsIWinTaskbar);
     this.available = this.taskbar.available;
     if (!this.available)
       return;
 
     this.prefs.addObserver(TOGGLE_PREF_NAME, this, true);
@@ -687,17 +687,17 @@ this.AeroPeek = {
   },
 
   set enabled(enable) {
     if (this._enabled == enable)
       return;
 
     this._enabled = enable;
 
-    this.windows.forEach(function (win) {
+    this.windows.forEach(function(win) {
       win.enabled = enable;
     });
   },
 
   get _prefenabled() {
     return this.__prefenabled;
   },
 
@@ -747,61 +747,61 @@ this.AeroPeek = {
       // We can't call onCloseWindow here because it'll bail if we're not
       // enabled.
       let tabWinObject = this.windows[0];
       tabWinObject.destroy(); // This will remove us from the array.
       delete tabWinObject.win.gTaskbarTabGroup; // Tidy up the window.
     }
   },
 
-  addPreview: function (preview) {
+  addPreview: function(preview) {
     this.previews.push(preview);
     this.checkPreviewCount();
   },
 
-  removePreview: function (preview) {
+  removePreview: function(preview) {
     let idx = this.previews.indexOf(preview);
     this.previews.splice(idx, 1);
     this.checkPreviewCount();
   },
 
-  checkPreviewCount: function () {
+  checkPreviewCount: function() {
     if (!this._prefenabled) {
       return;
     }
     this.enabled = this.previews.length <= this.maxpreviews;
   },
 
-  onOpenWindow: function (win) {
+  onOpenWindow: function(win) {
     // This occurs when the taskbar service is not available (xp, vista)
     if (!this.available || !this._prefenabled)
       return;
 
     win.gTaskbarTabGroup = new TabWindow(win);
   },
 
-  onCloseWindow: function (win) {
+  onCloseWindow: function(win) {
     // This occurs when the taskbar service is not available (xp, vista)
     if (!this.available || !this._prefenabled)
       return;
 
     win.gTaskbarTabGroup.destroy();
     delete win.gTaskbarTabGroup;
 
     if (this.windows.length == 0)
       this.destroy();
   },
 
-  resetCacheTimer: function () {
+  resetCacheTimer: function() {
     this.cacheTimer.cancel();
     this.cacheTimer.init(this, 1000 * this.cacheLifespan, Ci.nsITimer.TYPE_ONE_SHOT);
   },
 
   // nsIObserver
-  observe: function (aSubject, aTopic, aData) {
+  observe: function(aSubject, aTopic, aData) {
     if (aTopic == "nsPref:changed" && aData == TOGGLE_PREF_NAME) {
       this._prefenabled = this.prefs.getBoolPref(TOGGLE_PREF_NAME);
     }
     if (!this._prefenabled) {
       return;
     }
     switch (aTopic) {
       case "nsPref:changed":
@@ -809,17 +809,17 @@ this.AeroPeek = {
           break;
 
         if (aData == DISABLE_THRESHOLD_PREF_NAME)
           this.maxpreviews = this.prefs.getIntPref(DISABLE_THRESHOLD_PREF_NAME);
         // Might need to enable/disable ourselves
         this.checkPreviewCount();
         break;
       case "timer-callback":
-        this.previews.forEach(function (preview) {
+        this.previews.forEach(function(preview) {
           let controller = preview.controller.wrappedJSObject;
           controller.resetCanvasPreview();
         });
         break;
     }
   },
 
   /* nsINavHistoryObserver implementation */
--- a/browser/modules/test/browser_ContentSearch.js
+++ b/browser/modules/test/browser_ContentSearch.js
@@ -316,21 +316,21 @@ function waitForNewEngine(basename, numI
     expectedSearchEvents.push("CurrentState");
   }
   let eventPromises = expectedSearchEvents.map(e => waitForTestMsg(e));
 
   // Wait for addEngine().
   let addDeferred = Promise.defer();
   let url = getRootDirectory(gTestPath) + basename;
   Services.search.addEngine(url, null, "", false, {
-    onSuccess: function (engine) {
+    onSuccess: function(engine) {
       info("Search engine added: " + basename);
       addDeferred.resolve(engine);
     },
-    onError: function (errCode) {
+    onError: function(errCode) {
       ok(false, "addEngine failed with error code " + errCode);
       addDeferred.reject();
     },
   });
 
   return Promise.all([addDeferred.promise].concat(eventPromises));
 }
 
--- a/browser/modules/test/browser_ProcessHangNotifications.js
+++ b/browser/modules/test/browser_ProcessHangNotifications.js
@@ -14,17 +14,17 @@ function promiseNotificationShown(aWindo
       resolve(notification);
     });
   });
 }
 
 function promiseReportCallMade(aValue) {
   return new Promise((resolve) => {
     let old = gTestHangReport.testCallback;
-    gTestHangReport.testCallback = function (val) {
+    gTestHangReport.testCallback = function(val) {
       gTestHangReport.testCallback = old;
       is(aValue, val, "was the correct method call made on the hang report object?");
       resolve();
     };
   });
 }
 
 function pushPrefs(...aPrefs) {
@@ -45,46 +45,46 @@ let gTestHangReport = {
   SLOW_SCRIPT: 1,
   PLUGIN_HANG: 2,
 
   TEST_CALLBACK_CANCELED: 1,
   TEST_CALLBACK_TERMSCRIPT: 2,
   TEST_CALLBACK_TERMPLUGIN: 3,
 
   _hangType: 1,
-  _tcb: function (aCallbackType) {},
+  _tcb: function(aCallbackType) {},
 
   get hangType() {
     return this._hangType;
   },
 
   set hangType(aValue) {
     this._hangType = aValue;
   },
 
   set testCallback(aValue) {
     this._tcb = aValue;
   },
 
-  QueryInterface: function (aIID) {
+  QueryInterface: function(aIID) {
     if (aIID.equals(Components.interfaces.nsIHangReport) ||
         aIID.equals(Components.interfaces.nsISupports))
       return this;
     throw Components.results.NS_NOINTERFACE;
   },
 
-  userCanceled: function () {
+  userCanceled: function() {
     this._tcb(this.TEST_CALLBACK_CANCELED);
   },
 
-  terminateScript: function () {
+  terminateScript: function() {
     this._tcb(this.TEST_CALLBACK_TERMSCRIPT);
   },
 
-  terminatePlugin: function () {
+  terminatePlugin: function() {
     this._tcb(this.TEST_CALLBACK_TERMPLUGIN);
   },
 
   isReportForBrowser: function(aFrameLoader) {
     return true;
   }
 };
 
--- a/browser/modules/test/browser_taskbar_preview.js
+++ b/browser/modules/test/browser_taskbar_preview.js
@@ -37,17 +37,17 @@ function test() {
   gPrefService.setBoolPref(ENABLE_PREF_NAME, false);
   is(0, AeroPeek.previews.length, "Should have 0 previews when disabled");
 
   gPrefService.setBoolPref(ENABLE_PREF_NAME, true);
   checkPreviews(4, "Previews are back when re-enabling");
   for (let preview of AeroPeek.previews)
     ok(preview.visible, "Preview is shown as expected after re-enabling");
 
-  [1, 2, 3, 4].forEach(function (idx) {
+  [1, 2, 3, 4].forEach(function(idx) {
     gBrowser.selectedTab = gBrowser.tabs[idx];
     ok(checkSelectedTab(), "Current tab is correctly selected");
   });
 
   // Close #4
   getPreviewForTab(gBrowser.selectedTab).controller.onClose();
   checkPreviews(3, "Expected number of previews after closing selected tab via controller");
   ok(gBrowser.tabs.length == 3, "Successfully closed a tab");
--- a/browser/modules/test/contentSearch.js
+++ b/browser/modules/test/contentSearch.js
@@ -36,17 +36,17 @@ addMessageListener(TEST_MSG, msg => {
   }
 });
 
 function waitForLoadAndStopIt(expectedURL, callback) {
   let Ci = Components.interfaces;
   let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
                             .getInterface(Ci.nsIWebProgress);
   let listener = {
-    onStateChange: function (webProg, req, flags, status) {
+    onStateChange: function(webProg, req, flags, status) {
       if (req instanceof Ci.nsIChannel) {
         let url = req.originalURI.spec;
         dump("waitForLoadAndStopIt: onStateChange " + url + "\n");
         let docStart = Ci.nsIWebProgressListener.STATE_IS_DOCUMENT |
                        Ci.nsIWebProgressListener.STATE_START;
         if ((flags & docStart) && webProg.isTopLevel && url == expectedURL) {
           webProgress.removeProgressListener(listener);
           req.cancel(Components.results.NS_ERROR_FAILURE);
--- a/browser/modules/test/unit/social/head.js
+++ b/browser/modules/test/unit/social/head.js
@@ -83,31 +83,31 @@ function do_add_providers(cb) {
   });
 }
 
 function do_initialize_social(enabledOnStartup, cb) {
   initApp();
 
   if (enabledOnStartup) {
     // set prefs before initializing social
-    manifests.forEach(function (manifest) {
+    manifests.forEach(function(manifest) {
       setManifestPref(manifest);
     });
     // Set both providers active and flag the first one as "current"
     let activeVal = Cc["@mozilla.org/supports-string;1"].
                createInstance(Ci.nsISupportsString);
     let active = {};
     for (let m of manifests)
       active[m.origin] = 1;
     activeVal.data = JSON.stringify(active);
     Services.prefs.setComplexValue("social.activeProviders",
                                    Ci.nsISupportsString, activeVal);
 
     do_register_cleanup(function() {
-      manifests.forEach(function (manifest) {
+      manifests.forEach(function(manifest) {
         Services.prefs.clearUserPref("social.manifest." + manifest.origin);
       });
       Services.prefs.clearUserPref("social.activeProviders");
     });
 
     // expecting 2 providers installed
     do_wait_observer("social:providers-changed", function() {
       do_check_eq(Social.providers.length, 2, "2 providers installed");
@@ -127,28 +127,28 @@ function do_initialize_social(enabledOnS
 }
 
 function AsyncRunner() {
   do_test_pending();
   do_register_cleanup(() => this.destroy());
 
   this._callbacks = {
     done: do_test_finished,
-    error: function (err) {
+    error: function(err) {
       // xpcshell test functions like do_check_eq throw NS_ERROR_ABORT on
       // failure.  Ignore those so they aren't rethrown here.
       if (err !== Cr.NS_ERROR_ABORT) {
         if (err.stack) {
           err = err + " - See following stack:\n" + err.stack +
                       "\nUseless do_throw stack";
         }
         do_throw(err);
       }
     },
-    consoleError: function (scriptErr) {
+    consoleError: function(scriptErr) {
       // Try to ensure the error is related to the test.
       let filename = scriptErr.sourceName || scriptErr.toString() || "";
       if (filename.indexOf("/toolkit/components/social/") >= 0)
         do_throw(scriptErr);
     },
   };
   this._iteratorQueue = [];
 
--- a/browser/modules/test/unit/social/test_socialDisabledStartup.js
+++ b/browser/modules/test/unit/social/test_socialDisabledStartup.js
@@ -13,17 +13,17 @@ function run_test() {
 function testStartupDisabled() {
   // wait on startup before continuing
   do_check_false(Social.enabled, "Social is disabled");
   do_check_eq(Social.providers.length, 0, "zero social providers available");
   run_next_test();
 }
 
 function testEnableAfterStartup() {
-  do_add_providers(function () {
+  do_add_providers(function() {
     do_check_true(Social.enabled, "Social is enabled");
     do_check_eq(Social.providers.length, 2, "two social providers available");
     do_check_true(Social.providers[0].enabled, "provider 0 is enabled");
     do_check_true(Social.providers[1].enabled, "provider 1 is enabled");
     do_test_finished();
     run_next_test();
   });
 }
--- a/browser/modules/test/xpcshell/test_DirectoryLinksProvider.js
+++ b/browser/modules/test/xpcshell/test_DirectoryLinksProvider.js
@@ -242,17 +242,17 @@ function run_test() {
   });
 }
 
 
 function setTimeout(fun, timeout) {
   let timer = Components.classes["@mozilla.org/timer;1"]
                         .createInstance(Components.interfaces.nsITimer);
   var event = {
-    notify: function (timer) {
+    notify: function(timer) {
       fun();
     }
   };
   timer.initWithCallback(event, timeout,
                          Components.interfaces.nsITimer.TYPE_ONE_SHOT);
   return timer;
 }
 
@@ -1433,17 +1433,17 @@ add_task(function* test_DirectoryLinksPr
   // exhaust daily views
   DirectoryLinksProvider._addFrequencyCapView("1")
   do_check_true(DirectoryLinksProvider._testFrequencyCapLimits("1"));
   DirectoryLinksProvider._addFrequencyCapView("1")
   do_check_false(DirectoryLinksProvider._testFrequencyCapLimits("1"));
 
   // now step into the furture
   let _wasTodayOrig = DirectoryLinksProvider._wasToday;
-  DirectoryLinksProvider._wasToday = function () { return false; }
+  DirectoryLinksProvider._wasToday = function() { return false; }
   // exhaust total views
   DirectoryLinksProvider._addFrequencyCapView("1")
   do_check_true(DirectoryLinksProvider._testFrequencyCapLimits("1"));
   DirectoryLinksProvider._addFrequencyCapView("1")
   // reached totalViews 4, should return false
   do_check_false(DirectoryLinksProvider._testFrequencyCapLimits("1"));
 
   // add more views by updating configuration
@@ -1526,19 +1526,19 @@ add_task(function* test_DirectoryLinksPr
         uri: NetUtil.newURI(landingUrl),
         title: "HELLO",
         visits: [{
           visitDate: Date.now() * 1000,
           transitionType: Ci.nsINavHistoryService.TRANSITION_LINK
         }]
       },
       {
-        handleError: function () { do_check_true(false); },
-        handleResult: function () {},
-        handleCompletion: function () { resolve(); }
+        handleError: function() { do_check_true(false); },
+        handleResult: function() {},
+        handleCompletion: function() { resolve(); }
       }
     );
   });
 
   function UrlDeletionTester() {
     this.promise = new Promise(resolve => {
       this.onDeleteURI = (directoryLinksProvider, link) => {
         resolve();
--- a/browser/modules/webrtcUI.jsm
+++ b/browser/modules/webrtcUI.jsm
@@ -14,17 +14,17 @@ Cu.import("resource://gre/modules/Servic
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
                                   "resource://gre/modules/AppConstants.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "PluralForm",
                                   "resource://gre/modules/PluralForm.jsm");
 
 this.webrtcUI = {
-  init: function () {
+  init: function() {
     Services.obs.addObserver(maybeAddMenuIndicator, "browser-delayed-startup-finished", false);
 
     let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
                  .getService(Ci.nsIMessageBroadcaster);
     ppmm.addMessageListener("webrtc:UpdatingIndicators", this);
     ppmm.addMessageListener("webrtc:UpdateGlobalIndicators", this);
     ppmm.addMessageListener("child-process-shutdown", this);
 
@@ -32,17 +32,17 @@ this.webrtcUI = {
                .getService(Ci.nsIMessageListenerManager);
     mm.addMessageListener("rtcpeer:Request", this);
     mm.addMessageListener("rtcpeer:CancelRequest", this);
     mm.addMessageListener("webrtc:Request", this);
     mm.addMessageListener("webrtc:CancelRequest", this);
     mm.addMessageListener("webrtc:UpdateBrowserIndicators", this);
   },
 
-  uninit: function () {
+  uninit: function() {
     Services.obs.removeObserver(maybeAddMenuIndicator, "browser-delayed-startup-finished");
 
     let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
                  .getService(Ci.nsIMessageBroadcaster);
     ppmm.removeMessageListener("webrtc:UpdatingIndicators", this);
     ppmm.removeMessageListener("webrtc:UpdateGlobalIndicators", this);
 
     let mm = Cc["@mozilla.org/globalmessagemanager;1"]
@@ -315,27 +315,27 @@ function prompt(aBrowser, aRequest) {
     // reject the action.
     callback: function() {}
   };
 
   let secondaryActions = [
     {
       label: stringBundle.getString("getUserMedia.denyRequest.label"),
       accessKey: stringBundle.getString("getUserMedia.denyRequest.accesskey"),
-      callback: function () {
+      callback: function() {
         denyRequest(notification.browser, aRequest);
       }
     }
   ];
   // Bug 1037438: implement 'never' for screen sharing.
   if (!sharingScreen && !sharingAudio) {
     secondaryActions.push({
       label: stringBundle.getString("getUserMedia.never.label"),
       accessKey: stringBundle.getString("getUserMedia.never.accesskey"),
-      callback: function () {
+      callback: function() {
         denyRequest(notification.browser, aRequest);
         // Let someone save "Never" for http sites so that they can be stopped from
         // bothering you with doorhangers.
         let perms = Services.perms;
         if (audioDevices.length)
           perms.add(uri, "microphone", perms.DENY_ACTION);
         if (videoDevices.length)
           perms.add(uri, "camera", perms.DENY_ACTION);
@@ -345,17 +345,17 @@ function prompt(aBrowser, aRequest) {
 
   if (aRequest.secure && !sharingScreen && !sharingAudio) {
     // Don't show the 'Always' action if the connection isn't secure, or for
     // screen/audio sharing (because we can't guess which window the user wants
     // to share without prompting).
     secondaryActions.unshift({
       label: stringBundle.getString("getUserMedia.always.label"),
       accessKey: stringBundle.getString("getUserMedia.always.accesskey"),
-      callback: function (aState) {
+      callback: function(aState) {
         mainAction.callback(aState, true);
       }
     });
   }
 
   let options = {
     eventCallback: function(aTopic, aNewBrowser) {
       if (aTopic == "swapping")
--- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/ControlCenter.jsm
+++ b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/ControlCenter.jsm
@@ -91,17 +91,17 @@ this.ControlCenter = {
       }),
     },
 
     allPermissions: {
       applyConfig: Task.async(function* () {
         // there are 3 possible non-default permission states, so we alternate between them
         let states = [SitePermissions.ALLOW, SitePermissions.BLOCK, SitePermissions.SESSION];
         let uri = Services.io.newURI(PERMISSIONS_PAGE, null, null)
-        SitePermissions.listPermissions().forEach(function (permission, index) {
+        SitePermissions.listPermissions().forEach(function(permission, index) {
           SitePermissions.set(uri, permission, states[index % 3]);
         });
 
         yield loadPage(PERMISSIONS_PAGE);
         yield openIdentityPopup();
       }),
     },
 
--- a/storage/test/unit/head_storage.js
+++ b/storage/test/unit/head_storage.js
@@ -71,17 +71,17 @@ function cleanup()
  * spinning an event loop.
  */
 function asyncCleanup()
 {
   let closed = false;
 
   // close the connection
   print("*** Storage Tests: Trying to asyncClose!");
-  getOpenedDatabase().asyncClose(function () { closed = true; });
+  getOpenedDatabase().asyncClose(function() { closed = true; });
 
   let curThread = Components.classes["@mozilla.org/thread-manager;1"]
                             .getService().currentThread;
   while (!closed)
     curThread.processNextEvent(true);
 
   // we need to null out the database variable to get a new connection the next
   // time getOpenedDatabase is called
@@ -266,29 +266,29 @@ function getTableRowCount(aTableName)
   }
   return currentRows;
 }
 
 // Promise-Returning Functions
 
 function asyncClone(db, readOnly) {
   let deferred = Promise.defer();
-  db.asyncClone(readOnly, function (status, db2) {
+  db.asyncClone(readOnly, function(status, db2) {
     if (Components.isSuccessCode(status)) {
       deferred.resolve(db2);
     } else {
       deferred.reject(status);
     }
   });
   return deferred.promise;
 }
 
 function asyncClose(db) {
   let deferred = Promise.defer();
-  db.asyncClose(function (status) {
+  db.asyncClose(function(status) {
     if (Components.isSuccessCode(status)) {
       deferred.resolve();
     } else {
       deferred.reject(status);
     }
   });
   return deferred.promise;
 }
@@ -298,56 +298,56 @@ function openAsyncDatabase(file, options
   let properties;
   if (options) {
     properties = Cc["@mozilla.org/hash-property-bag;1"].
         createInstance(Ci.nsIWritablePropertyBag);
     for (let k in options) {
       properties.setProperty(k, options[k]);
     }
   }
-  getService().openAsyncDatabase(file, properties, function (status, db) {
+  getService().openAsyncDatabase(file, properties, function(status, db) {
     if (Components.isSuccessCode(status)) {
       deferred.resolve(db.QueryInterface(Ci.mozIStorageAsyncConnection));
     } else {
       deferred.reject(status);
     }
   });
   return deferred.promise;
 }
 
 function executeAsync(statement, onResult) {
   let deferred = Promise.defer();
   statement.executeAsync({
-    handleError: function (error) {
+    handleError: function(error) {
       deferred.reject(error);
     },
-    handleResult: function (result) {
+    handleResult: function(result) {
       if (onResult) {
         onResult(result);
       }
     },
-    handleCompletion: function (result) {
+    handleCompletion: function(result) {
       deferred.resolve(result);
     }
   });
   return deferred.promise;
 }
 
 function executeMultipleStatementsAsync(db, statements, onResult) {
   let deferred = Promise.defer();
   db.executeAsync(statements, statements.length, {
-    handleError: function (error) {
+    handleError: function(error) {
       deferred.reject(error);
     },
-    handleResult: function (result) {
+    handleResult: function(result) {
       if (onResult) {
         onResult(result);
       }
     },
-    handleCompletion: function (result) {
+    handleCompletion: function(result) {
       deferred.resolve(result);
     }
   });
   return deferred.promise;
 }
 
 function executeSimpleSQLAsync(db, query, onResult) {
   let deferred = Promise.defer();
--- a/storage/test/unit/test_connection_executeSimpleSQLAsync.js
+++ b/storage/test/unit/test_connection_executeSimpleSQLAsync.js
@@ -24,46 +24,46 @@ add_task(function* test_create_and_add()
     "VALUES (" + INTEGER + ", \"" + TEXT + "\", " + REAL + ")");
 
   do_check_eq(Ci.mozIStorageStatementCallback.REASON_FINISHED, completion);
 
   let result = null;
 
   completion = yield executeSimpleSQLAsync(adb,
     "SELECT string, number FROM test WHERE id = 1",
-    function (aResultSet) {
+    function(aResultSet) {
       result = aResultSet.getNextRow();
       do_check_eq(2, result.numEntries);
       do_check_eq(TEXT, result.getString(0));
       do_check_eq(REAL, result.getDouble(1));
     }
   );
 
   do_check_eq(Ci.mozIStorageStatementCallback.REASON_FINISHED, completion);
   do_check_neq(result, null);
   result = null;
 
   yield executeSimpleSQLAsync(adb, "SELECT COUNT(0) FROM test",
-    function (aResultSet) {
+    function(aResultSet) {
       result = aResultSet.getNextRow();
       do_check_eq(1, result.getInt32(0));
     });
 
   do_check_neq(result, null);
 
   yield asyncClose(adb);
 });
 
 
 add_task(function* test_asyncClose_does_not_complete_before_statement() {
   let adb = yield openAsyncDatabase(getTestDB());
   let executed = false;
 
   let reason = yield executeSimpleSQLAsync(adb, "SELECT * FROM test",
-    function (aResultSet) {
+    function(aResultSet) {
       let result = aResultSet.getNextRow();
 
       do_check_neq(result, null);
       do_check_eq(3, result.numEntries);
       do_check_eq(INTEGER, result.getInt32(0));
       do_check_eq(TEXT, result.getString(1));
       do_check_eq(REAL, result.getDouble(2));
       executed = true;
--- a/storage/test/unit/test_locale_collation.js
+++ b/storage/test/unit/test_locale_collation.js
@@ -112,17 +112,17 @@ function getResults(aCollation, aConn)
  */
 function initTableWithStrings(aStrings, aConn)
 {
   print("Initializing test table.");
 
   aConn.executeSimpleSQL("DROP TABLE IF EXISTS test");
   aConn.createTable("test", "t TEXT");
   let stmt = aConn.createStatement("INSERT INTO test (t) VALUES (:t)");
-  aStrings.forEach(function (str) {
+  aStrings.forEach(function(str) {
     stmt.params.t = str;
     stmt.execute();
     stmt.reset();
   });
   stmt.finalize();
 }
 
 /**
@@ -150,17 +150,17 @@ function localeCompare(aCollation)
       break;
     case "locale_case_accent_sensitive":
       strength = Ci.nsICollation.kCollationCaseSensitive;
       break;
     default:
       do_throw("Error in test: unknown collation '" + aCollation + "'");
       break;
   }
-  return function (aStr1, aStr2) {
+  return function(aStr1, aStr2) {
     return gLocaleCollation.compareString(strength, aStr1, aStr2);
   };
 }
 
 /**
  * Reads in the test data from the file DATA_BASENAME and returns it as an array
  * of strings.
  *
@@ -292,13 +292,13 @@ var gTests = [
     desc: "Case and accent insensitive UTF-16",
     run:   () => runUtf16Test("locale")
   },
 ];
 
 function run_test()
 {
   setup();
-  gTests.forEach(function (test) {
+  gTests.forEach(function(test) {
     print("-- Running test: " + test.desc);
     test.run();
   });
 }
--- a/storage/test/unit/test_statement_executeAsync.js
+++ b/storage/test/unit/test_statement_executeAsync.js
@@ -56,17 +56,17 @@ function execAsync(aStmt, aOptions, aRes
   else if (typeof aResults == "number") {
     resultsExpected = aResults;
   }
   else if (typeof aResults == "function") {
     resultsChecker = aResults;
   }
   else { // array
     resultsExpected = aResults.length;
-    resultsChecker = function (aResultNum, aTup, aCaller) {
+    resultsChecker = function(aResultNum, aTup, aCaller) {
       aResults[aResultNum](aTup, aCaller);
     };
   }
   let resultsSeen = 0;
 
   let errorCodeExpected = false;
   let reasonExpected = Ci.mozIStorageStatementCallback.REASON_FINISHED;
   let altReasonExpected = null;
@@ -221,17 +221,17 @@ function test_add_data()
 
 function test_get_data()
 {
   var stmt = makeTestStatement(
     "SELECT string, number, nuller, blober, id FROM test WHERE id = ?"
   );
   stmt.bindByIndex(0, INTEGER);
   execAsync(stmt, {}, [
-    function (tuple) {
+    function(tuple) {
       do_check_neq(null, tuple);
 
       // Check that it's what we expect
       do_check_false(tuple.getIsNull(0));
       do_check_eq(tuple.getResultByName("string"), tuple.getResultByIndex(0));
       do_check_eq(TEXT, tuple.getResultByName("string"));
       do_check_eq(Ci.mozIStorageValueArray.VALUE_TYPE_TEXT,
                   tuple.getTypeOfIndex(0));
@@ -277,17 +277,17 @@ function test_get_data()
 }
 
 function test_tuple_out_of_bounds()
 {
   var stmt = makeTestStatement(
     "SELECT string FROM test"
   );
   execAsync(stmt, {}, [
-    function (tuple) {
+    function(tuple) {
       do_check_neq(null, tuple);
 
       // Check all out of bounds - should throw
       var methods = [
         "getTypeOfIndex",
         "getInt32",
         "getInt64",
         "getDouble",
--- a/storage/test/unit/test_statement_wrapper_automatically.js
+++ b/storage/test/unit/test_statement_wrapper_automatically.js
@@ -149,17 +149,17 @@ function run_test()
     1337,       // int
     3.1337,     // double
     "foo",      // string
     true,       // boolean
     null,       // null
     new Date(), // Date object
   ];
 
-  vals.forEach(function (val)
+  vals.forEach(function(val)
   {
     printValDesc(val);
     print("Single parameter");
     insertAndCheckSingleParam(val);
     print("Multiple parameters");
     insertAndCheckMultipleParams(val);
   });
 
--- a/storage/test/unit/test_storage_connection.js
+++ b/storage/test/unit/test_storage_connection.js
@@ -268,17 +268,17 @@ add_task(function* test_close_fails_with
   let stmt = createStatement("SELECT * FROM test");
   stmt.executeAsync();
   stmt.finalize();
 
   let db = getOpenedDatabase();
   Assert.throws(() => db.close(), /NS_ERROR_UNEXPECTED/);
 
   // Clean up after ourselves.
-  db.asyncClose(function () {
+  db.asyncClose(function() {
     // Reset gDBConn so that later tests will get a new connection object.
     gDBConn = null;
     deferred.resolve();
   });
 
   yield deferred.promise;
 });
 
@@ -325,17 +325,17 @@ function* standardAsyncTest(promisedDB, 
   stmt.params.name = name;
   let result = yield executeAsync(stmt);
   do_print("Request complete");
   stmt.finalize();
   do_check_true(Components.isSuccessCode(result));
   do_print("Extracting data");
   stmt = adb.createAsyncStatement("SELECT * FROM test");
   let found = false;
-  yield executeAsync(stmt, function (results) {
+  yield executeAsync(stmt, function(results) {
     do_print("Data has been extracted");
     for (let row = results.getNextRow(); row != null; row = results.getNextRow()) {
       if (row.getResultByName("name") == name) {
         found = true;
         break;
       }
     }
   });
@@ -410,17 +410,17 @@ add_task(function* test_async_open_with_
   stmt.params.name = "clockworker";
   let result = yield executeAsync(stmt);
   do_print("Request complete");
   stmt.finalize();
   do_check_true(Components.isSuccessCode(result));
   do_print("Extracting data");
   stmt = adb.createAsyncStatement("SELECT * FROM test");
   let found = false;
-  yield executeAsync(stmt, function (results) {
+  yield executeAsync(stmt, function(results) {
     do_print("Data has been extracted");
     for (let row = results.getNextRow(); row != null; row = results.getNextRow()) {
       if (row.getResultByName("name") == "clockworker") {
         found = true;
         break;
       }
     }
   });
@@ -463,17 +463,17 @@ add_task(function* test_clone_no_optiona
   stmt.params.name = "yoric";
   let result = yield executeAsync(stmt);
   do_print("Request complete");
   stmt.finalize();
   do_check_true(Components.isSuccessCode(result));
   do_print("Extracting data from clone db");
   stmt = adb2.createAsyncStatement("SELECT * FROM test");
   let found = false;
-  yield executeAsync(stmt, function (results) {
+  yield executeAsync(stmt, function(results) {
     do_print("Data has been extracted");
     for (let row = results.getNextRow(); row != null; row = results.getNextRow()) {
       if (row.getResultByName("name") == "yoric") {
         found = true;
         break;
       }
     }
   });
@@ -531,17 +531,17 @@ add_task(function* test_clone_shared_rea
   db2.close();
 });
 
 add_task(function* test_close_clone_fails() {
   let calls = [
     "openDatabase",
     "openUnsharedDatabase",
   ];
-  calls.forEach(function (methodName) {
+  calls.forEach(function(methodName) {
     let db = getService()[methodName](getTestDB());
     db.close();
     expectError(Cr.NS_ERROR_NOT_INITIALIZED, () => db.clone());
   });
 });
 
 add_task(function* test_memory_clone_fails() {
   let db = getService().openSpecialDatabase("memory");
@@ -554,19 +554,19 @@ add_task(function* test_clone_copies_fun
   let calls = [
     "openDatabase",
     "openUnsharedDatabase",
   ];
   let functionMethods = [
     "createFunction",
     "createAggregateFunction",
   ];
-  calls.forEach(function (methodName) {
-    [true, false].forEach(function (readOnly) {
-      functionMethods.forEach(function (functionMethod) {
+  calls.forEach(function(methodName) {
+    [true, false].forEach(function(readOnly) {
+      functionMethods.forEach(function(functionMethod) {
         let db1 = getService()[methodName](getTestDB());
         // Create a function for db1.
         db1[functionMethod](FUNC_NAME, 1, {
           onFunctionCall: () => 0,
           onStep: () => 0,
           onFinal: () => 0,
         });
 
@@ -600,19 +600,19 @@ add_task(function* test_clone_copies_ove
   let calls = [
     "openDatabase",
     "openUnsharedDatabase",
   ];
   let functionMethods = [
     "createFunction",
     "createAggregateFunction",
   ];
-  calls.forEach(function (methodName) {
-    [true, false].forEach(function (readOnly) {
-      functionMethods.forEach(function (functionMethod) {
+  calls.forEach(function(methodName) {
+    [true, false].forEach(function(readOnly) {
+      functionMethods.forEach(function(functionMethod) {
         let db1 = getService()[methodName](getTestDB());
         // Create a function for db1.
         let func = new test_func();
         db1[functionMethod](FUNC_NAME, 1, func);
         do_check_false(func.called);
 
         // Clone it, and make sure the function gets called.
         let db2 = db1.clone(readOnly);
@@ -637,32 +637,32 @@ add_task(function* test_clone_copies_pra
     { name: "wal_autocheckpoint", value: 16, copied: true },
     { name: "busy_timeout", value: 50, copied: true },
     { name: "ignore_check_constraints", value: 1, copied: false },
   ];
 
   let db1 = getService().openUnsharedDatabase(getTestDB());
 
   // Sanity check initial values are different from enforced ones.
-  PRAGMAS.forEach(function (pragma) {
+  PRAGMAS.forEach(function(pragma) {
     let stmt = db1.createStatement("PRAGMA " + pragma.name);
     do_check_true(stmt.executeStep());
     do_check_neq(pragma.value, stmt.getInt32(0));
     stmt.finalize();
   });
   // Execute pragmas.
-  PRAGMAS.forEach(function (pragma) {
+  PRAGMAS.forEach(function(pragma) {
     db1.executeSimpleSQL("PRAGMA " + pragma.name + " = " + pragma.value);
   });
 
   let db2 = db1.clone();
   do_check_true(db2.connectionReady);
 
   // Check cloned connection inherited pragma values.
-  PRAGMAS.forEach(function (pragma) {
+  PRAGMAS.forEach(function(pragma) {
     let stmt = db2.createStatement("PRAGMA " + pragma.name);
     do_check_true(stmt.executeStep());
     let validate = pragma.copied ? do_check_eq : do_check_neq;
     validate(pragma.value, stmt.getInt32(0));
     stmt.finalize();
   });
 
   db1.close();
@@ -679,32 +679,32 @@ add_task(function* test_readonly_clone_c
     { name: "wal_autocheckpoint", value: 16, copied: false },
     { name: "busy_timeout", value: 50, copied: false },
     { name: "ignore_check_constraints", value: 1, copied: false },
   ];
 
   let db1 = getService().openUnsharedDatabase(getTestDB());
 
   // Sanity check initial values are different from enforced ones.
-  PRAGMAS.forEach(function (pragma) {
+  PRAGMAS.forEach(function(pragma) {
     let stmt = db1.createStatement("PRAGMA " + pragma.name);
     do_check_true(stmt.executeStep());
     do_check_neq(pragma.value, stmt.getInt32(0));
     stmt.finalize();
   });
   // Execute pragmas.
-  PRAGMAS.forEach(function (pragma) {
+  PRAGMAS.forEach(function(pragma) {
     db1.executeSimpleSQL("PRAGMA " + pragma.name + " = " + pragma.value);
   });
 
   let db2 = db1.clone(true);
   do_check_true(db2.connectionReady);
 
   // Check cloned connection inherited pragma values.
-  PRAGMAS.forEach(function (pragma) {
+  PRAGMAS.forEach(function(pragma) {
     let stmt = db2.createStatement("PRAGMA " + pragma.name);
     do_check_true(stmt.executeStep());
     let validate = pragma.copied ? do_check_eq : do_check_neq;
     validate(pragma.value, stmt.getInt32(0));
     stmt.finalize();
   });
 
   db1.close();
--- a/storage/test/unit/test_vacuum.js
+++ b/storage/test/unit/test_vacuum.js
@@ -142,17 +142,17 @@ const TESTS = [
       observe: function VO_observe(aSubject, aTopic, aData) {
         this.gotNotification = true;
       },
       QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver])
     };
     Services.obs.addObserver(vacuumObserver, "test-begin-vacuum", false);
 
     // Check after a couple seconds that no VACUUM has been run.
-    do_timeout(2000, function () {
+    do_timeout(2000, function() {
       print("Check VACUUM did not run.");
       do_check_false(vacuumObserver.gotNotification);
       Services.obs.removeObserver(vacuumObserver, "test-begin-vacuum");
       run_next_test();
     });
 
     synthesize_idle_daily();
   },
@@ -189,17 +189,17 @@ const TESTS = [
       observe: function VO_observe(aSubject, aTopic, aData) {
         this.gotNotification = true;
       },
       QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver])
     };
     Services.obs.addObserver(vacuumObserver, "test-begin-vacuum", false);
 
     // Check after a couple seconds that no VACUUM has been run.
-    do_timeout(2000, function () {
+    do_timeout(2000, function() {
       print("Check VACUUM did not run.");
       do_check_false(vacuumObserver.gotNotification);
       Services.obs.removeObserver(vacuumObserver, "test-begin-vacuum");
       run_next_test();
     });
 
     synthesize_idle_daily();
   },
@@ -282,17 +282,17 @@ const TESTS = [
       observe: function VO_observe(aSubject, aTopic, aData) {
         this.gotNotification = true;
       },
       QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver])
     };
     Services.obs.addObserver(vacuumObserver, "test-begin-vacuum", false);
 
     // Check after a couple seconds that no VACUUM has been run.
-    do_timeout(2000, function () {
+    do_timeout(2000, function() {
       print("Check VACUUM did not run.");
       do_check_false(vacuumObserver.gotNotification);
       Services.obs.removeObserver(vacuumObserver, "test-begin-vacuum");
       run_next_test();
     });
 
     synthesize_idle_daily();
   },