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

Unified Diff: chrome/browser/ui/cocoa/autofill/autofill_main_container_unittest.mm

Issue 14704004: [Autofill] Add Details Section (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix broken include path. Created 7 years, 7 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/autofill/autofill_main_container_unittest.mm
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_main_container_unittest.mm b/chrome/browser/ui/cocoa/autofill/autofill_main_container_unittest.mm
index 95feed386876fea57bb38e0bf61c7b6cc27e1dc1..d239581892b43fdf79dd93204f678283645d109b 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_main_container_unittest.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_main_container_unittest.mm
@@ -33,17 +33,24 @@ TEST_VIEW(AutofillMainContainerTest, [container_ view])
TEST_F(AutofillMainContainerTest, SubViews) {
bool hasAccountChooser = false;
+ bool hasButtons = false;
+ // Should have account chooser, button strip, and details section.
+ EXPECT_EQ(3U, [[[container_ view] subviews] count]);
for (NSView* view in [[container_ view] subviews]) {
if ([view isKindOfClass:[AutofillAccountChooser class]]) {
hasAccountChooser = true;
} else {
NSArray* subviews = [view subviews];
- EXPECT_EQ(2U, [subviews count]);
- EXPECT_TRUE([[subviews objectAtIndex:0] isKindOfClass:[NSButton class]]);
- EXPECT_TRUE([[subviews objectAtIndex:1] isKindOfClass:[NSButton class]]);
+ if ([subviews count] == 2) {
+ EXPECT_TRUE(
+ [[subviews objectAtIndex:0] isKindOfClass:[NSButton class]]);
+ EXPECT_TRUE(
+ [[subviews objectAtIndex:1] isKindOfClass:[NSButton class]]);
+ hasButtons = true;
+ }
}
}
- EXPECT_TRUE(hasAccountChooser);
+ EXPECT_TRUE(hasAccountChooser && hasButtons);
}

Powered by Google App Engine
This is Rietveld 408576698