Bug 1556173: Fix test_profile_reset.js on dev-edition builds. r=froydnj, a=test-only
authorDave Townsend <dtownsend@oxymoronical.com>
Mon, 10 Jun 2019 17:55:12 +0000
changeset 536874 55f38f0869b195d7f7e0cb3aff198d48e273129d
parent 536873 f7ba85dff0ee0d5bed92f83c2f2e3c97c86a2ce3
child 536875 881ef7c31cf0741e631f9da78e4c963e9809963e
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj, test-only
bugs1556173
milestone68.0
Bug 1556173: Fix test_profile_reset.js on dev-edition builds. r=froydnj, a=test-only Differential Revision: https://phabricator.services.mozilla.com/D34002
toolkit/profile/xpcshell/test_profile_reset.js
--- a/toolkit/profile/xpcshell/test_profile_reset.js
+++ b/toolkit/profile/xpcshell/test_profile_reset.js
@@ -1,13 +1,13 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 /*
- * Tests that from an empty database with profile terset requested a new profile
+ * Tests that from an empty database with profile reset requested a new profile
  * is still created.
  */
 
 add_task(async () => {
   let service = getProfileService();
 
   let { profile: selectedProfile, didCreate } = selectStartupProfile([], true);
   // With no profile we're just create a new profile and skip resetting it.
@@ -15,17 +15,21 @@ add_task(async () => {
   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.");
 
-  let profile = profileData.profiles[AppConstants.MOZ_DEV_EDITION ? 0 : 1];
+  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.");
 
   checkProfileService(profileData);