Chromium Code Reviews| 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_manager.h" | 5 #include "components/autofill/core/browser/autofill_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 3496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3507 "+1 (234) 567-8901"); | 3507 "+1 (234) 567-8901"); |
| 3508 profile.set_guid("00000000-0000-0000-0000-000000000001"); | 3508 profile.set_guid("00000000-0000-0000-0000-000000000001"); |
| 3509 profiles.push_back(profile); | 3509 profiles.push_back(profile); |
| 3510 test::SetProfileInfo(&profile, "Charles", "", "Holley", "buddy@gmail.com", | 3510 test::SetProfileInfo(&profile, "Charles", "", "Holley", "buddy@gmail.com", |
| 3511 "Decca", "123 Apple St.", "unit 6", "Lubbock", "TX", | 3511 "Decca", "123 Apple St.", "unit 6", "Lubbock", "TX", |
| 3512 "79401", "US", "5142821292"); | 3512 "79401", "US", "5142821292"); |
| 3513 profile.set_guid("00000000-0000-0000-0000-000000000002"); | 3513 profile.set_guid("00000000-0000-0000-0000-000000000002"); |
| 3514 profiles.push_back(profile); | 3514 profiles.push_back(profile); |
| 3515 test::SetProfileInfo(&profile, "Charles", "", "Baudelaire", | 3515 test::SetProfileInfo(&profile, "Charles", "", "Baudelaire", |
| 3516 "lesfleursdumal@gmail.com", "", "108 Rue Saint-Lazare", | 3516 "lesfleursdumal@gmail.com", "", "108 Rue Saint-Lazare", |
| 3517 "Apt. 10", "Paris", "Ile de France", "75008", "FR", | 3517 "Apt. 10", "Paris", "Île de France", "75008", "FR", |
| 3518 "+33 2 49 19 70 70"); | 3518 "+33 2 49 19 70 70"); |
| 3519 profile.set_guid("00000000-0000-0000-0000-000000000001"); | 3519 profile.set_guid("00000000-0000-0000-0000-000000000001"); |
| 3520 profiles.push_back(profile); | 3520 profiles.push_back(profile); |
| 3521 | 3521 |
| 3522 // Set up the test credit cards. | 3522 // Set up the test credit cards. |
| 3523 std::vector<CreditCard> credit_cards; | 3523 std::vector<CreditCard> credit_cards; |
| 3524 CreditCard credit_card; | 3524 CreditCard credit_card; |
| 3525 test::SetCreditCardInfo(&credit_card, "John Doe", "4234-5678-9012-3456", "04", | 3525 test::SetCreditCardInfo(&credit_card, "John Doe", "4234-5678-9012-3456", "04", |
| 3526 "2999"); | 3526 "2999"); |
| 3527 credit_card.set_guid("00000000-0000-0000-0000-000000000003"); | 3527 credit_card.set_guid("00000000-0000-0000-0000-000000000003"); |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 3553 {"(234)567-8901", PHONE_HOME_CITY_AND_NUMBER}, | 3553 {"(234)567-8901", PHONE_HOME_CITY_AND_NUMBER}, |
| 3554 {"2345678901", PHONE_HOME_CITY_AND_NUMBER}, | 3554 {"2345678901", PHONE_HOME_CITY_AND_NUMBER}, |
| 3555 {"1", PHONE_HOME_COUNTRY_CODE}, | 3555 {"1", PHONE_HOME_COUNTRY_CODE}, |
| 3556 {"234", PHONE_HOME_CITY_CODE}, | 3556 {"234", PHONE_HOME_CITY_CODE}, |
| 3557 {"5678901", PHONE_HOME_NUMBER}, | 3557 {"5678901", PHONE_HOME_NUMBER}, |
| 3558 {"567", PHONE_HOME_NUMBER}, | 3558 {"567", PHONE_HOME_NUMBER}, |
| 3559 {"8901", PHONE_HOME_NUMBER}, | 3559 {"8901", PHONE_HOME_NUMBER}, |
| 3560 | 3560 |
| 3561 // Test an european profile. | 3561 // Test an european profile. |
| 3562 {"Paris", ADDRESS_HOME_CITY}, | 3562 {"Paris", ADDRESS_HOME_CITY}, |
| 3563 {"Ile de France", ADDRESS_HOME_STATE}, | 3563 {"Ile de France", ADDRESS_HOME_STATE}, // Note: missing accent on Île. |
|
Mathieu
2016/05/27 17:47:13
Could we expand the test cases to verify other thi
Roger McFarlane (Chromium)
2016/05/27 20:20:42
Done.
| |
| 3564 {"75008", ADDRESS_HOME_ZIP}, | 3564 {"75008", ADDRESS_HOME_ZIP}, |
| 3565 {"FR", ADDRESS_HOME_COUNTRY}, | 3565 {"FR", ADDRESS_HOME_COUNTRY}, |
| 3566 {"France", ADDRESS_HOME_COUNTRY}, | 3566 {"France", ADDRESS_HOME_COUNTRY}, |
| 3567 {"33249197070", PHONE_HOME_WHOLE_NUMBER}, | 3567 {"33249197070", PHONE_HOME_WHOLE_NUMBER}, |
| 3568 {"+33 2 49 19 70 70", PHONE_HOME_WHOLE_NUMBER}, | 3568 {"+33 2 49 19 70 70", PHONE_HOME_WHOLE_NUMBER}, |
| 3569 {"2 49 19 70 70", PHONE_HOME_CITY_AND_NUMBER}, | 3569 {"2 49 19 70 70", PHONE_HOME_CITY_AND_NUMBER}, |
| 3570 {"249197070", PHONE_HOME_CITY_AND_NUMBER}, | 3570 {"249197070", PHONE_HOME_CITY_AND_NUMBER}, |
| 3571 {"33", PHONE_HOME_COUNTRY_CODE}, | 3571 {"33", PHONE_HOME_COUNTRY_CODE}, |
| 3572 {"2", PHONE_HOME_CITY_CODE}, | 3572 {"2", PHONE_HOME_CITY_CODE}, |
| 3573 | 3573 |
| (...skipping 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5031 FormsSeen(mixed_forms); | 5031 FormsSeen(mixed_forms); |
| 5032 | 5032 |
| 5033 // Suggestions should always be displayed. | 5033 // Suggestions should always be displayed. |
| 5034 for (const FormFieldData& field : mixed_form.fields) { | 5034 for (const FormFieldData& field : mixed_form.fields) { |
| 5035 GetAutofillSuggestions(mixed_form, field); | 5035 GetAutofillSuggestions(mixed_form, field); |
| 5036 EXPECT_TRUE(external_delegate_->on_suggestions_returned_seen()); | 5036 EXPECT_TRUE(external_delegate_->on_suggestions_returned_seen()); |
| 5037 } | 5037 } |
| 5038 } | 5038 } |
| 5039 | 5039 |
| 5040 } // namespace autofill | 5040 } // namespace autofill |
| OLD | NEW |