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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/settings/cells/account_signin_item_unittest.mm
diff --git a/ios/chrome/browser/ui/settings/cells/account_signin_item_unittest.mm b/ios/chrome/browser/ui/settings/cells/account_signin_item_unittest.mm
new file mode 100644
index 0000000000000000000000000000000000000000..30e4718fde7d17871be1e48eaa5e9910db6aadab
--- /dev/null
+++ b/ios/chrome/browser/ui/settings/cells/account_signin_item_unittest.mm
@@ -0,0 +1,34 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import "ios/chrome/browser/ui/settings/cells/account_signin_item.h"
+
+#import <CoreGraphics/CoreGraphics.h>
+#import <UIKit/UIKit.h>
+
+#include "testing/gtest/include/gtest/gtest.h"
+#include "testing/gtest_mac.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+// Tests that the UIImage and UILabels are set properly after a call to
+// |configureCell:|.
+
+TEST(AccountSignInItemTest, ImageView) {
+ AccountSignInItem* item = [[AccountSignInItem alloc] initWithType:0];
+ UIImage* image = [[UIImage alloc] init];
+
+ item.image = image;
+
+ id cell = [[[item cellClass] alloc] init];
+ ASSERT_TRUE([cell isMemberOfClass:[AccountSignInCell class]]);
+
+ AccountSignInCell* signInCell = cell;
+ EXPECT_FALSE(signInCell.imageView.image);
+
+ [item configureCell:cell];
+ EXPECT_NSEQ(image, signInCell.imageView.image);
+}
« 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