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

Side by Side Diff: ios/chrome/browser/ui/authentication/signin_promo_view_unittest.mm

Issue 2749703003: Adding mediator for Sign-in promo (Closed)
Patch Set: Fixing Louis' comments 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 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/authentication/signin_promo_view.h"
6
7 #import "ios/third_party/material_components_ios/src/components/Buttons/src/Mate rialButtons.h"
8 #include "third_party/ocmock/gtest_support.h"
9
10 #if !defined(__has_feature) || !__has_feature(objc_arc)
11 #error "This file requires ARC support."
12 #endif
13
14 TEST(SigninPromoViewTest, ChangeProfileImageInColdState) {
15 SigninPromoView* view =
16 [[SigninPromoView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
17 view.mode = SigninPromoViewColdStateMode;
18 UIImage* chromeImage = view.imageView.image;
19 [view setProfileImage:[[UIImage alloc] init]];
20 EXPECT_EQ(chromeImage, view.imageView.image);
21 }
22
23 TEST(SigninPromoViewTest, SecondaryButtonVisibility) {
24 SigninPromoView* view =
25 [[SigninPromoView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
26 view.mode = SigninPromoViewColdStateMode;
27 EXPECT_TRUE(view.secondaryButton.hidden);
28 view.mode = SigninPromoViewWarmStateMode;
29 EXPECT_FALSE(view.secondaryButton.hidden);
30 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698