Bug 1385815 - Enable whitespace related ESLint rules for mobile/android. r=sebastian
authorDan Banner <dbugs@thebanners.uk>
Tue, 01 Aug 2017 16:34:11 +0100
changeset 425441 b8312a6e31f4989c763df2e3d4225af01a89893d
parent 425440 277c7e4952a8a584b0256e63b4bf80f10d74a717
child 425442 704f6c7282a52781cd8933b64b2ddac1aa8de0a2
push id1567
push userjlorenzo@mozilla.com
push dateThu, 02 Nov 2017 12:36:05 +0000
treeherdermozilla-release@e512c14a0406 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1385815
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1385815 - Enable whitespace related ESLint rules for mobile/android. r=sebastian MozReview-Commit-ID: 6B79zhklsYR
mobile/android/.eslintrc.js
mobile/android/chrome/content/ActionBarHandler.js
mobile/android/chrome/content/CastingApps.js
mobile/android/chrome/content/EmbedRT.js
mobile/android/chrome/content/FeedHandler.js
mobile/android/chrome/content/InputWidgetHelper.js
mobile/android/chrome/content/Linkify.js
mobile/android/chrome/content/MasterPassword.js
mobile/android/chrome/content/OfflineApps.js
mobile/android/chrome/content/PermissionsHelper.js
mobile/android/chrome/content/PluginHelper.js
mobile/android/chrome/content/PresentationView.js
mobile/android/chrome/content/SelectHelper.js
mobile/android/chrome/content/WebrtcUI.js
mobile/android/chrome/content/aboutAddons.js
mobile/android/chrome/content/aboutCertError.xhtml
mobile/android/chrome/content/aboutDownloads.js
mobile/android/chrome/content/aboutHealthReport.js
mobile/android/chrome/content/aboutLogins.js
mobile/android/chrome/content/config.js
mobile/android/chrome/content/netError.xhtml
mobile/android/components/AddonUpdateService.js
mobile/android/components/BlocklistPrompt.js
mobile/android/components/DirectoryProvider.js
mobile/android/components/FilePicker.js
mobile/android/components/HelperAppDialog.js
mobile/android/components/ImageBlockingPolicy.js
mobile/android/components/LoginManagerPrompter.js
mobile/android/components/PresentationRequestUIGlue.js
mobile/android/components/PromptService.js
mobile/android/components/SessionStore.js
mobile/android/components/extensions/ext-browsingData.js
mobile/android/components/extensions/test/mochitest/test_ext_browsingData_cookies_cache.html
mobile/android/components/extensions/test/mochitest/test_ext_browsingData_settings.html
mobile/android/components/geckoview/GeckoViewPrompt.js
mobile/android/modules/DownloadNotifications.jsm
mobile/android/modules/HelperApps.jsm
mobile/android/modules/Home.jsm
mobile/android/modules/HomeProvider.jsm
mobile/android/modules/JNI.jsm
mobile/android/modules/NetErrorHelper.jsm
mobile/android/modules/Notifications.jsm
mobile/android/modules/Prompt.jsm
mobile/android/modules/Sanitizer.jsm
mobile/android/modules/WebsiteMetadata.jsm
mobile/android/modules/geckoview/GeckoViewProgress.jsm
mobile/android/tests/browser/chrome/test_hidden_select_option.html
mobile/android/tests/browser/chrome/test_select_disabled.html
mobile/android/tests/browser/chrome/test_session_clear_history.html
mobile/android/tests/browser/chrome/test_session_parentid.html
mobile/android/tests/browser/chrome/test_session_zombification.html
mobile/android/tests/browser/chrome/test_settings_fontinflation.html
mobile/android/tests/browser/chrome/test_video_discovery.html
mobile/android/tests/browser/chrome/web_channel.html
mobile/android/tests/browser/robocop/reader_mode_pages/developer.mozilla.org/en/XULRunner/Build_Instructions.html
mobile/android/tests/browser/robocop/reader_mode_pages/not_an_article.html
mobile/android/tests/browser/robocop/robocop_getusermedia.html
mobile/android/tests/browser/robocop/robocop_getusermedia2.html
mobile/android/tests/browser/robocop/robocop_head.js
mobile/android/tests/browser/robocop/robocop_media_playback_js.html
mobile/android/tests/browser/robocop/testFilePicker.js
mobile/android/tests/browser/robocop/testReaderCacheMigration.js
--- a/mobile/android/.eslintrc.js
+++ b/mobile/android/.eslintrc.js
@@ -3,35 +3,29 @@
 module.exports = {
   rules: {
     // XXX Bug 1358949 - This should be reduced down - probably to 20 or to
     // be removed & synced with the mozilla/recommended value.
     "complexity": ["error", 31],
 
     // Rules enabled in mozilla/recommended, and disabled for now, we should
     // re-enable these over time.
-    "block-spacing": "off",
     "brace-style": "off",
-    "comma-spacing": "off",
     "consistent-return": "off",
-    "eol-last": "off",
-    "key-spacing": "off",
-    "keyword-spacing": "off",
     "no-else-return": "off",
     "no-empty": "off",
     "no-extra-bind": "off",
     "no-extra-semi": "off",
     "no-lonely-if": "off",
     "no-multi-spaces": "off",
     "no-native-reassign": "off",
     "no-nested-ternary": "off",
     "no-new-object": "off",
     "no-octal": "off",
     "no-redeclare": "off",
-    "no-trailing-spaces": "off",
     "no-useless-call": "off",
     "no-useless-concat": "off",
     "no-useless-return": "off",
     "no-undef": "off",
     "no-unused-vars": "off",
     "object-shorthand": "off",
     "quotes": "off", // [2, "double"]
     "space-before-blocks": "off",
--- a/mobile/android/chrome/content/ActionBarHandler.js
+++ b/mobile/android/chrome/content/ActionBarHandler.js
@@ -255,17 +255,17 @@ var ActionBarHandler = {
    *        current state.
    */
   _sendActionBarActions: function(sendAlways) {
     let actions = this._getActionBarActions();
 
     let actionCountUnchanged = this._actionBarActions &&
       actions.length === this._actionBarActions.length;
     let actionsMatch = actionCountUnchanged &&
-      this._actionBarActions.every((e,i) => {
+      this._actionBarActions.every((e, i) => {
         return e.id === actions[i].id;
       });
 
     if (sendAlways || !actionsMatch) {
       WindowEventDispatcher.sendRequest({
         type: "TextSelection:ActionbarStatus",
         selectionID: this._selectionID,
         actions: actions,
@@ -338,17 +338,17 @@ var ActionBarHandler = {
           return (element) ? element.textLength != 0 : true;
         },
       },
 
       action: function(element, win) {
         // Some Mobile keyboards such as SwiftKeyboard, provide auto-suggest
         // style highlights via composition selections in editables.
         if (element) {
-          // If we have an active composition string, commit it, and 
+          // If we have an active composition string, commit it, and
           // ensure proper element focus.
           let editor = ActionBarHandler._getEditor(element, win)
           if (editor.composing) {
             element.blur();
             element.focus();
           }
         }
 
@@ -530,17 +530,17 @@ var ActionBarHandler = {
       id: "search_add_action",
       label: () => Strings.browser.GetStringFromName("contextmenu.addSearchEngine3"),
       icon: "drawable://ab_add_search_engine",
       order: 0,
       floatingOrder: 8,
 
       selector: {
         matches: function(element, win) {
-          if(!(element instanceof HTMLInputElement)) {
+          if (!(element instanceof HTMLInputElement)) {
             return false;
           }
           let form = element.form;
           if (!form || element.type == "password") {
             return false;
           }
 
           let method = form.method.toUpperCase();
--- a/mobile/android/chrome/content/CastingApps.js
+++ b/mobile/android/chrome/content/CastingApps.js
@@ -289,17 +289,17 @@ var CastingApps = {
         // Look for a video element contained in the overlay bounds
         let rect = element.getBoundingClientRect();
         if (aY >= rect.top && aX >= rect.left && aY <= rect.bottom && aX <= rect.right) {
           // Once we find a <video> under the overlay, we check it and exit.
           this._getVideo(element, types, extensions, aCallback);
           return;
         }
       }
-    } catch(e) {}
+    } catch (e) {}
   },
 
   _getContentTypeForURI: function(aURI, aElement, aCallback) {
     let channel;
     try {
       let secFlags = Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_DATA_INHERITS;
       if (aElement.crossOrigin) {
         secFlags = Ci.nsILoadInfo.SEC_REQUIRE_CORS_DATA_INHERITS;
@@ -308,17 +308,17 @@ var CastingApps = {
         }
       }
       channel = NetUtil.newChannel({
         uri: aURI,
         loadingNode: aElement,
         securityFlags: secFlags,
         contentPolicyType: Ci.nsIContentPolicy.TYPE_INTERNAL_VIDEO
       });
-    } catch(e) {
+    } catch (e) {
      aCallback(null);
      return;
     }
 
     let listener = {
       onStartRequest: function(request, context) {
         switch (channel.responseStatus) {
           case 301:
@@ -452,17 +452,17 @@ var CastingApps = {
       for (let element of elements) {
         // Look for a video element contained in the overlay bounds
         let rect = element.getBoundingClientRect();
         if (aY >= rect.top && aX >= rect.left && aY <= rect.bottom && aX <= rect.right) {
           // Use the flag set when the <video> binding was created as the check
           return element.mozAllowCasting;
         }
       }
-    } catch(e) {}
+    } catch (e) {}
 
     return false;
   },
 
   filterCast: {
     matches: function(aElement, aX, aY) {
       // This behavior matches the pageaction: As long as a video is castable,
       // we can cast it, even if it's already being cast to a device.
--- a/mobile/android/chrome/content/EmbedRT.js
+++ b/mobile/android/chrome/content/EmbedRT.js
@@ -51,14 +51,14 @@ var EmbedRT = {
     if ("load" in sandbox) {
       let params = {
         window: window,
         resourceURI: scriptURL,
       };
 
       try {
         sandbox.load(params);
-      } catch(e) {
+      } catch (e) {
         dump("Exception calling 'load' method in script: " + scriptURL + "\n" + e);
       }
     }
   }
 };
--- a/mobile/android/chrome/content/FeedHandler.js
+++ b/mobile/android/chrome/content/FeedHandler.js
@@ -13,17 +13,17 @@ var FeedHandler = {
     if (!this._contentTypes)
       this.loadContentHandlers();
 
     if (!(contentType in this._contentTypes))
       return [];
 
     return this._contentTypes[contentType];
   },
-  
+
   loadContentHandlers: function fh_loadContentHandlers() {
     this._contentTypes = {};
 
     let kids = Services.prefs.getBranch(this.PREF_CONTENTHANDLERS_BRANCH).getChildList("");
 
     // First get the numbers of the providers by getting all ###.uri prefs
     let nums = [];
     for (let i = 0; i < kids.length; i++) {
@@ -48,17 +48,17 @@ var FeedHandler = {
         let type = branch.getCharPref("type");
         let uri = branch.getComplexValue("uri", Ci.nsIPrefLocalizedString).data;
         let title = branch.getComplexValue("title", Ci.nsIPrefLocalizedString).data;
 
         if (!(type in this._contentTypes))
           this._contentTypes[type] = [];
         this._contentTypes[type].push({ contentType: type, uri: uri, name: title });
       }
-      catch(ex) {}
+      catch (ex) {}
     }
   },
 
   onEvent: function fh_onEvent(event, args, callback) {
     if (event === "Feeds:Subscribe") {
       let tab = BrowserApp.getTabForId(args.tabId);
       if (!tab)
         return;
--- a/mobile/android/chrome/content/InputWidgetHelper.js
+++ b/mobile/android/chrome/content/InputWidgetHelper.js
@@ -90,17 +90,17 @@ var InputWidgetHelper = {
     evt.initEvent("change", true, true, aElement.defaultView, 0,
                   false, false,
                   false, false, null);
     win.setTimeout(function() {
       aElement.dispatchEvent(evt);
     }, 0);
   },
 
-  _isDisabledElement : function(aElement) {
+  _isDisabledElement: function(aElement) {
     let currentElement = aElement;
     while (currentElement) {
       if (currentElement.disabled)
         return true;
 
       currentElement = currentElement.parentElement;
     }
     return false;
--- a/mobile/android/chrome/content/Linkify.js
+++ b/mobile/android/chrome/content/Linkify.js
@@ -5,31 +5,31 @@
 const LINKIFY_TIMEOUT = 0;
 
 function Linkifier() {
   this._linkifyTimer = null;
   this._phoneRegex = /(?:\s|^)[\+]?(\(?\d{1,8}\)?)?([- ]+\(?\d{1,8}\)?)+( ?(x|ext) ?\d{1,3})?(?:\s|$)/g;
 }
 
 Linkifier.prototype = {
-  _buildAnchor : function(aDoc, aNumberText) {
+  _buildAnchor: function(aDoc, aNumberText) {
     let anchorNode = aDoc.createElement("a");
     let cleanedText = "";
     for (let i = 0; i < aNumberText.length; i++) {
       let c = aNumberText.charAt(i);
       if ((c >= '0' && c <= '9') || c == '+')  //assuming there is only the leading '+'.
         cleanedText += c;
     }
     anchorNode.setAttribute("href", "tel:" + cleanedText);
     let nodeText = aDoc.createTextNode(aNumberText);
     anchorNode.appendChild(nodeText);
     return anchorNode;
   },
 
-  _linkifyNodeNumbers : function(aNodeToProcess, aDoc) {
+  _linkifyNodeNumbers: function(aNodeToProcess, aDoc) {
     let parent = aNodeToProcess.parentNode;
     let nodeText = aNodeToProcess.nodeValue;
 
     // Replacing the original text node with a sequence of
     // |text before number|anchor with number|text after number nodes.
     // Each step a couple of (optional) text node and anchor node are appended.
     let anchorNode = null;
     let m = null;
@@ -49,17 +49,17 @@ Linkifier.prototype = {
         parent.replaceChild(nodeToAdd, aNodeToProcess);
       else
         parent.insertBefore(nodeToAdd, prevNode.nextSibling); //inserts after.
 
       if (textExistsBeforeNumber) // if we added the text node before the anchor, we still need to add the anchor node.
         parent.insertBefore(anchorNode, nodeToAdd.nextSibling);
 
       // next nodes need to be appended to this node.
-      prevNode = anchorNode; 
+      prevNode = anchorNode;
       startIndex = m.index + m[0].length;
     }
 
     // if some text is remaining after the last anchor.
     if (startIndex > 0 && startIndex < nodeText.length) {
       let lastNode = aDoc.createTextNode(nodeText.substr(startIndex));
       parent.insertBefore(lastNode, prevNode.nextSibling);
       return lastNode;
@@ -98,11 +98,11 @@ Linkifier.prototype = {
       if (lastAddedNode) {
         nodeWalker.currentNode = lastAddedNode;
         this._linkifyTimer = setTimeout(parseNode, LINKIFY_TIMEOUT);
       } else {
         this._linkifyTimer = setTimeout(parseNode, LINKIFY_TIMEOUT);
       }
     };
 
-    this._linkifyTimer = setTimeout(parseNode, LINKIFY_TIMEOUT); 
+    this._linkifyTimer = setTimeout(parseNode, LINKIFY_TIMEOUT);
   }
 };
--- a/mobile/android/chrome/content/MasterPassword.js
+++ b/mobile/android/chrome/content/MasterPassword.js
@@ -26,28 +26,28 @@ var MasterPassword = {
       let token = this._pk11DB.getInternalKeyToken();
       if (token.needsUserInit) {
         token.initPassword(aPassword);
       } else if (!token.needsLogin()) {
         token.changePassword("", aPassword);
       }
 
       return true;
-    } catch(e) {
+    } catch (e) {
       dump("MasterPassword.setPassword: " + e);
     }
     return false;
   },
 
   removePassword: function removePassword(aOldPassword) {
     try {
       let token = this._pk11DB.getInternalKeyToken();
       if (token.checkPassword(aOldPassword)) {
         token.changePassword(aOldPassword, "");
         return true;
       }
-    } catch(e) {
+    } catch (e) {
       dump("MasterPassword.removePassword: " + e + "\n");
     }
     Snackbars.show(Strings.browser.GetStringFromName("masterPassword.incorrect"), Snackbars.LENGTH_LONG);
     return false;
   }
 };
--- a/mobile/android/chrome/content/OfflineApps.js
+++ b/mobile/android/chrome/content/OfflineApps.js
@@ -15,17 +15,17 @@ var OfflineApps = {
     if (Services.perms.testExactPermission(currentURI, "offline-app") != Services.perms.UNKNOWN_ACTION)
       return;
 
     try {
       if (Services.prefs.getBoolPref("offline-apps.allow_by_default")) {
         // All pages can use offline capabilities, no need to ask the user
         return;
       }
-    } catch(e) {
+    } catch (e) {
       // This pref isn't set by default, ignore failures
     }
 
     let host = currentURI.asciiHost;
     let notificationID = "offline-app-requested-" + host;
 
     let strings = Strings.browser;
     let buttons = [{
--- a/mobile/android/chrome/content/PermissionsHelper.js
+++ b/mobile/android/chrome/content/PermissionsHelper.js
@@ -108,17 +108,17 @@ var PermissionsHelper = {
         // Keep track of permissions, so we know which ones to clear
         this._currentPermissions = permissions;
 
         WindowEventDispatcher.sendRequest({
           type: "Permissions:Data",
           permissions: permissions
         });
         break;
- 
+
       case "Permissions:Clear":
         // An array of the indices of the permissions we want to clear
         let permissionsToClear = data.permissions;
         let privacyContext = BrowserApp.selectedBrowser.docShell
                                .QueryInterface(Ci.nsILoadContext);
 
         for (let i = 0; i < permissionsToClear.length; i++) {
           let indexToClear = permissionsToClear[i];
--- a/mobile/android/chrome/content/PluginHelper.js
+++ b/mobile/android/chrome/content/PluginHelper.js
@@ -115,17 +115,17 @@ var PluginHelper = {
       case "2": // Enable Plugins = Tap to Play (default)
         Services.prefs.clearUserPref("plugin.disable");
         Services.prefs.clearUserPref("plugin.default.state");
         break;
     }
   },
 
   // Copied from /browser/base/content/browser.js
-  isTooSmall : function (plugin, overlay) {
+  isTooSmall: function (plugin, overlay) {
     // Is the <object>'s size too small to hold what we want to show?
     let pluginRect = plugin.getBoundingClientRect();
     // XXX bug 446693. The text-shadow on the submitted-report text at
     //     the bottom causes scrollHeight to be larger than it should be.
     let overflows = (overlay.scrollWidth > pluginRect.width) ||
                     (overlay.scrollHeight - 5 > pluginRect.height);
 
     return overflows;
@@ -162,17 +162,17 @@ var PluginHelper = {
         // the user has set a permission to always play plugins on the site
         if (aTab.clickToPlayPluginsActivated ||
             Services.perms.testPermission(aTab.browser.currentURI, "plugins") ==
             Services.perms.ALLOW_ACTION) {
           PluginHelper.playPlugin(plugin);
           return;
         }
 
-        // If the plugin is hidden, or if the overlay is too small, show a 
+        // If the plugin is hidden, or if the overlay is too small, show a
         // doorhanger notification
         if (PluginHelper.isTooSmall(plugin, overlay)) {
           PluginHelper.delayAndShowDoorHanger(aTab);
         } else {
           // There's a large enough visible overlay that we don't need to show
           // the doorhanger.
           aTab.shouldShowPluginDoorhanger = false;
           overlay.classList.add("visible");
--- a/mobile/android/chrome/content/PresentationView.js
+++ b/mobile/android/chrome/content/PresentationView.js
@@ -22,17 +22,17 @@ let PresentationView = {
   _id: null,
 
   startup: function startup() {
     // use hash as the ID of this top level window
     this._id = window.location.hash.substr(1);
 
     // Listen "presentation-receiver:launch" sent from
     // PresentationRequestUIGlue.
-    Services.obs.addObserver(this,TOPIC_PRESENTATION_RECEIVER_LAUNCH);
+    Services.obs.addObserver(this, TOPIC_PRESENTATION_RECEIVER_LAUNCH);
 
     // Notify PresentationView is ready.
     Services.obs.notifyObservers(null, TOPIC_PRESENTATION_VIEW_READY, this._id);
   },
 
   stop: function stop() {
     Services.obs.removeObserver(this, TOPIC_PRESENTATION_RECEIVER_LAUNCH);
   },
--- a/mobile/android/chrome/content/SelectHelper.js
+++ b/mobile/android/chrome/content/SelectHelper.js
@@ -72,31 +72,31 @@ var SelectHelper = {
       p.addButton({
         label: this.strings().GetStringFromName("selectHelper.closeMultipleSelectDialog")
       }).setMultiChoiceItems(list);
     } else {
       p.setSingleChoiceItems(list);
     }
 
     p.show((data) => {
-      this._promptCallBack(data,element)
+      this._promptCallBack(data, element)
     });
   },
 
   _isMenu: function(element) {
     let win = element.ownerGlobal;
     return (element instanceof win.HTMLSelectElement || element instanceof Ci.nsIDOMXULMenuListElement);
   },
 
   // Return a list of Option elements within a Select excluding
   // any that were not visible.
   getListForElement: function(element) {
     let index = 0;
     let items = [];
-    this.forVisibleOptions(element, function(node, options,parent) {
+    this.forVisibleOptions(element, function(node, options, parent) {
       let item = {
         label: node.text || node.label,
         header: options.isGroup,
         disabled: node.disabled,
         id: index,
         selected: node.selected,
       };
 
@@ -155,17 +155,17 @@ var SelectHelper = {
     let event = element.ownerDocument.createEvent("XULCommandEvent");
     event.initCommandEvent("command", true, true, element.defaultView, 0,
         false, false, false, false, null, 0);
     win.setTimeout(function() {
       element.dispatchEvent(event);
     }, 0);
   },
 
-  _isDisabledElement : function(element) {
+  _isDisabledElement: function(element) {
     let currentElement = element;
     while (currentElement) {
       // Must test with === in case a form has a field named "disabled". See bug 1263589.
       if (currentElement.disabled === true) {
         return true;
       }
       currentElement = currentElement.parentElement;
     }
--- a/mobile/android/chrome/content/WebrtcUI.js
+++ b/mobile/android/chrome/content/WebrtcUI.js
@@ -37,17 +37,17 @@ var WebrtcUI = {
     } else if (aTopic === "getUserMedia:request") {
       RuntimePermissions
         .checkPermissions(this._determineNeededRuntimePermissions(aSubject))
         .then((permissionGranted) => {
           if (permissionGranted) {
             WebrtcUI.handleGumRequest(aSubject, aTopic, aData);
           } else {
             Services.obs.notifyObservers(null, "getUserMedia:response:deny", aSubject.callID);
-          }});
+          } });
     } else if (aTopic === "PeerConnection:request") {
       this.handlePCRequest(aSubject, aTopic, aData);
     } else if (aTopic === "recording-device-events") {
       switch (aData) {
         case "shutdown":
         case "starting":
           this.notify();
           break;
--- a/mobile/android/chrome/content/aboutAddons.js
+++ b/mobile/android/chrome/content/aboutAddons.js
@@ -238,17 +238,17 @@ var Addons = {
     let appManaged = (aAddon.scope == AddonManager.SCOPE_APPLICATION);
     let opType = this._getOpTypeForOperations(aAddon.pendingOperations);
     let updateable = (aAddon.permissions & AddonManager.PERM_CAN_UPGRADE) > 0;
     let uninstallable = (aAddon.permissions & AddonManager.PERM_CAN_UNINSTALL) > 0;
 
     let optionsURL = aAddon.optionsURL || "";
 
     let blocked = "";
-    switch(aAddon.blocklistState) {
+    switch (aAddon.blocklistState) {
       case Ci.nsIBlocklistService.STATE_BLOCKED:
         blocked = "blocked";
         break;
       case Ci.nsIBlocklistService.STATE_SOFTBLOCKED:
         blocked = "softBlocked";
         break;
       case Ci.nsIBlocklistService.STATE_OUTDATED:
         blocked = "outdated";
@@ -276,17 +276,17 @@ var Addons = {
 
   init: function init() {
     let self = this;
     AddonManager.getAllAddons(function(aAddons) {
       // Clear all content before filling the addons
       let list = document.getElementById("addons-list");
       list.innerHTML = "";
 
-      aAddons.sort(function(a,b) {
+      aAddons.sort(function(a, b) {
         return a.name.localeCompare(b.name);
       });
       for (let i=0; i<aAddons.length; i++) {
         // Don't create item for system add-ons.
         if (aAddons[i].isSystem)
           continue;
 
         let item = self._createItemForAddon(aAddons[i]);
--- a/mobile/android/chrome/content/aboutCertError.xhtml
+++ b/mobile/android/chrome/content/aboutCertError.xhtml
@@ -70,17 +70,17 @@
         // than it might seem since we want to preserve the <b> tags, but
         // not allow for any injection by just using innerHTML.  Instead,
         // just find the right target text node.
         var intro = document.getElementById('introContentP1');
         function replaceWithHost(node) {
           if (node.textContent == "#1")
             node.textContent = location.host;
           else
-            for(var i = 0; i < node.childNodes.length; i++)
+            for (var i = 0; i < node.childNodes.length; i++)
               replaceWithHost(node.childNodes[i]);
         };
         replaceWithHost(intro);
 
         if (getCSSClass() == "expertBadCert") {
           toggle('technicalContent');
           toggle('expertContent');
         }
--- a/mobile/android/chrome/content/aboutDownloads.js
+++ b/mobile/android/chrome/content/aboutDownloads.js
@@ -239,17 +239,17 @@ const kDownloadStatePropertyNames = [
   "stopped",
   "succeeded",
   "canceled",
   "error",
   "startTime"
 ];
 
 DownloadItem.prototype = {
-  _htmlEscape : function (s) {
+  _htmlEscape: function (s) {
     s = s.replace(/&/g, "&amp;");
     s = s.replace(/>/g, "&gt;");
     s = s.replace(/</g, "&lt;");
     s = s.replace(/"/g, "&quot;");
     s = s.replace(/'/g, "&apos;");
     return s;
   },
 
@@ -365,9 +365,9 @@ DownloadItem.prototype = {
     }
     return "";
   }
 };
 
 window.addEventListener("DOMContentLoaded", event => {
     contextMenu.init();
     downloadLists.init()
-});
\ No newline at end of file
+});
--- a/mobile/android/chrome/content/aboutHealthReport.js
+++ b/mobile/android/chrome/content/aboutHealthReport.js
@@ -160,17 +160,17 @@ var healthReportWrapper = {
                        ". Ignoring command.");
         break;
     }
   },
 
   initRemotePage: function () {
     let iframe = document.getElementById("remote-report").contentDocument;
     iframe.addEventListener("RemoteHealthReportCommand",
-                            function onCommand(e) {healthReportWrapper.handleRemoteCommand(e);});
+                            function onCommand(e) { healthReportWrapper.handleRemoteCommand(e); });
     healthReportWrapper.injectData("begin", null);
   },
 
   // error handling
   ERROR_INIT_FAILED:    1,
   ERROR_PAYLOAD_FAILED: 2,
   ERROR_PREFS_FAILED:   3,
 
--- a/mobile/android/chrome/content/aboutLogins.js
+++ b/mobile/android/chrome/content/aboutLogins.js
@@ -63,17 +63,17 @@ var Logins = {
       this._toggleListBody(true);
       emptyBody.classList.add("hidden");
     };
 
     let getAllLogins = () => {
       let logins = [];
       try {
         logins = Services.logins.getAllLogins();
-      } catch(e) {
+      } catch (e) {
         // It's likely that the Master Password was not entered; give
         // a hint to the next person.
         throw new Error("Possible Master Password permissions error: " + e.toString());
       }
 
       logins.sort((a, b) => a.hostname.localeCompare(b.hostname));
 
       return logins;
@@ -482,17 +482,17 @@ var Logins = {
       case "click": {
         this._onLoginClick(event);
         break;
       }
     }
   },
 
   observe: function (subject, topic, data) {
-    switch(topic) {
+    switch (topic) {
       case "passwordmgr-storage-changed": {
         this._reloadList();
         break;
       }
     }
   },
 
   _filter: function(event) {
--- a/mobile/android/chrome/content/config.js
+++ b/mobile/android/chrome/content/config.js
@@ -41,17 +41,17 @@ var NewPrefDialog = {
   _positiveButton: null,
 
   get type() {
     return this._prefTypeSelectElt.value;
   },
 
   set type(aType) {
     this._prefTypeSelectElt.value = aType;
-    switch(this._prefTypeSelectElt.value) {
+    switch (this._prefTypeSelectElt.value) {
       case "boolean":
         this._prefTypeSelectElt.selectedIndex = 0;
         break;
       case "string":
         this._prefTypeSelectElt.selectedIndex = 1;
         break;
       case "int":
         this._prefTypeSelectElt.selectedIndex = 2;
@@ -140,17 +140,17 @@ var NewPrefDialog = {
 
   // New prefs create dialog only allows creating a non-existing preference, doesn't allow for
   // Changing an existing one on-the-fly, tap existing/displayed line item pref for that
   create: function AC_create(aEvent) {
     if (this._positiveButton.getAttribute("disabled") == "true") {
       return;
     }
 
-    switch(this.type) {
+    switch (this.type) {
       case "boolean":
         Services.prefs.setBoolPref(this._prefNameInputElt.value, !!(this._booleanValue.value == "true"));
         break;
       case "string":
         Services.prefs.setCharPref(this._prefNameInputElt.value, this._stringValue.value);
         break;
       case "int":
         Services.prefs.setIntPref(this._prefNameInputElt.value, this._intValue.value);
@@ -269,17 +269,17 @@ var AboutConfig = {
       window.scrollTo(0, 0);
     }, INITIAL_PAGE_DELAY);
   },
 
   // Clear the displayed preferences list
   _clearPrefsContainer: function AC_clearPrefsContainer() {
     // Quick clear the prefsContainer list
     let empty = this._prefsContainer.cloneNode(false);
-    this._prefsContainer.parentNode.replaceChild(empty, this._prefsContainer); 
+    this._prefsContainer.parentNode.replaceChild(empty, this._prefsContainer);
     this._prefsContainer = empty;
 
     // Quick clear the prefs li.HTML list
     this._list.forEach(function(item) {
       delete item.li;
     });
   },
 
@@ -635,17 +635,17 @@ Pref.prototype = {
   _valueSetup: function AC_valueSetup() {
 
     this.li.setAttribute("type", this.type);
     this.li.setAttribute("value", this.value);
 
     let valDiv = this.li.querySelector(".pref-value");
     valDiv.value = this.value;
 
-    switch(this.type) {
+    switch (this.type) {
       case Services.prefs.PREF_BOOL:
         valDiv.setAttribute("type", "button");
         this.li.querySelector(".up").setAttribute("disabled", true);
         this.li.querySelector(".down").setAttribute("disabled", true);
         break;
       case Services.prefs.PREF_STRING:
         valDiv.setAttribute("type", "text");
         this.li.querySelector(".up").setAttribute("disabled", true);
--- a/mobile/android/chrome/content/netError.xhtml
+++ b/mobile/android/chrome/content/netError.xhtml
@@ -215,17 +215,17 @@
           var codeRe = /<a id="errorCode" title="([^"]+)">/;
           var codeResult = codeRe.exec(desc);
           var domainRe = /<a id="cert_domain_link" title="([^"]+)">/;
           var domainResult = domainRe.exec(desc);
 
           // The order of these links in the description is fixed in
           // TransportSecurityInfo.cpp:formatOverridableCertErrorMessage.
           var firstResult = domainResult;
-          if(!domainResult)
+          if (!domainResult)
             firstResult = codeResult;
           if (!firstResult)
             return;
           // Remove sd's existing children
           sd.textContent = "";
 
           // Everything up to the first link should be text content.
           sd.appendChild(document.createTextNode(desc.slice(0, firstResult.index)));
--- a/mobile/android/components/AddonUpdateService.js
+++ b/mobile/android/components/AddonUpdateService.js
@@ -40,17 +40,17 @@ const PREF_ADDON_UPDATE_INTERVAL = "exte
 
 var gNeedsRestart = false;
 
 function AddonUpdateService() {}
 
 AddonUpdateService.prototype = {
   classDescription: "Add-on auto-update management",
   classID: Components.ID("{93c8824c-9b87-45ae-bc90-5b82a1e4d877}"),
-  
+
   QueryInterface: XPCOMUtils.generateQI([Ci.nsITimerCallback]),
 
   notify: function aus_notify(aTimer) {
     if (aTimer && !getPref("getBoolPref", PREF_ADDON_UPDATE_ENABLED, true))
       return;
 
     // If we already auto-upgraded and installed new versions, ignore this check
     if (gNeedsRestart)
--- a/mobile/android/components/BlocklistPrompt.js
+++ b/mobile/android/components/BlocklistPrompt.js
@@ -23,24 +23,24 @@ BlocklistPrompt.prototype = {
       win.ExtensionsView.showRestart("blocked");
     } else {
       let bundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
       let notifyBox = win.getNotificationBox();
       let restartCallback = function(aNotification, aDescription) {
         // Notify all windows that an application quit has been requested
         var cancelQuit = Cc["@mozilla.org/supports-PRBool;1"].createInstance(Ci.nsISupportsPRBool);
         Services.obs.notifyObservers(cancelQuit, "quit-application-requested", "restart");
-  
+
         // If nothing aborted, quit the app
         if (cancelQuit.data == false) {
           let appStartup = Cc["@mozilla.org/toolkit/app-startup;1"].getService(Ci.nsIAppStartup);
           appStartup.quit(Ci.nsIAppStartup.eRestart | Ci.nsIAppStartup.eAttemptQuit);
         }
       };
-      
+
       let buttons = [{accessKey: null,
                       label: bundle.GetStringFromName("notificationRestart.button"),
                       callback: restartCallback}];
       notifyBox.appendNotification(bundle.GetStringFromName("notificationRestart.blocked"),
                                    "blocked-add-on",
                                    "",
                                    "PRIORITY_CRITICAL_HIGH",
                                    buttons);
--- a/mobile/android/components/DirectoryProvider.js
+++ b/mobile/android/components/DirectoryProvider.js
@@ -129,17 +129,17 @@ DirectoryProvider.prototype = {
 
     // We didn't append the locale dir - try the default one.
     try {
       let defLocale = Services.prefs.getCharPref("distribution.searchplugins.defaultLocale");
       let defLocalePlugins = localePlugins.clone();
       defLocalePlugins.append(defLocale);
       if (defLocalePlugins.exists())
         array.push(defLocalePlugins);
-    } catch(e) {
+    } catch (e) {
     }
   },
 
   getFiles: function(prop) {
     if (prop != NS_APP_SEARCH_DIR_LIST &&
         prop != NS_APP_DISTRIBUTION_SEARCH_DIR_LIST)
       return null;
 
--- a/mobile/android/components/FilePicker.js
+++ b/mobile/android/components/FilePicker.js
@@ -31,17 +31,17 @@ FilePicker.prototype = {
   _addToRecentDocs: false,
   _title: "",
 
   init: function(aParent, aTitle, aMode) {
     this._domWin = aParent;
     this._mode = aMode;
     this._title = aTitle;
 
-    let idService = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator); 
+    let idService = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator);
     this.guid = idService.generateUUID().toString();
 
     if (aMode != Ci.nsIFilePicker.modeOpen && aMode != Ci.nsIFilePicker.modeOpenMultiple)
       throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
   },
 
   appendFilters: function(aFilterMask) {
     if (aFilterMask & Ci.nsIFilePicker.filterAudio) {
@@ -109,17 +109,17 @@ FilePicker.prototype = {
 
   get filterIndex() {
     return this._filterIndex;
   },
 
   set filterIndex(val) {
     this._filterIndex = val;
   },
-  
+
   get displayDirectory() {
     return this._displayDirectory;
   },
 
   set displayDirectory(dir) {
     this._displayDirectory = dir;
   },
 
@@ -274,17 +274,17 @@ FilePicker.prototype = {
     try {
       if (!aDomWin.document)
         return;
       let event = aDomWin.document.createEvent("Events");
       event.initEvent(aEventName, true, true);
       let winUtils = aDomWin.QueryInterface(Ci.nsIInterfaceRequestor)
                            .getInterface(Ci.nsIDOMWindowUtils);
       winUtils.dispatchEventToChromeOnly(aDomWin, event);
-    } catch(ex) {
+    } catch (ex) {
     }
   },
 
   classID: Components.ID("{18a4e042-7c7c-424b-a583-354e68553a7f}"),
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIFilePicker, Ci.nsIObserver])
 };
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([FilePicker]);
--- a/mobile/android/components/HelperAppDialog.js
+++ b/mobile/android/components/HelperAppDialog.js
@@ -299,17 +299,17 @@ HelperAppLauncherDialog.prototype = {
 
   _getPreferredApp: function getPreferredApp(launcher) {
     let mime = this._getMimeTypeFromLauncher(launcher);
     if (!mime)
       return;
 
     try {
       return Services.prefs.getCharPref(this._getPrefName(mime));
-    } catch(ex) {
+    } catch (ex) {
       Services.console.logStringMessage("Error getting pref for " + mime + ".");
     }
     return null;
   },
 
   _setPreferredApp: function setPreferredApp(launcher, app) {
     let mime = this._getMimeTypeFromLauncher(launcher);
     if (!mime)
--- a/mobile/android/components/ImageBlockingPolicy.js
+++ b/mobile/android/components/ImageBlockingPolicy.js
@@ -90,17 +90,17 @@ ImageBlockingPolicy.prototype = {
         network.linkType == Ci.nsINetworkLinkService.LINK_TYPE_USB  ||
         network.linkType == Ci.nsINetworkLinkService.LINK_TYPE_WIFI);
   },
 
   _enabled: function() {
     return Services.prefs.getIntPref(PREF_IMAGEBLOCKING);
   },
 
-  observe : function (subject, topic, data) {
+  observe: function (subject, topic, data) {
     if (topic == TOPIC_GATHER_TELEMETRY) {
       Services.telemetry.getHistogramById(TELEMETRY_TAP_TO_LOAD_ENABLED).add(this._enabled());
     }
   },
 };
 
 function sendImageSizeTelemetry(imageURL) {
   let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Ci.nsIXMLHttpRequest);
--- a/mobile/android/components/LoginManagerPrompter.js
+++ b/mobile/android/components/LoginManagerPrompter.js
@@ -28,88 +28,88 @@ const PROMPT_UPDATE = 1;
  *
  * nsILoginManagerPrompter: Used by Login Manager for saving/changing logins
  * found in HTML forms.
  */
 function LoginManagerPrompter() {
 }
 
 LoginManagerPrompter.prototype = {
-  classID : Components.ID("97d12931-abe2-11df-94e2-0800200c9a66"),
-  QueryInterface : XPCOMUtils.generateQI([Ci.nsILoginManagerPrompter]),
+  classID: Components.ID("97d12931-abe2-11df-94e2-0800200c9a66"),
+  QueryInterface: XPCOMUtils.generateQI([Ci.nsILoginManagerPrompter]),
 
-  _factory       : null,
-  _window       : null,
-  _debug         : false, // mirrors signon.debug
+  _factory: null,
+  _window: null,
+  _debug: false, // mirrors signon.debug
 
-  __pwmgr : null, // Password Manager service
+  __pwmgr: null, // Password Manager service
   get _pwmgr() {
     if (!this.__pwmgr)
       this.__pwmgr = Cc["@mozilla.org/login-manager;1"].
                      getService(Ci.nsILoginManager);
     return this.__pwmgr;
   },
 
-  __promptService : null, // Prompt service for user interaction
+  __promptService: null, // Prompt service for user interaction
   get _promptService() {
     if (!this.__promptService)
       this.__promptService = Cc["@mozilla.org/embedcomp/prompt-service;1"].
                              getService(Ci.nsIPromptService2);
     return this.__promptService;
   },
 
-  __strBundle : null, // String bundle for L10N
+  __strBundle: null, // String bundle for L10N
   get _strBundle() {
     if (!this.__strBundle) {
       let bunService = Cc["@mozilla.org/intl/stringbundle;1"].
                        getService(Ci.nsIStringBundleService);
       this.__strBundle = {
-        pwmgr : bunService.createBundle("chrome://passwordmgr/locale/passwordmgr.properties"),
-        brand : bunService.createBundle("chrome://branding/locale/brand.properties")
+        pwmgr: bunService.createBundle("chrome://passwordmgr/locale/passwordmgr.properties"),
+        brand: bunService.createBundle("chrome://branding/locale/brand.properties")
       };
 
       if (!this.__strBundle)
         throw "String bundle for Login Manager not present!";
     }
 
     return this.__strBundle;
   },
 
-  __ellipsis : null,
+  __ellipsis: null,
   get _ellipsis() {
   if (!this.__ellipsis) {
     this.__ellipsis = "\u2026";
     try {
       this.__ellipsis = Services.prefs.getComplexValue(
                         "intl.ellipsis", Ci.nsIPrefLocalizedString).data;
     } catch (e) { }
   }
   return this.__ellipsis;
   },
 
   /*
    * log
    *
    * Internal function for logging debug messages to the Error Console window.
    */
-  log : function (message) {
+  log: function (message) {
     if (!this._debug)
       return;
 
     dump("Pwmgr Prompter: " + message + "\n");
     Services.console.logStringMessage("Pwmgr Prompter: " + message);
   },
 
   /* ---------- nsILoginManagerPrompter prompts ---------- */
 
   /*
    * init
    *
    */
-  init : function (aWindow, aFactory) {
+  init: function (aWindow, aFactory) {
     this._chromeWindow = this._getChromeWindow(aWindow).wrappedJSObject;
     this._factory = aFactory || null;
     this._browser = null;
 
     var prefBranch = Services.prefs.getBranch("signon.");
     this._debug = prefBranch.getBoolPref("debug");
     this.log("===== initialized =====");
   },
@@ -121,17 +121,17 @@ LoginManagerPrompter.prototype = {
   // setting this attribute is ignored because Android does not consider
   // opener windows when displaying login notifications
   set opener(aOpener) { },
 
   /*
    * promptToSavePassword
    *
    */
-  promptToSavePassword : function (aLogin) {
+  promptToSavePassword: function (aLogin) {
     this._showSaveLoginNotification(aLogin);
       Services.telemetry.getHistogramById("PWMGR_PROMPT_REMEMBER_ACTION").add(PROMPT_DISPLAYED);
     Services.obs.notifyObservers(aLogin, "passwordmgr-prompt-save");
   },
 
   /*
    * _showLoginNotification
    *
@@ -140,17 +140,17 @@ LoginManagerPrompter.prototype = {
    *        String message to be displayed in the doorhanger
    * @param aButtons
    *        Buttons to display with the doorhanger
    * @param aUsername
    *        Username string used in creating a doorhanger action
    * @param aPassword
    *        Password string used in creating a doorhanger action
    */
-  _showLoginNotification : function (aBody, aButtons, aUsername, aPassword) {
+  _showLoginNotification: function (aBody, aButtons, aUsername, aPassword) {
     let tabID = this._chromeWindow.BrowserApp.getTabForBrowser(this._browser).id;
 
     let actionText = {
       text: aUsername,
       type: "EDIT",
       bundle: { username: aUsername,
       password: aPassword }
     };
@@ -176,17 +176,17 @@ LoginManagerPrompter.prototype = {
   /*
    * _showSaveLoginNotification
    *
    * Displays a notification doorhanger (rather than a popup), to allow the user to
    * save the specified login. This allows the user to see the results of
    * their login, and only save a login which they know worked.
    *
    */
-  _showSaveLoginNotification : function (aLogin) {
+  _showSaveLoginNotification: function (aLogin) {
     let brandShortName = this._strBundle.brand.GetStringFromName("brandShortName");
     let notificationText  = this._getLocalizedString("saveLogin", [brandShortName]);
 
     let username = aLogin.username ? this._sanitizeUsername(aLogin.username) : "";
 
     // The callbacks in |buttons| have a closure to access the variables
     // in scope here; set one to |this._pwmgr| so we can get back to pwmgr
     // without a getService() call.
@@ -221,30 +221,30 @@ LoginManagerPrompter.prototype = {
   /*
    * promptToChangePassword
    *
    * Called when we think we detect a password change for an existing
    * login, when the form being submitted contains multiple password
    * fields.
    *
    */
-  promptToChangePassword : function (aOldLogin, aNewLogin) {
+  promptToChangePassword: function (aOldLogin, aNewLogin) {
     this._showChangeLoginNotification(aOldLogin, aNewLogin.password);
     Services.telemetry.getHistogramById("PWMGR_PROMPT_UPDATE_ACTION").add(PROMPT_DISPLAYED);
     let oldGUID = aOldLogin.QueryInterface(Ci.nsILoginMetaInfo).guid;
     Services.obs.notifyObservers(aNewLogin, "passwordmgr-prompt-change", oldGUID);
   },
 
   /*
    * _showChangeLoginNotification
    *
    * Shows the Change Password notification doorhanger.
    *
    */
-  _showChangeLoginNotification : function (aOldLogin, aNewPassword) {
+  _showChangeLoginNotification: function (aOldLogin, aNewPassword) {
     var notificationText;
     if (aOldLogin.username) {
       let displayUser = this._sanitizeUsername(aOldLogin.username);
       notificationText  = this._getLocalizedString("updatePassword", [displayUser]);
     } else {
       notificationText  = this._getLocalizedString("updatePasswordNoUser");
     }
 
@@ -282,20 +282,20 @@ LoginManagerPrompter.prototype = {
    *
    * Called when we detect a password change in a form submission, but we
    * don't know which existing login (username) it's for. Asks the user
    * to select a username and confirm the password change.
    *
    * Note: The caller doesn't know the username for aNewLogin, so this
    *       function fills in .username and .usernameField with the values
    *       from the login selected by the user.
-   * 
+   *
    * Note; XPCOM stupidity: |count| is just |logins.length|.
    */
-  promptToChangePasswordWithUsernames : function (logins, count, aNewLogin) {
+  promptToChangePasswordWithUsernames: function (logins, count, aNewLogin) {
     const buttonFlags = Ci.nsIPrompt.STD_YES_NO_BUTTONS;
 
     var usernames = logins.map(l => l.username);
     var dialogText  = this._getLocalizedString("userSelectText2");
     var dialogTitle = this._getLocalizedString("passwordChangeTitle");
     var selectedIndex = { value: null };
 
     // If user selects ok, outparam.value is set to the index
@@ -312,17 +312,17 @@ LoginManagerPrompter.prototype = {
     }
   },
 
   /* ---------- Internal Methods ---------- */
 
   /*
    * _updateLogin
    */
-  _updateLogin : function (login, newPassword) {
+  _updateLogin: function (login, newPassword) {
     var now = Date.now();
     var propBag = Cc["@mozilla.org/hash-property-bag;1"].
       createInstance(Ci.nsIWritablePropertyBag);
     if (newPassword) {
       propBag.setProperty("password", newPassword);
       // Explicitly set the password change time here (even though it would
       // be changed automatically), to ensure that it's exactly the same
       // value as timeLastUsed.
@@ -349,17 +349,17 @@ LoginManagerPrompter.prototype = {
   },
 
   /*
    * _getNativeWindow
    *
    * Returns the NativeWindow to this prompter, or null if there isn't
    * a NativeWindow available (w/ error sent to logcat).
    */
-  _getNativeWindow : function () {
+  _getNativeWindow: function () {
     let nativeWindow = null;
     try {
       let chromeWin = this._chromeWindow;
       if (chromeWin.NativeWindow) {
         nativeWindow = chromeWin.NativeWindow;
       } else {
         Cu.reportError("NativeWindow not available on window");
       }
@@ -378,33 +378,33 @@ LoginManagerPrompter.prototype = {
    *   _getLocalizedString("key1");
    *   _getLocalizedString("key2", ["arg1"]);
    *   _getLocalizedString("key3", ["arg1", "arg2"]);
    *   (etc)
    *
    * Returns the localized string for the specified key,
    * formatted if required.
    *
-   */ 
-  _getLocalizedString : function (key, formatArgs) {
+   */
+  _getLocalizedString: function (key, formatArgs) {
     if (formatArgs)
       return this._strBundle.pwmgr.formatStringFromName(
         key, formatArgs, formatArgs.length);
     else
       return this._strBundle.pwmgr.GetStringFromName(key);
   },
 
   /*
    * _sanitizeUsername
    *
    * Sanitizes the specified username, by stripping quotes and truncating if
    * it's too long. This helps prevent an evil site from messing with the
    * "save password?" prompt too much.
    */
-  _sanitizeUsername : function (username) {
+  _sanitizeUsername: function (username) {
     if (username.length > 30) {
       username = username.substring(0, 30);
       username += this._ellipsis;
     }
     return username.replace(/['"]/g, "");
   },
 }; // end of LoginManagerPrompter implementation
 
--- a/mobile/android/components/PresentationRequestUIGlue.js
+++ b/mobile/android/components/PresentationRequestUIGlue.js
@@ -49,17 +49,17 @@ PresentationRequestUIGlue.prototype = {
 
         let data = JSON.parse(aData);
         if (data.requestId != requestId) {
           return;
         }
 
         Services.obs.removeObserver(handleObserve,
                                     TOPIC_PRESENTATION_RECEIVER_LAUNCH_RESPONSE);
-        switch(data.result) {
+        switch (data.result) {
           case "success":
             aResolve(aSubject);
             break;
           case "error":
             aReject();
             break;
         };
       };
--- a/mobile/android/components/PromptService.js
+++ b/mobile/android/components/PromptService.js
@@ -386,28 +386,28 @@ InternalPrompt.prototype = {
     if (ok)
       aOutSelection.value = data.menulist0;
 
     return ok;
   },
 
   /* ----------  nsIAuthPrompt  ---------- */
 
-  nsIAuthPrompt_prompt : function (title, text, passwordRealm, savePassword, defaultText, result) {
+  nsIAuthPrompt_prompt: function (title, text, passwordRealm, savePassword, defaultText, result) {
     // TODO: Port functions from nsLoginManagerPrompter.js to here
     if (defaultText)
       result.value = defaultText;
     return this.nsIPrompt_prompt(title, text, result, null, {});
   },
 
-  nsIAuthPrompt_promptUsernameAndPassword : function(aTitle, aText, aPasswordRealm, aSavePassword, aUser, aPass) {
+  nsIAuthPrompt_promptUsernameAndPassword: function(aTitle, aText, aPasswordRealm, aSavePassword, aUser, aPass) {
     return this.nsIAuthPrompt_loginPrompt(aTitle, aText, aPasswordRealm, aSavePassword, aUser, aPass);
   },
 
-  nsIAuthPrompt_promptPassword : function(aTitle, aText, aPasswordRealm, aSavePassword, aPass) {
+  nsIAuthPrompt_promptPassword: function(aTitle, aText, aPasswordRealm, aSavePassword, aPass) {
     return this.nsIAuthPrompt_loginPrompt(aTitle, aText, aPasswordRealm, aSavePassword, null, aPass);
   },
 
   nsIAuthPrompt_loginPrompt: function(aTitle, aPasswordRealm, aSavePassword, aUser, aPass) {
     let checkMsg = null;
     let check = { value: false };
     let hostname, realm;
     [hostname, realm, aUser] = PromptUtils.getHostnameAndRealm(aPasswordRealm);
@@ -468,17 +468,17 @@ InternalPrompt.prototype = {
       PromptUtils.savePassword(foundLogins, username, password, hostname, httpRealm);
 
     return ok;
   },
 
   _asyncPrompts: {},
   _asyncPromptInProgress: false,
 
-  _doAsyncPrompt : function() {
+  _doAsyncPrompt: function() {
     if (this._asyncPromptInProgress)
       return;
 
     // Find the first prompt key we have in the queue
     let hashKey = null;
     for (hashKey in this._asyncPrompts)
       break;
 
@@ -558,17 +558,17 @@ InternalPrompt.prototype = {
         return cancelable;
       }
 
       asyncPrompt = {
         consumers: [cancelable],
         channel: aChannel,
         authInfo: aAuthInfo,
         level: aLevel,
-        inProgress : false,
+        inProgress: false,
         prompter: this
       }
 
       this._asyncPrompts[hashKey] = asyncPrompt;
       this._doAsyncPrompt();
     } catch (e) {
       Cu.reportError("PromptService: " + e + "\n");
       throw e;
@@ -757,17 +757,17 @@ var PromptUtils = {
       res.port = proxy.proxyInfo.port;
     } else {
       res.host = uri.host;
       res.port = uri.port;
     }
     return res;
   },
 
-  getAuthTarget : function pu_getAuthTarget(aChannel, aAuthInfo) {
+  getAuthTarget: function pu_getAuthTarget(aChannel, aAuthInfo) {
     let hostname, realm;
     // If our proxy is demanding authentication, don't use the
     // channel's actual destination.
     if (aAuthInfo.flags & Ci.nsIAuthInformation.AUTH_PROXY) {
         if (!(aChannel instanceof Ci.nsIProxiedChannel))
           throw "proxy auth needs nsIProxiedChannel";
 
       let info = aChannel.proxyInfo;
@@ -791,32 +791,32 @@ var PromptUtils = {
     // the formatted hostname instead.
     realm = aAuthInfo.realm;
     if (!realm)
       realm = hostname;
 
     return [hostname, realm];
   },
 
-  getAuthInfo : function pu_getAuthInfo(aAuthInfo) {
+  getAuthInfo: function pu_getAuthInfo(aAuthInfo) {
     let flags = aAuthInfo.flags;
     let username = {value: ""};
     let password = {value: ""};
 
     if (flags & Ci.nsIAuthInformation.NEED_DOMAIN && aAuthInfo.domain)
       username.value = aAuthInfo.domain + "\\" + aAuthInfo.username;
     else
       username.value = aAuthInfo.username;
 
     password.value = aAuthInfo.password
 
     return [username, password];
   },
 
-  setAuthInfo : function (aAuthInfo, username, password) {
+  setAuthInfo: function (aAuthInfo, username, password) {
     var flags = aAuthInfo.flags;
     if (flags & Ci.nsIAuthInformation.NEED_DOMAIN) {
       // Domain is separated from username by a backslash
       var idx = username.indexOf("\\");
       if (idx == -1) {
         aAuthInfo.username = username;
       } else {
         aAuthInfo.domain   =  username.substring(0, idx);
@@ -826,31 +826,31 @@ var PromptUtils = {
       aAuthInfo.username = username;
     }
     aAuthInfo.password = password;
   },
 
   /**
    * Strip out things like userPass and path for display.
    */
-  getFormattedHostname : function pu_getFormattedHostname(uri) {
+  getFormattedHostname: function pu_getFormattedHostname(uri) {
     return uri.scheme + "://" + uri.hostPort;
   },
 
   fireDialogEvent: function(aDomWin, aEventName) {
     // accessing the document object can throw if this window no longer exists. See bug 789888.
     try {
       if (!aDomWin.document)
         return;
       let event = aDomWin.document.createEvent("Events");
       event.initEvent(aEventName, true, true);
       let winUtils = aDomWin.QueryInterface(Ci.nsIInterfaceRequestor)
                            .getInterface(Ci.nsIDOMWindowUtils);
       winUtils.dispatchEventToChromeOnly(aDomWin, event);
-    } catch(ex) {
+    } catch (ex) {
     }
   }
 };
 
 XPCOMUtils.defineLazyGetter(PromptUtils, "passwdBundle", function () {
   return Services.strings.createBundle("chrome://passwordmgr/locale/passwordmgr.properties");
 });
 
--- a/mobile/android/components/SessionStore.js
+++ b/mobile/android/components/SessionStore.js
@@ -702,17 +702,17 @@ SessionStore.prototype = {
 
       this._lastClosedTabIndex = aTabIndex;
 
       if (this._notifyClosedTabs) {
         this._sendClosedTabsToJava(aWindow);
       }
 
       log("onTabClose() ran for tab " + tab.id);
-      let evt = new Event("SSTabCloseProcessed", {"bubbles":true, "cancelable":false});
+      let evt = new Event("SSTabCloseProcessed", {"bubbles": true, "cancelable": false});
       aBrowser.dispatchEvent(evt);
     }
   },
 
   _sessionDataIsEmpty: function ss_sessionDataIsEmpty(aData) {
     if (!aData || !aData.entries || aData.entries.length == 0) {
       return true;
     }
@@ -782,17 +782,17 @@ SessionStore.prototype = {
       this.onTabInput(aWindow, aBrowser);
       // A similar thing applies for the scroll position, otherwise a stray
       // DOMTitleChanged event can clobber the scroll position if the user
       // doesn't scroll again afterwards.
       this.onTabScroll(aWindow, aBrowser);
     }
 
     log("onTabLoad() ran for tab " + aWindow.BrowserApp.getTabForBrowser(aBrowser).id);
-    let evt = new Event("SSTabDataUpdated", {"bubbles":true, "cancelable":false});
+    let evt = new Event("SSTabDataUpdated", {"bubbles": true, "cancelable": false});
     aBrowser.dispatchEvent(evt);
     this.saveStateDelayed();
 
     this._updateCrashReportURL(aWindow);
   },
 
   onTabSelect: function ss_onTabSelect(aWindow, aBrowser) {
     if (this._loadState != STATE_RUNNING) {
@@ -961,17 +961,17 @@ SessionStore.prototype = {
     // Save some data that'll help in adjusting the zoom level
     // when restoring in a different screen orientation.
     scrolldata.zoom.displaySize = this._getContentViewerSize(content);
     log("onTabScroll() displayWidth: " + scrolldata.zoom.displaySize.width);
 
     // Save zoom and scroll data.
     data.scrolldata = scrolldata;
     log("onTabScroll() ran for tab " + aWindow.BrowserApp.getTabForBrowser(aBrowser).id);
-    let evt = new Event("SSTabScrollCaptured", {"bubbles":true, "cancelable":false});
+    let evt = new Event("SSTabScrollCaptured", {"bubbles": true, "cancelable": false});
     aBrowser.dispatchEvent(evt);
     this.saveStateDelayed();
   },
 
   _getContentViewerSize: function ss_getContentViewerSize(aWindow) {
     let displaySize = {};
     let width = {}, height = {};
     aWindow.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(
--- a/mobile/android/components/extensions/ext-browsingData.js
+++ b/mobile/android/components/extensions/ext-browsingData.js
@@ -61,17 +61,17 @@ this.browsingData = class extends Extens
           let name;
 
           let dataToRemove = {};
           let dataRemovalPermitted = {};
 
           for (let item of PREF_LIST) {
             // The property formData needs a different case than the
             // formdata preference.
-            switch(item){
+            switch (item){
               case "formdata":
                 name = "formData";
                 break;
               case "cookies_sessions":
                 name = "cookies";
                 break;
               case "downloadFiles":
                 name = "downloads";
@@ -92,9 +92,9 @@ this.browsingData = class extends Extens
           return clearCookies(options);
         },
         removeCache(options) {
           return Sanitizer.clearItem("cache");
         },
       },
     };
   }
-};
\ No newline at end of file
+};
--- a/mobile/android/components/extensions/test/mochitest/test_ext_browsingData_cookies_cache.html
+++ b/mobile/android/components/extensions/test/mochitest/test_ext_browsingData_cookies_cache.html
@@ -134,9 +134,9 @@ add_task(async function testCache() {
 
   await testRemovalMethod("removeCache");
 
   await extension.unload();
 });
 </script>
 
 </body>
-</html>
\ No newline at end of file
+</html>
--- a/mobile/android/components/extensions/test/mochitest/test_ext_browsingData_settings.html
+++ b/mobile/android/components/extensions/test/mochitest/test_ext_browsingData_settings.html
@@ -25,17 +25,17 @@ function checkPrefs(key, actualValue, pr
   let prefValue = prefs.includes(`${PREF_KEY_PREFIX}${prefSuffix}`);
   is(actualValue, prefValue, `${key} property of dataToRemove matches the expected pref.`);
 }
 
 function testSettingsPreferences(dataToRemove){
   let prefs = SharedPreferences.forProfile().getSetPref(PREF_DOMAIN);
 
   for (let key of Object.keys(dataToRemove)) {
-    switch(key){
+    switch (key){
       case "formData":
         checkPrefs(key, dataToRemove[key], prefs, "formdata");
         break;
       case "cookies":
         checkPrefs(key, dataToRemove[key], prefs, "cookies_sessions");
         break;
       case "downloads":
         checkPrefs(key, dataToRemove[key], prefs, "downloadFiles");
@@ -93,9 +93,9 @@ add_task(async function testSettings() {
   let settings = await extension.awaitMessage("settings");
   testSettingsPreferences(settings.dataToRemove);
 
   await extension.unload();
 });
 </script>
 
 </body>
-</html>
\ No newline at end of file
+</html>
--- a/mobile/android/components/geckoview/GeckoViewPrompt.js
+++ b/mobile/android/components/geckoview/GeckoViewPrompt.js
@@ -441,17 +441,17 @@ PromptDelegate.prototype = {
                       true, true);
       winUtils.dispatchEventToChromeOnly(this._domWin, event);
 
       if (aEntering) {
         winUtils.enterModalState();
       }
       return true;
 
-    } catch(ex) {
+    } catch (ex) {
       Cu.reportError("Failed to change modal state: " + e);
     }
     return false;
   },
 
   /**
    * Shows a native prompt, and then spins the event loop for this thread while we wait
    * for a response
--- a/mobile/android/modules/DownloadNotifications.jsm
+++ b/mobile/android/modules/DownloadNotifications.jsm
@@ -224,17 +224,17 @@ DownloadNotification.prototype = {
     } else if (this._succeeded) {
       options.persistent = false;
       this._updateOptionsForStatic(options, "alertDownloadsDone2");
     }
 
     return options;
   },
 
-  _updateOptionsForStatic : function (options, titleName) {
+  _updateOptionsForStatic: function (options, titleName) {
     options.title = strings.GetStringFromName(titleName);
     options.message = this._fileName;
   },
 
   _updateOptionsForOngoing: function (options, buttons) {
     options.title = this._fileName;
     options.message = this.download.progress + "%";
     options.buttons = buttons;
--- a/mobile/android/modules/HelperApps.jsm
+++ b/mobile/android/modules/HelperApps.jsm
@@ -17,17 +17,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
                                   "resource://gre/modules/Messaging.jsm");
 
 XPCOMUtils.defineLazyGetter(this, "ContentAreaUtils", function() {
   let ContentAreaUtils = {};
   Services.scriptloader.loadSubScript("chrome://global/content/contentAreaUtils.js", ContentAreaUtils);
   return ContentAreaUtils;
 });
 
-this.EXPORTED_SYMBOLS = ["App","HelperApps"];
+this.EXPORTED_SYMBOLS = ["App", "HelperApps"];
 
 function App(data) {
   this.name = data.name;
   this.isDefault = data.isDefault;
   this.packageName = data.packageName;
   this.activityName = data.activityName;
   this.iconUri = "-moz-icon://" + data.packageName;
 }
@@ -93,17 +93,17 @@ var HelperApps =  {
     let results = {};
     for (let i = 0; i < protoHandlers.length; i++) {
       try {
         let protoApp = protoHandlers.queryElementAt(i, Ci.nsIHandlerApp);
         results[protoApp.name] = new App({
           name: protoApp.name,
           description: protoApp.detailedDescription,
         });
-      } catch(e) {}
+      } catch (e) {}
     }
 
     return results;
   },
 
   getAppsForUri: function getAppsForUri(uri, flags = { }, callback) {
     // Return early for well-known internal schemes
     if (!uri || uri.schemeIs("about") || uri.schemeIs("chrome")) {
@@ -172,20 +172,20 @@ var HelperApps =  {
 
   _parseApps: function _parseApps(appInfo) {
     // appInfo -> {apps: [app1Label, app1Default, app1PackageName, app1ActivityName, app2Label, app2Defaut, ...]}
     // see GeckoAppShell.java getHandlersForIntent function for details
     const numAttr = 4; // 4 elements per ResolveInfo: label, default, package name, activity name.
 
     let apps = [];
     for (let i = 0; i < appInfo.length; i += numAttr) {
-      apps.push(new App({"name" : appInfo[i],
-                 "isDefault" : appInfo[i+1],
-                 "packageName" : appInfo[i+2],
-                 "activityName" : appInfo[i+3]}));
+      apps.push(new App({"name": appInfo[i],
+                 "isDefault": appInfo[i+1],
+                 "packageName": appInfo[i+2],
+                 "activityName": appInfo[i+3]}));
     }
 
     return apps;
   },
 
   _getMessage: function(type, uri, options = {}) {
     let mimeType = options.mimeType;
     if (uri && mimeType == undefined) {
--- a/mobile/android/modules/Home.jsm
+++ b/mobile/android/modules/Home.jsm
@@ -120,17 +120,17 @@ var HomeBanner = (function () {
   let _handleDismiss = function(id) {
     let message = _messages[id];
     if (message.ondismiss)
       message.ondismiss();
   };
 
   return Object.freeze({
     onEvent: function(event, data, callback) {
-      switch(event) {
+      switch (event) {
         case "HomeBanner:Click":
           _handleClick(data.id);
           break;
 
         case "HomeBanner:Dismiss":
           _handleDismiss(data.id);
           break;
       }
@@ -199,17 +199,17 @@ var HomePanels = (function () {
       let ids = data.ids || null;
 
       let panels = [];
       for (let id in _registeredPanels) {
         // Null ids means we want to fetch all available panels
         if (ids == null || ids.indexOf(id) >= 0) {
           try {
             panels.push(_generatePanel(id));
-          } catch(e) {
+          } catch (e) {
             Cu.reportError("Home.panels: Invalid options, panel.id = " + id + ": " + e);
           }
         }
       }
 
       EventDispatcher.instance.sendRequest({
         type: "HomePanels:Data",
         panels: panels,
--- a/mobile/android/modules/HomeProvider.jsm
+++ b/mobile/android/modules/HomeProvider.jsm
@@ -262,17 +262,17 @@ function getDatabaseConnection() {
       // version is undefined.
       if (dbVersion === 0) {
         yield createDatabase(db);
       } else if (dbVersion < SCHEMA_VERSION) {
         yield upgradeDatabase(db, dbVersion, SCHEMA_VERSION);
       }
 
       yield db.setSchemaVersion(SCHEMA_VERSION);
-    } catch(e) {
+    } catch (e) {
       // Close the DB connection before passing the exception to the consumer.
       yield db.close();
       throw e;
     }
 
     gDatabaseEnsured = true;
     return db;
   });
--- a/mobile/android/modules/JNI.jsm
+++ b/mobile/android/modules/JNI.jsm
@@ -1,17 +1,17 @@
 // JavaScript to Java bridge via the Java Native Interface
 // Allows calling into Android SDK from JavaScript in Firefox Add-On.
 // Released into the public domain.
 //  C. Scott Ananian <cscott@laptop.org> (http://cscott.net)
 
 // NOTE: All changes to this file should first be pushed to the repo at:
 // https://github.com/cscott/skeleton-addon-fxandroid/tree/jni
 
-var EXPORTED_SYMBOLS = ["JNI","android_log"];
+var EXPORTED_SYMBOLS = ["JNI", "android_log"];
 
 Components.utils.import("resource://gre/modules/ctypes.jsm")
 
 var liblog = ctypes.open('liblog.so');
 var android_log = liblog.declare("__android_log_write",
                              ctypes.default_abi,
                              ctypes.int32_t,
                              ctypes.int32_t,
@@ -897,17 +897,17 @@ function JNIClassSig(jenv, jcls) {
   var jmtd = jenvpp().GetMethodID(jenv, jclscls,
                                   "getName", "()Ljava/lang/String;");
   var name = jenvpp().CallObjectMethod(jenv, jcls, jmtd);
   name = JNIReadString(jenv, name);
   // API is weird.  Make sure we're using slashes not dots
   name = name.replace(/\./g, '/');
   // special case primitives, arrays
   if (name.charAt(0)==='[') return name;
-  switch(name) {
+  switch (name) {
   case 'void': return 'V';
   case 'boolean': return 'Z';
   case 'byte': return 'B';
   case 'char': return 'C';
   case 'short': return 'S';
   case 'int': return 'I';
   case 'long': return 'J';
   case 'float': return 'F';
--- a/mobile/android/modules/NetErrorHelper.jsm
+++ b/mobile/android/modules/NetErrorHelper.jsm
@@ -48,17 +48,17 @@ function NetErrorHelper(browser) {
 NetErrorHelper.attachToBrowser = function(browser) {
   return new NetErrorHelper(browser);
 }
 
 NetErrorHelper.prototype = {
   handleClick: function(event) {
     let node = event.target;
 
-    while(node) {
+    while (node) {
       if (node.id in handlers && handlers[node.id].handleClick) {
         handlers[node.id].handleClick(event);
         return;
       }
 
       node = node.parentNode;
     }
   },
@@ -122,17 +122,17 @@ handlers.wifi = {
         for (let i = 0; i < nodes.length; i++) {
           nodes[i].style.display = "none";
         }
       }
   },
 
   handleClick: function(event) {
     let node = event.target;
-    while(node && node.id !== "wifi") {
+    while (node && node.id !== "wifi") {
       node = node.parentNode;
     }
 
     if (!node) {
       return;
     }
 
     UITelemetry.addEvent("neterror.1", "button", null, "wifitoggle");
--- a/mobile/android/modules/Notifications.jsm
+++ b/mobile/android/modules/Notifications.jsm
@@ -117,18 +117,18 @@ Notification.prototype = {
 
     if (this._buttons) {
       msg.actions = [];
       let buttonName;
       for (buttonName in this._buttons) {
         let button = this._buttons[buttonName];
         let obj = {
           buttonId: button.buttonId,
-          title : button.title,
-          icon : button.icon
+          title: button.title,
+          icon: button.icon
         };
         msg.actions.push(obj);
       }
     }
 
     if (this._light)
       msg.light = this._light;
 
--- a/mobile/android/modules/Prompt.jsm
+++ b/mobile/android/modules/Prompt.jsm
@@ -120,17 +120,17 @@ Prompt.prototype = {
   },
 
   addPassword: function(aOptions) {
     return this._addInput({
       type: "password",
       value: aOptions.value,
       hint: aOptions.hint,
       autofocus: aOptions.autofocus,
-      id : aOptions.id
+      id: aOptions.id
     });
   },
 
   addDatePicker: function(aOptions) {
     return this._addInput({
       type: aOptions.type || "date",
       value: aOptions.value,
       id: aOptions.id,
--- a/mobile/android/modules/Sanitizer.jsm
+++ b/mobile/android/modules/Sanitizer.jsm
@@ -53,23 +53,23 @@ Sanitizer.prototype = {
       {
         return new Promise(function(resolve, reject) {
           let refObj = {};
           TelemetryStopwatch.start("FX_SANITIZE_CACHE", refObj);
 
           var cache = Cc["@mozilla.org/netwerk/cache-storage-service;1"].getService(Ci.nsICacheStorageService);
           try {
             cache.clear();
-          } catch(er) {}
+          } catch (er) {}
 
           let imageCache = Cc["@mozilla.org/image/tools;1"].getService(Ci.imgITools)
                                                            .getImgCacheForDocument(null);
           try {
             imageCache.clearCache(false); // true=chrome, false=content
-          } catch(er) {}
+          } catch (er) {}
 
           TelemetryStopwatch.finish("FX_SANITIZE_CACHE", refObj);
           resolve();
         });
       },
 
       get canClear()
       {
@@ -140,17 +140,17 @@ Sanitizer.prototype = {
     offlineApps: {
       clear: function ()
       {
         return new Promise(function(resolve, reject) {
           var cacheService = Cc["@mozilla.org/netwerk/cache-storage-service;1"].getService(Ci.nsICacheStorageService);
           var appCacheStorage = cacheService.appCacheStorage(LoadContextInfo.default, null);
           try {
             appCacheStorage.asyncEvictStorage(null);
-          } catch(er) {}
+          } catch (er) {}
 
           resolve();
         });
       },
 
       get canClear()
       {
           return true;
--- a/mobile/android/modules/WebsiteMetadata.jsm
+++ b/mobile/android/modules/WebsiteMetadata.jsm
@@ -173,23 +173,23 @@ const metadataRules = {
     rules: [
       ['meta[property="og:site_name"]', node => node.element.getAttribute('content')]
     ]
   },
 };
 
 function getMetadata(doc, url, rules) {
   const metadata = {};
-  const context = {url,doc};
+  const context = {url, doc};
   const ruleSet = rules || metadataRules;
 
   Object.keys(ruleSet).map(metadataKey => {
     const metadataRule = ruleSet[metadataKey];
 
-    if(Array.isArray(metadataRule.rules)) {
+    if (Array.isArray(metadataRule.rules)) {
       const builtRule = buildRuleset(metadataKey, metadataRule.rules, metadataRule.processors);
       metadata[metadataKey] = builtRule(doc, context);
     } else {
       metadata[metadataKey] = getMetadata(doc, url, metadataRule);
     }
   });
 
   return metadata;
--- a/mobile/android/modules/geckoview/GeckoViewProgress.jsm
+++ b/mobile/android/modules/geckoview/GeckoViewProgress.jsm
@@ -51,24 +51,24 @@ var IdentityHandler = {
   TRACKING_MODE_UNKNOWN: "unknown",
 
   // Blocked active tracking content. Shield icon is shown, with a popup option to load content.
   TRACKING_MODE_CONTENT_BLOCKED: "blocked",
 
   // Loaded active tracking content. Yellow triangle icon is shown.
   TRACKING_MODE_CONTENT_LOADED: "loaded",
 
-  _useTrackingProtection : false,
-  _usePrivateMode : false,
+  _useTrackingProtection: false,
+  _usePrivateMode: false,
 
-  setUseTrackingProtection : function(aUse) {
+  setUseTrackingProtection: function(aUse) {
     this._useTrackingProtection = aUse;
   },
 
-  setUsePrivateMode : function(aUse) {
+  setUsePrivateMode: function(aUse) {
     this._usePrivateMode = aUse;
   },
 
   /**
    * Determines the identity mode corresponding to the icon we show in the urlbar.
    */
   getIdentityMode: function getIdentityMode(aState) {
     if (aState & Ci.nsIWebProgressListener.STATE_IDENTITY_EV_TOPLEVEL) {
--- a/mobile/android/tests/browser/chrome/test_hidden_select_option.html
+++ b/mobile/android/tests/browser/chrome/test_hidden_select_option.html
@@ -33,17 +33,17 @@ https://bugzilla.mozilla.org/show_bug.cg
     // Returns an object for the callback method that would normally be created by Prompt.java's
     // addListResult(..) method.
     function createCallBackDummyData(select){
       var dummyList = [];
       let listElements = SelectHelper.getListForElement(select);
       for (var i = 0; i < listElements.length; i++) {
         dummyList.push(i);
       }
-      return {list:dummyList};
+      return {list: dummyList};
     }
 
     // Wait until the page has loaded so that we can access the DOM.
     SimpleTest.waitForExplicitFinish();
     window.onload = function () {
       let select = document.getElementById("sample-select");
 
       // ##############################################
@@ -61,17 +61,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 
       // ############################################
       // ### Testing SelectHelper._promptCallBack ###
       // ############################################
 
       // We will simulate "selecting" (ie choosing via the prompt) all the visible options...
       is(select.selectedOptions.length, 0, "No options selected yet.");
       let dummyData = createCallBackDummyData(select);
-      SelectHelper._promptCallBack(dummyData,select);
+      SelectHelper._promptCallBack(dummyData, select);
 
       // Check that only the visible options had the "selected" attribute set...
       let selectedOptions = select.selectedOptions;
       for (var i = 0; i < selectedOptions.length; i++) {
         ok(shouldBeVisible(selectedOptions[i]), "Element should be visible.");
       }
 
       // Check that no additional options had the "selected" attribute set...
--- a/mobile/android/tests/browser/chrome/test_select_disabled.html
+++ b/mobile/android/tests/browser/chrome/test_select_disabled.html
@@ -23,26 +23,26 @@ https://bugzilla.mozilla.org/show_bug.cg
     let SelectHelper = sandbox.SelectHelper;
 
     // Wait until the page has loaded so that we can access the DOM.
     SimpleTest.waitForExplicitFinish();
     window.onload = function () {
       // test options are not incorrectly disabled...
       let isEnabled1 = document.getElementById("is_enabled_1");
       let isEnabled2 = document.getElementById("is_enabled_2");
-      ok(!SelectHelper._isDisabledElement(isEnabled1),"input with name=\"disabled\" should not disable options (bug 1263589)");
-      ok(!SelectHelper._isDisabledElement(isEnabled2),"<form disabled> is not valid and will have no effect.");
+      ok(!SelectHelper._isDisabledElement(isEnabled1), "input with name=\"disabled\" should not disable options (bug 1263589)");
+      ok(!SelectHelper._isDisabledElement(isEnabled2), "<form disabled> is not valid and will have no effect.");
 
       // test options are disabled when expected...
       let isNotEnabled1 = document.getElementById("is_not_enabled_1");
       let isNotEnabled2 = document.getElementById("is_not_enabled_2");
       let isNotEnabled3 = document.getElementById("is_not_enabled_2");
-      ok(SelectHelper._isDisabledElement(isNotEnabled1),"<option disabled> is disabled.");
-      ok(SelectHelper._isDisabledElement(isNotEnabled2),"<optelement disabled> will have disabled children.");
-      ok(SelectHelper._isDisabledElement(isNotEnabled3),"<fieldset disabled> will have disabled children.");
+      ok(SelectHelper._isDisabledElement(isNotEnabled1), "<option disabled> is disabled.");
+      ok(SelectHelper._isDisabledElement(isNotEnabled2), "<optelement disabled> will have disabled children.");
+      ok(SelectHelper._isDisabledElement(isNotEnabled3), "<fieldset disabled> will have disabled children.");
 
       SimpleTest.finish();
     }
 
     </script>
 </head>
 <body>
 
@@ -80,9 +80,9 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 
 </p>
 <div id="content" style="display: none">
 </div>
 <pre id="test">
 </pre>
 </body>
-</html>
\ No newline at end of file
+</html>
--- a/mobile/android/tests/browser/chrome/test_session_clear_history.html
+++ b/mobile/android/tests/browser/chrome/test_session_clear_history.html
@@ -95,34 +95,34 @@ https://bugzilla.mozilla.org/show_bug.cg
     createFileIfNotExists(sessionFileTemp);
 
     ok(sessionFile.exists(), "session file exists");
     ok(sessionFileBackup.exists(), "backup file exists");
     ok(sessionFilePrevious.exists(), "last session file exists");
     ok(sessionFileTemp.exists(), "temp file exists");
 
     // Clear browsing history
-    let sanitize = { history:true };
+    let sanitize = { history: true };
     let notification = promiseNotification("sessionstore-state-purge-complete");
 
     BrowserApp.sanitize(sanitize);
     yield notification;
 
     ok(!sessionFile.exists(), "session file was deleted");
     ok(!sessionFileBackup.exists(), "backup file was deleted");
     ok(!sessionFilePrevious.exists(), "last session file was deleted");
     ok(!sessionFileTemp.exists(), "temp file was deleted");
 
     // Revert back to normal
     ss.setLoadState(STATE_RUNNING);
   });
 
   add_task(function* test_sessionStoreClearTabHistory() {
     // Add a new tab with some content
-    tabTest = BrowserApp.addTab(url1 , { selected: true, parentId: BrowserApp.selectedTab.id });
+    tabTest = BrowserApp.addTab(url1, { selected: true, parentId: BrowserApp.selectedTab.id });
     yield promiseBrowserEvent(tabTest.browser, "DOMTitleChanged");
 
     // Navigate to create some history
     tabTest.browser.loadURI(url2);
     yield promiseBrowserEvent(tabTest.browser, "DOMTitleChanged");
     tabTest.browser.loadURI(url3);
     yield promiseBrowserEvent(tabTest.browser, "DOMTitleChanged");
     is(tabTest.browser.canGoBack, true, "can go back");
@@ -131,34 +131,34 @@ https://bugzilla.mozilla.org/show_bug.cg
 
     // Check that the session store has recorded this history
     let data = tabTest.browser.__SS_data;
     is(data.entries.length, 3, "the session store has captured 3 history entries");
     is(data.index, 2, "history index is correct");
     is(data.entries[0].url, url1, "URL of first history entry is correct");
 
     // Clear browsing history
-    let sanitize = { history:true };
+    let sanitize = { history: true };
     let notification = promiseNotification("sessionstore-state-purge-complete");
 
     BrowserApp.sanitize(sanitize);
     yield notification;
 
     // Only the current session history entry should remain
     data = tabTest.browser.__SS_data;
     is(data.entries.length, 1, "the session store has cleared all previous entries");
     is(data.index, 1, "history index is correct");
     is(data.entries[0].url, url2, "URL of first history entry is correct after data clearing");
 
     cleanupTabs();
   });
 
   add_task(function* test_sessionStoreClearZombieTabHistory() {
     // Add a new tab with some content
-    tabTest = BrowserApp.addTab(url1 , { selected: true, parentId: BrowserApp.selectedTab.id });
+    tabTest = BrowserApp.addTab(url1, { selected: true, parentId: BrowserApp.selectedTab.id });
     yield promiseBrowserEvent(tabTest.browser, "DOMTitleChanged");
 
     // Navigate to create some history
     tabTest.browser.loadURI(url2);
     yield promiseBrowserEvent(tabTest.browser, "DOMTitleChanged");
     tabTest.browser.loadURI(url3);
     yield promiseBrowserEvent(tabTest.browser, "DOMTitleChanged");
     is(tabTest.browser.canGoBack, true, "can go back");
@@ -179,17 +179,17 @@ https://bugzilla.mozilla.org/show_bug.cg
     // Zombify the backgrounded test tab
     tabTest.zombify();
 
     // Check that the test tab is actually zombified
     ok(tabTest.browser.__SS_restore, "Test tab is set for delay loading.");
     is(tabTest.browser.currentURI.spec, "about:blank", "Test tab is zombified.");
 
     // Clear browsing history
-    let sanitize = { history:true };
+    let sanitize = { history: true };
     let notification = promiseNotification("sessionstore-state-purge-complete");
 
     BrowserApp.sanitize(sanitize);
     yield notification;
 
     // Only the current session history entry should remain
     data = tabTest.browser.__SS_data;
     is(data.entries.length, 1, "the session store has cleared all previous entries");
--- a/mobile/android/tests/browser/chrome/test_session_parentid.html
+++ b/mobile/android/tests/browser/chrome/test_session_parentid.html
@@ -54,49 +54,49 @@ https://bugzilla.mozilla.org/show_bug.cg
   const url = "data:text/html;charset=utf-8,It%20was%20a%20dark%20and%20stormy%20night.";
 
   add_task(function* test_sessionStoreParentId() {
     SimpleTest.registerCleanupFunction(function() {
       cleanupTabs();
     });
 
     // First, check that passing a parent tab ID works as expected
-    tabParent = BrowserApp.addTab(url , { selected: true });
+    tabParent = BrowserApp.addTab(url, { selected: true });
     yield promiseBrowserEvent(tabParent.browser, "DOMContentLoaded");
 
     // Open tabs without passing a parent tab ID
-    tabChild1 = BrowserApp.addTab(url , { selected: false });
-    tabChild2 = BrowserApp.addTab(url , { selected: true });
+    tabChild1 = BrowserApp.addTab(url, { selected: false });
+    tabChild2 = BrowserApp.addTab(url, { selected: true });
     yield promiseTabEvent(BrowserApp.deck, "TabSelect");
     is(BrowserApp.selectedTab, tabChild2, "2nd child tab is selected");
 
     // After closing that tab, its neighbour should be selected
     BrowserApp.closeTab(tabChild2);
     tabChild2 = null;
     yield promiseTabEvent(BrowserApp.deck, "TabSelect");
     is(BrowserApp.selectedTab, tabChild1, "1st child tab is selected");
 
     // Add a new tab and pass a parent tab ID this time
-    tabChild2 = BrowserApp.addTab(url , { selected: true, parentId: tabParent.id });
+    tabChild2 = BrowserApp.addTab(url, { selected: true, parentId: tabParent.id });
     yield promiseTabEvent(BrowserApp.deck, "TabSelect");
     is(BrowserApp.selectedTab, tabChild2, "2nd child tab is selected");
 
     // After closing that tab, its parent should be selected
     BrowserApp.closeTab(tabChild2);
     tabChild2 = null;
     yield promiseTabEvent(BrowserApp.deck, "TabSelect");
     is(BrowserApp.selectedTab, tabParent, "parent tab is selected");
 
     // Reset selection and switch to the other child tab
     BrowserApp.selectTab(tabChild1);
     yield promiseTabEvent(BrowserApp.deck, "TabSelect");
     is(BrowserApp.selectedTab, tabChild1, "1st child tab is selected");
 
     // Now check that this works even if the child tab is closed and subsequently restored
-    tabChild2 = BrowserApp.addTab(url , { selected: false, parentId: tabParent.id });
+    tabChild2 = BrowserApp.addTab(url, { selected: false, parentId: tabParent.id });
     yield promiseTabEvent(tabChild2.browser, "SSTabDataUpdated");
     BrowserApp.closeTab(tabChild2);
     yield promiseTabEvent(tabChild2.browser, "SSTabCloseProcessed");
 
     // Restore the tab
     let closedTabData = ss.getClosedTabs(chromeWin)[0];
     let browser = ss.undoCloseTab(chromeWin, closedTabData);
     yield promiseTabEvent(BrowserApp.deck, "TabSelect");
--- a/mobile/android/tests/browser/chrome/test_session_zombification.html
+++ b/mobile/android/tests/browser/chrome/test_session_zombification.html
@@ -48,17 +48,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   const url2 = "data:text/html;charset=utf-8,Suddenly%2C%20a%20tab%20was%20zombified.";
 
   add_task(function* test_sessionStoreZombify() {
     SimpleTest.registerCleanupFunction(function() {
       cleanupTabs();
     });
 
     // Add a new tab with some content
-    tabTest = BrowserApp.addTab(url1 , { selected: true, parentId: BrowserApp.selectedTab.id });
+    tabTest = BrowserApp.addTab(url1, { selected: true, parentId: BrowserApp.selectedTab.id });
     yield promiseBrowserEvent(tabTest.browser, "DOMContentLoaded");
 
     // Add a new tab with a blank page
     tabBlank = BrowserApp.addTab("about:blank", { selected: true, parentId: BrowserApp.selectedTab.id });
     is(BrowserApp.selectedTab, tabBlank, "Test tab is in background.");
 
     // Zombify the backgrounded test tab
     tabTest.zombify();
@@ -102,17 +102,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   add_task(function* test_sessionStoreKeepAsZombie() {
     let observerService = Services.obs;
 
     SimpleTest.registerCleanupFunction(function() {
       cleanupTabs();
     });
 
     // Add a new tab with some content
-    tabTest = BrowserApp.addTab(url1 , { selected: true, parentId: BrowserApp.selectedTab.id });
+    tabTest = BrowserApp.addTab(url1, { selected: true, parentId: BrowserApp.selectedTab.id });
     yield promiseBrowserEvent(tabTest.browser, "DOMContentLoaded");
 
     // Add a new tab with a blank page
     tabBlank = BrowserApp.addTab("about:blank", { selected: true, parentId: BrowserApp.selectedTab.id });
     yield promiseTabEvent(BrowserApp.deck, "TabSelect");
     is(BrowserApp.selectedTab, tabBlank, "Test tab is in background.");
 
     // Zombify the backgrounded test tab
--- a/mobile/android/tests/browser/chrome/test_settings_fontinflation.html
+++ b/mobile/android/tests/browser/chrome/test_settings_fontinflation.html
@@ -77,17 +77,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 
   add_task(function* test_sysFontScaleScalesMobilePages() {
     // Check that we're starting out with the default values
     is(sharedPrefs.getBoolPref(ANDROID_PREF), false, "System font size scaling is disabled");
     is(Services.prefs.getIntPref(GECKO_PREF_FONT_INFLATION), 0, "Gecko-side font inflation is disabled");
 
     // Check the system font scale factor and then enable it for testing
     is(getSystemFontScale(), 1.0, "system font scale is default");
-    tab = BrowserApp.addTab(URL_mobile , { selected: true, parentId: BrowserApp.selectedTab.id });
+    tab = BrowserApp.addTab(URL_mobile, { selected: true, parentId: BrowserApp.selectedTab.id });
     yield promiseBrowserEvent(tab.browser, "load");
     is(tab.browser.effectiveTextZoom, 1.0, "text zoom is default value");
 
     setSystemFontScale(2.0);
     tab.reloadWithMode(tab.desktopMode);
     yield promiseBrowserEvent(tab.browser, "load");
 
     is(getSystemFontScale(), 2.0, "system font scale is enabled");
@@ -127,17 +127,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 
   add_task(function* test_fontInflationPrecedence() {
     // Check that we're starting out with the default values
     is(sharedPrefs.getBoolPref(ANDROID_PREF), false, "System font size scaling is disabled");
     is(Services.prefs.getIntPref(GECKO_PREF_FONT_INFLATION), 0, "Gecko-side font inflation is disabled");
 
     // Check the system font scale factor and then take a screenshot of this base state
     is(getSystemFontScale(), 1.0, "system font scale is default");
-    tab = BrowserApp.addTab(URL_desktop , { selected: true, parentId: BrowserApp.selectedTab.id });
+    tab = BrowserApp.addTab(URL_desktop, { selected: true, parentId: BrowserApp.selectedTab.id });
     yield promiseBrowserEvent(tab.browser, "load");
     is(tab.browser.effectiveTextZoom, 1.0, "text zoom is default value");
 
     let noZoom = snapshotWindow(tab.browser.contentWindow);
 
     // Enable font inflation and check that this has some effect
     Services.prefs.setIntPref(GECKO_PREF_FONT_INFLATION, FONT_INFLATION_DEFAULT_VALUE);
 
--- a/mobile/android/tests/browser/chrome/test_video_discovery.html
+++ b/mobile/android/tests/browser/chrome/test_video_discovery.html
@@ -129,17 +129,17 @@ Migrated from Robocop: https://bugzilla.
     }
   }
 
   SimpleTest.waitForExplicitFinish();
 
   // On debug runs, 10 assertions typically observed; 5 each of:
   //  - ASSERTION: cancel with non-failure status code: 'NS_FAILED(status)'
   //  - ASSERTION: OnDataAvailable implementation consumed no data: 'Error'
-  SimpleTest.expectAssertions(0,10);
+  SimpleTest.expectAssertions(0, 10);
   setup_browser();
 
   </script>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=953381">Mozilla Bug 953381</a>
 <br>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1184186">Migrated from Robocop testVideoDiscovery</a>
--- a/mobile/android/tests/browser/chrome/web_channel.html
+++ b/mobile/android/tests/browser/chrome/web_channel.html
@@ -4,17 +4,17 @@
   <meta charset="utf-8">
   <title>web_channel_test</title>
 </head>
 <body>
 <script>
   window.onload = function() {
     var testName = window.location.search.replace(/^\?/, "");
 
-    switch(testName) {
+    switch (testName) {
       case "generic":
         test_generic();
         break;
       case "twoway":
         test_twoWay();
         break;
       case "multichannel":
         test_multichannel();
--- a/mobile/android/tests/browser/robocop/reader_mode_pages/developer.mozilla.org/en/XULRunner/Build_Instructions.html
+++ b/mobile/android/tests/browser/robocop/reader_mode_pages/developer.mozilla.org/en/XULRunner/Build_Instructions.html
@@ -365,9 +365,9 @@ var _tag=new WebTrends();
 //<![CDATA[
 _tag.dcsCollect();
 //]]>>
 </script>
 <noscript>
 <div><img alt="DCSIMG" id="DCSIMG" width="1" height="1" src="../../../statse.webtrendslive.com/dcs8yrjuavz5bdaun34r2o8bi_8o8x/njs.gif%3Fdcsuri=%252Fnojavascript&amp;WT.js=No&amp;WT.tv=8.6.2"/></div>
 </noscript>
 </body>
-</html>
\ No newline at end of file
+</html>
--- a/mobile/android/tests/browser/robocop/reader_mode_pages/not_an_article.html
+++ b/mobile/android/tests/browser/robocop/reader_mode_pages/not_an_article.html
@@ -124,9 +124,9 @@
 </div>
 
 
 <script src="//support.cdn.mozilla.net/static/jsi18n/en-us/javascript.js?beb7c1e"></script>
 
 <script src="//support.cdn.mozilla.net/static/js/mobile/common-min.js?build=beb7c1e"></script>
 
 </body>
-</html>
\ No newline at end of file
+</html>
--- a/mobile/android/tests/browser/robocop/robocop_getusermedia.html
+++ b/mobile/android/tests/browser/robocop/robocop_getusermedia.html
@@ -73,14 +73,14 @@
         }
         document.title += " gumtest";
         audio.srcObject.stop();
         video.srcObject.stop();
       }, function(err) {
         document.title = "failed gumtest";
         stopMedia();
       });
-    } catch(e) {
+    } catch (e) {
       stopMedia();
     }
   }
 </script>
 </body></html>
--- a/mobile/android/tests/browser/robocop/robocop_getusermedia2.html
+++ b/mobile/android/tests/browser/robocop/robocop_getusermedia2.html
@@ -70,14 +70,14 @@
         }
         document.title += " gumtest";
         audio.mozSrcObject.stop();
         video.mozSrcObject.stop();
       }, function(err) {
         document.title = "failed gumtest";
         stopMedia();
       });
-    } catch(e) {
+    } catch (e) {
       stopMedia();
     }
   }
 </script>
 </body></html>
--- a/mobile/android/tests/browser/robocop/robocop_head.js
+++ b/mobile/android/tests/browser/robocop/robocop_head.js
@@ -524,18 +524,18 @@ function pattern_matcher(pattern) {
     }
     return function (value, diagnosis) {
       if (!(value && typeof value == "object")) {
         return explain(diagnosis, "value not object");
       }
       for (let [p, m] of matchers) {
         var element_diagnosis = [];
         if (!(p in value && m(value[p], element_diagnosis))) {
-          return explain(diagnosis, { property:p,
-                                      diagnosis:element_diagnosis[0] });
+          return explain(diagnosis, { property: p,
+                                      diagnosis: element_diagnosis[0] });
         }
       }
       return true;
     };
   } else if (pattern === undefined) {
     return function(value) { return true; };
   } else {
     return function (value, diagnosis) {
--- a/mobile/android/tests/browser/robocop/robocop_media_playback_js.html
+++ b/mobile/android/tests/browser/robocop/robocop_media_playback_js.html
@@ -4,29 +4,29 @@
 <video id="testMediaWithoutAudioTrack"    src="no_audio_track.webm" loop></audio>
 <script type="application/javascript" src="robocop_head.js"></script>
 <script type="text/javascript">
 var audio = document.getElementById("testAudio");
 var mediaWithSilentAudioTrack = document.getElementById("testMediaWithSilentAudioTrack");
 var mediaWithoutAudioTrack = document.getElementById("testMediaWithoutAudioTrack");
 
 let test = {
-  play_audio : function() {
+  play_audio: function() {
     audio.play();
   },
 
-  pause_audio : function() {
+  pause_audio: function() {
     audio.pause();
   },
 
-  adjust_audio_volume : function(volume) {
+  adjust_audio_volume: function(volume) {
     audio.volume = volume;
   },
 
-  adjust_audio_muted : function(muted) {
+  adjust_audio_muted: function(muted) {
     audio.muted = muted;
   },
 
   finish_test: function() {
     java.disconnect();
   },
 
   play_media_with_silent_audio_track: function() {
--- a/mobile/android/tests/browser/robocop/testFilePicker.js
+++ b/mobile/android/tests/browser/robocop/testFilePicker.js
@@ -45,28 +45,28 @@ add_test(function filepicker_open() {
       do_test_finished();
 
       run_next_test();
     }
   };
 
   try {
     fp.init(chromeWin, "Open", Ci.nsIFilePicker.modeOpen);
-  } catch(ex) {
+  } catch (ex) {
     ok(false, "Android should support FilePicker.modeOpen: " + ex);
   }
   fp.open(fpCallback);
 });
 
 add_test(function filepicker_save() {
   let failed = false;
   let fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
   try {
     fp.init(null, "Save", Ci.nsIFilePicker.modeSave);
-  } catch(ex) {
+  } catch (ex) {
     failed = true;
   }
   ok(failed, "Android does not support FilePicker.modeSave");
 
   run_next_test();
 });
 
 run_next_test();
--- a/mobile/android/tests/browser/robocop/testReaderCacheMigration.js
+++ b/mobile/android/tests/browser/robocop/testReaderCacheMigration.js
@@ -15,9 +15,9 @@ do_test_pending();
 
 function check_hashed_path_matches(url, hashedPath) {
   var jsHashedPath = ReaderMode._toHashedPath(url);
   do_check_eq(hashedPath, jsHashedPath);
 }
 
 function finish_test() {
   do_test_finished();
-}
\ No newline at end of file
+}