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

Unified Diff: components/autofill/core/browser/autofill_profile_unittest.cc

Issue 1989173005: [Autofill] Dedupe similar profiles on insertion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 6 months 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
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..587968fec47559fe2d0b50620b3771a1c9c4baef 100644
--- a/components/autofill/core/browser/autofill_profile_unittest.cc
+++ b/components/autofill/core/browser/autofill_profile_unittest.cc
@@ -1263,4 +1263,20 @@ TEST(AutofillProfileTest, SaveAdditionalInfo_Name_ComplementaryInformation) {
a.GetRawInfo(NAME_FULL));
}
+// Tests that PrimaryValues of two similar profiles with different
+// punctuation and case are equal.
+TEST(AutofillProfileTest, PrimaryValue_SimilarProfiles) {
+ 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(profile1.PrimaryValue("en-US"), profile2.PrimaryValue("en-US"));
+}
+
} // namespace autofill
« no previous file with comments | « components/autofill/core/browser/autofill_profile.cc ('k') | components/autofill/core/browser/personal_data_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698