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

Side by Side Diff: chrome/browser/ui/cocoa/passwords/signin_promo_view_controller_unittest.mm

Issue 2103983002: Add 'x' button to the signin promo in the password bubble on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « chrome/browser/ui/cocoa/passwords/signin_promo_view_controller.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/passwords/signin_promo_view_controller.h" 5 #import "chrome/browser/ui/cocoa/passwords/signin_promo_view_controller.h"
6 6
7 #include "base/metrics/field_trial.h" 7 #include "base/metrics/field_trial.h"
8 #import "chrome/browser/ui/cocoa/passwords/base_passwords_controller_test.h" 8 #import "chrome/browser/ui/cocoa/passwords/base_passwords_controller_test.h"
9 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h" 9 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller_mock.h"
10 #include "components/password_manager/core/browser/password_bubble_experiment.h" 10 #include "components/password_manager/core/browser/password_bubble_experiment.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 EXPECT_TRUE([delegate() dismissed]); 67 EXPECT_TRUE([delegate() dismissed]);
68 } 68 }
69 69
70 TEST_F(SignInPromoViewControllerTest, ClickNo) { 70 TEST_F(SignInPromoViewControllerTest, ClickNo) {
71 EXPECT_CALL(*ui_controller(), NavigateToChromeSignIn()).Times(0); 71 EXPECT_CALL(*ui_controller(), NavigateToChromeSignIn()).Times(0);
72 [controller().noButton performClick:nil]; 72 [controller().noButton performClick:nil];
73 73
74 EXPECT_TRUE([delegate() dismissed]); 74 EXPECT_TRUE([delegate() dismissed]);
75 } 75 }
76 76
77 TEST_F(SignInPromoViewControllerTest, ClickClose) {
78 EXPECT_CALL(*ui_controller(), NavigateToChromeSignIn()).Times(0);
79 [controller().closeButton performClick:nil];
80
81 EXPECT_TRUE([delegate() dismissed]);
82 }
83
77 TEST_F(SignInPromoViewControllerTest, CloseBubbleAndHandleClick) { 84 TEST_F(SignInPromoViewControllerTest, CloseBubbleAndHandleClick) {
78 // A user may press mouse down, some navigation closes the bubble, mouse up 85 // A user may press mouse down, some navigation closes the bubble, mouse up
79 // still sends the action. 86 // still sends the action.
80 EXPECT_CALL(*ui_controller(), NavigateToChromeSignIn()).Times(0); 87 EXPECT_CALL(*ui_controller(), NavigateToChromeSignIn()).Times(0);
81 [delegate() setModel:nil]; 88 [delegate() setModel:nil];
82 [controller().signInButton performClick:nil]; 89 [controller().signInButton performClick:nil];
83 [controller().noButton performClick:nil]; 90 [controller().noButton performClick:nil];
91 [controller().closeButton performClick:nil];
84 } 92 }
85 93
86 } // namespace 94 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/passwords/signin_promo_view_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698