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

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

Issue 323143004: [Mac] Misc fixes for the new avatar bubble (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unbork rebase and fix unittest Created 6 years, 6 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_chooser_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller_unittest.mm b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller_unittest.mm
index eecccfb85be7acaa40f902f7e79fdf9c87cada87..47090002db02d56a10b09775118d3499b617abba 100644
--- a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller_unittest.mm
@@ -392,16 +392,21 @@ TEST_F(ProfileChooserControllerTest, AccountManagementLayout) {
// and one option buttons view.
EXPECT_EQ(5U, [subviews count]);
- // There should be two buttons in the option buttons view.
+ // There should be two buttons and a separator in the option buttons view.
NSArray* buttonSubviews = [[subviews objectAtIndex:0] subviews];
- const SEL buttonSelectors[] = { @selector(showUserManager:),
- @selector(lockProfile:) };
- EXPECT_EQ(2U, [buttonSubviews count]);
- for (NSUInteger i = 0; i < [buttonSubviews count]; ++i) {
- NSButton* button = static_cast<NSButton*>([buttonSubviews objectAtIndex:i]);
- EXPECT_EQ(buttonSelectors[i], [button action]);
- EXPECT_EQ(controller(), [button target]);
- }
+ EXPECT_EQ(3U, [buttonSubviews count]);
+
+ NSButton* notYouButton =
+ static_cast<NSButton*>([buttonSubviews objectAtIndex:0]);
+ EXPECT_EQ(@selector(showUserManager:), [notYouButton action]);
+ EXPECT_EQ(controller(), [notYouButton target]);
+
+ EXPECT_TRUE([[buttonSubviews objectAtIndex:1] isKindOfClass:[NSBox class]]);
+
+ NSButton* lockButton =
+ static_cast<NSButton*>([buttonSubviews objectAtIndex:2]);
+ EXPECT_EQ(@selector(lockProfile:), [lockButton action]);
+ EXPECT_EQ(controller(), [lockButton target]);
// There should be a separator.
EXPECT_TRUE([[subviews objectAtIndex:1] isKindOfClass:[NSBox class]]);

Powered by Google App Engine
This is Rietveld 408576698