| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/profiles/profile_list_desktop.h" | 5 #include "chrome/browser/profiles/profile_list_desktop.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 base::FilePath path = cache->GetUserDataDir().AppendASCII("p2"); | 325 base::FilePath path = cache->GetUserDataDir().AppendASCII("p2"); |
| 326 cache->AddProfileToCache(path, ASCIIToUTF16("Test 2"), base::string16(), 0, | 326 cache->AddProfileToCache(path, ASCIIToUTF16("Test 2"), base::string16(), 0, |
| 327 "TEST_ID"); | 327 "TEST_ID"); |
| 328 cache->SetIsOmittedProfileAtIndex(cache->GetIndexOfProfileWithPath(path), | 328 cache->SetIsOmittedProfileAtIndex(cache->GetIndexOfProfileWithPath(path), |
| 329 false); | 329 false); |
| 330 | 330 |
| 331 AvatarMenu* model = GetAvatarMenu(); | 331 AvatarMenu* model = GetAvatarMenu(); |
| 332 model->RebuildMenu(); | 332 model->RebuildMenu(); |
| 333 EXPECT_EQ(2U, model->GetNumberOfItems()); | 333 EXPECT_EQ(2U, model->GetNumberOfItems()); |
| 334 | 334 |
| 335 // Now check that the sync_state of a managed user shows the managed user | 335 // Now check that the sync_state of a supervised user shows the supervised |
| 336 // avatar label instead. | 336 // user avatar label instead. |
| 337 base::string16 managed_user_label = | 337 base::string16 supervised_user_label = |
| 338 l10n_util::GetStringUTF16(IDS_MANAGED_USER_AVATAR_LABEL); | 338 l10n_util::GetStringUTF16(IDS_SUPERVISED_USER_AVATAR_LABEL); |
| 339 const AvatarMenu::Item& item1 = model->GetItemAt(0); | 339 const AvatarMenu::Item& item1 = model->GetItemAt(0); |
| 340 EXPECT_NE(item1.sync_state, managed_user_label); | 340 EXPECT_NE(item1.sync_state, supervised_user_label); |
| 341 | 341 |
| 342 const AvatarMenu::Item& item2 = model->GetItemAt(1); | 342 const AvatarMenu::Item& item2 = model->GetItemAt(1); |
| 343 EXPECT_EQ(item2.sync_state, managed_user_label); | 343 EXPECT_EQ(item2.sync_state, supervised_user_label); |
| 344 } | 344 } |
| 345 | 345 |
| 346 } // namespace | 346 } // namespace |
| OLD | NEW |