Index: chrome/browser/profiles/profile_manager_unittest.cc |
diff --git a/chrome/browser/profiles/profile_manager_unittest.cc b/chrome/browser/profiles/profile_manager_unittest.cc |
index a0f1660238aba45a90dbf322455ce2a6b3010850..50e27609f9d9ecae8d754c41a79e3d4c7e12fb78 100644 |
--- a/chrome/browser/profiles/profile_manager_unittest.cc |
+++ b/chrome/browser/profiles/profile_manager_unittest.cc |
@@ -120,7 +120,7 @@ class ProfileManagerTest : public testing::Test { |
// Helper function to create a profile with |name| for a profile |manager|. |
void CreateProfileAsync(ProfileManager* manager, |
const std::string& name, |
- bool is_managed, |
+ bool is_supervised, |
MockObserver* mock_observer) { |
manager->CreateProfileAsync( |
temp_dir_.path().AppendASCII(name), |
@@ -128,7 +128,7 @@ class ProfileManagerTest : public testing::Test { |
base::Unretained(mock_observer)), |
base::UTF8ToUTF16(name), |
base::UTF8ToUTF16(profiles::GetDefaultAvatarIconUrl(0)), |
- is_managed ? "Dummy ID" : std::string()); |
+ is_supervised ? "Dummy ID" : std::string()); |
} |
// Helper function to add a profile with |profile_name| to |
@@ -302,7 +302,7 @@ TEST_F(ProfileManagerTest, CreateProfilesAsync) { |
} |
TEST_F(ProfileManagerTest, CreateProfileAsyncCheckOmitted) { |
- std::string name = "Managed Profile"; |
+ std::string name = "0 Supervised Profile"; |
MockObserver mock_observer; |
EXPECT_CALL(mock_observer, OnProfileCreated( |
@@ -316,15 +316,15 @@ TEST_F(ProfileManagerTest, CreateProfileAsyncCheckOmitted) { |
base::RunLoop().RunUntilIdle(); |
EXPECT_EQ(1u, cache.GetNumberOfProfiles()); |
- // Managed profiles should start out omitted from the profile list. |
+ // Supervised profiles should start out omitted from the profile list. |
EXPECT_TRUE(cache.IsOmittedProfileAtIndex(0)); |
- name = "Regular Profile"; |
+ name = "1 Regular Profile"; |
CreateProfileAsync(profile_manager, name, false, &mock_observer); |
base::RunLoop().RunUntilIdle(); |
EXPECT_EQ(2u, cache.GetNumberOfProfiles()); |
- // Non-managed profiles should be included in the profile list. |
+ // Non-supervised profiles should be included in the profile list. |
EXPECT_FALSE(cache.IsOmittedProfileAtIndex(1)); |
} |
@@ -333,26 +333,29 @@ TEST_F(ProfileManagerTest, AddProfileToCacheCheckOmitted) { |
ProfileInfoCache& cache = profile_manager->GetProfileInfoCache(); |
EXPECT_EQ(0u, cache.GetNumberOfProfiles()); |
- const base::FilePath managed_path = temp_dir_.path().AppendASCII("Managed"); |
- TestingProfile* managed_profile = new TestingProfile(managed_path, NULL); |
- managed_profile->GetPrefs()->SetString(prefs::kManagedUserId, "An ID"); |
+ const base::FilePath supervised_path = |
+ temp_dir_.path().AppendASCII("Supervised"); |
+ TestingProfile* supervised_profile = |
+ new TestingProfile(supervised_path, NULL); |
+ supervised_profile->GetPrefs()->SetString(prefs::kSupervisedUserId, "An ID"); |
// RegisterTestingProfile adds the profile to the cache and takes ownership. |
- profile_manager->RegisterTestingProfile(managed_profile, true, false); |
+ profile_manager->RegisterTestingProfile(supervised_profile, true, false); |
EXPECT_EQ(1u, cache.GetNumberOfProfiles()); |
EXPECT_TRUE(cache.IsOmittedProfileAtIndex(0)); |
- const base::FilePath nonmanaged_path = temp_dir_.path().AppendASCII( |
- "Non-Managed"); |
- TestingProfile* nonmanaged_profile = new TestingProfile(nonmanaged_path, |
- NULL); |
- profile_manager->RegisterTestingProfile(nonmanaged_profile, true, false); |
+ const base::FilePath nonsupervised_path = temp_dir_.path().AppendASCII( |
+ "Non-Supervised"); |
+ TestingProfile* nonsupervised_profile = new TestingProfile(nonsupervised_path, |
+ NULL); |
+ profile_manager->RegisterTestingProfile(nonsupervised_profile, true, false); |
EXPECT_EQ(2u, cache.GetNumberOfProfiles()); |
- size_t managed_index = cache.GetIndexOfProfileWithPath(managed_path); |
- EXPECT_TRUE(cache.IsOmittedProfileAtIndex(managed_index)); |
- size_t nonmanaged_index = cache.GetIndexOfProfileWithPath(nonmanaged_path); |
- EXPECT_FALSE(cache.IsOmittedProfileAtIndex(nonmanaged_index)); |
+ size_t supervised_index = cache.GetIndexOfProfileWithPath(supervised_path); |
+ EXPECT_TRUE(cache.IsOmittedProfileAtIndex(supervised_index)); |
+ size_t nonsupervised_index = |
+ cache.GetIndexOfProfileWithPath(nonsupervised_path); |
+ EXPECT_FALSE(cache.IsOmittedProfileAtIndex(nonsupervised_index)); |
} |
TEST_F(ProfileManagerTest, GetGuestProfilePath) { |