| 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 c9fd67d0f7eebd0220dae7f83dce36308a7a06b7..4cad2867e6d7067e221f6ffd9c8cc4cf8cc9fa84 100644
|
| --- a/components/autofill/core/browser/autofill_manager_unittest.cc
|
| +++ b/components/autofill/core/browser/autofill_manager_unittest.cc
|
| @@ -3514,7 +3514,7 @@ TEST_F(AutofillManagerTest, DeterminePossibleFieldTypesForUpload) {
|
| profiles.push_back(profile);
|
| test::SetProfileInfo(&profile, "Charles", "", "Baudelaire",
|
| "lesfleursdumal@gmail.com", "", "108 Rue Saint-Lazare",
|
| - "Apt. 10", "Paris", "Ile de France", "75008", "FR",
|
| + "Apt. 10", "Paris", "Île de France", "75008", "FR",
|
| "+33 2 49 19 70 70");
|
| profile.set_guid("00000000-0000-0000-0000-000000000001");
|
| profiles.push_back(profile);
|
| @@ -3558,9 +3558,12 @@ TEST_F(AutofillManagerTest, DeterminePossibleFieldTypesForUpload) {
|
| {"567", PHONE_HOME_NUMBER},
|
| {"8901", PHONE_HOME_NUMBER},
|
|
|
| - // Test an european profile.
|
| + // Test a European profile.
|
| {"Paris", ADDRESS_HOME_CITY},
|
| - {"Ile de France", ADDRESS_HOME_STATE},
|
| + {"Île de France", ADDRESS_HOME_STATE}, // Exact match
|
| + {"Ile de France", ADDRESS_HOME_STATE}, // Missing accent.
|
| + {"-Ile-de-France-", ADDRESS_HOME_STATE}, // Extra punctuation.
|
| + {"île dÉ FrÃÑÇË", ADDRESS_HOME_STATE}, // Other accents & case mismatch.
|
| {"75008", ADDRESS_HOME_ZIP},
|
| {"FR", ADDRESS_HOME_COUNTRY},
|
| {"France", ADDRESS_HOME_COUNTRY},
|
| @@ -3582,7 +3585,7 @@ TEST_F(AutofillManagerTest, DeterminePossibleFieldTypesForUpload) {
|
| {"99", CREDIT_CARD_EXP_2_DIGIT_YEAR},
|
| {"04/2999", CREDIT_CARD_EXP_DATE_4_DIGIT_YEAR},
|
|
|
| - // Make sure whitespaces and invalid characters are handled properly.
|
| + // Make sure whitespace and invalid characters are handled properly.
|
| {"", EMPTY_TYPE},
|
| {" ", EMPTY_TYPE},
|
| {"***", UNKNOWN_TYPE},
|
| @@ -3622,7 +3625,7 @@ TEST_F(AutofillManagerTest, DeterminePossibleFieldTypesForUpload) {
|
|
|
| FormFieldData field;
|
| test::CreateTestFormField("", "1", "", "text", &field);
|
| - field.value = ASCIIToUTF16(test_case.input_value);
|
| + field.value = UTF8ToUTF16(test_case.input_value);
|
| form.fields.push_back(field);
|
|
|
| FormStructure form_structure(form);
|
| @@ -3635,7 +3638,8 @@ TEST_F(AutofillManagerTest, DeterminePossibleFieldTypesForUpload) {
|
| form_structure.field(0)->possible_types();
|
| EXPECT_EQ(1U, possible_types.size());
|
|
|
| - EXPECT_NE(possible_types.end(), possible_types.find(test_case.field_type));
|
| + EXPECT_NE(possible_types.end(), possible_types.find(test_case.field_type))
|
| + << "Failed to determine type for: \"" << test_case.input_value << "\"";
|
| }
|
| }
|
|
|
|
|