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

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

Issue 8230011: [Mac/multiprofile] "Customize User..." should edit the currently active profile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix review comments Created 9 years, 2 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/avatar_menu_model.cc ('k') | chrome/browser/ui/cocoa/profile_menu_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/avatar_menu_model_unittest.cc
diff --git a/chrome/browser/profiles/avatar_menu_model_unittest.cc b/chrome/browser/profiles/avatar_menu_model_unittest.cc
index fb50ebc6644c80bbdf0a9dd5192e453a969ac9d9..03346e8d313d20619bd8a311236ca59017fb814e 100644
--- a/chrome/browser/profiles/avatar_menu_model_unittest.cc
+++ b/chrome/browser/profiles/avatar_menu_model_unittest.cc
@@ -72,6 +72,21 @@ TEST_F(AvatarMenuModelTest, InitialCreation) {
EXPECT_EQ(name2, item2.name);
}
+TEST_F(AvatarMenuModelTest, ActiveItem) {
+ string16 name1(ASCIIToUTF16("Test 1"));
+ string16 name2(ASCIIToUTF16("Test 2"));
+
+ manager()->CreateTestingProfile("p1", name1, 0);
+ manager()->CreateTestingProfile("p2", name2, 0);
+
+ MockObserver observer;
+ AvatarMenuModel model(manager()->profile_info_cache(), &observer, browser());
+ ASSERT_EQ(2U, model.GetNumberOfItems());
+ // TODO(jeremy): Expand test to verify active profile index other than 0
+ // crbug.com/100871
+ ASSERT_EQ(0U, model.GetActiveProfileIndex());
+}
+
TEST_F(AvatarMenuModelTest, ModifyingNameResortsCorrectly) {
string16 name1(ASCIIToUTF16("Alpha"));
string16 name2(ASCIIToUTF16("Beta"));
« no previous file with comments | « chrome/browser/profiles/avatar_menu_model.cc ('k') | chrome/browser/ui/cocoa/profile_menu_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698