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

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

Issue 1814883002: [Autofill] Check for full state name and abbreviation when determining types to upload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit Created 4 years, 9 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_manager_unittest.cc
diff --git a/components/autofill/core/browser/autofill_manager_unittest.cc b/components/autofill/core/browser/autofill_manager_unittest.cc
index f8e9772e0a8d30e4656f067e3f13c240154178aa..cf3d96508e4731f6648d2c34cf0edff520d350dd 100644
--- a/components/autofill/core/browser/autofill_manager_unittest.cc
+++ b/components/autofill/core/browser/autofill_manager_unittest.cc
@@ -3326,7 +3326,7 @@ TEST_F(AutofillManagerTest, DeterminePossibleFieldTypesForUpload) {
profile.set_guid("00000000-0000-0000-0000-000000000001");
profiles.push_back(profile);
test::SetProfileInfo(&profile, "Charles", "", "Holley", "buddy@gmail.com",
- "Decca", "123 Apple St.", "unit 6", "Lubbock", "Texas",
+ "Decca", "123 Apple St.", "unit 6", "Lubbock", "TX",
"79401", "US", "5142821292");
profile.set_guid("00000000-0000-0000-0000-000000000002");
profiles.push_back(profile);
@@ -3413,6 +3413,10 @@ TEST_F(AutofillManagerTest, DeterminePossibleFieldTypesForUpload) {
{"3734 Elvis Presley Blvd", ADDRESS_HOME_LINE1},
{"3734, Elvis Presley Blvd.", ADDRESS_HOME_LINE1},
+ // Make sure that a state's full name and abbreviation match.
+ {"TN", ADDRESS_HOME_STATE}, // Saved as "Tennessee" in profile.
+ {"Texas", ADDRESS_HOME_STATE}, // Saved as "TX" in profile.
+
// Special phone number case. A profile with no country code should only
// match PHONE_HOME_CITY_AND_NUMBER.
{"5142821292", PHONE_HOME_CITY_AND_NUMBER},
@@ -3421,7 +3425,6 @@ TEST_F(AutofillManagerTest, DeterminePossibleFieldTypesForUpload) {
{"Elvis Aaron", UNKNOWN_TYPE},
{"Mr. Presley", UNKNOWN_TYPE},
{"3734 Elvis Presley", UNKNOWN_TYPE},
- {"TN", UNKNOWN_TYPE},
{"38116-1023", UNKNOWN_TYPE},
{"5", UNKNOWN_TYPE},
{"56", UNKNOWN_TYPE},

Powered by Google App Engine
This is Rietveld 408576698