| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/autofill/core/browser/autofill_profile.h" | 5 #include "components/autofill/core/browser/autofill_profile.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1256 | 1256 |
| 1257 // The first, middle and last names should be kept and name full should be | 1257 // The first, middle and last names should be kept and name full should be |
| 1258 // added. | 1258 // added. |
| 1259 EXPECT_EQ(base::ASCIIToUTF16("Marion"), a.GetRawInfo(NAME_FIRST)); | 1259 EXPECT_EQ(base::ASCIIToUTF16("Marion"), a.GetRawInfo(NAME_FIRST)); |
| 1260 EXPECT_EQ(base::ASCIIToUTF16("Mitchell"), a.GetRawInfo(NAME_MIDDLE)); | 1260 EXPECT_EQ(base::ASCIIToUTF16("Mitchell"), a.GetRawInfo(NAME_MIDDLE)); |
| 1261 EXPECT_EQ(base::ASCIIToUTF16("Morrison"), a.GetRawInfo(NAME_LAST)); | 1261 EXPECT_EQ(base::ASCIIToUTF16("Morrison"), a.GetRawInfo(NAME_LAST)); |
| 1262 EXPECT_EQ(base::ASCIIToUTF16("Marion Mitchell Morrison"), | 1262 EXPECT_EQ(base::ASCIIToUTF16("Marion Mitchell Morrison"), |
| 1263 a.GetRawInfo(NAME_FULL)); | 1263 a.GetRawInfo(NAME_FULL)); |
| 1264 } | 1264 } |
| 1265 | 1265 |
| 1266 // Tests that PrimaryValues of two similar profiles with different |
| 1267 // punctuation and case are equal. |
| 1268 TEST(AutofillProfileTest, PrimaryValue_SimilarProfiles) { |
| 1269 AutofillProfile profile1(base::GenerateGUID(), "https://www.example.com/"); |
| 1270 test::SetProfileInfo(&profile1, "Marion", "Mitchell", "Morrison", |
| 1271 "marion@me.xyz", "Fox", "123 Zoo St.", "unit 5", |
| 1272 "Hollywood", "CA", "91601", "US", "12345678910"); |
| 1273 |
| 1274 AutofillProfile profile2(base::GenerateGUID(), "https://www.example.com/"); |
| 1275 test::SetProfileInfo(&profile2, "marion", "mitchell", "morrison", |
| 1276 "marion@me.xyz", "Fox", "123, Zoo St", "unit 5", |
| 1277 "hollywood", "CA", "91601", "US", "12345678910"); |
| 1278 |
| 1279 EXPECT_EQ(profile1.PrimaryValue("en-US"), profile2.PrimaryValue("en-US")); |
| 1280 } |
| 1281 |
| 1266 } // namespace autofill | 1282 } // namespace autofill |
| OLD | NEW |