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

Unified Diff: chrome/browser/ui/cocoa/passwords/update_pending_password_view_controller_unittest.mm

Issue 2040143006: Implement the Sync promo in the password bubble on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests Created 4 years, 6 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: chrome/browser/ui/cocoa/passwords/update_pending_password_view_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/passwords/update_pending_password_view_controller_unittest.mm b/chrome/browser/ui/cocoa/passwords/update_pending_password_view_controller_unittest.mm
index 73efa298a03a8296295aa62a8f701a2fd21f2aeb..9cca7b00bbf6c765d03d74a6b7b647d66b03eab5 100644
--- a/chrome/browser/ui/cocoa/passwords/update_pending_password_view_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/passwords/update_pending_password_view_controller_unittest.mm
@@ -25,28 +25,19 @@ namespace {
class UpdatePendingPasswordViewControllerTest
: public ManagePasswordsControllerTest {
public:
- UpdatePendingPasswordViewControllerTest() {}
-
- void SetUp() override {
- ManagePasswordsControllerTest::SetUp();
- delegate_.reset([[ContentViewDelegateMock alloc] init]);
+ void SetUpUpdatePendingState(bool multiple_forms) {
+ ManagePasswordsControllerTest::SetUpUpdatePendingState(multiple_forms);
+ controller_.reset([[UpdatePendingPasswordViewController alloc]
+ initWithDelegate:delegate()]);
+ [controller_ view];
}
- ContentViewDelegateMock* delegate() { return delegate_.get(); }
-
UpdatePendingPasswordViewController* controller() {
- if (!controller_) {
- [delegate() setModel:GetModelAndCreateIfNull()];
- controller_.reset([[UpdatePendingPasswordViewController alloc]
- initWithDelegate:delegate()]);
- [controller_ view];
- }
return controller_.get();
}
private:
base::scoped_nsobject<UpdatePendingPasswordViewController> controller_;
- base::scoped_nsobject<ContentViewDelegateMock> delegate_;
};
TEST_F(UpdatePendingPasswordViewControllerTest,
@@ -98,7 +89,6 @@ TEST_F(UpdatePendingPasswordViewControllerTest, CloseBubbleAndHandleClick) {
SetUpUpdatePendingState(false);
EXPECT_CALL(*ui_controller(), UpdatePassword(_)).Times(0);
EXPECT_CALL(*ui_controller(), OnNopeUpdateClicked()).Times(0);
- [controller() bubbleWillDisappear];
[delegate() setModel:nil];
[controller().updateButton performClick:nil];
[controller().noButton performClick:nil];

Powered by Google App Engine
This is Rietveld 408576698