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

Side by Side Diff: chrome/browser/ui/views/payments/shipping_address_editor_view_controller_browsertest.cc

Issue 2829503002: [Payments] Normalize Shipping Address sent to merchant on Desktop. (Closed)
Patch Set: Be more strict on country code Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/ui/views/payments/payment_request_browsertest_base.h" 9 #include "chrome/browser/ui/views/payments/payment_request_browsertest_base.h"
10 #include "chrome/browser/ui/views/payments/payment_request_dialog_view_ids.h" 10 #include "chrome/browser/ui/views/payments/payment_request_dialog_view_ids.h"
(...skipping 24 matching lines...) Expand all
35 : public PaymentRequestBrowserTestBase, 35 : public PaymentRequestBrowserTestBase,
36 public TestChromePaymentRequestDelegate::AddressInputProvider { 36 public TestChromePaymentRequestDelegate::AddressInputProvider {
37 protected: 37 protected:
38 PaymentRequestShippingAddressEditorTest() 38 PaymentRequestShippingAddressEditorTest()
39 : PaymentRequestBrowserTestBase( 39 : PaymentRequestBrowserTestBase(
40 "/payment_request_dynamic_shipping_test.html") {} 40 "/payment_request_dynamic_shipping_test.html") {}
41 41
42 void EnableAddressInputOverride() { SetAddressInputOverride(this); } 42 void EnableAddressInputOverride() { SetAddressInputOverride(this); }
43 43
44 // TestChromePaymentRequestDelegate::AddressInputProvider. 44 // TestChromePaymentRequestDelegate::AddressInputProvider.
45 std::unique_ptr<const ::i18n::addressinput::Source> GetAddressInputSource() 45 std::unique_ptr<::i18n::addressinput::Source> GetAddressInputSource()
46 override { 46 override {
47 return base::MakeUnique<TestSource>(address_input_override_data_); 47 return base::MakeUnique<TestSource>(address_input_override_data_);
48 } 48 }
49 49
50 std::unique_ptr<::i18n::addressinput::Storage> GetAddressInputStorage() 50 std::unique_ptr<::i18n::addressinput::Storage> GetAddressInputStorage()
51 override { 51 override {
52 return base::MakeUnique<::i18n::addressinput::NullStorage>(); 52 return base::MakeUnique<::i18n::addressinput::NullStorage>();
53 } 53 }
54 54
55 void SetRequiredFields() { 55 void SetRequiredFields() {
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 data_loop.Run(); 289 data_loop.Run();
290 290
291 ASSERT_EQ(1UL, personal_data_manager->GetProfiles().size()); 291 ASSERT_EQ(1UL, personal_data_manager->GetProfiles().size());
292 autofill::AutofillProfile* profile = personal_data_manager->GetProfiles()[0]; 292 autofill::AutofillProfile* profile = personal_data_manager->GetProfiles()[0];
293 DCHECK(profile); 293 DCHECK(profile);
294 EXPECT_EQ(base::ASCIIToUTF16("any state"), 294 EXPECT_EQ(base::ASCIIToUTF16("any state"),
295 profile->GetRawInfo(autofill::ADDRESS_HOME_STATE)); 295 profile->GetRawInfo(autofill::ADDRESS_HOME_STATE));
296 } 296 }
297 297
298 } // namespace payments 298 } // namespace payments
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698