Bug 1561435 - Format toolkit/profile/, a=automatic-formatting
authorVictor Porof <vporof@mozilla.com>
Fri, 05 Jul 2019 11:17:27 +0200
changeset 541093 8be6c7ab9d2793c8d085c6868f6bb7591e3cd6bb
parent 541092 58fd5776802aa7dd7e6d3fddd7d433da5ef30426
child 541094 d8d9a53c4c13fe5cb4c6a865590f40633a12a27d
push id11533
push userarchaeopteryx@coole-files.de
push dateMon, 08 Jul 2019 18:18:03 +0000
treeherdermozilla-beta@f4452e031aed [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatic-formatting
bugs1561435
milestone69.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 1561435 - Format toolkit/profile/, a=automatic-formatting # ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D36058
toolkit/profile/content/createProfileWizard.js
toolkit/profile/content/profileDowngrade.js
toolkit/profile/content/profileSelection.js
toolkit/profile/xpcshell/head.js
toolkit/profile/xpcshell/test_check_backup.js
toolkit/profile/xpcshell/test_claim_locked.js
toolkit/profile/xpcshell/test_clean.js
toolkit/profile/xpcshell/test_conflict_installs.js
toolkit/profile/xpcshell/test_conflict_profiles.js
toolkit/profile/xpcshell/test_create_default.js
toolkit/profile/xpcshell/test_fix_directory_case.js
toolkit/profile/xpcshell/test_ignore_legacy_directory.js
toolkit/profile/xpcshell/test_invalid_descriptor.js
toolkit/profile/xpcshell/test_legacy_empty.js
toolkit/profile/xpcshell/test_legacy_select.js
toolkit/profile/xpcshell/test_lock.js
toolkit/profile/xpcshell/test_missing_profilesini.js
toolkit/profile/xpcshell/test_new_default.js
toolkit/profile/xpcshell/test_previous_dedicated.js
toolkit/profile/xpcshell/test_profile_reset.js
toolkit/profile/xpcshell/test_remove.js
toolkit/profile/xpcshell/test_remove_default.js
toolkit/profile/xpcshell/test_select_default.js
toolkit/profile/xpcshell/test_select_environment.js
toolkit/profile/xpcshell/test_select_environment_named.js
toolkit/profile/xpcshell/test_select_missing.js
toolkit/profile/xpcshell/test_select_named.js
toolkit/profile/xpcshell/test_select_noname.js
toolkit/profile/xpcshell/test_select_profilemanager.js
toolkit/profile/xpcshell/test_single_profile_selected.js
toolkit/profile/xpcshell/test_single_profile_unselected.js
toolkit/profile/xpcshell/test_skip_locked_environment.js
toolkit/profile/xpcshell/test_snap.js
toolkit/profile/xpcshell/test_snap_empty.js
toolkit/profile/xpcshell/test_snatch_environment.js
toolkit/profile/xpcshell/test_snatch_environment_default.js
toolkit/profile/xpcshell/test_startswithlast.js
toolkit/profile/xpcshell/test_steal_inuse.js
toolkit/profile/xpcshell/test_update_selected_dedicated.js
toolkit/profile/xpcshell/test_update_unknown_dedicated.js
toolkit/profile/xpcshell/test_update_unselected_dedicated.js
toolkit/profile/xpcshell/test_use_dedicated.js
--- a/toolkit/profile/content/createProfileWizard.js
+++ b/toolkit/profile/content/createProfileWizard.js
@@ -1,17 +1,19 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 const C = Cc;
 const I = Ci;
 
-const {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { AppConstants } = ChromeUtils.import(
+  "resource://gre/modules/AppConstants.jsm"
+);
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 const ToolkitProfileService = "@mozilla.org/toolkit/profile-service;1";
 
 var gProfileService;
 var gProfileManagerBundle;
 
 var gDefaultProfileParent;
 
@@ -19,88 +21,135 @@ var gDefaultProfileParent;
 var gProfileRoot;
 
 // Text node to display the location and name of the profile to create.
 var gProfileDisplay;
 
 // Called once when the wizard is opened.
 function initWizard() {
   try {
-    gProfileService = C[ToolkitProfileService].getService(I.nsIToolkitProfileService);
+    gProfileService = C[ToolkitProfileService].getService(
+      I.nsIToolkitProfileService
+    );
     gProfileManagerBundle = document.getElementById("bundle_profileManager");
 
     gDefaultProfileParent = Services.dirsvc.get("DefProfRt", I.nsIFile);
 
     // Initialize the profile location display.
     gProfileDisplay = document.getElementById("profileDisplay").firstChild;
     document.addEventListener("wizardfinish", onFinish);
-    document.getElementById("explanation").addEventListener("pageshow", enableNextButton);
-    document.getElementById("createProfile").addEventListener("pageshow", initSecondWizardPage);
+    document
+      .getElementById("explanation")
+      .addEventListener("pageshow", enableNextButton);
+    document
+      .getElementById("createProfile")
+      .addEventListener("pageshow", initSecondWizardPage);
     setDisplayToDefaultFolder();
   } catch (e) {
     window.close();
-    throw (e);
+    throw e;
   }
 }
 
 // Called every time the second wizard page is displayed.
 function initSecondWizardPage() {
   var profileName = document.getElementById("profileName");
   profileName.select();
   profileName.focus();
 
   // Initialize profile name validation.
   checkCurrentInput(profileName.value);
 }
 
 const kSaltTable = [
-  "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n",
-  "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
-  "1", "2", "3", "4", "5", "6", "7", "8", "9", "0" ];
+  "a",
+  "b",
+  "c",
+  "d",
+  "e",
+  "f",
+  "g",
+  "h",
+  "i",
+  "j",
+  "k",
+  "l",
+  "m",
+  "n",
+  "o",
+  "p",
+  "q",
+  "r",
+  "s",
+  "t",
+  "u",
+  "v",
+  "w",
+  "x",
+  "y",
+  "z",
+  "1",
+  "2",
+  "3",
+  "4",
+  "5",
+  "6",
+  "7",
+  "8",
+  "9",
+  "0",
+];
 
 var kSaltString = "";
 for (var i = 0; i < 8; ++i) {
   kSaltString += kSaltTable[Math.floor(Math.random() * kSaltTable.length)];
 }
 
-
 function saltName(aName) {
   return kSaltString + "." + aName;
 }
 
 function setDisplayToDefaultFolder() {
   var defaultProfileDir = gDefaultProfileParent.clone();
-  defaultProfileDir.append(saltName(document.getElementById("profileName").value));
+  defaultProfileDir.append(
+    saltName(document.getElementById("profileName").value)
+  );
   gProfileRoot = defaultProfileDir;
   document.getElementById("useDefault").disabled = true;
 }
 
 function updateProfileDisplay() {
   gProfileDisplay.data = gProfileRoot.path;
 }
 
 // Invoke a folder selection dialog for choosing the directory of profile storage.
 function chooseProfileFolder() {
   var newProfileRoot;
 
-  var dirChooser = C["@mozilla.org/filepicker;1"].createInstance(I.nsIFilePicker);
-  dirChooser.init(window, gProfileManagerBundle.getString("chooseFolder"),
-                  I.nsIFilePicker.modeGetFolder);
+  var dirChooser = C["@mozilla.org/filepicker;1"].createInstance(
+    I.nsIFilePicker
+  );
+  dirChooser.init(
+    window,
+    gProfileManagerBundle.getString("chooseFolder"),
+    I.nsIFilePicker.modeGetFolder
+  );
   dirChooser.appendFilters(I.nsIFilePicker.filterAll);
 
   // default to the Profiles folder
   dirChooser.displayDirectory = gDefaultProfileParent;
 
   dirChooser.open(() => {
     newProfileRoot = dirChooser.file;
 
     // Disable the "Default Folder..." button when the default profile folder
     // was selected manually in the File Picker.
-    document.getElementById("useDefault").disabled =
-      (newProfileRoot.parent.equals(gDefaultProfileParent));
+    document.getElementById(
+      "useDefault"
+    ).disabled = newProfileRoot.parent.equals(gDefaultProfileParent);
 
     gProfileRoot = newProfileRoot;
     updateProfileDisplay();
   });
 }
 
 // Checks the current user input for validity and triggers an error message accordingly.
 function checkCurrentInput(currentInput) {
@@ -108,19 +157,23 @@ function checkCurrentInput(currentInput)
   var finishText = document.getElementById("finishText");
   var canAdvance;
 
   var errorMessage = checkProfileName(currentInput);
 
   if (!errorMessage) {
     finishText.className = "";
     if (AppConstants.platform == "macosx") {
-      finishText.firstChild.data = gProfileManagerBundle.getString("profileFinishTextMac");
+      finishText.firstChild.data = gProfileManagerBundle.getString(
+        "profileFinishTextMac"
+      );
     } else {
-      finishText.firstChild.data = gProfileManagerBundle.getString("profileFinishText");
+      finishText.firstChild.data = gProfileManagerBundle.getString(
+        "profileFinishText"
+      );
     }
     canAdvance = true;
   } else {
     finishText.className = "error";
     finishText.firstChild.data = errorMessage;
     canAdvance = false;
   }
 
@@ -138,35 +191,39 @@ function updateProfileName(aNewName) {
     updateProfileDisplay();
   }
 }
 
 // Checks whether the given string is a valid profile name.
 // Returns an error message describing the error in the name or "" when it's valid.
 function checkProfileName(profileNameToCheck) {
   // Check for emtpy profile name.
-  if (!/\S/.test(profileNameToCheck))
+  if (!/\S/.test(profileNameToCheck)) {
     return gProfileManagerBundle.getString("profileNameEmpty");
+  }
 
   // Check whether all characters in the profile name are allowed.
-  if (/([\\*:?<>|\/\"])/.test(profileNameToCheck))
+  if (/([\\*:?<>|\/\"])/.test(profileNameToCheck)) {
     return gProfileManagerBundle.getFormattedString("invalidChar", [RegExp.$1]);
+  }
 
   // Check whether a profile with the same name already exists.
-  if (profileExists(profileNameToCheck))
+  if (profileExists(profileNameToCheck)) {
     return gProfileManagerBundle.getString("profileExists");
+  }
 
   // profileNameToCheck is valid.
   return "";
 }
 
 function profileExists(aName) {
   for (let profile of gProfileService.profiles) {
-    if (profile.name.toLowerCase() == aName.toLowerCase())
+    if (profile.name.toLowerCase() == aName.toLowerCase()) {
       return true;
+    }
   }
 
   return false;
 }
 
 // Called when the first wizard page is shown.
 function enableNextButton() {
   document.documentElement.canAdvance = true;
@@ -175,32 +232,39 @@ function enableNextButton() {
 function onFinish(event) {
   var profileName = document.getElementById("profileName").value;
   var profile;
 
   // Create profile named profileName in profileRoot.
   try {
     profile = gProfileService.createProfile(gProfileRoot, profileName);
   } catch (e) {
-    var profileCreationFailed =
-      gProfileManagerBundle.getString("profileCreationFailed");
-    var profileCreationFailedTitle =
-      gProfileManagerBundle.getString("profileCreationFailedTitle");
-    Services.prompt.alert(window, profileCreationFailedTitle,
-                          profileCreationFailed + "\n" + e);
+    var profileCreationFailed = gProfileManagerBundle.getString(
+      "profileCreationFailed"
+    );
+    var profileCreationFailedTitle = gProfileManagerBundle.getString(
+      "profileCreationFailedTitle"
+    );
+    Services.prompt.alert(
+      window,
+      profileCreationFailedTitle,
+      profileCreationFailed + "\n" + e
+    );
 
     event.preventDefault();
     return;
   }
 
   // window.opener is false if the Create Profile Wizard was opened from the
   // command line.
   if (window.opener) {
     // Add new profile to the list in the Profile Manager.
     window.opener.CreateProfile(profile);
   } else {
     // Use the newly created Profile.
     var profileLock = profile.lock(null);
 
-    var dialogParams = window.arguments[0].QueryInterface(I.nsIDialogParamBlock);
+    var dialogParams = window.arguments[0].QueryInterface(
+      I.nsIDialogParamBlock
+    );
     dialogParams.objects.insertElementAt(profileLock, 0);
   }
 }
--- a/toolkit/profile/content/profileDowngrade.js
+++ b/toolkit/profile/content/profileDowngrade.js
@@ -1,15 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 let gParams;
 
-const { AppConstants } = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
+const { AppConstants } = ChromeUtils.import(
+  "resource://gre/modules/AppConstants.jsm"
+);
 
 function init() {
   /*
    * The C++ code passes a dialog param block using its integers as in and out
    * arguments for this UI. The following are the uses of the integers:
    *
    *  0: A set of flags from nsIToolkitProfileService.downgradeUIFlags.
    *  1: A return argument, one of nsIToolkitProfileService.downgradeUIChoice.
--- a/toolkit/profile/content/profileSelection.js
+++ b/toolkit/profile/content/profileSelection.js
@@ -1,121 +1,159 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-const {AppConstants} = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
-const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { AppConstants } = ChromeUtils.import(
+  "resource://gre/modules/AppConstants.jsm"
+);
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 const C = Cc;
 const I = Ci;
 
 const ToolkitProfileService = "@mozilla.org/toolkit/profile-service;1";
 
 var gDialogParams;
 var gProfileManagerBundle;
 var gBrandBundle;
 var gProfileService;
 var gNeedsFlush = false;
 
 function startup() {
   try {
-    gDialogParams = window.arguments[0].
-      QueryInterface(I.nsIDialogParamBlock);
+    gDialogParams = window.arguments[0].QueryInterface(I.nsIDialogParamBlock);
 
-    gProfileService = C[ToolkitProfileService].getService(I.nsIToolkitProfileService);
+    gProfileService = C[ToolkitProfileService].getService(
+      I.nsIToolkitProfileService
+    );
 
     gProfileManagerBundle = document.getElementById("bundle_profileManager");
     gBrandBundle = document.getElementById("bundle_brand");
 
     document.documentElement.centerWindowOnScreen();
 
     var profilesElement = document.getElementById("profiles");
 
     for (let profile of gProfileService.profiles.entries(I.nsIToolkitProfile)) {
       var listitem = profilesElement.appendItem(profile.name, "");
 
-      var tooltiptext =
-        gProfileManagerBundle.getFormattedString("profileTooltip", [profile.name, profile.rootDir.path]);
+      var tooltiptext = gProfileManagerBundle.getFormattedString(
+        "profileTooltip",
+        [profile.name, profile.rootDir.path]
+      );
       listitem.setAttribute("tooltiptext", tooltiptext);
       listitem.profile = profile;
       try {
         if (profile === gProfileService.defaultProfile) {
-          setTimeout(function(a) {
-            profilesElement.ensureElementIsVisible(a);
-            profilesElement.selectItem(a);
-          }, 0, listitem);
+          setTimeout(
+            function(a) {
+              profilesElement.ensureElementIsVisible(a);
+              profilesElement.selectItem(a);
+            },
+            0,
+            listitem
+          );
         }
-      } catch (e) { }
+      } catch (e) {}
     }
 
-    var autoSelectLastProfile = document.getElementById("autoSelectLastProfile");
+    var autoSelectLastProfile = document.getElementById(
+      "autoSelectLastProfile"
+    );
     autoSelectLastProfile.checked = gProfileService.startWithLastProfile;
     profilesElement.focus();
   } catch (e) {
     window.close();
-    throw (e);
+    throw e;
   }
   document.addEventListener("dialogaccept", acceptDialog);
   document.addEventListener("dialogcancel", exitDialog);
 }
 
 function flush(cancelled) {
   updateStartupPrefs();
 
-  gDialogParams.SetInt(1, document.getElementById("offlineState").checked ? 1 : 0);
+  gDialogParams.SetInt(
+    1,
+    document.getElementById("offlineState").checked ? 1 : 0
+  );
 
   if (gNeedsFlush) {
     try {
       gProfileService.flush();
     } catch (e) {
       let productName = gBrandBundle.getString("brandProductName");
       let appName = gBrandBundle.getString("brandShortName");
 
       let title = gProfileManagerBundle.getString("flushFailTitle");
-      let restartButton = gProfileManagerBundle.getFormattedString("flushFailRestartButton",
-                                                                  [appName]);
+      let restartButton = gProfileManagerBundle.getFormattedString(
+        "flushFailRestartButton",
+        [appName]
+      );
       let exitButton = gProfileManagerBundle.getString("flushFailExitButton");
 
       let message;
       if (e.result == undefined) {
-        message = gProfileManagerBundle.getFormattedString("conflictMessage",
-                                                          [productName, appName]);
+        message = gProfileManagerBundle.getFormattedString("conflictMessage", [
+          productName,
+          appName,
+        ]);
       } else {
         message = gProfileManagerBundle.getString("flushFailMessage");
       }
 
       const PS = Ci.nsIPromptService;
-      let result = Services.prompt.confirmEx(window, title, message,
-                                            (PS.BUTTON_POS_0 * PS.BUTTON_TITLE_IS_STRING) +
-                                            (PS.BUTTON_POS_1 * PS.BUTTON_TITLE_IS_STRING),
-                                            restartButton, exitButton, null, null, {});
+      let result = Services.prompt.confirmEx(
+        window,
+        title,
+        message,
+        PS.BUTTON_POS_0 * PS.BUTTON_TITLE_IS_STRING +
+          PS.BUTTON_POS_1 * PS.BUTTON_TITLE_IS_STRING,
+        restartButton,
+        exitButton,
+        null,
+        null,
+        {}
+      );
 
-      gDialogParams.SetInt(0, result == 0 ? Ci.nsIToolkitProfileService.restart
-                                          : Ci.nsIToolkitProfileService.exit);
+      gDialogParams.SetInt(
+        0,
+        result == 0
+          ? Ci.nsIToolkitProfileService.restart
+          : Ci.nsIToolkitProfileService.exit
+      );
       return;
     }
     gNeedsFlush = false;
   }
 
-  gDialogParams.SetInt(0, cancelled ? Ci.nsIToolkitProfileService.exit
-                                    : Ci.nsIToolkitProfileService.launchWithProfile);
+  gDialogParams.SetInt(
+    0,
+    cancelled
+      ? Ci.nsIToolkitProfileService.exit
+      : Ci.nsIToolkitProfileService.launchWithProfile
+  );
 }
 
 function acceptDialog(event) {
   var appName = gBrandBundle.getString("brandShortName");
 
   var profilesElement = document.getElementById("profiles");
   var selectedProfile = profilesElement.selectedItem;
   if (!selectedProfile) {
-    var pleaseSelectTitle = gProfileManagerBundle.getString("pleaseSelectTitle");
-    var pleaseSelect =
-      gProfileManagerBundle.getFormattedString("pleaseSelect", [appName]);
+    var pleaseSelectTitle = gProfileManagerBundle.getString(
+      "pleaseSelectTitle"
+    );
+    var pleaseSelect = gProfileManagerBundle.getFormattedString(
+      "pleaseSelect",
+      [appName]
+    );
     Services.prompt.alert(window, pleaseSelectTitle, pleaseSelect);
     event.preventDefault();
     return;
   }
 
   gDialogParams.objects.insertElementAt(selectedProfile.profile.rootDir, 0);
   gDialogParams.objects.insertElementAt(selectedProfile.profile.localDir, 1);
 
@@ -140,50 +178,58 @@ function updateStartupPrefs() {
   if (gProfileService.startWithLastProfile != autoSelectLastProfile.checked) {
     gProfileService.startWithLastProfile = autoSelectLastProfile.checked;
     gNeedsFlush = true;
   }
 }
 
 // handle key event on listboxes
 function onProfilesKey(aEvent) {
-  switch ( aEvent.keyCode ) {
-  case KeyEvent.DOM_VK_BACK_SPACE:
-    if (AppConstants.platform != "macosx")
+  switch (aEvent.keyCode) {
+    case KeyEvent.DOM_VK_BACK_SPACE:
+      if (AppConstants.platform != "macosx") {
+        break;
+      }
+    case KeyEvent.DOM_VK_DELETE:
+      ConfirmDelete();
       break;
-  case KeyEvent.DOM_VK_DELETE:
-    ConfirmDelete();
-    break;
-  case KeyEvent.DOM_VK_F2:
-    RenameProfile();
-    break;
+    case KeyEvent.DOM_VK_F2:
+      RenameProfile();
+      break;
   }
 }
 
 function onProfilesDblClick(aEvent) {
-  if (aEvent.target.closest("richlistitem"))
+  if (aEvent.target.closest("richlistitem")) {
     document.documentElement.acceptDialog();
+  }
 }
 
 // invoke the createProfile Wizard
 function CreateProfileWizard() {
-  window.openDialog("chrome://mozapps/content/profile/createProfileWizard.xul",
-                    "", "centerscreen,chrome,modal,titlebar", gProfileService);
+  window.openDialog(
+    "chrome://mozapps/content/profile/createProfileWizard.xul",
+    "",
+    "centerscreen,chrome,modal,titlebar",
+    gProfileService
+  );
 }
 
 /**
  * Called from createProfileWizard to update the display.
  */
 function CreateProfile(aProfile) {
   var profilesElement = document.getElementById("profiles");
 
   var listitem = profilesElement.appendItem(aProfile.name, "");
 
-  var tooltiptext =
-    gProfileManagerBundle.getFormattedString("profileTooltip", [aProfile.name, aProfile.rootDir.path]);
+  var tooltiptext = gProfileManagerBundle.getFormattedString("profileTooltip", [
+    aProfile.name,
+    aProfile.rootDir.path,
+  ]);
   listitem.setAttribute("tooltiptext", tooltiptext);
   listitem.profile = aProfile;
 
   profilesElement.ensureElementIsVisible(listitem);
   profilesElement.selectItem(listitem);
 
   gNeedsFlush = true;
 }
@@ -194,81 +240,99 @@ function RenameProfile() {
   var selectedItem = profilesElement.selectedItem;
   if (!selectedItem) {
     return false;
   }
 
   var selectedProfile = selectedItem.profile;
 
   var oldName = selectedProfile.name;
-  var newName = {value: oldName};
+  var newName = { value: oldName };
 
   var dialogTitle = gProfileManagerBundle.getString("renameProfileTitle");
-  var msg =
-    gProfileManagerBundle.getFormattedString("renameProfilePrompt", [oldName]);
+  var msg = gProfileManagerBundle.getFormattedString("renameProfilePrompt", [
+    oldName,
+  ]);
 
-  if (Services.prompt.prompt(window, dialogTitle, msg, newName, null, {value: 0})) {
+  if (
+    Services.prompt.prompt(window, dialogTitle, msg, newName, null, {
+      value: 0,
+    })
+  ) {
     newName = newName.value;
 
     // User hasn't changed the profile name. Treat as if cancel was pressed.
-    if (newName == oldName)
+    if (newName == oldName) {
       return false;
+    }
 
     try {
       selectedProfile.name = newName;
       gNeedsFlush = true;
     } catch (e) {
       var alTitle = gProfileManagerBundle.getString("profileNameInvalidTitle");
-      var alMsg = gProfileManagerBundle.getFormattedString("profileNameInvalid", [newName]);
+      var alMsg = gProfileManagerBundle.getFormattedString(
+        "profileNameInvalid",
+        [newName]
+      );
       Services.prompt.alert(window, alTitle, alMsg);
       return false;
     }
 
     selectedItem.firstChild.setAttribute("value", newName);
-    var tiptext = gProfileManagerBundle.
-                  getFormattedString("profileTooltip",
-                                     [newName, selectedProfile.rootDir.path]);
+    var tiptext = gProfileManagerBundle.getFormattedString("profileTooltip", [
+      newName,
+      selectedProfile.rootDir.path,
+    ]);
     selectedItem.setAttribute("tooltiptext", tiptext);
 
     return true;
   }
 
   return false;
 }
 
 function ConfirmDelete() {
-  var profileList = document.getElementById( "profiles" );
+  var profileList = document.getElementById("profiles");
 
   var selectedItem = profileList.selectedItem;
   if (!selectedItem) {
     return false;
   }
 
   var selectedProfile = selectedItem.profile;
   var deleteFiles = false;
 
   if (selectedProfile.rootDir.exists()) {
     var dialogTitle = gProfileManagerBundle.getString("deleteTitle");
-    var dialogText =
-      gProfileManagerBundle.getFormattedString("deleteProfileConfirm",
-                                               [selectedProfile.rootDir.path]);
+    var dialogText = gProfileManagerBundle.getFormattedString(
+      "deleteProfileConfirm",
+      [selectedProfile.rootDir.path]
+    );
 
-    var buttonPressed = Services.prompt.confirmEx(window, dialogTitle, dialogText,
-                          (Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_0) +
-                          (Services.prompt.BUTTON_TITLE_CANCEL * Services.prompt.BUTTON_POS_1) +
-                          (Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_2),
-                          gProfileManagerBundle.getString("dontDeleteFiles"),
-                          null,
-                          gProfileManagerBundle.getString("deleteFiles"),
-                          null, {value: 0});
-    if (buttonPressed == 1)
+    var buttonPressed = Services.prompt.confirmEx(
+      window,
+      dialogTitle,
+      dialogText,
+      Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_0 +
+        Services.prompt.BUTTON_TITLE_CANCEL * Services.prompt.BUTTON_POS_1 +
+        Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_2,
+      gProfileManagerBundle.getString("dontDeleteFiles"),
+      null,
+      gProfileManagerBundle.getString("deleteFiles"),
+      null,
+      { value: 0 }
+    );
+    if (buttonPressed == 1) {
       return false;
+    }
 
-    if (buttonPressed == 2)
+    if (buttonPressed == 2) {
       deleteFiles = true;
+    }
   }
 
   try {
     selectedProfile.remove(deleteFiles);
     gNeedsFlush = true;
   } catch (e) {
     let title = gProfileManagerBundle.getString("profileDeletionFailedTitle");
     let msg = gProfileManagerBundle.getString("profileDeletionFailed");
--- a/toolkit/profile/xpcshell/head.js
+++ b/toolkit/profile/xpcshell/head.js
@@ -1,32 +1,39 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
-const { FileUtils } = ChromeUtils.import("resource://gre/modules/FileUtils.jsm");
+const { FileUtils } = ChromeUtils.import(
+  "resource://gre/modules/FileUtils.jsm"
+);
 const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm");
-const { AppConstants } = ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
-const { TelemetryTestUtils } = ChromeUtils.import("resource://testing-common/TelemetryTestUtils.jsm");
+const { AppConstants } = ChromeUtils.import(
+  "resource://gre/modules/AppConstants.jsm"
+);
+const { TelemetryTestUtils } = ChromeUtils.import(
+  "resource://testing-common/TelemetryTestUtils.jsm"
+);
 
 const NS_ERROR_START_PROFILE_MANAGER = 0x805800c9;
 
 const UPDATE_CHANNEL = AppConstants.MOZ_UPDATE_CHANNEL;
 
 let gProfD = do_get_profile();
 let gDataHome = gProfD.clone();
 gDataHome.append("data");
 gDataHome.createUnique(Ci.nsIFile.DIRECTORY_TYPE, 0o755);
 let gDataHomeLocal = gProfD.clone();
 gDataHomeLocal.append("local");
 gDataHomeLocal.createUnique(Ci.nsIFile.DIRECTORY_TYPE, 0o755);
 
-let xreDirProvider = Cc["@mozilla.org/xre/directory-provider;1"].
-                     getService(Ci.nsIXREDirProvider);
+let xreDirProvider = Cc["@mozilla.org/xre/directory-provider;1"].getService(
+  Ci.nsIXREDirProvider
+);
 xreDirProvider.setUserDataDirectory(gDataHome, false);
 xreDirProvider.setUserDataDirectory(gDataHomeLocal, true);
 
 let gIsDefaultApp = false;
 
 const ShellService = {
   register() {
     let registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
@@ -36,51 +43,59 @@ const ShellService = {
         if (outer != null) {
           throw Cr.NS_ERROR_NO_AGGREGATION;
         }
 
         return ShellService.QueryInterface(iid);
       },
     };
 
-    registrar.registerFactory(this.ID, "ToolkitShellService", this.CONTRACT, factory);
+    registrar.registerFactory(
+      this.ID,
+      "ToolkitShellService",
+      this.CONTRACT,
+      factory
+    );
   },
 
   isDefaultApplication() {
     return gIsDefaultApp;
   },
 
   QueryInterface: ChromeUtils.generateQI([Ci.nsIToolkitShellService]),
   ID: Components.ID("{ce724e0c-ed70-41c9-ab31-1033b0b591be}"),
   CONTRACT: "@mozilla.org/toolkit/shell-service;1",
 };
 
 ShellService.register();
 
 let gIsLegacy = false;
 
 function simulateSnapEnvironment() {
-  let env = Cc["@mozilla.org/process/environment;1"].
-          getService(Ci.nsIEnvironment);
+  let env = Cc["@mozilla.org/process/environment;1"].getService(
+    Ci.nsIEnvironment
+  );
   env.set("SNAP_NAME", "foo");
 
   gIsLegacy = true;
 }
 
 function enableLegacyProfiles() {
-  let env = Cc["@mozilla.org/process/environment;1"].
-          getService(Ci.nsIEnvironment);
+  let env = Cc["@mozilla.org/process/environment;1"].getService(
+    Ci.nsIEnvironment
+  );
   env.set("MOZ_LEGACY_PROFILES", "1");
 
   gIsLegacy = true;
 }
 
 function getProfileService() {
-  return Cc["@mozilla.org/toolkit/profile-service;1"].
-         getService(Ci.nsIToolkitProfileService);
+  return Cc["@mozilla.org/toolkit/profile-service;1"].getService(
+    Ci.nsIToolkitProfileService
+  );
 }
 
 let PROFILE_DEFAULT = "default";
 let DEDICATED_NAME = `default-${UPDATE_CHANNEL}`;
 if (AppConstants.MOZ_DEV_EDITION) {
   DEDICATED_NAME = PROFILE_DEFAULT = "dev-edition-default";
 }
 
@@ -98,24 +113,39 @@ function makeRandomProfileDir(name) {
  * A wrapper around nsIToolkitProfileService.selectStartupProfile to make it
  * a bit nicer to use from JS.
  */
 function selectStartupProfile(args = [], isResetting = false, legacyHash = "") {
   let service = getProfileService();
   let rootDir = {};
   let localDir = {};
   let profile = {};
-  let didCreate = service.selectStartupProfile(["xpcshell", ...args], isResetting,
-                                               UPDATE_CHANNEL, legacyHash, rootDir,
-                                               localDir, profile);
+  let didCreate = service.selectStartupProfile(
+    ["xpcshell", ...args],
+    isResetting,
+    UPDATE_CHANNEL,
+    legacyHash,
+    rootDir,
+    localDir,
+    profile
+  );
 
   if (profile.value) {
-    Assert.ok(rootDir.value.equals(profile.value.rootDir), "Should have matched the root dir.");
-    Assert.ok(localDir.value.equals(profile.value.localDir), "Should have matched the local dir.");
-    Assert.ok(service.currentProfile === profile.value, "Should have marked the profile as the current profile.");
+    Assert.ok(
+      rootDir.value.equals(profile.value.rootDir),
+      "Should have matched the root dir."
+    );
+    Assert.ok(
+      localDir.value.equals(profile.value.localDir),
+      "Should have matched the local dir."
+    );
+    Assert.ok(
+      service.currentProfile === profile.value,
+      "Should have marked the profile as the current profile."
+    );
   } else {
     Assert.ok(!service.currentProfile, "Should be no current profile.");
   }
 
   return {
     rootDir: rootDir.value,
     localDir: localDir.value,
     profile: profile.value,
@@ -124,70 +154,91 @@ function selectStartupProfile(args = [],
 }
 
 function testStartsProfileManager(args = [], isResetting = false) {
   try {
     selectStartupProfile(args, isResetting);
     Assert.ok(false, "Should have started the profile manager");
     checkStartupReason();
   } catch (e) {
-    Assert.equal(e.result, NS_ERROR_START_PROFILE_MANAGER, "Should have started the profile manager");
+    Assert.equal(
+      e.result,
+      NS_ERROR_START_PROFILE_MANAGER,
+      "Should have started the profile manager"
+    );
   }
 }
 
 function safeGet(ini, section, key) {
   try {
     return ini.getString(section, key);
   } catch (e) {
     return null;
   }
 }
 
 /**
  * Writes a compatibility.ini file that marks the give profile directory as last
  * used by the given install path.
  */
-function writeCompatibilityIni(dir, appDir = FileUtils.getDir("CurProcD", []),
-                                    greDir = FileUtils.getDir("GreD", [])) {
+function writeCompatibilityIni(
+  dir,
+  appDir = FileUtils.getDir("CurProcD", []),
+  greDir = FileUtils.getDir("GreD", [])
+) {
   let target = dir.clone();
   target.append("compatibility.ini");
 
-  let factory = Cc["@mozilla.org/xpcom/ini-parser-factory;1"].
-                getService(Ci.nsIINIParserFactory);
+  let factory = Cc["@mozilla.org/xpcom/ini-parser-factory;1"].getService(
+    Ci.nsIINIParserFactory
+  );
   let ini = factory.createINIParser().QueryInterface(Ci.nsIINIParserWriter);
 
   // The profile service doesn't care about these so just use fixed values
-  ini.setString("Compatibility", "LastVersion", "64.0a1_20180919123806/20180919123806");
+  ini.setString(
+    "Compatibility",
+    "LastVersion",
+    "64.0a1_20180919123806/20180919123806"
+  );
   ini.setString("Compatibility", "LastOSABI", "Darwin_x86_64-gcc3");
 
-  ini.setString("Compatibility", "LastPlatformDir", greDir.persistentDescriptor);
+  ini.setString(
+    "Compatibility",
+    "LastPlatformDir",
+    greDir.persistentDescriptor
+  );
   ini.setString("Compatibility", "LastAppDir", appDir.persistentDescriptor);
 
   ini.writeFile(target);
 }
 
 /**
  * Writes a profiles.ini based on the passed profile data.
  * profileData should contain two properties, options and profiles.
  * options contains a single property, startWithLastProfile.
  * profiles is an array of profiles each containing name, path and default
  * properties.
  */
 function writeProfilesIni(profileData) {
   let target = gDataHome.clone();
   target.append("profiles.ini");
 
-  let factory = Cc["@mozilla.org/xpcom/ini-parser-factory;1"].
-                getService(Ci.nsIINIParserFactory);
+  let factory = Cc["@mozilla.org/xpcom/ini-parser-factory;1"].getService(
+    Ci.nsIINIParserFactory
+  );
   let ini = factory.createINIParser().QueryInterface(Ci.nsIINIParserWriter);
 
   const { options = {}, profiles = [], installs = null } = profileData;
 
   let { startWithLastProfile = true } = options;
-  ini.setString("General", "StartWithLastProfile", startWithLastProfile ? "1" : "0");
+  ini.setString(
+    "General",
+    "StartWithLastProfile",
+    startWithLastProfile ? "1" : "0"
+  );
 
   for (let i = 0; i < profiles.length; i++) {
     let profile = profiles[i];
     let section = `Profile${i}`;
 
     ini.setString(section, "Name", profile.name);
     ini.setString(section, "IsRelative", 1);
     ini.setString(section, "Path", profile.path);
@@ -198,17 +249,21 @@ function writeProfilesIni(profileData) {
   }
 
   if (installs) {
     ini.setString("General", "Version", "2");
 
     for (let hash of Object.keys(installs)) {
       ini.setString(`Install${hash}`, "Default", installs[hash].default);
       if ("locked" in installs[hash]) {
-        ini.setString(`Install${hash}`, "Locked", installs[hash].locked ? "1" : "0");
+        ini.setString(
+          `Install${hash}`,
+          "Locked",
+          installs[hash].locked ? "1" : "0"
+        );
       }
     }
 
     writeInstallsIni({ installs });
   } else {
     writeInstallsIni(null);
   }
 
@@ -232,21 +287,23 @@ function readProfilesIni() {
     profiles: [],
     installs: null,
   };
 
   if (!target.exists()) {
     return profileData;
   }
 
-  let factory = Cc["@mozilla.org/xpcom/ini-parser-factory;1"].
-                getService(Ci.nsIINIParserFactory);
+  let factory = Cc["@mozilla.org/xpcom/ini-parser-factory;1"].getService(
+    Ci.nsIINIParserFactory
+  );
   let ini = factory.createINIParser(target);
 
-  profileData.options.startWithLastProfile = safeGet(ini, "General", "StartWithLastProfile") == "1";
+  profileData.options.startWithLastProfile =
+    safeGet(ini, "General", "StartWithLastProfile") == "1";
   if (safeGet(ini, "General", "Version") == "2") {
     profileData.installs = {};
   }
 
   let sections = ini.getSections();
   while (sections.hasMore()) {
     let section = sections.getNext();
 
@@ -254,35 +311,45 @@ function readProfilesIni() {
       continue;
     }
 
     if (section.startsWith("Profile")) {
       let isRelative = safeGet(ini, section, "IsRelative");
       if (isRelative === null) {
         break;
       }
-      Assert.equal(isRelative, "1", "Paths should always be relative in these tests.");
+      Assert.equal(
+        isRelative,
+        "1",
+        "Paths should always be relative in these tests."
+      );
 
       let profile = {
         name: safeGet(ini, section, "Name"),
         path: safeGet(ini, section, "Path"),
       };
 
       try {
         profile.default = ini.getString(section, "Default") == "1";
-        Assert.ok(profile.default, "The Default value is only written when true.");
+        Assert.ok(
+          profile.default,
+          "The Default value is only written when true."
+        );
       } catch (e) {
         profile.default = false;
       }
 
       profileData.profiles.push(profile);
     }
 
     if (section.startsWith("Install")) {
-      Assert.ok(profileData.installs, "Should only see an install section if the ini version was correct.");
+      Assert.ok(
+        profileData.installs,
+        "Should only see an install section if the ini version was correct."
+      );
 
       profileData.installs[section.substring(7)] = {
         default: safeGet(ini, section, "Default"),
       };
 
       let locked = safeGet(ini, section, "Locked");
       if (locked !== null) {
         profileData.installs[section.substring(7)].locked = locked;
@@ -302,25 +369,25 @@ function readProfilesIni() {
  */
 function writeInstallsIni(installData) {
   let target = gDataHome.clone();
   target.append("installs.ini");
 
   if (!installData) {
     try {
       target.remove(false);
-    } catch (e) {
-    }
+    } catch (e) {}
     return;
   }
 
   const { installs = {} } = installData;
 
-  let factory = Cc["@mozilla.org/xpcom/ini-parser-factory;1"].
-                getService(Ci.nsIINIParserFactory);
+  let factory = Cc["@mozilla.org/xpcom/ini-parser-factory;1"].getService(
+    Ci.nsIINIParserFactory
+  );
   let ini = factory.createINIParser(null).QueryInterface(Ci.nsIINIParserWriter);
 
   for (let hash of Object.keys(installs)) {
     ini.setString(hash, "Default", installs[hash].default);
     if ("locked" in installs[hash]) {
       ini.setString(hash, "Locked", installs[hash].locked ? "1" : "0");
     }
   }
@@ -338,18 +405,19 @@ function readInstallsIni() {
   let installData = {
     installs: {},
   };
 
   if (!target.exists()) {
     return installData;
   }
 
-  let factory = Cc["@mozilla.org/xpcom/ini-parser-factory;1"].
-                getService(Ci.nsIINIParserFactory);
+  let factory = Cc["@mozilla.org/xpcom/ini-parser-factory;1"].getService(
+    Ci.nsIINIParserFactory
+  );
   let ini = factory.createINIParser(target);
 
   let sections = ini.getSections();
   while (sections.hasMore()) {
     let hash = sections.getNext();
     if (hash != "General") {
       installData.installs[hash] = {
         default: safeGet(ini, hash, "Default"),
@@ -364,82 +432,119 @@ function readInstallsIni() {
 
   return installData;
 }
 
 /**
  * Check that the backup data in installs.ini matches the install data in
  * profiles.ini.
  */
-function checkBackup(profileData = readProfilesIni(), installData = readInstallsIni()) {
+function checkBackup(
+  profileData = readProfilesIni(),
+  installData = readInstallsIni()
+) {
   if (!profileData.installs) {
     // If the profiles db isn't of the right version we wouldn't expect the
     // backup to be accurate.
     return;
   }
 
-  Assert.deepEqual(profileData.installs, installData.installs, "Backup installs.ini should match installs in profiles.ini");
+  Assert.deepEqual(
+    profileData.installs,
+    installData.installs,
+    "Backup installs.ini should match installs in profiles.ini"
+  );
 }
 
 /**
  * Checks that the profile service seems to have the right data in it compared
  * to profile and install data structured as in the above functions.
  */
-function checkProfileService(profileData = readProfilesIni(), verifyBackup = true) {
+function checkProfileService(
+  profileData = readProfilesIni(),
+  verifyBackup = true
+) {
   let service = getProfileService();
 
   let expectedStartWithLast = true;
   if ("options" in profileData) {
     expectedStartWithLast = profileData.options.startWithLastProfile;
   }
 
-  Assert.equal(service.startWithLastProfile, expectedStartWithLast,
-               "Start with last profile should match.");
+  Assert.equal(
+    service.startWithLastProfile,
+    expectedStartWithLast,
+    "Start with last profile should match."
+  );
 
   let serviceProfiles = Array.from(service.profiles);
 
-  Assert.equal(serviceProfiles.length, profileData.profiles.length, "Should be the same number of profiles.");
+  Assert.equal(
+    serviceProfiles.length,
+    profileData.profiles.length,
+    "Should be the same number of profiles."
+  );
 
   // Sort to make matching easy.
   serviceProfiles.sort((a, b) => a.name.localeCompare(b.name));
   profileData.profiles.sort((a, b) => a.name.localeCompare(b.name));
 
   let hash = xreDirProvider.getInstallHash();
-  let defaultPath = (profileData.installs && hash in profileData.installs) ?
-                    profileData.installs[hash].default : null;
+  let defaultPath =
+    profileData.installs && hash in profileData.installs
+      ? profileData.installs[hash].default
+      : null;
   let dedicatedProfile = null;
   let legacyProfile = null;
 
   for (let i = 0; i < serviceProfiles.length; i++) {
     let serviceProfile = serviceProfiles[i];
     let expectedProfile = profileData.profiles[i];
 
-    Assert.equal(serviceProfile.name, expectedProfile.name, "Should have the same name.");
+    Assert.equal(
+      serviceProfile.name,
+      expectedProfile.name,
+      "Should have the same name."
+    );
 
-    let expectedPath = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
+    let expectedPath = Cc["@mozilla.org/file/local;1"].createInstance(
+      Ci.nsIFile
+    );
     expectedPath.setRelativeDescriptor(gDataHome, expectedProfile.path);
-    Assert.equal(serviceProfile.rootDir.path, expectedPath.path, "Should have the same path.");
+    Assert.equal(
+      serviceProfile.rootDir.path,
+      expectedPath.path,
+      "Should have the same path."
+    );
 
     if (expectedProfile.path == defaultPath) {
       dedicatedProfile = serviceProfile;
     }
 
     if (AppConstants.MOZ_DEV_EDITION) {
       if (expectedProfile.name == PROFILE_DEFAULT) {
         legacyProfile = serviceProfile;
       }
     } else if (expectedProfile.default) {
       legacyProfile = serviceProfile;
     }
   }
 
   if (gIsLegacy) {
-    Assert.equal(service.defaultProfile, legacyProfile, "Should have seen the right profile selected.");
+    Assert.equal(
+      service.defaultProfile,
+      legacyProfile,
+      "Should have seen the right profile selected."
+    );
   } else {
-    Assert.equal(service.defaultProfile, dedicatedProfile, "Should have seen the right profile selected.");
+    Assert.equal(
+      service.defaultProfile,
+      dedicatedProfile,
+      "Should have seen the right profile selected."
+    );
   }
 
   if (verifyBackup) {
     checkBackup(profileData);
   }
 }
 
 /**
@@ -451,18 +556,25 @@ async function readFile(file) {
   return decoder.decode(data);
 }
 
 function checkStartupReason(expected = undefined) {
   const tId = "startup.profile_selection_reason";
   let scalars = TelemetryTestUtils.getProcessScalars("parent");
 
   if (expected === undefined) {
-    Assert.ok(!(tId in scalars), "Startup telemetry should not have been recorded.");
+    Assert.ok(
+      !(tId in scalars),
+      "Startup telemetry should not have been recorded."
+    );
     return;
   }
 
   if (tId in scalars) {
-    Assert.equal(scalars[tId], expected, "Should have seen the right startup reason.");
+    Assert.equal(
+      scalars[tId],
+      expected,
+      "Should have seen the right startup reason."
+    );
   } else {
     Assert.ok(false, "Startup telemetry should have been recorded.");
   }
 }
--- a/toolkit/profile/xpcshell/test_check_backup.js
+++ b/toolkit/profile/xpcshell/test_check_backup.js
@@ -7,23 +7,26 @@
 
 add_task(async () => {
   let hash = xreDirProvider.getInstallHash();
 
   let profileData = {
     options: {
       startWithLastProfile: true,
     },
-    profiles: [{
-      name: "Profile1",
-      path: "Path1",
-    }, {
-      name: "Profile2",
-      path: "Path2",
-    }],
+    profiles: [
+      {
+        name: "Profile1",
+        path: "Path1",
+      },
+      {
+        name: "Profile2",
+        path: "Path2",
+      },
+    ],
   };
 
   let installs = {
     [hash]: {
       default: "Path2",
     },
   };
 
@@ -34,11 +37,18 @@ add_task(async () => {
   checkStartupReason("default");
 
   let service = getProfileService();
   // Should have added the backup data to the service, check that is true.
   profileData.installs = installs;
   checkProfileService(profileData);
 
   Assert.ok(!didCreate, "Should not have created a new profile.");
-  Assert.equal(profile.name, "Profile2", "Should have selected the right profile");
-  Assert.ok(!service.createdAlternateProfile, "Should not have created an alternate profile.");
+  Assert.equal(
+    profile.name,
+    "Profile2",
+    "Should have selected the right profile"
+  );
+  Assert.ok(
+    !service.createdAlternateProfile,
+    "Should not have created an alternate profile."
+  );
 });
--- a/toolkit/profile/xpcshell/test_claim_locked.js
+++ b/toolkit/profile/xpcshell/test_claim_locked.js
@@ -7,39 +7,62 @@
  */
 
 add_task(async () => {
   let defaultProfile = makeRandomProfileDir("default");
 
   writeCompatibilityIni(defaultProfile);
 
   writeProfilesIni({
-    profiles: [{
-      name: "Foo",
-      path: defaultProfile.leafName,
-      default: true,
-    }],
+    profiles: [
+      {
+        name: "Foo",
+        path: defaultProfile.leafName,
+        default: true,
+      },
+    ],
     installs: {
       other: {
         default: defaultProfile.leafName,
         locked: true,
       },
     },
   });
 
   let { profile: selectedProfile, didCreate } = selectStartupProfile();
 
   let profileData = readProfilesIni();
 
-  Assert.ok(profileData.options.startWithLastProfile, "Should be set to start with the last profile.");
-  Assert.equal(profileData.profiles.length, 2, "Should have the right number of profiles.");
+  Assert.ok(
+    profileData.options.startWithLastProfile,
+    "Should be set to start with the last profile."
+  );
+  Assert.equal(
+    profileData.profiles.length,
+    2,
+    "Should have the right number of profiles."
+  );
 
   let hash = xreDirProvider.getInstallHash();
-  Assert.equal(Object.keys(profileData.installs).length, 2, "Should be two known installs.");
-  Assert.notEqual(profileData.installs[hash].default, defaultProfile.leafName, "Should not have marked the original default profile as the default for this install.");
-  Assert.ok(profileData.installs[hash].locked, "Should have locked as we created this profile for this install.");
+  Assert.equal(
+    Object.keys(profileData.installs).length,
+    2,
+    "Should be two known installs."
+  );
+  Assert.notEqual(
+    profileData.installs[hash].default,
+    defaultProfile.leafName,
+    "Should not have marked the original default profile as the default for this install."
+  );
+  Assert.ok(
+    profileData.installs[hash].locked,
+    "Should have locked as we created this profile for this install."
+  );
 
   checkProfileService(profileData);
 
   Assert.ok(didCreate, "Should have created a new profile.");
-  Assert.ok(!selectedProfile.rootDir.equals(defaultProfile), "Should be using a different directory.");
+  Assert.ok(
+    !selectedProfile.rootDir.equals(defaultProfile),
+    "Should be using a different directory."
+  );
   Assert.equal(selectedProfile.name, DEDICATED_NAME);
 });
--- a/toolkit/profile/xpcshell/test_clean.js
+++ b/toolkit/profile/xpcshell/test_clean.js
@@ -17,91 +17,149 @@ add_task(async () => {
   Assert.ok(!target.exists(), "installs.ini should not exist yet.");
 
   // Create a new profile to use.
   let newProfile = service.createProfile(null, "dedicated");
   service.flush();
 
   let profileData = readProfilesIni();
 
-  Assert.equal(profileData.profiles.length, 1, "Should have the right number of profiles.");
+  Assert.equal(
+    profileData.profiles.length,
+    1,
+    "Should have the right number of profiles."
+  );
 
   let profile = profileData.profiles[0];
   Assert.equal(profile.name, "dedicated", "Should have the right name.");
   Assert.ok(!profile.default, "Should not be marked as the old-style default.");
 
   // The new profile hasn't been marked as the default yet!
-  Assert.equal(Object.keys(profileData.installs).length, 0, "Should be no defaults for installs yet.");
+  Assert.equal(
+    Object.keys(profileData.installs).length,
+    0,
+    "Should be no defaults for installs yet."
+  );
 
   checkProfileService(profileData);
 
-  Assert.ok(service.startWithLastProfile, "Should be set to start with the last profile.");
+  Assert.ok(
+    service.startWithLastProfile,
+    "Should be set to start with the last profile."
+  );
   service.startWithLastProfile = false;
-  Assert.ok(!service.startWithLastProfile, "Should be set to not start with the last profile.");
+  Assert.ok(
+    !service.startWithLastProfile,
+    "Should be set to not start with the last profile."
+  );
 
   service.defaultProfile = newProfile;
   service.flush();
 
   profileData = readProfilesIni();
 
-  Assert.equal(profileData.profiles.length, 1, "Should have the right number of profiles.");
+  Assert.equal(
+    profileData.profiles.length,
+    1,
+    "Should have the right number of profiles."
+  );
 
   profile = profileData.profiles[0];
   Assert.equal(profile.name, "dedicated", "Should have the right name.");
   Assert.ok(!profile.default, "Should not be marked as the old-style default.");
 
   let hash = xreDirProvider.getInstallHash();
-  Assert.equal(Object.keys(profileData.installs).length, 1, "Should be only one known install.");
-  Assert.equal(profileData.installs[hash].default, profileData.profiles[0].path, "Should have marked the new profile as the default for this install.");
+  Assert.equal(
+    Object.keys(profileData.installs).length,
+    1,
+    "Should be only one known install."
+  );
+  Assert.equal(
+    profileData.installs[hash].default,
+    profileData.profiles[0].path,
+    "Should have marked the new profile as the default for this install."
+  );
 
   checkProfileService(profileData);
 
   let otherProfile = service.createProfile(null, "another");
   service.defaultProfile = otherProfile;
 
   service.flush();
 
   profileData = readProfilesIni();
 
-  Assert.equal(profileData.profiles.length, 2, "Should have the right number of profiles.");
+  Assert.equal(
+    profileData.profiles.length,
+    2,
+    "Should have the right number of profiles."
+  );
 
   profile = profileData.profiles[0];
   Assert.equal(profile.name, "another", "Should have the right name.");
   Assert.ok(!profile.default, "Should not be marked as the old-style default.");
 
   profile = profileData.profiles[1];
   Assert.equal(profile.name, "dedicated", "Should have the right name.");
   Assert.ok(!profile.default, "Should not be marked as the old-style default.");
 
-  Assert.equal(Object.keys(profileData.installs).length, 1, "Should be only one known install.");
-  Assert.equal(profileData.installs[hash].default, profileData.profiles[0].path, "Should have marked the new profile as the default for this install.");
+  Assert.equal(
+    Object.keys(profileData.installs).length,
+    1,
+    "Should be only one known install."
+  );
+  Assert.equal(
+    profileData.installs[hash].default,
+    profileData.profiles[0].path,
+    "Should have marked the new profile as the default for this install."
+  );
 
   checkProfileService(profileData);
 
   newProfile.remove(true);
   service.flush();
 
   profileData = readProfilesIni();
 
-  Assert.equal(profileData.profiles.length, 1, "Should have the right number of profiles.");
+  Assert.equal(
+    profileData.profiles.length,
+    1,
+    "Should have the right number of profiles."
+  );
 
   profile = profileData.profiles[0];
   Assert.equal(profile.name, "another", "Should have the right name.");
   Assert.ok(!profile.default, "Should not be marked as the old-style default.");
 
-  Assert.equal(Object.keys(profileData.installs).length, 1, "Should be only one known install.");
-  Assert.equal(profileData.installs[hash].default, profileData.profiles[0].path, "Should have marked the new profile as the default for this install.");
+  Assert.equal(
+    Object.keys(profileData.installs).length,
+    1,
+    "Should be only one known install."
+  );
+  Assert.equal(
+    profileData.installs[hash].default,
+    profileData.profiles[0].path,
+    "Should have marked the new profile as the default for this install."
+  );
 
   checkProfileService(profileData);
 
   otherProfile.remove(true);
   service.flush();
 
   profileData = readProfilesIni();
 
-  Assert.equal(profileData.profiles.length, 0, "Should have the right number of profiles.");
+  Assert.equal(
+    profileData.profiles.length,
+    0,
+    "Should have the right number of profiles."
+  );
 
   // We leave a reference to the missing profile to stop us trying to steal the
   // old-style default profile on next startup.
-  Assert.equal(Object.keys(profileData.installs).length, 1, "Should be only one known install.");
+  Assert.equal(
+    Object.keys(profileData.installs).length,
+    1,
+    "Should be only one known install."
+  );
 
   checkProfileService(profileData);
 });
--- a/toolkit/profile/xpcshell/test_conflict_installs.js
+++ b/toolkit/profile/xpcshell/test_conflict_installs.js
@@ -2,32 +2,39 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 /*
  * Tests that the profile service refuses to flush when the install.ini file
  * has been modified.
  */
 
 function check_unchanged(service) {
-  Assert.ok(!service.isListOutdated, "Should not have detected a modification.");
+  Assert.ok(
+    !service.isListOutdated,
+    "Should not have detected a modification."
+  );
   try {
     service.flush();
     Assert.ok(true, "Should have flushed.");
   } catch (e) {
     Assert.ok(false, "Should have succeeded flushing.");
   }
 }
 
 function check_outdated(service) {
   Assert.ok(service.isListOutdated, "Should have detected a modification.");
   try {
     service.flush();
     Assert.ok(false, "Should have failed to flush.");
   } catch (e) {
-    Assert.equal(e.result, Cr.NS_ERROR_DATABASE_CHANGED, "Should have refused to flush.");
+    Assert.equal(
+      e.result,
+      Cr.NS_ERROR_DATABASE_CHANGED,
+      "Should have refused to flush."
+    );
   }
 }
 
 add_task(async () => {
   let service = getProfileService();
 
   Assert.ok(!service.isListOutdated, "Should not be modified yet.");
 
--- a/toolkit/profile/xpcshell/test_conflict_profiles.js
+++ b/toolkit/profile/xpcshell/test_conflict_profiles.js
@@ -2,32 +2,39 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 /*
  * Tests that the profile service refuses to flush when the profiles.ini file
  * has been modified.
  */
 
 function check_unchanged(service) {
-  Assert.ok(!service.isListOutdated, "Should not have detected a modification.");
+  Assert.ok(
+    !service.isListOutdated,
+    "Should not have detected a modification."
+  );
   try {
     service.flush();
     Assert.ok(true, "Should have flushed.");
   } catch (e) {
     Assert.ok(false, "Should have succeeded flushing.");
   }
 }
 
 function check_outdated(service) {
   Assert.ok(service.isListOutdated, "Should have detected a modification.");
   try {
     service.flush();
     Assert.ok(false, "Should have failed to flush.");
   } catch (e) {
-    Assert.equal(e.result, Cr.NS_ERROR_DATABASE_CHANGED, "Should have refused to flush.");
+    Assert.equal(
+      e.result,
+      Cr.NS_ERROR_DATABASE_CHANGED,
+      "Should have refused to flush."
+    );
   }
 }
 
 add_task(async () => {
   let service = getProfileService();
 
   Assert.ok(!service.isListOutdated, "Should not be modified yet.");
 
--- a/toolkit/profile/xpcshell/test_create_default.js
+++ b/toolkit/profile/xpcshell/test_create_default.js
@@ -10,26 +10,47 @@ add_task(async () => {
   let { profile, didCreate } = selectStartupProfile();
 
   checkStartupReason("firstrun-created-default");
 
   let profileData = readProfilesIni();
   checkProfileService(profileData);
 
   Assert.ok(didCreate, "Should have created a new profile.");
-  Assert.equal(profile, service.defaultProfile, "Should now be the default profile.");
-  Assert.equal(profile.name, DEDICATED_NAME, "Should have created a new profile with the right name.");
-  Assert.ok(!service.createdAlternateProfile, "Should not have created an alternate profile.");
+  Assert.equal(
+    profile,
+    service.defaultProfile,
+    "Should now be the default profile."
+  );
+  Assert.equal(
+    profile.name,
+    DEDICATED_NAME,
+    "Should have created a new profile with the right name."
+  );
+  Assert.ok(
+    !service.createdAlternateProfile,
+    "Should not have created an alternate profile."
+  );
 
-  Assert.ok(profileData.options.startWithLastProfile, "Should be set to start with the last profile.");
-  Assert.equal(profileData.profiles.length, 2, "Should have the right number of profiles.");
+  Assert.ok(
+    profileData.options.startWithLastProfile,
+    "Should be set to start with the last profile."
+  );
+  Assert.equal(
+    profileData.profiles.length,
+    2,
+    "Should have the right number of profiles."
+  );
 
   profile = profileData.profiles[0];
   Assert.equal(profile.name, "default", "Should have the right name.");
   Assert.ok(profile.default, "Should be marked as the old-style default.");
 
   profile = profileData.profiles[1];
   Assert.equal(profile.name, DEDICATED_NAME, "Should have the right name.");
   Assert.ok(!profile.default, "Should not be marked as the old-style default.");
 
   let hash = xreDirProvider.getInstallHash();
-  Assert.ok(profileData.installs[hash].locked, "Should have locked the profile");
+  Assert.ok(
+    profileData.installs[hash].locked,
+    "Should have locked the profile"
+  );
 });
--- a/toolkit/profile/xpcshell/test_fix_directory_case.js
+++ b/toolkit/profile/xpcshell/test_fix_directory_case.js
@@ -14,58 +14,100 @@ add_task(async () => {
   let defaultProfile = makeRandomProfileDir("default");
   let dedicatedProfile = makeRandomProfileDir("dedicated");
   let devProfile = makeRandomProfileDir("devedition");
 
   // Make sure we don't steal the old-style default.
   writeCompatibilityIni(defaultProfile);
 
   writeProfilesIni({
-    profiles: [{
-      name: "default",
-      path: defaultProfile.leafName,
-      default: true,
-    }, {
-      name: "dedicated",
-      path: dedicatedProfile.leafName,
-    }, {
-      name: "dev-edition-default",
-      path: devProfile.leafName,
-    }],
+    profiles: [
+      {
+        name: "default",
+        path: defaultProfile.leafName,
+        default: true,
+      },
+      {
+        name: "dedicated",
+        path: dedicatedProfile.leafName,
+      },
+      {
+        name: "dev-edition-default",
+        path: devProfile.leafName,
+      },
+    ],
     installs: {
       [legacyHash]: {
         default: dedicatedProfile.leafName,
       },
-      "otherhash": {
+      otherhash: {
         default: "foobar",
       },
     },
   });
 
-  let { profile: selectedProfile, didCreate } = selectStartupProfile([], false, legacyHash);
+  let { profile: selectedProfile, didCreate } = selectStartupProfile(
+    [],
+    false,
+    legacyHash
+  );
   checkStartupReason("default");
 
   let profileData = readProfilesIni();
 
-  Assert.ok(profileData.options.startWithLastProfile, "Should be set to start with the last profile.");
-  Assert.equal(profileData.profiles.length, 3, "Should have the right number of profiles.");
+  Assert.ok(
+    profileData.options.startWithLastProfile,
+    "Should be set to start with the last profile."
+  );
+  Assert.equal(
+    profileData.profiles.length,
+    3,
+    "Should have the right number of profiles."
+  );
 
   let profile = profileData.profiles[0];
   Assert.equal(profile.name, `dedicated`, "Should have the right name.");
-  Assert.equal(profile.path, dedicatedProfile.leafName, "Should be the expected dedicated profile.");
+  Assert.equal(
+    profile.path,
+    dedicatedProfile.leafName,
+    "Should be the expected dedicated profile."
+  );
   Assert.ok(!profile.default, "Should not be marked as the old-style default.");
 
   profile = profileData.profiles[1];
   Assert.equal(profile.name, "default", "Should have the right name.");
-  Assert.equal(profile.path, defaultProfile.leafName, "Should be the original default profile.");
+  Assert.equal(
+    profile.path,
+    defaultProfile.leafName,
+    "Should be the original default profile."
+  );
   Assert.ok(profile.default, "Should be marked as the old-style default.");
 
-  Assert.equal(Object.keys(profileData.installs).length, 3, "Should be three known installs.");
-  Assert.equal(profileData.installs[currentHash].default, dedicatedProfile.leafName, "Should have switched to the new install hash.");
-  Assert.equal(profileData.installs[legacyHash].default, dedicatedProfile.leafName, "Should have kept the old install hash.");
-  Assert.equal(profileData.installs.otherhash.default, "foobar", "Should have kept the default for the other install.");
+  Assert.equal(
+    Object.keys(profileData.installs).length,
+    3,
+    "Should be three known installs."
+  );
+  Assert.equal(
+    profileData.installs[currentHash].default,
+    dedicatedProfile.leafName,
+    "Should have switched to the new install hash."
+  );
+  Assert.equal(
+    profileData.installs[legacyHash].default,
+    dedicatedProfile.leafName,
+    "Should have kept the old install hash."
+  );
+  Assert.equal(
+    profileData.installs.otherhash.default,
+    "foobar",
+    "Should have kept the default for the other install."
+  );
 
   checkProfileService(profileData);
 
   Assert.ok(!didCreate, "Should not have created a new profile.");
-  Assert.ok(selectedProfile.rootDir.equals(dedicatedProfile), "Should be using the right directory.");
+  Assert.ok(
+    selectedProfile.rootDir.equals(dedicatedProfile),
+    "Should be using the right directory."
+  );
   Assert.equal(selectedProfile.name, "dedicated");
 });
--- a/toolkit/profile/xpcshell/test_ignore_legacy_directory.js
+++ b/toolkit/profile/xpcshell/test_ignore_legacy_directory.js
@@ -14,66 +14,116 @@ add_task(async () => {
   let defaultProfile = makeRandomProfileDir("default");
   let dedicatedProfile = makeRandomProfileDir("dedicated");
   let devProfile = makeRandomProfileDir("devedition");
 
   // Make sure we don't steal the old-style default.
   writeCompatibilityIni(defaultProfile);
 
   writeProfilesIni({
-    profiles: [{
-      name: "default",
-      path: defaultProfile.leafName,
-      default: true,
-    }, {
-      name: "dedicated",
-      path: dedicatedProfile.leafName,
-    }, {
-      name: "dev-edition-default",
-      path: devProfile.leafName,
-    }],
+    profiles: [
+      {
+        name: "default",
+        path: defaultProfile.leafName,
+        default: true,
+      },
+      {
+        name: "dedicated",
+        path: dedicatedProfile.leafName,
+      },
+      {
+        name: "dev-edition-default",
+        path: devProfile.leafName,
+      },
+    ],
     installs: {
       [legacyHash]: {
         default: defaultProfile.leafName,
       },
       [currentHash]: {
         default: dedicatedProfile.leafName,
       },
-      "otherhash": {
+      otherhash: {
         default: "foobar",
       },
     },
   });
 
-  let { profile: selectedProfile, didCreate } = selectStartupProfile([], false, legacyHash);
+  let { profile: selectedProfile, didCreate } = selectStartupProfile(
+    [],
+    false,
+    legacyHash
+  );
   checkStartupReason("default");
 
   let profileData = readProfilesIni();
 
-  Assert.ok(profileData.options.startWithLastProfile, "Should be set to start with the last profile.");
-  Assert.equal(profileData.profiles.length, 3, "Should have the right number of profiles.");
+  Assert.ok(
+    profileData.options.startWithLastProfile,
+    "Should be set to start with the last profile."
+  );
+  Assert.equal(
+    profileData.profiles.length,
+    3,
+    "Should have the right number of profiles."
+  );
 
   let profile = profileData.profiles[0];
   Assert.equal(profile.name, `dedicated`, "Should have the right name.");
-  Assert.equal(profile.path, dedicatedProfile.leafName, "Should be the expected dedicated profile.");
+  Assert.equal(
+    profile.path,
+    dedicatedProfile.leafName,
+    "Should be the expected dedicated profile."
+  );
   Assert.ok(!profile.default, "Should not be marked as the old-style default.");
 
   profile = profileData.profiles[1];
   Assert.equal(profile.name, "default", "Should have the right name.");
-  Assert.equal(profile.path, defaultProfile.leafName, "Should be the original default profile.");
+  Assert.equal(
+    profile.path,
+    defaultProfile.leafName,
+    "Should be the original default profile."
+  );
   Assert.ok(profile.default, "Should be marked as the old-style default.");
 
   profile = profileData.profiles[2];
-  Assert.equal(profile.name, "dev-edition-default", "Should have the right name.");
-  Assert.equal(profile.path, devProfile.leafName, "Should not be the original default profile.");
+  Assert.equal(
+    profile.name,
+    "dev-edition-default",
+    "Should have the right name."
+  );
+  Assert.equal(
+    profile.path,
+    devProfile.leafName,
+    "Should not be the original default profile."
+  );
   Assert.ok(!profile.default, "Should not be marked as the old-style default.");
 
-  Assert.equal(Object.keys(profileData.installs).length, 3, "Should be three known installs.");
-  Assert.equal(profileData.installs[currentHash].default, dedicatedProfile.leafName, "Should have switched to the new install hash.");
-  Assert.equal(profileData.installs[legacyHash].default, defaultProfile.leafName, "Should have ignored old install hash.");
-  Assert.equal(profileData.installs.otherhash.default, "foobar", "Should have kept the default for the other install.");
+  Assert.equal(
+    Object.keys(profileData.installs).length,
+    3,
+    "Should be three known installs."
+  );
+  Assert.equal(
+    profileData.installs[currentHash].default,
+    dedicatedProfile.leafName,
+    "Should have switched to the new install hash."
+  );
+  Assert.equal(
+    profileData.installs[legacyHash].default,
+    defaultProfile.leafName,
+    "Should have ignored old install hash."
+  );
+  Assert.equal(
+    profileData.installs.otherhash.default,
+    "foobar",
+    "Should have kept the default for the other install."
+  );
 
   checkProfileService(profileData);
 
   Assert.ok(!didCreate, "Should not have created a new profile.");
-  Assert.ok(selectedProfile.rootDir.equals(dedicatedProfile), "Should be using the right directory.");
+  Assert.ok(
+    selectedProfile.rootDir.equals(dedicatedProfile),
+    "Should be using the right directory."
+  );
   Assert.equal(selectedProfile.name, "dedicated");
 });
--- a/toolkit/profile/xpcshell/test_invalid_descriptor.js
+++ b/toolkit/profile/xpcshell/test_invalid_descriptor.js
@@ -8,38 +8,52 @@
 
 add_task(async () => {
   let hash = xreDirProvider.getInstallHash();
 
   let profileData = {
     options: {
       startWithLastProfile: true,
     },
-    profiles: [{
-      name: "Profile1",
-      path: "../data/test",
-    }, {
-      name: "Profile2",
-      path: "Path2",
-    }],
+    profiles: [
+      {
+        name: "Profile1",
+        path: "../data/test",
+      },
+      {
+        name: "Profile2",
+        path: "Path2",
+      },
+    ],
     installs: {
       [hash]: {
         default: "test",
       },
     },
   };
 
   writeProfilesIni(profileData);
 
   let { profile, didCreate } = selectStartupProfile();
   checkStartupReason("default");
 
   let service = getProfileService();
 
   Assert.ok(!didCreate, "Should not have created a new profile.");
-  Assert.equal(profile.name, "Profile1", "Should have selected the expected profile");
-  Assert.ok(!service.createdAlternateProfile, "Should not have created an alternate profile.");
+  Assert.equal(
+    profile.name,
+    "Profile1",
+    "Should have selected the expected profile"
+  );
+  Assert.ok(
+    !service.createdAlternateProfile,
+    "Should not have created an alternate profile."
+  );
 
-  Assert.equal(profile.name, service.defaultProfile.name, "Should have selected the right default.");
+  Assert.equal(
+    profile.name,
+    service.defaultProfile.name,
+    "Should have selected the right default."
+  );
 
   service.flush();
   checkProfileService();
 });
--- a/toolkit/profile/xpcshell/test_legacy_empty.js
+++ b/toolkit/profile/xpcshell/test_legacy_empty.js
@@ -8,17 +8,21 @@
 add_task(async () => {
   enableLegacyProfiles();
 
   let service = getProfileService();
   let { profile, didCreate } = selectStartupProfile();
   checkStartupReason("firstrun-created-default");
 
   Assert.ok(didCreate, "Should have created a new profile.");
-  Assert.equal(profile.name, PROFILE_DEFAULT, "Should have used the normal name.");
+  Assert.equal(
+    profile.name,
+    PROFILE_DEFAULT,
+    "Should have used the normal name."
+  );
   if (AppConstants.MOZ_DEV_EDITION) {
     Assert.equal(service.profileCount, 2, "Should be two profiles.");
   } else {
     Assert.equal(service.profileCount, 1, "Should be only one profile.");
   }
 
   checkProfileService();
 });
--- a/toolkit/profile/xpcshell/test_legacy_select.js
+++ b/toolkit/profile/xpcshell/test_legacy_select.js
@@ -10,39 +10,58 @@ add_task(async () => {
   let defaultProfile = makeRandomProfileDir("default");
 
   // Just pretend this profile was last used by something in the profile dir.
   let greDir = gProfD.clone();
   greDir.append("app");
   writeCompatibilityIni(defaultProfile, greDir, greDir);
 
   writeProfilesIni({
-    profiles: [{
-      name: PROFILE_DEFAULT,
-      path: defaultProfile.leafName,
-      default: true,
-    }],
+    profiles: [
+      {
+        name: PROFILE_DEFAULT,
+        path: defaultProfile.leafName,
+        default: true,
+      },
+    ],
   });
 
   enableLegacyProfiles();
 
   let { profile: selectedProfile, didCreate } = selectStartupProfile();
   checkStartupReason("default");
 
   let profileData = readProfilesIni();
   let installsINI = gDataHome.clone();
   installsINI.append("installs.ini");
-  Assert.ok(!installsINI.exists(), "Installs database should not have been created.");
+  Assert.ok(
+    !installsINI.exists(),
+    "Installs database should not have been created."
+  );
 
-  Assert.ok(profileData.options.startWithLastProfile, "Should be set to start with the last profile.");
-  Assert.equal(profileData.profiles.length, 1, "Should have the right number of profiles.");
+  Assert.ok(
+    profileData.options.startWithLastProfile,
+    "Should be set to start with the last profile."
+  );
+  Assert.equal(
+    profileData.profiles.length,
+    1,
+    "Should have the right number of profiles."
+  );
 
   let profile = profileData.profiles[0];
   Assert.equal(profile.name, PROFILE_DEFAULT, "Should have the right name.");
-  Assert.equal(profile.path, defaultProfile.leafName, "Should be the original default profile.");
+  Assert.equal(
+    profile.path,
+    defaultProfile.leafName,
+    "Should be the original default profile."
+  );
   Assert.ok(profile.default, "Should be marked as the old-style default.");
 
   checkProfileService(profileData);
 
   Assert.ok(!didCreate, "Should not have created a new profile.");
-  Assert.ok(selectedProfile.rootDir.equals(defaultProfile), "Should be using the right directory.");
+  Assert.ok(
+    selectedProfile.rootDir.equals(defaultProfile),
+    "Should be using the right directory."
+  );
   Assert.equal(selectedProfile.name, PROFILE_DEFAULT);
 });
--- a/toolkit/profile/xpcshell/test_lock.js
+++ b/toolkit/profile/xpcshell/test_lock.js
@@ -8,38 +8,65 @@
 
 add_task(async () => {
   gIsDefaultApp = true;
   let defaultProfile = makeRandomProfileDir("default");
 
   writeCompatibilityIni(defaultProfile);
 
   writeProfilesIni({
-    profiles: [{
-      name: PROFILE_DEFAULT,
-      path: defaultProfile.leafName,
-      default: true,
-    }],
+    profiles: [
+      {
+        name: PROFILE_DEFAULT,
+        path: defaultProfile.leafName,
+        default: true,
+      },
+    ],
   });
 
   let { profile: selectedProfile, didCreate } = selectStartupProfile();
 
   let hash = xreDirProvider.getInstallHash();
   let profileData = readProfilesIni();
 
-  Assert.ok(profileData.options.startWithLastProfile, "Should be set to start with the last profile.");
-  Assert.equal(profileData.profiles.length, 1, "Should have the right number of profiles.");
+  Assert.ok(
+    profileData.options.startWithLastProfile,
+    "Should be set to start with the last profile."
+  );
+  Assert.equal(
+    profileData.profiles.length,
+    1,
+    "Should have the right number of profiles."
+  );
 
   let profile = profileData.profiles[0];
   Assert.equal(profile.name, PROFILE_DEFAULT, "Should have the right name.");
-  Assert.equal(profile.path, defaultProfile.leafName, "Should be the original default profile.");
+  Assert.equal(
+    profile.path,
+    defaultProfile.leafName,
+    "Should be the original default profile."
+  );
   Assert.ok(profile.default, "Should be marked as the old-style default.");
 
-  Assert.equal(Object.keys(profileData.installs).length, 1, "Should be only one known install.");
-  Assert.equal(profileData.installs[hash].default, defaultProfile.leafName, "Should have marked the original default profile as the default for this install.");
-  Assert.ok(profileData.installs[hash].locked, "Should have locked as we're the default app.");
+  Assert.equal(
+    Object.keys(profileData.installs).length,
+    1,
+    "Should be only one known install."
+  );
+  Assert.equal(
+    profileData.installs[hash].default,
+    defaultProfile.leafName,
+    "Should have marked the original default profile as the default for this install."
+  );
+  Assert.ok(
+    profileData.installs[hash].locked,
+    "Should have locked as we're the default app."
+  );
 
   checkProfileService(profileData);
 
   Assert.ok(!didCreate, "Should not have created a new profile.");
-  Assert.ok(selectedProfile.rootDir.equals(defaultProfile), "Should be using the right directory.");
+  Assert.ok(
+    selectedProfile.rootDir.equals(defaultProfile),
+    "Should be using the right directory."
+  );
   Assert.equal(selectedProfile.name, PROFILE_DEFAULT);
 });
--- a/toolkit/profile/xpcshell/test_missing_profilesini.js
+++ b/toolkit/profile/xpcshell/test_missing_profilesini.js
@@ -23,18 +23,33 @@ add_task(async () => {
 
   writeInstallsIni({ installs });
 
   let { profile, didCreate } = selectStartupProfile();
   checkStartupReason("firstrun-created-default");
 
   let service = getProfileService();
   Assert.ok(didCreate, "Should have created a new profile.");
-  Assert.equal(profile.name, DEDICATED_NAME, "Should have created the right profile");
-  Assert.ok(!service.createdAlternateProfile, "Should not have created an alternate profile.");
+  Assert.equal(
+    profile.name,
+    DEDICATED_NAME,
+    "Should have created the right profile"
+  );
+  Assert.ok(
+    !service.createdAlternateProfile,
+    "Should not have created an alternate profile."
+  );
 
   let profilesData = readProfilesIni();
-  Assert.equal(Object.keys(profilesData.installs).length, 1, "Should be only one known install");
+  Assert.equal(
+    Object.keys(profilesData.installs).length,
+    1,
+    "Should be only one known install"
+  );
   Assert.ok(hash in profilesData.installs, "Should be the expected install.");
-  Assert.notEqual(profilesData.installs[hash].default, "Path2", "Didn't import the previous data.");
+  Assert.notEqual(
+    profilesData.installs[hash].default,
+    "Path2",
+    "Didn't import the previous data."
+  );
 
   checkProfileService(profilesData);
 });
--- a/toolkit/profile/xpcshell/test_new_default.js
+++ b/toolkit/profile/xpcshell/test_new_default.js
@@ -10,67 +10,118 @@ add_task(async () => {
   let mydefaultProfile = makeRandomProfileDir("mydefault");
   let defaultProfile = makeRandomProfileDir("default");
   let devDefaultProfile = makeRandomProfileDir("devedition");
 
   writeCompatibilityIni(mydefaultProfile);
   writeCompatibilityIni(devDefaultProfile);
 
   writeProfilesIni({
-    profiles: [{
-      name: "mydefault",
-      path: mydefaultProfile.leafName,
-      default: true,
-    }, {
-      name: "default",
-      path: defaultProfile.leafName,
-    }, {
-      name: "dev-edition-default",
-      path: devDefaultProfile.leafName,
-    }],
+    profiles: [
+      {
+        name: "mydefault",
+        path: mydefaultProfile.leafName,
+        default: true,
+      },
+      {
+        name: "default",
+        path: defaultProfile.leafName,
+      },
+      {
+        name: "dev-edition-default",
+        path: devDefaultProfile.leafName,
+      },
+    ],
   });
 
   let service = getProfileService();
   let { profile: selectedProfile, didCreate } = selectStartupProfile();
   checkStartupReason("firstrun-claimed-default");
 
   let hash = xreDirProvider.getInstallHash();
   let profileData = readProfilesIni();
 
-  Assert.ok(profileData.options.startWithLastProfile, "Should be set to start with the last profile.");
-  Assert.equal(profileData.profiles.length, 3, "Should have the right number of profiles.");
+  Assert.ok(
+    profileData.options.startWithLastProfile,
+    "Should be set to start with the last profile."
+  );
+  Assert.equal(
+    profileData.profiles.length,
+    3,
+    "Should have the right number of profiles."
+  );
 
   let profile = profileData.profiles[0];
   Assert.equal(profile.name, "default", "Should have the right name.");
-  Assert.equal(profile.path, defaultProfile.leafName, "Should be the original non-default profile.");
+  Assert.equal(
+    profile.path,
+    defaultProfile.leafName,
+    "Should be the original non-default profile."
+  );
   Assert.ok(!profile.default, "Should not be marked as the old-style default.");
 
   profile = profileData.profiles[1];
-  Assert.equal(profile.name, "dev-edition-default", "Should have the right name.");
-  Assert.equal(profile.path, devDefaultProfile.leafName, "Should be the original dev default profile.");
+  Assert.equal(
+    profile.name,
+    "dev-edition-default",
+    "Should have the right name."
+  );
+  Assert.equal(
+    profile.path,
+    devDefaultProfile.leafName,
+    "Should be the original dev default profile."
+  );
   Assert.ok(!profile.default, "Should not be marked as the old-style default.");
 
   profile = profileData.profiles[2];
   Assert.equal(profile.name, "mydefault", "Should have the right name.");
-  Assert.equal(profile.path, mydefaultProfile.leafName, "Should be the original default profile.");
+  Assert.equal(
+    profile.path,
+    mydefaultProfile.leafName,
+    "Should be the original default profile."
+  );
   Assert.ok(profile.default, "Should be marked as the old-style default.");
 
-  Assert.equal(Object.keys(profileData.installs).length, 1, "Should be only one known install.");
+  Assert.equal(
+    Object.keys(profileData.installs).length,
+    1,
+    "Should be only one known install."
+  );
   if (AppConstants.MOZ_DEV_EDITION) {
-    Assert.equal(profileData.installs[hash].default, devDefaultProfile.leafName, "Should have marked the original dev default profile as the default for this install.");
+    Assert.equal(
+      profileData.installs[hash].default,
+      devDefaultProfile.leafName,
+      "Should have marked the original dev default profile as the default for this install."
+    );
   } else {
-    Assert.equal(profileData.installs[hash].default, mydefaultProfile.leafName, "Should have marked the original default profile as the default for this install.");
+    Assert.equal(
+      profileData.installs[hash].default,
+      mydefaultProfile.leafName,
+      "Should have marked the original default profile as the default for this install."
+    );
   }
 
-  Assert.ok(!profileData.installs[hash].locked, "Should not be locked as we're not the default app.");
+  Assert.ok(
+    !profileData.installs[hash].locked,
+    "Should not be locked as we're not the default app."
+  );
 
   checkProfileService(profileData);
 
   Assert.ok(!didCreate, "Should not have created a new profile.");
   if (AppConstants.MOZ_DEV_EDITION) {
-    Assert.ok(selectedProfile.rootDir.equals(devDefaultProfile), "Should be using the right directory.");
+    Assert.ok(
+      selectedProfile.rootDir.equals(devDefaultProfile),
+      "Should be using the right directory."
+    );
     Assert.equal(selectedProfile.name, "dev-edition-default");
   } else {
-    Assert.ok(selectedProfile.rootDir.equals(mydefaultProfile), "Should be using the right directory.");
+    Assert.ok(
+      selectedProfile.rootDir.equals(mydefaultProfile),
+      "Should be using the right directory."
+    );
     Assert.equal(selectedProfile.name, "mydefault");
   }
-  Assert.ok(!service.createdAlternateProfile, "Should not have created an alternate profile.");
+  Assert.ok(
+    !service.createdAlternateProfile,
+    "Should not have created an alternate profile."
+  );
 });
--- a/toolkit/profile/xpcshell/test_previous_dedicated.js
+++ b/toolkit/profile/xpcshell/test_previous_dedicated.js
@@ -9,39 +9,59 @@
 
 add_task(async () => {
   let hash = xreDirProvider.getInstallHash();
   let defaultProfile = makeRandomProfileDir("default");
 
   writeCompatibilityIni(defaultProfile);
 
   writeProfilesIni({
-    profiles: [{
-      name: "default",
-      path: defaultProfile.leafName,
-      default: true,
-    }],
+    profiles: [
+      {
+        name: "default",
+        path: defaultProfile.leafName,
+        default: true,
+      },
+    ],
     installs: {
       [hash]: {
         default: "foobar",
       },
     },
   });
 
   let service = getProfileService();
   testStartsProfileManager();
 
   let profileData = readProfilesIni();
 
-  Assert.ok(profileData.options.startWithLastProfile, "Should be set to start with the last profile.");
-  Assert.equal(profileData.profiles.length, 1, "Should have the right number of profiles.");
-  Assert.ok(!service.createdAlternateProfile, "Should not have created an alternate profile.");
+  Assert.ok(
+    profileData.options.startWithLastProfile,
+    "Should be set to start with the last profile."
+  );
+  Assert.equal(
+    profileData.profiles.length,
+    1,
+    "Should have the right number of profiles."
+  );
+  Assert.ok(
+    !service.createdAlternateProfile,
+    "Should not have created an alternate profile."
+  );
 
   let profile = profileData.profiles[0];
   Assert.equal(profile.name, "default", "Should have the right name.");
-  Assert.equal(profile.path, defaultProfile.leafName, "Should be the original default profile.");
+  Assert.equal(
+    profile.path,
+    defaultProfile.leafName,
+    "Should be the original default profile."
+  );
   Assert.ok(profile.default, "Should be marked as the old-style default.");
 
   // We keep the data here so we don't steal on the next reboot...
-  Assert.equal(Object.keys(profileData.installs).length, 1, "Still list the broken reference.");
+  Assert.equal(
+    Object.keys(profileData.installs).length,
+    1,
+    "Still list the broken reference."
+  );
 
   checkProfileService(profileData);
 });
--- a/toolkit/profile/xpcshell/test_profile_reset.js
+++ b/toolkit/profile/xpcshell/test_profile_reset.js
@@ -12,29 +12,54 @@ add_task(async () => {
   let { profile: selectedProfile, didCreate } = selectStartupProfile([], true);
   // With no profile we're just create a new profile and skip resetting it.
   checkStartupReason("firstrun-created-default");
   checkProfileService();
 
   let hash = xreDirProvider.getInstallHash();
   let profileData = readProfilesIni();
 
-  Assert.ok(profileData.options.startWithLastProfile, "Should be set to start with the last profile.");
-  Assert.equal(profileData.profiles.length, 2, "Should have the right number of profiles, ours and the old-style default.");
+  Assert.ok(
+    profileData.options.startWithLastProfile,
+    "Should be set to start with the last profile."
+  );
+  Assert.equal(
+    profileData.profiles.length,
+    2,
+    "Should have the right number of profiles, ours and the old-style default."
+  );
 
   let profile = profileData.profiles[0];
   Assert.equal(profile.name, "default", "Should have the right name.");
   Assert.ok(profile.default, "Should be marked as the old-style default.");
 
   profile = profileData.profiles[1];
   Assert.equal(profile.name, DEDICATED_NAME, "Should have the right name.");
   Assert.ok(!profile.default, "Should not be marked as the old-style default.");
 
-  Assert.equal(Object.keys(profileData.installs).length, 1, "Should only be one known installs.");
-  Assert.equal(profileData.installs[hash].default, profile.path, "Should have taken the new profile as the default for the current install.");
-  Assert.ok(profileData.installs[hash].locked, "Should have locked as we created this profile.");
+  Assert.equal(
+    Object.keys(profileData.installs).length,
+    1,
+    "Should only be one known installs."
+  );
+  Assert.equal(
+    profileData.installs[hash].default,
+    profile.path,
+    "Should have taken the new profile as the default for the current install."
+  );
+  Assert.ok(
+    profileData.installs[hash].locked,
+    "Should have locked as we created this profile."
+  );
 
   checkProfileService(profileData);
 
   Assert.ok(didCreate, "Should have created a new profile.");
-  Assert.ok(!service.createdAlternateProfile, "Should not have created an alternate profile.");
-  Assert.equal(selectedProfile.name, profile.name, "Should be using the right profile.");
+  Assert.ok(
+    !service.createdAlternateProfile,
+    "Should not have created an alternate profile."
+  );
+  Assert.equal(
+    selectedProfile.name,
+    profile.name,
+    "Should be using the right profile."
+  );
 });
--- a/toolkit/profile/xpcshell/test_remove.js
+++ b/toolkit/profile/xpcshell/test_remove.js
@@ -1,32 +1,47 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 /*
  * Tests adding and removing functions correctly.
  */
 
 function compareLists(service, knownProfiles) {
-  Assert.equal(service.profileCount, knownProfiles.length, "profileCount should be correct.");
+  Assert.equal(
+    service.profileCount,
+    knownProfiles.length,
+    "profileCount should be correct."
+  );
   let serviceProfiles = Array.from(service.profiles);
-  Assert.equal(serviceProfiles.length, knownProfiles.length, "Enumerator length should be correct.");
+  Assert.equal(
+    serviceProfiles.length,
+    knownProfiles.length,
+    "Enumerator length should be correct."
+  );
 
   for (let i = 0; i < knownProfiles.length; i++) {
     // Cannot use strictEqual here, it attempts to print out a string
     // representation of the profile objects and on some platforms that recurses
     // infinitely.
-    Assert.ok(serviceProfiles[i] === knownProfiles[i], `Should have the right profile in position ${i}.`);
+    Assert.ok(
+      serviceProfiles[i] === knownProfiles[i],
+      `Should have the right profile in position ${i}.`
+    );
   }
 }
 
 function removeProfile(profiles, position) {
   dump(`Removing profile in position ${position}.`);
   Assert.greaterOrEqual(position, 0, "Should be removing a valid position.");
-  Assert.less(position, profiles.length, "Should be removing a valid position.");
+  Assert.less(
+    position,
+    profiles.length,
+    "Should be removing a valid position."
+  );
 
   let last = profiles.pop();
 
   if (profiles.length == position) {
     // We were asked to remove the last profile.
     last.remove(false);
     return;
   }
@@ -66,22 +81,17 @@ add_task(async () => {
   // Second one...
   removeProfile(profiles, 1);
   compareLists(service, profiles);
 
   // Something in the middle.
   removeProfile(profiles, 2);
   compareLists(service, profiles);
 
-  let expectedNames = [
-    "profile9",
-    "profile7",
-    "profile5",
-    "profile4",
-  ];
+  let expectedNames = ["profile9", "profile7", "profile5", "profile4"];
 
   let serviceProfiles = Array.from(service.profiles);
   for (let i = 0; i < expectedNames.length; i++) {
     Assert.equal(serviceProfiles[i].name, expectedNames[i]);
   }
 
   removeProfile(profiles, 0);
   removeProfile(profiles, 0);
--- a/toolkit/profile/xpcshell/test_remove_default.js
+++ b/toolkit/profile/xpcshell/test_remove_default.js
@@ -6,56 +6,74 @@
  * removes the profile.
  */
 
 add_task(async () => {
   let hash = xreDirProvider.getInstallHash();
   let defaultProfile = makeRandomProfileDir("default");
 
   let profilesIni = {
-    profiles: [{
-      name: "default",
-      path: defaultProfile.leafName,
-      default: true,
-    }],
+    profiles: [
+      {
+        name: "default",
+        path: defaultProfile.leafName,
+        default: true,
+      },
+    ],
     installs: {
       [hash]: {
         default: defaultProfile.leafName,
       },
     },
   };
   writeProfilesIni(profilesIni);
 
   let service = getProfileService();
   checkProfileService(profilesIni);
 
   let { profile, didCreate } = selectStartupProfile();
   Assert.ok(!didCreate, "Should have not created a new profile.");
-  Assert.equal(profile.name, "default", "Should have selected the default profile.");
-  Assert.equal(profile, service.defaultProfile, "Should have selected the default profile.");
+  Assert.equal(
+    profile.name,
+    "default",
+    "Should have selected the default profile."
+  );
+  Assert.equal(
+    profile,
+    service.defaultProfile,
+    "Should have selected the default profile."
+  );
 
   checkProfileService(profilesIni);
 
   // In an actual run of Firefox we wouldn't be able to delete the profile in
   // use because it would be locked. But we don't actually lock the profile in
   // tests.
   profile.remove(false);
 
   Assert.ok(!service.defaultProfile, "Should no longer be a default profile.");
-  Assert.equal(profile, service.currentProfile, "Should still be the profile in use.");
+  Assert.equal(
+    profile,
+    service.currentProfile,
+    "Should still be the profile in use."
+  );
 
   // These are the modifications that should have been made.
   profilesIni.profiles.pop();
   profilesIni.installs[hash].default = "";
 
   // The data isn't flushed to disk so don't check the backup here.
   checkProfileService(profilesIni, false);
 
   service.flush();
 
   // And that should have flushed to disk correctly.
   checkProfileService();
 
   // checkProfileService doesn't differentiate between a blank default profile
   // for the install and a missing install.
   profilesIni = readProfilesIni();
-  Assert.equal(profilesIni.installs[hash].default, "", "Should be a blank default profile.");
+  Assert.equal(
+    profilesIni.installs[hash].default,
+    "",
+    "Should be a blank default profile."
+  );
 });
--- a/toolkit/profile/xpcshell/test_select_default.js
+++ b/toolkit/profile/xpcshell/test_select_default.js
@@ -7,39 +7,45 @@
 
 add_task(async () => {
   let hash = xreDirProvider.getInstallHash();
 
   let profileData = {
     options: {
       startWithLastProfile: true,
     },
-    profiles: [{
-      name: "Profile1",
-      path: "Path1",
-    }, {
-      name: "Profile3",
-      path: "Path3",
-    }],
+    profiles: [
+      {
+        name: "Profile1",
+        path: "Path1",
+      },
+      {
+        name: "Profile3",
+        path: "Path3",
+      },
+    ],
     installs: {
       [hash]: {
         default: "Path2",
       },
     },
   };
 
   if (AppConstants.MOZ_DEV_EDITION) {
-    profileData.profiles.push({
-      name: "default",
-      path: "Path2",
-      default: true,
-    }, {
-      name: PROFILE_DEFAULT,
-      path: "Path4",
-    });
+    profileData.profiles.push(
+      {
+        name: "default",
+        path: "Path2",
+        default: true,
+      },
+      {
+        name: PROFILE_DEFAULT,
+        path: "Path4",
+      }
+    );
   } else {
     profileData.profiles.push({
       name: PROFILE_DEFAULT,
       path: "Path2",
       default: true,
     });
   }
 
@@ -47,12 +53,23 @@ add_task(async () => {
 
   let { profile, didCreate } = selectStartupProfile();
   checkStartupReason("default");
 
   let service = getProfileService();
   checkProfileService(profileData);
 
   Assert.ok(!didCreate, "Should not have created a new profile.");
-  Assert.equal(profile, service.defaultProfile, "Should have returned the default profile.");
-  Assert.equal(profile.name, "default", "Should have selected the right profile");
-  Assert.ok(!service.createdAlternateProfile, "Should not have created an alternate profile.");
+  Assert.equal(
+    profile,
+    service.defaultProfile,
+    "Should have returned the default profile."
+  );
+  Assert.equal(
+    profile.name,
+    "default",
+    "Should have selected the right profile"
+  );
+  Assert.ok(
+    !service.createdAlternateProfile,
+    "Should not have created an alternate profile."
+  );
 });
--- a/toolkit/profile/xpcshell/test_select_environment.js
+++ b/toolkit/profile/xpcshell/test_select_environment.js
@@ -7,34 +7,39 @@
 
 add_task(async () => {
   let dir = makeRandomProfileDir("foo");
 
   let profileData = {
     options: {
       startWithLastProfile: true,
     },
-    profiles: [{
-      name: "Profile1",
-      path: dir.leafName,
-    }, {
-      name: "Profile2",
-      path: "Path2",
-      default: true,
-    }, {
-      name: "Profile3",
-      path: "Path3",
-    }],
+    profiles: [
+      {
+        name: "Profile1",
+        path: dir.leafName,
+      },
+      {
+        name: "Profile2",
+        path: "Path2",
+        default: true,
+      },
+      {
+        name: "Profile3",
+        path: "Path3",
+      },
+    ],
   };
 
   writeProfilesIni(profileData);
   checkProfileService(profileData);
 
-  let env = Cc["@mozilla.org/process/environment;1"].
-            getService(Ci.nsIEnvironment);
+  let env = Cc["@mozilla.org/process/environment;1"].getService(
+    Ci.nsIEnvironment
+  );
   env.set("XRE_PROFILE_PATH", dir.path);
   env.set("XRE_PROFILE_LOCAL_PATH", dir.path);
 
   let { rootDir, localDir, profile, didCreate } = selectStartupProfile();
   checkStartupReason("restart");
 
   Assert.ok(!didCreate, "Should not have created a new profile.");
   Assert.ok(rootDir.equals(dir), "Should have selected the right root dir.");
--- a/toolkit/profile/xpcshell/test_select_environment_named.js
+++ b/toolkit/profile/xpcshell/test_select_environment_named.js
@@ -9,41 +9,56 @@ add_task(async () => {
   let root = makeRandomProfileDir("foo");
   let local = gDataHomeLocal.clone();
   local.append("foo");
 
   let profileData = {
     options: {
       startWithLastProfile: true,
     },
-    profiles: [{
-      name: "Profile1",
-      path: root.leafName,
-    }, {
-      name: "Profile2",
-      path: "Path2",
-      default: true,
-    }, {
-      name: "Profile3",
-      path: "Path3",
-    }],
+    profiles: [
+      {
+        name: "Profile1",
+        path: root.leafName,
+      },
+      {
+        name: "Profile2",
+        path: "Path2",
+        default: true,
+      },
+      {
+        name: "Profile3",
+        path: "Path3",
+      },
+    ],
   };
 
   writeProfilesIni(profileData);
   checkProfileService(profileData);
 
-  let env = Cc["@mozilla.org/process/environment;1"].
-            getService(Ci.nsIEnvironment);
+  let env = Cc["@mozilla.org/process/environment;1"].getService(
+    Ci.nsIEnvironment
+  );
   env.set("XRE_PROFILE_PATH", root.path);
   env.set("XRE_PROFILE_LOCAL_PATH", local.path);
 
-  let { rootDir, localDir, profile, didCreate } = selectStartupProfile(["-P", "Profile3"]);
+  let { rootDir, localDir, profile, didCreate } = selectStartupProfile([
+    "-P",
+    "Profile3",
+  ]);
   checkStartupReason("restart");
 
   Assert.ok(!didCreate, "Should not have created a new profile.");
   Assert.ok(rootDir.equals(root), "Should have selected the right root dir.");
-  Assert.ok(localDir.equals(local), "Should have selected the right local dir.");
+  Assert.ok(
+    localDir.equals(local),
+    "Should have selected the right local dir."
+  );
   Assert.ok(profile, "A named profile matches this.");
   Assert.equal(profile.name, "Profile1", "The right profile was matched.");
 
   let service = getProfileService();
-  Assert.notEqual(service.defaultProfile, profile, "Should not be the default profile.");
+  Assert.notEqual(
+    service.defaultProfile,
+    profile,
+    "Should not be the default profile."
+  );
 });
--- a/toolkit/profile/xpcshell/test_select_missing.js
+++ b/toolkit/profile/xpcshell/test_select_missing.js
@@ -5,26 +5,30 @@
  * Tests that when choosing an unknown profile the profile manager is shown.
  */
 
 add_task(async () => {
   let profileData = {
     options: {
       startWithLastProfile: true,
     },
-    profiles: [{
-      name: "Profile1",
-      path: "Path1",
-    }, {
-      name: "Profile2",
-      path: "Path2",
-      default: true,
-    }, {
-      name: "Profile3",
-      path: "Path3",
-    }],
+    profiles: [
+      {
+        name: "Profile1",
+        path: "Path1",
+      },
+      {
+        name: "Profile2",
+        path: "Path2",
+        default: true,
+      },
+      {
+        name: "Profile3",
+        path: "Path3",
+      },
+    ],
   };
 
   writeProfilesIni(profileData);
   checkProfileService(profileData);
 
   testStartsProfileManager(["-P", "foo"]);
 });
--- a/toolkit/profile/xpcshell/test_select_named.js
+++ b/toolkit/profile/xpcshell/test_select_named.js
@@ -5,31 +5,39 @@
  * Tests that from a database of profiles the correct profile is selected.
  */
 
 add_task(async () => {
   let profileData = {
     options: {
       startWithLastProfile: true,
     },
-    profiles: [{
-      name: "Profile1",
-      path: "Path1",
-    }, {
-      name: "Profile2",
-      path: "Path2",
-      default: true,
-    }, {
-      name: "Profile3",
-      path: "Path3",
-    }],
+    profiles: [
+      {
+        name: "Profile1",
+        path: "Path1",
+      },
+      {
+        name: "Profile2",
+        path: "Path2",
+        default: true,
+      },
+      {
+        name: "Profile3",
+        path: "Path3",
+      },
+    ],
   };
 
   writeProfilesIni(profileData);
 
   checkProfileService(profileData);
 
   let { profile, didCreate } = selectStartupProfile(["-P", "Profile1"]);
   checkStartupReason("argument-p");
 
   Assert.ok(!didCreate, "Should not have created a new profile.");
-  Assert.equal(profile.name, "Profile1", "Should have chosen the right profile");
+  Assert.equal(
+    profile.name,
+    "Profile1",
+    "Should have chosen the right profile"
+  );
 });
--- a/toolkit/profile/xpcshell/test_select_noname.js
+++ b/toolkit/profile/xpcshell/test_select_noname.js
@@ -6,26 +6,30 @@
  * profile name the profile manager is opened.
  */
 
 add_task(async () => {
   let profileData = {
     options: {
       startWithLastProfile: true,
     },
-    profiles: [{
-      name: "Profile1",
-      path: "Path1",
-    }, {
-      name: "Profile2",
-      path: "Path2",
-      default: true,
-    }, {
-      name: "Profile3",
-      path: "Path3",
-    }],
+    profiles: [
+      {
+        name: "Profile1",
+        path: "Path1",
+      },
+      {
+        name: "Profile2",
+        path: "Path2",
+        default: true,
+      },
+      {
+        name: "Profile3",
+        path: "Path3",
+      },
+    ],
   };
 
   writeProfilesIni(profileData);
   checkProfileService(profileData);
 
   testStartsProfileManager(["-P"]);
 });
--- a/toolkit/profile/xpcshell/test_select_profilemanager.js
+++ b/toolkit/profile/xpcshell/test_select_profilemanager.js
@@ -5,26 +5,30 @@
  * Tests that when requested the profile manager is shown.
  */
 
 add_task(async () => {
   let profileData = {
     options: {
       startWithLastProfile: true,
     },
-    profiles: [{
-      name: "Profile1",
-      path: "Path1",
-    }, {
-      name: "Profile2",
-      path: "Path2",
-      default: true,
-    }, {
-      name: "Profile3",
-      path: "Path3",
-    }],
+    profiles: [
+      {
+        name: "Profile1",
+        path: "Path1",
+      },
+      {
+        name: "Profile2",
+        path: "Path2",
+        default: true,
+      },
+      {
+        name: "Profile3",
+        path: "Path3",
+      },
+    ],
   };
 
   writeProfilesIni(profileData);
   checkProfileService(profileData);
 
   testStartsProfileManager(["-profilemanager"]);
 });
--- a/toolkit/profile/xpcshell/test_single_profile_selected.js
+++ b/toolkit/profile/xpcshell/test_single_profile_selected.js
@@ -8,41 +8,71 @@
  */
 
 add_task(async () => {
   let defaultProfile = makeRandomProfileDir("default");
 
   writeCompatibilityIni(defaultProfile);
 
   writeProfilesIni({
-    profiles: [{
-      name: "default",
-      path: defaultProfile.leafName,
-      default: false,
-    }],
+    profiles: [
+      {
+        name: "default",
+        path: defaultProfile.leafName,
+        default: false,
+      },
+    ],
   });
 
   let { profile: selectedProfile, didCreate } = selectStartupProfile();
   checkStartupReason("firstrun-claimed-default");
 
   let hash = xreDirProvider.getInstallHash();
   let profileData = readProfilesIni();
 
-  Assert.ok(profileData.options.startWithLastProfile, "Should be set to start with the last profile.");
-  Assert.equal(profileData.profiles.length, 1, "Should have the right number of profiles.");
+  Assert.ok(
+    profileData.options.startWithLastProfile,
+    "Should be set to start with the last profile."
+  );
+  Assert.equal(
+    profileData.profiles.length,
+    1,
+    "Should have the right number of profiles."
+  );
 
   let profile = profileData.profiles[0];
   Assert.equal(profile.name, "default", "Should have the right name.");
-  Assert.equal(profile.path, defaultProfile.leafName, "Should be the original default profile.");
+  Assert.equal(
+    profile.path,
+    defaultProfile.leafName,
+    "Should be the original default profile."
+  );
   Assert.ok(profile.default, "Should be marked as the old-style default.");
 
-  Assert.equal(Object.keys(profileData.installs).length, 1, "Should be only one known install.");
-  Assert.equal(profileData.installs[hash].default, defaultProfile.leafName, "Should have marked the original default profile as the default for this install.");
-  Assert.ok(!profileData.installs[hash].locked, "Should not have locked as we're not the default app.");
+  Assert.equal(
+    Object.keys(profileData.installs).length,
+    1,
+    "Should be only one known install."
+  );
+  Assert.equal(
+    profileData.installs[hash].default,
+    defaultProfile.leafName,
+    "Should have marked the original default profile as the default for this install."
+  );
+  Assert.ok(
+    !profileData.installs[hash].locked,
+    "Should not have locked as we're not the default app."
+  );
 
   checkProfileService(profileData);
 
   Assert.ok(!didCreate, "Should not have created a new profile.");
   let service = getProfileService();
-  Assert.ok(!service.createdAlternateProfile, "Should not have created an alternate profile.");
-  Assert.ok(selectedProfile.rootDir.equals(defaultProfile), "Should be using the right directory.");
+  Assert.ok(
+    !service.createdAlternateProfile,
+    "Should not have created an alternate profile."
+  );
+  Assert.ok(
+    selectedProfile.rootDir.equals(defaultProfile),
+    "Should be using the right directory."
+  );
   Assert.equal(selectedProfile.name, "default");
 });
--- a/toolkit/profile/xpcshell/test_single_profile_unselected.js
+++ b/toolkit/profile/xpcshell/test_single_profile_unselected.js
@@ -11,47 +11,70 @@ add_task(async () => {
   let defaultProfile = makeRandomProfileDir("default");
 
   // Just pretend this profile was last used by something in the profile dir.
   let greDir = gProfD.clone();
   greDir.append("app");
   writeCompatibilityIni(defaultProfile, greDir, greDir);
 
   writeProfilesIni({
-    profiles: [{
-      name: "default",
-      path: defaultProfile.leafName,
-      default: false,
-    }],
+    profiles: [
+      {
+        name: "default",
+        path: defaultProfile.leafName,
+        default: false,
+      },
+    ],
   });
 
   let service = getProfileService();
 
   let profileData = readProfilesIni();
 
-  Assert.ok(profileData.options.startWithLastProfile, "Should be set to start with the last profile.");
-  Assert.equal(profileData.profiles.length, 1, "Should have the right number of profiles.");
+  Assert.ok(
+    profileData.options.startWithLastProfile,
+    "Should be set to start with the last profile."
+  );
+  Assert.equal(
+    profileData.profiles.length,
+    1,
+    "Should have the right number of profiles."
+  );
 
   let profile = profileData.profiles[0];
   Assert.equal(profile.name, "default", "Should have the right name.");
-  Assert.equal(profile.path, defaultProfile.leafName, "Should be the original default profile.");
+  Assert.equal(
+    profile.path,
+    defaultProfile.leafName,
+    "Should be the original default profile."
+  );
   Assert.ok(!profile.default, "Should not be marked as the old-style default.");
 
   Assert.ok(!profileData.installs, "Should be no defaults for installs yet.");
 
   checkProfileService(profileData);
 
   let { profile: selectedProfile, didCreate } = selectStartupProfile();
   checkStartupReason("firstrun-skipped-default");
   Assert.ok(didCreate, "Should have created a new profile.");
-  Assert.ok(service.createdAlternateProfile, "Should have created an alternate profile.");
-  Assert.ok(!selectedProfile.rootDir.equals(defaultProfile), "Should be using the right directory.");
+  Assert.ok(
+    service.createdAlternateProfile,
+    "Should have created an alternate profile."
+  );
+  Assert.ok(
+    !selectedProfile.rootDir.equals(defaultProfile),
+    "Should be using the right directory."
+  );
   Assert.equal(selectedProfile.name, DEDICATED_NAME);
 
   profileData = readProfilesIni();
 
   profile = profileData.profiles[0];
   Assert.equal(profile.name, "default", "Should have the right name.");
-  Assert.equal(profile.path, defaultProfile.leafName, "Should be the original default profile.");
+  Assert.equal(
+    profile.path,
+    defaultProfile.leafName,
+    "Should be the original default profile."
+  );
   Assert.ok(profile.default, "Should now be marked as the old-style default.");
 
   checkProfileService(profileData);
 });
--- a/toolkit/profile/xpcshell/test_skip_locked_environment.js
+++ b/toolkit/profile/xpcshell/test_skip_locked_environment.js
@@ -13,68 +13,122 @@ add_task(async () => {
   local.append("foo");
 
   writeCompatibilityIni(root);
 
   let profileData = {
     options: {
       startWithLastProfile: true,
     },
-    profiles: [{
-      name: PROFILE_DEFAULT,
-      path: root.leafName,
-      default: true,
-    }, {
-      name: "Profile2",
-      path: "Path2",
-    }, {
-      name: "Profile3",
-      path: "Path3",
-    }],
+    profiles: [
+      {
+        name: PROFILE_DEFAULT,
+        path: root.leafName,
+        default: true,
+      },
+      {
+        name: "Profile2",
+        path: "Path2",
+      },
+      {
+        name: "Profile3",
+        path: "Path3",
+      },
+    ],
     // Another install is using the profile and it is locked.
     installs: {
       otherinstall: {
         default: root.leafName,
         locked: true,
       },
     },
   };
 
   writeProfilesIni(profileData);
   checkProfileService(profileData);
 
-  let env = Cc["@mozilla.org/process/environment;1"].
-            getService(Ci.nsIEnvironment);
+  let env = Cc["@mozilla.org/process/environment;1"].getService(
+    Ci.nsIEnvironment
+  );
   env.set("XRE_PROFILE_PATH", root.path);
   env.set("XRE_PROFILE_LOCAL_PATH", local.path);
 
   let { rootDir, localDir, profile, didCreate } = selectStartupProfile();
   checkStartupReason("restart-skipped-default");
 
   // Since there is already a profile with the desired name on dev-edition, a
   // unique version will be used.
-  let expectedName = AppConstants.MOZ_DEV_EDITION ? `${DEDICATED_NAME}-1` : DEDICATED_NAME;
+  let expectedName = AppConstants.MOZ_DEV_EDITION
+    ? `${DEDICATED_NAME}-1`
+    : DEDICATED_NAME;
 
   Assert.ok(didCreate, "Should have created a new profile.");
   Assert.ok(!rootDir.equals(root), "Should have selected the right root dir.");
-  Assert.ok(!localDir.equals(local), "Should have selected the right local dir.");
+  Assert.ok(
+    !localDir.equals(local),
+    "Should have selected the right local dir."
+  );
   Assert.ok(profile, "A named profile was returned.");
   Assert.equal(profile.name, expectedName, "The right profile name was used.");
 
   let service = getProfileService();
-  Assert.equal(service.defaultProfile, profile, "Should be the default profile.");
-  Assert.equal(service.currentProfile, profile, "Should be the current profile.");
+  Assert.equal(
+    service.defaultProfile,
+    profile,
+    "Should be the default profile."
+  );
+  Assert.equal(
+    service.currentProfile,
+    profile,
+    "Should be the current profile."
+  );
 
   profileData = readProfilesIni();
 
-  Assert.equal(profileData.profiles[0].name, PROFILE_DEFAULT, "Should be the right profile.");
-  Assert.ok(profileData.profiles[0].default, "Should be the old default profile.");
-  Assert.equal(profileData.profiles[0].path, root.leafName, "Should be the correct path.");
-  Assert.equal(profileData.profiles[1].name, expectedName, "Should be the right profile.");
-  Assert.ok(!profileData.profiles[1].default, "Should not be the old default profile.");
+  Assert.equal(
+    profileData.profiles[0].name,
+    PROFILE_DEFAULT,
+    "Should be the right profile."
+  );
+  Assert.ok(
+    profileData.profiles[0].default,
+    "Should be the old default profile."
+  );
+  Assert.equal(
+    profileData.profiles[0].path,
+    root.leafName,
+    "Should be the correct path."
+  );
+  Assert.equal(
+    profileData.profiles[1].name,
+    expectedName,
+    "Should be the right profile."
+  );
+  Assert.ok(
+    !profileData.profiles[1].default,
+    "Should not be the old default profile."
+  );
 
   let hash = xreDirProvider.getInstallHash();
-  Assert.equal(Object.keys(profileData.installs).length, 2, "Should be one known install.");
-  Assert.notEqual(profileData.installs[hash].default, root.leafName, "Should have marked the original default profile as the default for this install.");
-  Assert.ok(profileData.installs[hash].locked, "Should have locked as we created the profile for this install.");
-  Assert.equal(profileData.installs.otherinstall.default, root.leafName, "Should have left the other profile as the default for the other install.");
-  Assert.ok(profileData.installs[hash].locked, "Should still be locked to the other install.");
+  Assert.equal(
+    Object.keys(profileData.installs).length,
+    2,
+    "Should be one known install."
+  );
+  Assert.notEqual(
+    profileData.installs[hash].default,
+    root.leafName,
+    "Should have marked the original default profile as the default for this install."
+  );
+  Assert.ok(
+    profileData.installs[hash].locked,
+    "Should have locked as we created the profile for this install."
+  );
+  Assert.equal(
+    profileData.installs.otherinstall.default,
+    root.leafName,
+    "Should have left the other profile as the default for the other install."
+  );
+  Assert.ok(
+    profileData.installs[hash].locked,
+    "Should still be locked to the other install."
+  );
 });
--- a/toolkit/profile/xpcshell/test_snap.js
+++ b/toolkit/profile/xpcshell/test_snap.js
@@ -10,39 +10,58 @@ add_task(async () => {
   let defaultProfile = makeRandomProfileDir("default");
 
   // Just pretend this profile was last used by something in the profile dir.
   let greDir = gProfD.clone();
   greDir.append("app");
   writeCompatibilityIni(defaultProfile, greDir, greDir);
 
   writeProfilesIni({
-    profiles: [{
-      name: PROFILE_DEFAULT,
-      path: defaultProfile.leafName,
-      default: true,
-    }],
+    profiles: [
+      {
+        name: PROFILE_DEFAULT,
+        path: defaultProfile.leafName,
+        default: true,
+      },
+    ],
   });
 
   simulateSnapEnvironment();
 
   let { profile: selectedProfile, didCreate } = selectStartupProfile();
   checkStartupReason("default");
 
   let profileData = readProfilesIni();
   let installsINI = gDataHome.clone();
   installsINI.append("installs.ini");
-  Assert.ok(!installsINI.exists(), "Installs database should not have been created.");
+  Assert.ok(
+    !installsINI.exists(),
+    "Installs database should not have been created."
+  );
 
-  Assert.ok(profileData.options.startWithLastProfile, "Should be set to start with the last profile.");
-  Assert.equal(profileData.profiles.length, 1, "Should have the right number of profiles.");
+  Assert.ok(
+    profileData.options.startWithLastProfile,
+    "Should be set to start with the last profile."
+  );
+  Assert.equal(
+    profileData.profiles.length,
+    1,
+    "Should have the right number of profiles."
+  );
 
   let profile = profileData.profiles[0];
   Assert.equal(profile.name, PROFILE_DEFAULT, "Should have the right name.");
-  Assert.equal(profile.path, defaultProfile.leafName, "Should be the original default profile.");
+  Assert.equal(
+    profile.path,
+    defaultProfile.leafName,
+    "Should be the original default profile."
+  );
   Assert.ok(profile.default, "Should be marked as the old-style default.");
 
   checkProfileService(profileData);
 
   Assert.ok(!didCreate, "Should not have created a new profile.");
-  Assert.ok(selectedProfile.rootDir.equals(defaultProfile), "Should be using the right directory.");
+  Assert.ok(
+    selectedProfile.rootDir.equals(defaultProfile),
+    "Should be using the right directory."
+  );
   Assert.equal(selectedProfile.name, PROFILE_DEFAULT);
 });
--- a/toolkit/profile/xpcshell/test_snap_empty.js
+++ b/toolkit/profile/xpcshell/test_snap_empty.js
@@ -8,17 +8,21 @@
 add_task(async () => {
   simulateSnapEnvironment();
 
   let service = getProfileService();
   let { profile, didCreate } = selectStartupProfile();
   checkStartupReason("firstrun-created-default");
 
   Assert.ok(didCreate, "Should have created a new profile.");
-  Assert.equal(profile.name, PROFILE_DEFAULT, "Should have used the normal name.");
+  Assert.equal(
+    profile.name,
+    PROFILE_DEFAULT,
+    "Should have used the normal name."
+  );
   if (AppConstants.MOZ_DEV_EDITION) {
     Assert.equal(service.profileCount, 2, "Should be two profiles.");
   } else {
     Assert.equal(service.profileCount, 1, "Should be only one profile.");
   }
 
   checkProfileService();
 });
--- a/toolkit/profile/xpcshell/test_snatch_environment.js
+++ b/toolkit/profile/xpcshell/test_snatch_environment.js
@@ -13,58 +13,92 @@ add_task(async () => {
   local.append("foo");
 
   writeCompatibilityIni(root);
 
   let profileData = {
     options: {
       startWithLastProfile: true,
     },
-    profiles: [{
-      name: PROFILE_DEFAULT,
-      path: root.leafName,
-      default: true,
-    }, {
-      name: "Profile2",
-      path: "Path2",
-    }, {
-      name: "Profile3",
-      path: "Path3",
-    }],
+    profiles: [
+      {
+        name: PROFILE_DEFAULT,
+        path: root.leafName,
+        default: true,
+      },
+      {
+        name: "Profile2",
+        path: "Path2",
+      },
+      {
+        name: "Profile3",
+        path: "Path3",
+      },
+    ],
     // Another install is using the profile but it isn't locked.
     installs: {
       otherinstall: {
         default: root.leafName,
       },
     },
   };
 
   writeProfilesIni(profileData);
   checkProfileService(profileData);
 
-  let env = Cc["@mozilla.org/process/environment;1"].
-            getService(Ci.nsIEnvironment);
+  let env = Cc["@mozilla.org/process/environment;1"].getService(
+    Ci.nsIEnvironment
+  );
   env.set("XRE_PROFILE_PATH", root.path);
   env.set("XRE_PROFILE_LOCAL_PATH", local.path);
 
   let { rootDir, localDir, profile, didCreate } = selectStartupProfile();
   checkStartupReason("restart-claimed-default");
 
   Assert.ok(!didCreate, "Should not have created a new profile.");
   Assert.ok(rootDir.equals(root), "Should have selected the right root dir.");
-  Assert.ok(localDir.equals(local), "Should have selected the right local dir.");
+  Assert.ok(
+    localDir.equals(local),
+    "Should have selected the right local dir."
+  );
   Assert.ok(profile, "A named profile matches this.");
   Assert.equal(profile.name, PROFILE_DEFAULT, "The right profile was matched.");
 
   let service = getProfileService();
-  Assert.equal(service.defaultProfile, profile, "Should be the default profile.");
-  Assert.equal(service.currentProfile, profile, "Should be the current profile.");
+  Assert.equal(
+    service.defaultProfile,
+    profile,
+    "Should be the default profile."
+  );
+  Assert.equal(
+    service.currentProfile,
+    profile,
+    "Should be the current profile."
+  );
 
   profileData = readProfilesIni();
-  Assert.equal(profileData.profiles[0].name, PROFILE_DEFAULT, "Should be the right profile.");
-  Assert.ok(profileData.profiles[0].default, "Should still be the old default profile.");
+  Assert.equal(
+    profileData.profiles[0].name,
+    PROFILE_DEFAULT,
+    "Should be the right profile."
+  );
+  Assert.ok(
+    profileData.profiles[0].default,
+    "Should still be the old default profile."
+  );
 
   let hash = xreDirProvider.getInstallHash();
   // The info about the other install will have been removed so it goes through first run on next startup.
-  Assert.equal(Object.keys(profileData.installs).length, 1, "Should be one known install.");
-  Assert.equal(profileData.installs[hash].default, root.leafName, "Should have marked the original default profile as the default for this install.");
-  Assert.ok(!profileData.installs[hash].locked, "Should not have locked as we're not the default app.");
+  Assert.equal(
+    Object.keys(profileData.installs).length,
+    1,
+    "Should be one known install."
+  );
+  Assert.equal(
+    profileData.installs[hash].default,
+    root.leafName,
+    "Should have marked the original default profile as the default for this install."
+  );
+  Assert.ok(
+    !profileData.installs[hash].locked,
+    "Should not have locked as we're not the default app."
+  );
 });
--- a/toolkit/profile/xpcshell/test_snatch_environment_default.js
+++ b/toolkit/profile/xpcshell/test_snatch_environment_default.js
@@ -15,58 +15,90 @@ add_task(async () => {
   local.append("foo");
 
   writeCompatibilityIni(root);
 
   let profileData = {
     options: {
       startWithLastProfile: true,
     },
-    profiles: [{
-      name: PROFILE_DEFAULT,
-      path: root.leafName,
-      default: true,
-    }, {
-      name: "Profile2",
-      path: "Path2",
-    }, {
-      name: "Profile3",
-      path: "Path3",
-    }],
+    profiles: [
+      {
+        name: PROFILE_DEFAULT,
+        path: root.leafName,
+        default: true,
+      },
+      {
+        name: "Profile2",
+        path: "Path2",
+      },
+      {
+        name: "Profile3",
+        path: "Path3",
+      },
+    ],
     // Another install is using the profile but it isn't locked.
     installs: {
       otherinstall: {
         default: root.leafName,
       },
     },
   };
 
   writeProfilesIni(profileData);
   checkProfileService(profileData);
 
-  let env = Cc["@mozilla.org/process/environment;1"].
-            getService(Ci.nsIEnvironment);
+  let env = Cc["@mozilla.org/process/environment;1"].getService(
+    Ci.nsIEnvironment
+  );
   env.set("XRE_PROFILE_PATH", root.path);
   env.set("XRE_PROFILE_LOCAL_PATH", local.path);
 
   let { rootDir, localDir, profile, didCreate } = selectStartupProfile();
   checkStartupReason("restart-claimed-default");
 
   Assert.ok(!didCreate, "Should not have created a new profile.");
   Assert.ok(rootDir.equals(root), "Should have selected the right root dir.");
-  Assert.ok(localDir.equals(local), "Should have selected the right local dir.");
+  Assert.ok(
+    localDir.equals(local),
+    "Should have selected the right local dir."
+  );
   Assert.ok(!!profile, "A named profile matches this.");
   Assert.equal(profile.name, PROFILE_DEFAULT, "The right profile was matched.");
 
   let service = getProfileService();
-  Assert.ok(service.defaultProfile === profile, "Should be the default profile.");
-  Assert.ok(service.currentProfile === profile, "Should be the current profile.");
+  Assert.ok(
+    service.defaultProfile === profile,
+    "Should be the default profile."
+  );
+  Assert.ok(
+    service.currentProfile === profile,
+    "Should be the current profile."
+  );
 
   profileData = readProfilesIni();
-  Assert.equal(profileData.profiles[0].name, PROFILE_DEFAULT, "Should be the right profile.");
-  Assert.ok(profileData.profiles[0].default, "Should still be the old default profile.");
+  Assert.equal(
+    profileData.profiles[0].name,
+    PROFILE_DEFAULT,
+    "Should be the right profile."
+  );
+  Assert.ok(
+    profileData.profiles[0].default,
+    "Should still be the old default profile."
+  );
 
   let hash = xreDirProvider.getInstallHash();
   // The info about the other install will have been removed so it goes through first run on next startup.
-  Assert.equal(Object.keys(profileData.installs).length, 1, "Should be one known install.");
-  Assert.equal(profileData.installs[hash].default, root.leafName, "Should have marked the original default profile as the default for this install.");
-  Assert.ok(profileData.installs[hash].locked, "Should have locked as we're the default app.");
+  Assert.equal(
+    Object.keys(profileData.installs).length,
+    1,
+    "Should be one known install."
+  );
+  Assert.equal(
+    profileData.installs[hash].default,
+    root.leafName,
+    "Should have marked the original default profile as the default for this install."
+  );
+  Assert.ok(
+    profileData.installs[hash].locked,
+    "Should have locked as we're the default app."
+  );
 });
--- a/toolkit/profile/xpcshell/test_startswithlast.js
+++ b/toolkit/profile/xpcshell/test_startswithlast.js
@@ -10,17 +10,19 @@ add_task(async () => {
   let defaultProfile = makeRandomProfileDir("default");
 
   writeCompatibilityIni(defaultProfile);
 
   writeProfilesIni({
     options: {
       startWithLastProfile: false,
     },
-    profiles: [{
-      name: PROFILE_DEFAULT,
-      path: defaultProfile.leafName,
-      default: true,
-    }],
+    profiles: [
+      {
+        name: PROFILE_DEFAULT,
+        path: defaultProfile.leafName,
+        default: true,
+      },
+    ],
   });
 
   testStartsProfileManager();
 });
--- a/toolkit/profile/xpcshell/test_steal_inuse.js
+++ b/toolkit/profile/xpcshell/test_steal_inuse.js
@@ -7,46 +7,76 @@
  */
 
 add_task(async () => {
   let defaultProfile = makeRandomProfileDir("default");
 
   writeCompatibilityIni(defaultProfile);
 
   writeProfilesIni({
-    profiles: [{
-      name: PROFILE_DEFAULT,
-      path: defaultProfile.leafName,
-      default: true,
-    }],
+    profiles: [
+      {
+        name: PROFILE_DEFAULT,
+        path: defaultProfile.leafName,
+        default: true,
+      },
+    ],
     installs: {
       otherhash: {
         default: defaultProfile.leafName,
       },
     },
   });
 
   let service = getProfileService();
   let { profile: selectedProfile, didCreate } = selectStartupProfile();
   checkStartupReason("firstrun-claimed-default");
 
   let hash = xreDirProvider.getInstallHash();
   let profileData = readProfilesIni();
 
-  Assert.ok(profileData.options.startWithLastProfile, "Should be set to start with the last profile.");
-  Assert.equal(profileData.profiles.length, 1, "Should have the right number of profiles.");
+  Assert.ok(
+    profileData.options.startWithLastProfile,
+    "Should be set to start with the last profile."
+  );
+  Assert.equal(
+    profileData.profiles.length,
+    1,
+    "Should have the right number of profiles."
+  );
 
   let profile = profileData.profiles[0];
   Assert.equal(profile.name, PROFILE_DEFAULT, "Should have the right name.");
-  Assert.equal(profile.path, defaultProfile.leafName, "Should be the original default profile.");
+  Assert.equal(
+    profile.path,
+    defaultProfile.leafName,
+    "Should be the original default profile."
+  );
   Assert.ok(profile.default, "Should be marked as the old-style default.");
 
-  Assert.equal(Object.keys(profileData.installs).length, 1, "Should only be one known installs.");
-  Assert.equal(profileData.installs[hash].default, defaultProfile.leafName, "Should have taken the original default profile as the default for the current install.");
-  Assert.ok(!profileData.installs[hash].locked, "Should not have locked as we're not the default app.");
+  Assert.equal(
+    Object.keys(profileData.installs).length,
+    1,
+    "Should only be one known installs."
+  );
+  Assert.equal(
+    profileData.installs[hash].default,
+    defaultProfile.leafName,
+    "Should have taken the original default profile as the default for the current install."
+  );
+  Assert.ok(
+    !profileData.installs[hash].locked,
+    "Should not have locked as we're not the default app."
+  );
 
   checkProfileService(profileData);
 
   Assert.ok(!didCreate, "Should not have created a new profile.");
-  Assert.ok(!service.createdAlternateProfile, "Should not have created an alternate profile.");
-  Assert.ok(selectedProfile.rootDir.equals(defaultProfile), "Should be using the right directory.");
+  Assert.ok(
+    !service.createdAlternateProfile,
+    "Should not have created an alternate profile."
+  );
+  Assert.ok(
+    selectedProfile.rootDir.equals(defaultProfile),
+    "Should be using the right directory."
+  );
   Assert.equal(selectedProfile.name, PROFILE_DEFAULT);
 });
--- a/toolkit/profile/xpcshell/test_update_selected_dedicated.js
+++ b/toolkit/profile/xpcshell/test_update_selected_dedicated.js
@@ -7,41 +7,71 @@
  */
 
 add_task(async () => {
   let defaultProfile = makeRandomProfileDir("default");
 
   writeCompatibilityIni(defaultProfile);
 
   writeProfilesIni({
-    profiles: [{
-      name: PROFILE_DEFAULT,
-      path: defaultProfile.leafName,
-      default: true,
-    }],
+    profiles: [
+      {
+        name: PROFILE_DEFAULT,
+        path: defaultProfile.leafName,
+        default: true,
+      },
+    ],
   });
 
   let service = getProfileService();
   let { profile: selectedProfile, didCreate } = selectStartupProfile();
   checkStartupReason("firstrun-claimed-default");
 
   let hash = xreDirProvider.getInstallHash();
   let profileData = readProfilesIni();
 
-  Assert.ok(profileData.options.startWithLastProfile, "Should be set to start with the last profile.");
-  Assert.equal(profileData.profiles.length, 1, "Should have the right number of profiles.");
+  Assert.ok(
+    profileData.options.startWithLastProfile,
+    "Should be set to start with the last profile."
+  );
+  Assert.equal(
+    profileData.profiles.length,
+    1,
+    "Should have the right number of profiles."
+  );
 
   let profile = profileData.profiles[0];
   Assert.equal(profile.name, PROFILE_DEFAULT, "Should have the right name.");
-  Assert.equal(profile.path, defaultProfile.leafName, "Should be the original default profile.");
+  Assert.equal(
+    profile.path,
+    defaultProfile.leafName,
+    "Should be the original default profile."
+  );
   Assert.ok(profile.default, "Should be marked as the old-style default.");
 
-  Assert.equal(Object.keys(profileData.installs).length, 1, "Should be only one known install.");
-  Assert.equal(profileData.installs[hash].default, defaultProfile.leafName, "Should have marked the original default profile as the default for this install.");
-  Assert.ok(!profileData.installs[hash].locked, "Should not have locked as we're not the default app.");
+  Assert.equal(
+    Object.keys(profileData.installs).length,
+    1,
+    "Should be only one known install."
+  );
+  Assert.equal(
+    profileData.installs[hash].default,
+    defaultProfile.leafName,
+    "Should have marked the original default profile as the default for this install."
+  );
+  Assert.ok(
+    !profileData.installs[hash].locked,
+    "Should not have locked as we're not the default app."
+  );
 
   checkProfileService(profileData);
 
   Assert.ok(!didCreate, "Should not have created a new profile.");
-  Assert.ok(!service.createdAlternateProfile, "Should not have created an alternate profile.");
-  Assert.ok(selectedProfile.rootDir.equals(defaultProfile), "Should be using the right directory.");
+  Assert.ok(
+    !service.createdAlternateProfile,
+    "Should not have created an alternate profile."
+  );
+  Assert.ok(
+    selectedProfile.rootDir.equals(defaultProfile),
+    "Should be using the right directory."
+  );
   Assert.equal(selectedProfile.name, PROFILE_DEFAULT);
 });
--- a/toolkit/profile/xpcshell/test_update_unknown_dedicated.js
+++ b/toolkit/profile/xpcshell/test_update_unknown_dedicated.js
@@ -7,48 +7,84 @@
  * the flag to show the user info about dedicated profiles.
  */
 
 add_task(async () => {
   let hash = xreDirProvider.getInstallHash();
   let defaultProfile = makeRandomProfileDir("default");
 
   writeProfilesIni({
-    profiles: [{
-      name: PROFILE_DEFAULT,
-      path: defaultProfile.leafName,
-      default: true,
-    }],
+    profiles: [
+      {
+        name: PROFILE_DEFAULT,
+        path: defaultProfile.leafName,
+        default: true,
+      },
+    ],
   });
 
   let service = getProfileService();
   let { profile: selectedProfile, didCreate } = selectStartupProfile();
   checkStartupReason("firstrun-created-default");
 
   let profileData = readProfilesIni();
 
-  Assert.ok(profileData.options.startWithLastProfile, "Should be set to start with the last profile.");
-  Assert.equal(profileData.profiles.length, 2, "Should have the right number of profiles.");
+  Assert.ok(
+    profileData.options.startWithLastProfile,
+    "Should be set to start with the last profile."
+  );
+  Assert.equal(
+    profileData.profiles.length,
+    2,
+    "Should have the right number of profiles."
+  );
 
   // Since there is already a profile with the desired name on dev-edition, a
   // unique version will be used.
-  let expectedName = AppConstants.MOZ_DEV_EDITION ? `${DEDICATED_NAME}-1` : DEDICATED_NAME;
+  let expectedName = AppConstants.MOZ_DEV_EDITION
+    ? `${DEDICATED_NAME}-1`
+    : DEDICATED_NAME;
 
   let profile = profileData.profiles[0];
   Assert.equal(profile.name, PROFILE_DEFAULT, "Should have the right name.");
-  Assert.equal(profile.path, defaultProfile.leafName, "Should be the original default profile.");
+  Assert.equal(
+    profile.path,
+    defaultProfile.leafName,
+    "Should be the original default profile."
+  );
   Assert.ok(profile.default, "Should be marked as the old-style default.");
   profile = profileData.profiles[1];
   Assert.equal(profile.name, expectedName, "Should have the right name.");
-  Assert.notEqual(profile.path, defaultProfile.leafName, "Should not be the original default profile.");
+  Assert.notEqual(
+    profile.path,
+    defaultProfile.leafName,
+    "Should not be the original default profile."
+  );
   Assert.ok(!profile.default, "Should not be marked as the old-style default.");
 
-  Assert.equal(Object.keys(profileData.installs).length, 1, "Should be a default for installs.");
-  Assert.equal(profileData.installs[hash].default, profile.path, "Should have the right default profile.");
-  Assert.ok(profileData.installs[hash].locked, "Should have locked as we created this profile for this install.");
+  Assert.equal(
+    Object.keys(profileData.installs).length,
+    1,
+    "Should be a default for installs."
+  );
+  Assert.equal(
+    profileData.installs[hash].default,
+    profile.path,
+    "Should have the right default profile."
+  );
+  Assert.ok(
+    profileData.installs[hash].locked,
+    "Should have locked as we created this profile for this install."
+  );
 
   checkProfileService(profileData);
 
   Assert.ok(didCreate, "Should have created a new profile.");
-  Assert.ok(!service.createdAlternateProfile, "Should not have created an alternate profile.");
-  Assert.ok(!selectedProfile.rootDir.equals(defaultProfile), "Should not be using the old directory.");
+  Assert.ok(
+    !service.createdAlternateProfile,
+    "Should not have created an alternate profile."
+  );
+  Assert.ok(
+    !selectedProfile.rootDir.equals(defaultProfile),
+    "Should not be using the old directory."
+  );
   Assert.equal(selectedProfile.name, expectedName);
 });
--- a/toolkit/profile/xpcshell/test_update_unselected_dedicated.js
+++ b/toolkit/profile/xpcshell/test_update_unselected_dedicated.js
@@ -11,48 +11,84 @@ add_task(async () => {
   let defaultProfile = makeRandomProfileDir("default");
 
   // Just pretend this profile was last used by something in the profile dir.
   let greDir = gProfD.clone();
   greDir.append("app");
   writeCompatibilityIni(defaultProfile, greDir, greDir);
 
   writeProfilesIni({
-    profiles: [{
-      name: PROFILE_DEFAULT,
-      path: defaultProfile.leafName,
-      default: true,
-    }],
+    profiles: [
+      {
+        name: PROFILE_DEFAULT,
+        path: defaultProfile.leafName,
+        default: true,
+      },
+    ],
   });
 
   let service = getProfileService();
   let { profile: selectedProfile, didCreate } = selectStartupProfile();
   checkStartupReason("firstrun-skipped-default");
 
   let profileData = readProfilesIni();
 
-  Assert.ok(profileData.options.startWithLastProfile, "Should be set to start with the last profile.");
-  Assert.equal(profileData.profiles.length, 2, "Should have the right number of profiles.");
+  Assert.ok(
+    profileData.options.startWithLastProfile,
+    "Should be set to start with the last profile."
+  );
+  Assert.equal(
+    profileData.profiles.length,
+    2,
+    "Should have the right number of profiles."
+  );
 
   // Since there is already a profile with the desired name on dev-edition, a
   // unique version will be used.
-  let expectedName = AppConstants.MOZ_DEV_EDITION ? `${DEDICATED_NAME}-1` : DEDICATED_NAME;
+  let expectedName = AppConstants.MOZ_DEV_EDITION
+    ? `${DEDICATED_NAME}-1`
+    : DEDICATED_NAME;
 
   let profile = profileData.profiles[0];
   Assert.equal(profile.name, PROFILE_DEFAULT, "Should have the right name.");
-  Assert.equal(profile.path, defaultProfile.leafName, "Should be the original default profile.");
+  Assert.equal(
+    profile.path,
+    defaultProfile.leafName,
+    "Should be the original default profile."
+  );
   Assert.ok(profile.default, "Should be marked as the old-style default.");
   profile = profileData.profiles[1];
   Assert.equal(profile.name, expectedName, "Should have the right name.");
-  Assert.notEqual(profile.path, defaultProfile.leafName, "Should not be the original default profile.");
+  Assert.notEqual(
+    profile.path,
+    defaultProfile.leafName,
+    "Should not be the original default profile."
+  );
   Assert.ok(!profile.default, "Should not be marked as the old-style default.");
 
-  Assert.equal(Object.keys(profileData.installs).length, 1, "Should be a default for this install.");
-  Assert.equal(profileData.installs[hash].default, profile.path, "Should have marked the new profile as the default for this install.");
-  Assert.ok(profileData.installs[hash].locked, "Should have locked as we created this profile for this install.");
+  Assert.equal(
+    Object.keys(profileData.installs).length,
+    1,
+    "Should be a default for this install."
+  );
+  Assert.equal(
+    profileData.installs[hash].default,
+    profile.path,
+    "Should have marked the new profile as the default for this install."
+  );
+  Assert.ok(
+    profileData.installs[hash].locked,
+    "Should have locked as we created this profile for this install."
+  );
 
   checkProfileService(profileData);
 
   Assert.ok(didCreate, "Should have created a new profile.");
-  Assert.ok(service.createdAlternateProfile, "Should have created an alternate profile.");
-  Assert.ok(!selectedProfile.rootDir.equals(defaultProfile), "Should be using the right directory.");
+  Assert.ok(
+    service.createdAlternateProfile,
+    "Should have created an alternate profile."
+  );
+  Assert.ok(
+    !selectedProfile.rootDir.equals(defaultProfile),
+    "Should be using the right directory."
+  );
   Assert.equal(selectedProfile.name, expectedName);
 });
--- a/toolkit/profile/xpcshell/test_use_dedicated.js
+++ b/toolkit/profile/xpcshell/test_use_dedicated.js
@@ -10,57 +10,91 @@ add_task(async () => {
   let defaultProfile = makeRandomProfileDir("default");
   let dedicatedProfile = makeRandomProfileDir("dedicated");
   let devProfile = makeRandomProfileDir("devedition");
 
   // Make sure we don't steal the old-style default.
   writeCompatibilityIni(defaultProfile);
 
   writeProfilesIni({
-    profiles: [{
-      name: "default",
-      path: defaultProfile.leafName,
-      default: true,
-    }, {
-      name: "dedicated",
-      path: dedicatedProfile.leafName,
-    }, {
-      name: "dev-edition-default",
-      path: devProfile.leafName,
-    }],
+    profiles: [
+      {
+        name: "default",
+        path: defaultProfile.leafName,
+        default: true,
+      },
+      {
+        name: "dedicated",
+        path: dedicatedProfile.leafName,
+      },
+      {
+        name: "dev-edition-default",
+        path: devProfile.leafName,
+      },
+    ],
     installs: {
       [hash]: {
         default: dedicatedProfile.leafName,
       },
-      "otherhash": {
+      otherhash: {
         default: "foobar",
       },
     },
   });
 
   let { profile: selectedProfile, didCreate } = selectStartupProfile();
   checkStartupReason("default");
 
   let profileData = readProfilesIni();
 
-  Assert.ok(profileData.options.startWithLastProfile, "Should be set to start with the last profile.");
-  Assert.equal(profileData.profiles.length, 3, "Should have the right number of profiles.");
+  Assert.ok(
+    profileData.options.startWithLastProfile,
+    "Should be set to start with the last profile."
+  );
+  Assert.equal(
+    profileData.profiles.length,
+    3,
+    "Should have the right number of profiles."
+  );
 
   let profile = profileData.profiles[0];
   Assert.equal(profile.name, `dedicated`, "Should have the right name.");
-  Assert.equal(profile.path, dedicatedProfile.leafName, "Should be the expected dedicated profile.");
+  Assert.equal(
+    profile.path,
+    dedicatedProfile.leafName,
+    "Should be the expected dedicated profile."
+  );
   Assert.ok(!profile.default, "Should not be marked as the old-style default.");
 
   profile = profileData.profiles[1];
   Assert.equal(profile.name, "default", "Should have the right name.");
-  Assert.equal(profile.path, defaultProfile.leafName, "Should be the original default profile.");
+  Assert.equal(
+    profile.path,
+    defaultProfile.leafName,
+    "Should be the original default profile."
+  );
   Assert.ok(profile.default, "Should be marked as the old-style default.");
 
-  Assert.equal(Object.keys(profileData.installs).length, 2, "Should be two known installs.");
-  Assert.equal(profileData.installs[hash].default, dedicatedProfile.leafName, "Should have kept the default for this install.");
-  Assert.equal(profileData.installs.otherhash.default, "foobar", "Should have kept the default for the other install.");
+  Assert.equal(
+    Object.keys(profileData.installs).length,
+    2,
+    "Should be two known installs."
+  );
+  Assert.equal(
+    profileData.installs[hash].default,
+    dedicatedProfile.leafName,
+    "Should have kept the default for this install."
+  );
+  Assert.equal(
+    profileData.installs.otherhash.default,
+    "foobar",
+    "Should have kept the default for the other install."
+  );
 
   checkProfileService(profileData);
 
   Assert.ok(!didCreate, "Should not have created a new profile.");
-  Assert.ok(selectedProfile.rootDir.equals(dedicatedProfile), "Should be using the right directory.");
+  Assert.ok(
+    selectedProfile.rootDir.equals(dedicatedProfile),
+    "Should be using the right directory."
+  );
   Assert.equal(selectedProfile.name, "dedicated");
 });