Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2148)

Unified Diff: chrome/browser/profiles/profile_info_cache_unittest.cc

Issue 476993002: [Profiles] Fix the usage of custom/default names and avatars (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: all rebase all the time Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/profiles/profile_info_cache.cc ('k') | chrome/browser/profiles/profile_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_info_cache_unittest.cc
diff --git a/chrome/browser/profiles/profile_info_cache_unittest.cc b/chrome/browser/profiles/profile_info_cache_unittest.cc
index 82c1f3f1d30e7a29a1a678d4a373910424f2be56..ab253578132871594c3074c3975973406860d221 100644
--- a/chrome/browser/profiles/profile_info_cache_unittest.cc
+++ b/chrome/browser/profiles/profile_info_cache_unittest.cc
@@ -334,6 +334,8 @@ TEST_F(ProfileInfoCacheTest, GAIAName) {
// Don't use GAIA name as profile name. This re-sorts the cache.
base::string16 custom_name(ASCIIToUTF16("Custom name"));
GetCache()->SetNameOfProfileAtIndex(index2, custom_name);
+ GetCache()->SetProfileIsUsingDefaultNameAtIndex(index2, false);
+
index1 = GetCache()->GetIndexOfProfileWithPath(GetProfilePath("path_1"));
index2 = GetCache()->GetIndexOfProfileWithPath(GetProfilePath("path_2"));
@@ -382,8 +384,9 @@ TEST_F(ProfileInfoCacheTest, GAIAPicture) {
EXPECT_TRUE(gfx::test::IsEqual(
gaia_image, GetCache()->GetAvatarIconOfProfileAtIndex(1)));
- // Set another avatar. This should make it preferred over the GAIA image.
+ // Set a non-default avatar. This should be preferred over the GAIA image.
GetCache()->SetAvatarIconOfProfileAtIndex(1, kOtherAvatarIndex);
+ GetCache()->SetProfileIsUsingDefaultAvatarAtIndex(1, false);
EXPECT_FALSE(GetCache()->ProfileIsUsingDefaultAvatarAtIndex(1));
EXPECT_FALSE(GetCache()->IsUsingGAIAPictureOfProfileAtIndex(1));
int other_avatar_id =
« no previous file with comments | « chrome/browser/profiles/profile_info_cache.cc ('k') | chrome/browser/profiles/profile_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698