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

Unified Diff: chrome/browser/ui/cocoa/passwords/confirmation_password_saved_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/confirmation_password_saved_view_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/passwords/confirmation_password_saved_view_controller_unittest.mm b/chrome/browser/ui/cocoa/passwords/confirmation_password_saved_view_controller_unittest.mm
index e8c903a84bc9d9daf94e26d0d4e050883dfb221f..26fea09dd8a711a5a99ef1ba05482e6ac0207ce7 100644
--- a/chrome/browser/ui/cocoa/passwords/confirmation_password_saved_view_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/passwords/confirmation_password_saved_view_controller_unittest.mm
@@ -20,29 +20,20 @@ namespace {
class ConfirmationPasswordSavedViewControllerTest
: public ManagePasswordsControllerTest {
public:
- ConfirmationPasswordSavedViewControllerTest() : controller_(nil) {}
-
void SetUp() override {
ManagePasswordsControllerTest::SetUp();
- delegate_.reset([[ContentViewDelegateMock alloc] init]);
SetUpConfirmationState();
+ controller_.reset([[ConfirmationPasswordSavedViewController alloc]
+ initWithDelegate:delegate()]);
+ [controller_ view];
}
- ContentViewDelegateMock* delegate() { return delegate_.get(); }
-
ConfirmationPasswordSavedViewController* controller() {
- if (!controller_) {
- [delegate() setModel:GetModelAndCreateIfNull()];
- controller_.reset([[ConfirmationPasswordSavedViewController alloc]
- initWithDelegate:delegate()]);
- [controller_ view];
- }
return controller_.get();
}
private:
base::scoped_nsobject<ConfirmationPasswordSavedViewController> controller_;
- base::scoped_nsobject<ContentViewDelegateMock> delegate_;
};
TEST_F(ConfirmationPasswordSavedViewControllerTest,
@@ -63,7 +54,6 @@ TEST_F(ConfirmationPasswordSavedViewControllerTest, CloseBubbleAndHandleClick) {
// still sends the action.
EXPECT_CALL(*ui_controller(), NavigateToPasswordManagerSettingsPage())
.Times(0);
- [controller() bubbleWillDisappear];
[delegate() setModel:nil];
[controller().confirmationText clickedOnLink:@"about:blank" atIndex:0];
[controller().okButton performClick:nil];

Powered by Google App Engine
This is Rietveld 408576698