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

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: 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..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

Powered by Google App Engine
This is Rietveld 408576698