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

Unified Diff: ios/chrome/browser/ui/settings/cells/signin_promo_item_unittest.mm

Issue 2749703003: Adding mediator for Sign-in promo (Closed)
Patch Set: Update tests Created 3 years, 9 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: ios/chrome/browser/ui/settings/cells/signin_promo_item_unittest.mm
diff --git a/ios/chrome/browser/ui/settings/cells/signin_promo_item_unittest.mm b/ios/chrome/browser/ui/settings/cells/signin_promo_item_unittest.mm
deleted file mode 100644
index 91fe8705783c73a5c5bf90f9c6a67ac2435dbda2..0000000000000000000000000000000000000000
--- a/ios/chrome/browser/ui/settings/cells/signin_promo_item_unittest.mm
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2017 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/signin_promo_item.h"
-
-#import <CoreGraphics/CoreGraphics.h>
-#import <UIKit/UIKit.h>
-
-#import "ios/third_party/material_components_ios/src/components/Buttons/src/MaterialButtons.h"
-#import "testing/gtest_mac.h"
-
-#if !defined(__has_feature) || !__has_feature(objc_arc)
-#error "This file requires ARC support."
-#endif
-
-// Tests that the profile image, the profile name and the profile email are set
-// properly after a call to |configureCell:|.
-TEST(SigninPromoItemTest, ConfigureCell) {
- SigninPromoItem* item = [[SigninPromoItem alloc] initWithType:0];
- UIImage* image = [[UIImage alloc] init];
-
- item.profileImage = image;
- item.profileName = @"John Doe";
- item.profileEmail = @"johndoe@gmail.com";
-
- id cell = [[[item cellClass] alloc] init];
- ASSERT_TRUE([cell isMemberOfClass:[SigninPromoCell class]]);
-
- SigninPromoCell* signInCell = cell;
- EXPECT_FALSE(signInCell.imageView.image);
-
- [item configureCell:signInCell];
-
- EXPECT_NSEQ(image, signInCell.imageView.image);
- NSString* upperCaseProfileName = [item.profileName uppercaseString];
- NSRange profileNameRange = [signInCell.signinButton.titleLabel.text
- rangeOfString:upperCaseProfileName];
- EXPECT_NE(profileNameRange.length, 0u);
- NSRange profileEmailRange =
- [signInCell.notMeButton.titleLabel.text rangeOfString:item.profileEmail];
- EXPECT_NE(profileEmailRange.length, 0u);
-}

Powered by Google App Engine
This is Rietveld 408576698