Chromium Code Reviews| Index: components/autofill/core/browser/personal_data_manager_unittest.cc |
| diff --git a/components/autofill/core/browser/personal_data_manager_unittest.cc b/components/autofill/core/browser/personal_data_manager_unittest.cc |
| index bdbe43656c4d381ac51e9bcd477d9c8abcaa7b80..cffd935fe16ed761b5ac0804b46517f39389652d 100644 |
| --- a/components/autofill/core/browser/personal_data_manager_unittest.cc |
| +++ b/components/autofill/core/browser/personal_data_manager_unittest.cc |
| @@ -1097,10 +1097,14 @@ TEST_F(PersonalDataManagerTest, AggregateTwoProfilesWithMultiValue) { |
| const std::vector<AutofillProfile*>& results2 = personal_data_->GetProfiles(); |
| // Modify expected to include multi-valued fields. |
| - std::vector<base::string16> values; |
| - expected.GetRawMultiInfo(NAME_FULL, &values); |
| - values.push_back(ASCIIToUTF16("John Adams")); |
| - expected.SetRawMultiInfo(NAME_FULL, values); |
| + std::vector<base::string16> first_values, last_values, values; |
|
Ilya Sherman
2014/06/24 07:21:37
nit: Perhaps "first_names", "last_names", and "ema
|
| + expected.GetRawMultiInfo(NAME_FIRST, &first_values); |
| + first_values.push_back(ASCIIToUTF16("John")); |
| + expected.GetRawMultiInfo(NAME_LAST, &last_values); |
| + last_values.push_back(ASCIIToUTF16("Adams")); |
| + expected.SetRawMultiInfo(NAME_FIRST, first_values); |
| + expected.SetRawMultiInfo(NAME_LAST, last_values); |
| + |
| expected.GetRawMultiInfo(EMAIL_ADDRESS, &values); |
| values.push_back(ASCIIToUTF16("second@gmail.com")); |
| expected.SetRawMultiInfo(EMAIL_ADDRESS, values); |
| @@ -2119,10 +2123,16 @@ TEST_F(PersonalDataManagerTest, SaveImportedProfileWithExistingVerifiedData) { |
| // The new profile should be merged into the existing one. |
| AutofillProfile expected_profile = new_verified_profile; |
| expected_profile.set_guid(profile.guid()); |
| - std::vector<base::string16> names; |
| - expected_profile.GetRawMultiInfo(NAME_FULL, &names); |
| - names.insert(names.begin(), ASCIIToUTF16("Marion Mitchell Morrison")); |
| - expected_profile.SetRawMultiInfo(NAME_FULL, names); |
| + std::vector<base::string16> first_names, middle_names, last_names; |
| + expected_profile.GetRawMultiInfo(NAME_FIRST, &first_names); |
| + expected_profile.GetRawMultiInfo(NAME_MIDDLE, &middle_names); |
| + expected_profile.GetRawMultiInfo(NAME_LAST, &last_names); |
| + first_names.insert(first_names.begin(), ASCIIToUTF16("Marion")); |
| + middle_names.insert(middle_names.begin(), ASCIIToUTF16("Mitchell")); |
| + last_names.insert(last_names.begin(), ASCIIToUTF16("Morrison")); |
| + expected_profile.SetRawMultiInfo(NAME_FIRST, first_names); |
| + expected_profile.SetRawMultiInfo(NAME_MIDDLE, middle_names); |
| + expected_profile.SetRawMultiInfo(NAME_LAST, last_names); |
| const std::vector<AutofillProfile*>& results = personal_data_->GetProfiles(); |
| ASSERT_EQ(1U, results.size()); |