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

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

Issue 2829903004: Reland: Normalize shipping address for merchant on Desktop. (Closed)
Patch Set: Make android code use the new impl 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 SetFieldTestValue(autofill::ServerFieldType type) { 55 void SetFieldTestValue(autofill::ServerFieldType type) {
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 data_loop.Run(); 369 data_loop.Run();
370 370
371 ASSERT_EQ(1UL, personal_data_manager->GetProfiles().size()); 371 ASSERT_EQ(1UL, personal_data_manager->GetProfiles().size());
372 autofill::AutofillProfile* profile = personal_data_manager->GetProfiles()[0]; 372 autofill::AutofillProfile* profile = personal_data_manager->GetProfiles()[0];
373 DCHECK(profile); 373 DCHECK(profile);
374 EXPECT_EQ(base::ASCIIToUTF16("any state"), 374 EXPECT_EQ(base::ASCIIToUTF16("any state"),
375 profile->GetRawInfo(autofill::ADDRESS_HOME_STATE)); 375 profile->GetRawInfo(autofill::ADDRESS_HOME_STATE));
376 } 376 }
377 377
378 } // namespace payments 378 } // namespace payments
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698