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

Unified Diff: components/password_manager/core/browser/password_autofill_manager_unittest.cc

Issue 614023002: [Password manager] Relplace the FormFieldData vector from autofill::FormData with named fields… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated nit from Vaclav's review. Created 6 years, 1 month 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
« no previous file with comments | « components/password_manager/core/browser/password_autofill_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/password_manager/core/browser/password_autofill_manager_unittest.cc
diff --git a/components/password_manager/core/browser/password_autofill_manager_unittest.cc b/components/password_manager/core/browser/password_autofill_manager_unittest.cc
index 1f46b403c1249eedccae54448bbfd1ae9da51fe4..e8b5bd20d2c0b3ed205c418953306700290fce84 100644
--- a/components/password_manager/core/browser/password_autofill_manager_unittest.cc
+++ b/components/password_manager/core/browser/password_autofill_manager_unittest.cc
@@ -81,12 +81,12 @@ class PasswordAutofillManagerTest : public testing::Test {
autofill::FormFieldData username_field;
username_field.name = base::ASCIIToUTF16(kUsernameName);
username_field.value = test_username_;
- fill_data_.basic_data.fields.push_back(username_field);
+ fill_data_.username_field = username_field;
autofill::FormFieldData password_field;
password_field.name = base::ASCIIToUTF16(kPasswordName);
password_field.value = test_password_;
- fill_data_.basic_data.fields.push_back(password_field);
+ fill_data_.password_field = password_field;
}
void InitializePasswordAutofillManager(
@@ -173,9 +173,8 @@ TEST_F(PasswordAutofillManagerTest, ExternalDelegatePasswordSuggestions) {
gfx::RectF element_bounds;
autofill::PasswordFormFillData data;
- data.basic_data.fields.resize(2);
- data.basic_data.fields[0].value = test_username_;
- data.basic_data.fields[1].value = test_password_;
+ data.username_field.value = test_username_;
+ data.password_field.value = test_password_;
data.preferred_realm = "http://foo.com/";
int dummy_key = 0;
password_autofill_manager_->OnAddPasswordFormMapping(dummy_key, data);
@@ -212,9 +211,8 @@ TEST_F(PasswordAutofillManagerTest, ExtractSuggestions) {
gfx::RectF element_bounds;
autofill::PasswordFormFillData data;
- data.basic_data.fields.resize(2);
- data.basic_data.fields[0].value = test_username_;
- data.basic_data.fields[1].value = test_password_;
+ data.username_field.value = test_username_;
+ data.password_field.value = test_password_;
data.preferred_realm = "http://foo.com/";
autofill::PasswordAndRealm additional;
« no previous file with comments | « components/password_manager/core/browser/password_autofill_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698