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

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

Issue 1009953002: Integrate ManagePasswordsState into ManagePasswordsUIController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed the comments Created 5 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: chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_pending_view_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_pending_view_controller_unittest.mm b/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_pending_view_controller_unittest.mm
index 48f975b0c6d2ef75c01a645b8b0fbef76a7fd333..3671cf26d5e11755636c1fb33a0b2297ae27a851 100644
--- a/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_pending_view_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_pending_view_controller_unittest.mm
@@ -58,7 +58,6 @@ class ManagePasswordsBubblePendingViewControllerTest
ManagePasswordsControllerTest::SetUp();
delegate_.reset(
[[ManagePasswordsBubblePendingViewTestDelegate alloc] init]);
- ui_controller()->SetState(password_manager::ui::PENDING_PASSWORD_STATE);
}
ManagePasswordsBubblePendingViewTestDelegate* delegate() {
@@ -116,10 +115,10 @@ TEST_F(ManagePasswordsBubblePendingViewControllerTest,
autofill::PasswordForm form;
form.username_value = base::ASCIIToUTF16("username");
form.password_value = base::ASCIIToUTF16("password");
- autofill::ConstPasswordFormMap map;
- map[base::ASCIIToUTF16("username")] = &form;
- ui_controller()->SetPasswordFormMap(map);
- EXPECT_FALSE(model()->best_matches().empty());
+ ScopedVector<autofill::PasswordForm> forms;
+ forms.push_back(new autofill::PasswordForm(form));
+ ui_controller()->PretendSubmittedPassword(forms.Pass());
+ EXPECT_FALSE(model()->local_credentials().empty());
BubbleCombobox* nopeButton = [controller() nopeButton];
ClickMenuItem(nopeButton,

Powered by Google App Engine
This is Rietveld 408576698