1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
5 * Tests that the environment variables are used to select a profile.
9 let dir = makeRandomProfileDir("foo");
13 startWithLastProfile: true,
32 writeProfilesIni(profileData);
33 checkProfileService(profileData);
35 Services.env.set("XRE_PROFILE_PATH", dir.path);
36 Services.env.set("XRE_PROFILE_LOCAL_PATH", dir.path);
38 let { rootDir, localDir, profile, didCreate } = selectStartupProfile();
39 checkStartupReason("restart");
41 Assert.ok(!didCreate, "Should not have created a new profile.");
42 Assert.ok(rootDir.equals(dir), "Should have selected the right root dir.");
43 Assert.ok(localDir.equals(dir), "Should have selected the right local dir.");
44 Assert.ok(!profile, "No named profile matches this.");