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

Side by Side Diff: ios/chrome/browser/payments/test_payment_request.h

Issue 2958873002: [Payment Request] Unit tests for incomplete shipping/billing address selection (Closed)
Patch Set: Created 3 years, 5 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
« no previous file with comments | « no previous file | ios/chrome/browser/payments/test_payment_request.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef IOS_CHROME_BROWSER_PAYMENTS_TEST_PAYMENT_REQUEST_H_ 5 #ifndef IOS_CHROME_BROWSER_PAYMENTS_TEST_PAYMENT_REQUEST_H_
6 #define IOS_CHROME_BROWSER_PAYMENTS_TEST_PAYMENT_REQUEST_H_ 6 #define IOS_CHROME_BROWSER_PAYMENTS_TEST_PAYMENT_REQUEST_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ios/chrome/browser/payments/payment_request.h" 9 #include "ios/chrome/browser/payments/payment_request.h"
10 10
(...skipping 10 matching lines...) Expand all
21 class PaymentRequest; 21 class PaymentRequest;
22 class PaymentShippingOption; 22 class PaymentShippingOption;
23 } // namespace web 23 } // namespace web
24 24
25 // PaymentRequest for use in tests. 25 // PaymentRequest for use in tests.
26 class TestPaymentRequest : public PaymentRequest { 26 class TestPaymentRequest : public PaymentRequest {
27 public: 27 public:
28 // |personal_data_manager| should not be null and should outlive this object. 28 // |personal_data_manager| should not be null and should outlive this object.
29 TestPaymentRequest(const web::PaymentRequest& web_payment_request, 29 TestPaymentRequest(const web::PaymentRequest& web_payment_request,
30 autofill::PersonalDataManager* personal_data_manager) 30 autofill::PersonalDataManager* personal_data_manager)
31 : PaymentRequest(web_payment_request, personal_data_manager) {} 31 : PaymentRequest(web_payment_request, personal_data_manager),
32 region_data_loader_(nullptr),
33 profile_comparator_(nullptr) {}
32 34
33 ~TestPaymentRequest() override {} 35 ~TestPaymentRequest() override {}
34 36
35 void SetRegionDataLoader(autofill::RegionDataLoader* region_data_loader) { 37 void SetRegionDataLoader(autofill::RegionDataLoader* region_data_loader) {
36 region_data_loader_ = region_data_loader; 38 region_data_loader_ = region_data_loader;
37 } 39 }
38 40
39 void SetProfileComparator( 41 void SetProfileComparator(
40 payments::PaymentsProfileComparator* profile_comparator) { 42 payments::PaymentsProfileComparator* profile_comparator) {
41 profile_comparator_ = profile_comparator; 43 profile_comparator_ = profile_comparator;
(...skipping 25 matching lines...) Expand all
67 // Not owned and must outlive this object. 69 // Not owned and must outlive this object.
68 autofill::RegionDataLoader* region_data_loader_; 70 autofill::RegionDataLoader* region_data_loader_;
69 71
70 // Not owned and must outlive this object. 72 // Not owned and must outlive this object.
71 payments::PaymentsProfileComparator* profile_comparator_; 73 payments::PaymentsProfileComparator* profile_comparator_;
72 74
73 DISALLOW_COPY_AND_ASSIGN(TestPaymentRequest); 75 DISALLOW_COPY_AND_ASSIGN(TestPaymentRequest);
74 }; 76 };
75 77
76 #endif // IOS_CHROME_BROWSER_PAYMENTS_TEST_PAYMENT_REQUEST_H_ 78 #endif // IOS_CHROME_BROWSER_PAYMENTS_TEST_PAYMENT_REQUEST_H_
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/payments/test_payment_request.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698