tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_fail_recover_storeID.js (953B)


      1 /* Any copyright is dedicated to the Public Domain.
      2 https://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 "use strict";
      5 
      6 add_task(async function test_recover_storeID() {
      7  startProfileService();
      8  Services.prefs.setCharPref("toolkit.profiles.storeID", "foobar");
      9 
     10  const SelectableProfileService = getSelectableProfileService();
     11  const ProfilesDatastoreService = getProfilesDatastoreService();
     12 
     13  await ProfilesDatastoreService.init();
     14  await SelectableProfileService.init();
     15 
     16  Assert.ok(
     17    !ProfilesDatastoreService.initialized,
     18    "Didn't initialize the datastore service"
     19  );
     20  Assert.ok(
     21    !SelectableProfileService.initialized,
     22    "Didn't initialize the profiles service"
     23  );
     24 
     25  let profile = SelectableProfileService.currentProfile;
     26  Assert.ok(!profile, "Should not have a current profile");
     27  Assert.equal(
     28    getProfileService().currentProfile.storeID,
     29    null,
     30    "Should not have updated the store ID on the profile"
     31  );
     32 });