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

Unified Diff: chrome/browser/ui/cocoa/web_intent_sheet_controller_unittest.mm

Issue 10387141: [OSX, WebIntents] Display suggestions label, unless there are no suggestions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix review nit. Created 8 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
« no previous file with comments | « chrome/browser/ui/cocoa/web_intent_sheet_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/web_intent_sheet_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/web_intent_sheet_controller_unittest.mm b/chrome/browser/ui/cocoa/web_intent_sheet_controller_unittest.mm
index e333de79777054bdb872899c114a8baaf3b33971..b51a0a70f39c97274dd691f58844b25df15584af 100644
--- a/chrome/browser/ui/cocoa/web_intent_sheet_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/web_intent_sheet_controller_unittest.mm
@@ -117,13 +117,15 @@ TEST_F(WebIntentPickerSheetControllerTest, SuggestionView) {
NSArray* flip_views = [[window_ contentView] subviews];
NSArray* main_views = [[flip_views objectAtIndex:0] subviews];
- // 4th object should be the suggestion view.
+ // 3rd object should be the suggestion view.
ASSERT_TRUE([main_views count] > 2);
ASSERT_TRUE([[main_views objectAtIndex:2] isKindOfClass:[NSView class]]);
NSView* suggest_view = [main_views objectAtIndex:2];
- // There is exactly one subview, which contains the suggested item.
- ASSERT_EQ(1U, [[suggest_view subviews] count]);
+ // There are two subviews - label & suggested items.
+ ASSERT_EQ(2U, [[suggest_view subviews] count]);
+ ASSERT_TRUE([[[suggest_view subviews] objectAtIndex:1]
+ isKindOfClass:[NSTextField class]]);
ASSERT_TRUE([[[suggest_view subviews] objectAtIndex:0]
isKindOfClass:[NSView class]]);
NSView* item_view = [[suggest_view subviews] objectAtIndex:0];
« no previous file with comments | « chrome/browser/ui/cocoa/web_intent_sheet_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698