| 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..c8cd5b60e5729c78e6165cfef5c8cf1fc11fa462 100644
|
| --- a/components/autofill/core/browser/autofill_profile_unittest.cc
|
| +++ b/components/autofill/core/browser/autofill_profile_unittest.cc
|
| @@ -1263,4 +1263,23 @@ TEST(AutofillProfileTest, SaveAdditionalInfo_Name_ComplementaryInformation) {
|
| a.GetRawInfo(NAME_FULL));
|
| }
|
|
|
| +// Tests that canonicalized PrimaryValues of two similar profiles with different
|
| +// punctuation and case are equal.
|
| +TEST(AutofillProfileTest, CanonicalizedPrimaryValue) {
|
| + AutofillProfile profile1(base::GenerateGUID(), "https://www.example.com/");
|
| + test::SetProfileInfo(&profile1, "Marion", "Mitchell", "Morrison",
|
| + "marion@me.xyz", "Fox", "123 Zoo St.", "unit 5",
|
| + "Hollywood", "CA", "91601", "US", "12345678910");
|
| +
|
| + AutofillProfile profile2(base::GenerateGUID(), "https://www.example.com/");
|
| + test::SetProfileInfo(&profile2, "marion", "mitchell", "morrison",
|
| + "marion@me.xyz", "Fox", "123, Zoo St", "unit 5",
|
| + "hollywood", "CA", "91601", "US", "12345678910");
|
| +
|
| + EXPECT_EQ(AutofillProfile::CanonicalizeProfileString(
|
| + profile1.PrimaryValue("en-US")),
|
| + AutofillProfile::CanonicalizeProfileString(
|
| + profile2.PrimaryValue("en-US")));
|
| +}
|
| +
|
| } // namespace autofill
|
|
|