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

Unified Diff: ios/chrome/browser/ui/authentication/signin_promo_view_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/authentication/signin_promo_view_unittest.mm
diff --git a/ios/chrome/browser/ui/authentication/signin_promo_view_unittest.mm b/ios/chrome/browser/ui/authentication/signin_promo_view_unittest.mm
new file mode 100644
index 0000000000000000000000000000000000000000..d1717524501e8a427f9c381a925252388e9f15f1
--- /dev/null
+++ b/ios/chrome/browser/ui/authentication/signin_promo_view_unittest.mm
@@ -0,0 +1,21 @@
+// 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/authentication/signin_promo_view.h"
+
+#import "ios/third_party/material_components_ios/src/components/Buttons/src/MaterialButtons.h"
+#include "third_party/ocmock/gtest_support.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+TEST(SigninPromoViewTest, SecondaryButtonVisibility) {
+ SigninPromoView* view =
+ [[SigninPromoView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
+ view.mode = SigninPromoViewModeColdState;
+ EXPECT_TRUE(view.secondaryButton.hidden);
+ view.mode = SigninPromoViewModeWarmState;
+ EXPECT_FALSE(view.secondaryButton.hidden);
+}
« no previous file with comments | « ios/chrome/browser/ui/authentication/signin_promo_view_mediator_unittest.mm ('k') | ios/chrome/browser/ui/settings/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698