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

Side by Side Diff: ios/chrome/browser/ui/suggestions/suggestions_item_unittest.mm

Issue 2625693002: Suggestions UI - expandable item (Closed)
Patch Set: Address comments Created 3 years, 11 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #import "ios/chrome/browser/ui/suggestions/suggestions_item.h"
6
7 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h"
8 #include "testing/gtest/include/gtest/gtest.h"
9
10 namespace {
11
12 // Tests that configureCell: set all the fields of the cell.
13 TEST(SuggestionsItemTest, CellIsConfigured) {
14 NSString* title = @"testTitle";
15 NSString* subtitle = @"testSubtitle";
16 SuggestionsItem* item =
17 [[SuggestionsItem alloc] initWithType:0 title:title subtitle:subtitle];
18 SuggestionsCell* cell = [[[item cellClass] alloc] init];
19 EXPECT_TRUE([cell isMemberOfClass:[SuggestionsCell class]]);
20
21 [item configureCell:cell];
22 EXPECT_EQ(title, [cell.titleButton titleForState:UIControlStateNormal]);
23 EXPECT_EQ(subtitle, cell.detailTextLabel.text);
24 }
25
26 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698