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

Side by Side Diff: ios/chrome/browser/ui/settings/cells/account_signin_item_unittest.mm

Issue 2589583003: Upstream Chrome on iOS source code [7/11]. (Closed)
Patch Set: Created 4 years 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 2016 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/settings/cells/account_signin_item.h"
6
7 #import <CoreGraphics/CoreGraphics.h>
8 #import <UIKit/UIKit.h>
9
10 #include "testing/gtest/include/gtest/gtest.h"
11 #include "testing/gtest_mac.h"
12
13 #if !defined(__has_feature) || !__has_feature(objc_arc)
14 #error "This file requires ARC support."
15 #endif
16
17 // Tests that the UIImage and UILabels are set properly after a call to
18 // |configureCell:|.
19
20 TEST(AccountSignInItemTest, ImageView) {
21 AccountSignInItem* item = [[AccountSignInItem alloc] initWithType:0];
22 UIImage* image = [[UIImage alloc] init];
23
24 item.image = image;
25
26 id cell = [[[item cellClass] alloc] init];
27 ASSERT_TRUE([cell isMemberOfClass:[AccountSignInCell class]]);
28
29 AccountSignInCell* signInCell = cell;
30 EXPECT_FALSE(signInCell.imageView.image);
31
32 [item configureCell:cell];
33 EXPECT_NSEQ(image, signInCell.imageView.image);
34 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/settings/cells/account_signin_item.mm ('k') | ios/chrome/browser/ui/settings/cells/autofill_data_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698