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

Unified Diff: chrome/browser/ui/cocoa/profiles/profile_menu_controller_unittest.mm

Issue 1038423004: Reland of: Change default code flag to NewAvatarMenu. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unneeded code from ProfileInfoCacheTest Created 5 years, 8 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/ui/cocoa/profiles/profile_menu_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/profiles/profile_menu_controller_unittest.mm b/chrome/browser/ui/cocoa/profiles/profile_menu_controller_unittest.mm
index e2acb1c9f4577f381cb22885cc19b0b5649256d0..ee9bd7b7dcf67d1db455ee3f6b7fff7811d549bd 100644
--- a/chrome/browser/ui/cocoa/profiles/profile_menu_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/profiles/profile_menu_controller_unittest.mm
@@ -80,12 +80,12 @@ class ProfileMenuControllerTest : public CocoaProfileTest {
TEST_F(ProfileMenuControllerTest, InitializeMenu) {
NSMenu* menu = [controller() menu];
- // <sep>, Edit, <sep>, New.
- ASSERT_EQ(4, [menu numberOfItems]);
+ // Profile, <sep>, Edit, <sep>, New.
+ ASSERT_EQ(5, [menu numberOfItems]);
TestBottomItems();
- EXPECT_TRUE([menu_item() isHidden]);
+ EXPECT_FALSE([menu_item() isHidden]);
}
TEST_F(ProfileMenuControllerTest, CreateItemWithTitle) {
@@ -100,9 +100,9 @@ TEST_F(ProfileMenuControllerTest, CreateItemWithTitle) {
TEST_F(ProfileMenuControllerTest, RebuildMenu) {
NSMenu* menu = [controller() menu];
- EXPECT_EQ(4, [menu numberOfItems]);
+ EXPECT_EQ(5, [menu numberOfItems]);
- EXPECT_TRUE([menu_item() isHidden]);
+ EXPECT_FALSE([menu_item() isHidden]);
// Create some more profiles on the manager.
TestingProfileManager* manager = testing_profile_manager();
@@ -130,12 +130,12 @@ TEST_F(ProfileMenuControllerTest, InsertItems) {
base::scoped_nsobject<NSMenu> menu([[NSMenu alloc] initWithTitle:@""]);
ASSERT_EQ(0, [menu numberOfItems]);
- // With only one profile, insertItems should be a no-op.
+ // Even with one profile items can still be inserted.
BOOL result = [controller() insertItemsIntoMenu:menu
atOffset:0
fromDock:NO];
- EXPECT_FALSE(result);
- EXPECT_EQ(0, [menu numberOfItems]);
+ EXPECT_TRUE(result);
+ EXPECT_EQ(1, [menu numberOfItems]);
[menu removeAllItems];
// Same for use in building the dock menu.

Powered by Google App Engine
This is Rietveld 408576698