Chromium Code Reviews| Index: components/autofill/core/browser/autofill_profile_unittest.cc |
| diff --git a/components/autofill/core/browser/autofill_profile_unittest.cc b/components/autofill/core/browser/autofill_profile_unittest.cc |
| index 7a6630f8b2b184744aeec2a46ce17fd226664cb7..115fd08a64276fe5ac688e45de1adb77b4181043 100644 |
| --- a/components/autofill/core/browser/autofill_profile_unittest.cc |
| +++ b/components/autofill/core/browser/autofill_profile_unittest.cc |
| @@ -1263,4 +1263,17 @@ TEST(AutofillProfileTest, SaveAdditionalInfo_Name_ComplementaryInformation) { |
| a.GetRawInfo(NAME_FULL)); |
| } |
| +// Tests that PrimaryValue returns a string containing the first name, last |
| +// name, first address line and city of the profile with a whitespace in between |
| +// each part. |
| +TEST(AutofillProfileTest, PrimaryValue) { |
|
Mathieu
2016/06/08 18:32:24
This test is mostly testing JoinString, and it's n
sebsg
2016/06/08 21:58:46
You are right, it was not very useful. I added a t
|
| + AutofillProfile profile(base::GenerateGUID(), "https://www.example.com/"); |
| + test::SetProfileInfo(&profile, "Marion", "Mitchell", "Morrison", |
| + "marion@me.xyz", "Fox", "123 Zoo St.", "unit 5", |
| + "Hollywood", "CA", "91601", "US", "12345678910"); |
| + |
| + EXPECT_EQ(base::UTF8ToUTF16("Marion Morrison 123 Zoo St. Hollywood"), |
| + profile.PrimaryValue()); |
| +} |
| + |
| } // namespace autofill |