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

Unified Diff: chrome/browser/chromeos/profiles/profile_list_chromeos_unittest.cc

Issue 895803003: [Profiles] Remove the NotificationService from the ProfileInfoCache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: copy paste the right function Created 5 years, 10 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
Index: chrome/browser/chromeos/profiles/profile_list_chromeos_unittest.cc
diff --git a/chrome/browser/chromeos/profiles/profile_list_chromeos_unittest.cc b/chrome/browser/chromeos/profiles/profile_list_chromeos_unittest.cc
index 09f7c1848f85bbdaf2651fe9b6d1403ddb1dc4bd..2d37fa451e0cc7c1d7949c9dd534dea4ec655874 100644
--- a/chrome/browser/chromeos/profiles/profile_list_chromeos_unittest.cc
+++ b/chrome/browser/chromeos/profiles/profile_list_chromeos_unittest.cc
@@ -227,7 +227,7 @@ TEST_F(ProfileListChromeOSTest, ModifyingNameResortsCorrectly) {
AddProfile(name2, true);
AvatarMenu* menu = GetAvatarMenu();
-
+ EXPECT_EQ(0, change_count());
ASSERT_EQ(2U, menu->GetNumberOfItems());
const AvatarMenu::Item& item1 = menu->GetItemAt(0);
@@ -243,9 +243,9 @@ TEST_F(ProfileListChromeOSTest, ModifyingNameResortsCorrectly) {
GetFakeChromeUserManager()->SaveUserDisplayName(
base::UTF16ToASCII(name1) + "@example.com", newname1);
manager()->profile_info_cache()->SetNameOfProfileAtIndex(0, newname1);
+ EXPECT_EQ(1, change_count());
const AvatarMenu::Item& item1next = menu->GetItemAt(0);
- EXPECT_GT(change_count(), 1);
EXPECT_EQ(0U, item1next.menu_index);
EXPECT_EQ(name2, item1next.name);
@@ -263,15 +263,15 @@ TEST_F(ProfileListChromeOSTest, ChangeOnNotify) {
AvatarMenu* menu = GetAvatarMenu();
EXPECT_EQ(2U, menu->GetNumberOfItems());
+ EXPECT_EQ(0, change_count());
base::string16 name3(ASCIIToUTF16("p3.com"));
AddProfile(name3, true);
- // Four changes happened via the call to CreateTestingProfile: adding the
- // profile to the cache, setting the user name, rebuilding the list of
- // profiles after the name change, and changing the avatar.
- // TODO(michaelpg): Determine why actual change number does not match comment.
- EXPECT_GE(change_count(), 4);
+ // Three changes happened via the call to CreateTestingProfile: adding the
+ // profile to the cache, setting the user name (which rebuilt the list of
+ // profiles after the name change), and changing the avatar.
+ EXPECT_EQ(change_count(), 3);
ASSERT_EQ(3U, menu->GetNumberOfItems());
const AvatarMenu::Item& item1 = menu->GetItemAt(0);

Powered by Google App Engine
This is Rietveld 408576698