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

Unified Diff: chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_manage_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_manage_view_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_manage_view_controller_unittest.mm b/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_manage_view_controller_unittest.mm
index 2d4e3123c0d7c756f4199d4a9292b687f5f75d42..c90e11c1009b142704eda9b1be8ec0ccd78eb839 100644
--- a/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_manage_view_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/passwords/manage_passwords_bubble_manage_view_controller_unittest.mm
@@ -41,7 +41,6 @@ class ManagePasswordsBubbleManageViewControllerTest
ManagePasswordsControllerTest::SetUp();
delegate_.reset(
[[ManagePasswordsBubbleManageViewTestDelegate alloc] init]);
- ui_controller()->SetState(password_manager::ui::MANAGE_STATE);
}
ManagePasswordsBubbleManageViewTestDelegate* delegate() {
@@ -79,14 +78,14 @@ TEST_F(ManagePasswordsBubbleManageViewControllerTest,
TEST_F(ManagePasswordsBubbleManageViewControllerTest,
ShouldShowNoPasswordsWhenNoPasswordsExistForSite) {
- EXPECT_TRUE(model()->best_matches().empty());
+ EXPECT_TRUE(model()->local_credentials().empty());
EXPECT_EQ([NoPasswordsView class], [controller().contentView class]);
}
TEST_F(ManagePasswordsBubbleManageViewControllerTest,
ShouldShowAllPasswordItemsWhenPasswordsExistForSite) {
// Add a few password entries.
- autofill::ConstPasswordFormMap map;
+ autofill::PasswordFormMap map;
autofill::PasswordForm form1;
form1.username_value = base::ASCIIToUTF16("username1");
form1.password_value = base::ASCIIToUTF16("password1");
@@ -98,11 +97,11 @@ TEST_F(ManagePasswordsBubbleManageViewControllerTest,
map[base::ASCIIToUTF16("username2")] = &form2;
// Add the entries to the model.
- ui_controller()->SetPasswordFormMap(map);
+ ui_controller()->OnPasswordAutofilled(map);
model()->set_state(password_manager::ui::MANAGE_STATE);
// Check the view state.
- EXPECT_FALSE(model()->best_matches().empty());
+ EXPECT_FALSE(model()->local_credentials().empty());
EXPECT_EQ([PasswordItemListView class], [controller().contentView class]);
NSArray* items = base::mac::ObjCCastStrict<PasswordItemListView>(
controller().contentView).itemViews;

Powered by Google App Engine
This is Rietveld 408576698