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

Unified Diff: chrome/browser/password_manager/password_store_mac_unittest.cc

Issue 459103005: Introduce new PasswordForm attributes for Credential Management API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mike's comment Created 6 years, 4 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/password_manager/password_store_mac_unittest.cc
diff --git a/chrome/browser/password_manager/password_store_mac_unittest.cc b/chrome/browser/password_manager/password_store_mac_unittest.cc
index e2ada527138d3cc5e115916c566ff41a35ffa92a..47f86a42c1291d3322cce137c4d1ffd042b03041 100644
--- a/chrome/browser/password_manager/password_store_mac_unittest.cc
+++ b/chrome/browser/password_manager/password_store_mac_unittest.cc
@@ -203,11 +203,15 @@ static PasswordForm* CreatePasswordFormFromData(
form->password_element = WideToUTF16(form_data.password_element);
if (form_data.username_value) {
form->username_value = WideToUTF16(form_data.username_value);
+ form->display_name = form->username_value;
+ form->is_zero_click = true;
if (form_data.password_value)
form->password_value = WideToUTF16(form_data.password_value);
} else {
form->blacklisted_by_user = true;
}
+ form->avatar_url = GURL("https://accounts.google.com/Avatar");
+ form->federation_url = GURL("https://accounts.google.com/login");
return form;
}
@@ -250,6 +254,9 @@ static void CheckFormsAgainstExpectations(
if (expectation->username_value) {
EXPECT_EQ(WideToUTF16(expectation->username_value),
form->username_value) << test_label;
+ EXPECT_EQ(WideToUTF16(expectation->username_value),
+ form->display_name) << test_label;
+ EXPECT_TRUE(form->is_zero_click) << test_label;
EXPECT_EQ(WideToUTF16(expectation->password_value),
form->password_value) << test_label;
} else {
@@ -262,6 +269,8 @@ static void CheckFormsAgainstExpectations(
base::Time created = base::Time::FromDoubleT(expectation->creation_time);
EXPECT_EQ(created + base::TimeDelta::FromDays(1),
form->date_synced) << test_label;
+ EXPECT_EQ(GURL("https://accounts.google.com/Avatar"), form->avatar_url);
+ EXPECT_EQ(GURL("https://accounts.google.com/login"), form->federation_url);
}
}
« no previous file with comments | « chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc ('k') | components/autofill/core/common/password_form.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698