Reland: Normalize shipping address for merchant on Desktop

Desktop / Chromium - sebsg [chromium.org] - 21 April 2017 13:05 EDT

The CL was causing some tests to fail, because the FakeAddressNormalizer in tests initialized the AddressValidator with a null storage, which triggered an assertion failure in some cases.

By creating an AddressNormalizer interface, the FakeAddressNormalizer doesn't need to create an AddressValidator object and can be used in test more easily.

BUG=707765

Original CL: https://codereview.chromium.org/2829503002/

Review-Url: https://codereview.chromium.org/2829903004 Cr-Commit-Position: refs/heads/master@{#466369}

8a9c234 Reland: Normalize shipping address for merchant on Desktop.
.../android/personal_data_manager_android.h | 4 +-
.../payments/chrome_payment_request_delegate.cc | 12 ++-
.../payments/chrome_payment_request_delegate.h | 9 +-
...payment_request_payment_response_browsertest.cc | 2 +-
...g_address_editor_view_controller_browsertest.cc | 2 +-
.../test_chrome_payment_request_delegate.cc | 2 +-
.../test_chrome_payment_request_delegate.h | 4 +-
components/autofill/core/browser/address.cc | 8 +-
.../autofill/core/browser/autofill_data_util.cc | 12 +++
.../autofill/core/browser/autofill_data_util.h | 4 +
.../core/browser/autofill_data_util_unittest.cc | 41 +++++++++
.../payments/content/payment_request_state.cc | 4 +-
.../payments/content/payment_response_helper.cc | 99 +++++++++++++++-------
.../payments/content/payment_response_helper.h | 29 +++++--
.../content/payment_response_helper_unittest.cc | 51 +++++++++--
components/payments/core/BUILD.gn | 5 +-
components/payments/core/address_normalizer.h | 43 ++--------
...ss_normalizer.cc => address_normalizer_impl.cc} | 16 ++--
components/payments/core/address_normalizer_impl.h | 62 ++++++++++++++
...test.cc => address_normalizer_impl_unittest.cc} | 12 +--
.../payments/core/payment_request_delegate.h | 7 +-
21 files changed, 317 insertions(+), 111 deletions(-)

Upstream: git.chromium.org


  • Share