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

Unified Diff: components/payments/core/test_payment_request_delegate.h

Issue 2836353002: [Payments] Normalize shipping address change on Desktop (Closed)
Patch Set: Addressed Math's comments 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 side-by-side diff with in-line comments
Download patch
Index: components/payments/core/test_payment_request_delegate.h
diff --git a/components/payments/core/test_payment_request_delegate.h b/components/payments/core/test_payment_request_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..a38a6067051a354a3051430c67a22135d336c699
--- /dev/null
+++ b/components/payments/core/test_payment_request_delegate.h
@@ -0,0 +1,51 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_PAYMENTS_CORE_TEST_PAYMENT_REQUEST_DELEGATE_H_
+#define COMPONENTS_PAYMENTS_CORE_TEST_PAYMENT_REQUEST_DELEGATE_H_
+
+#include "components/payments/core/payment_request_delegate.h"
+#include "components/payments/core/test_address_normalizer.h"
+
+namespace payments {
+
+class TestPaymentRequestDelegate : public PaymentRequestDelegate {
+ public:
+ TestPaymentRequestDelegate(
+ autofill::PersonalDataManager* personal_data_manager);
+ ~TestPaymentRequestDelegate() override;
+
+ // PaymentRequestDelegate
+ void ShowDialog(PaymentRequest* request) override {}
+ void CloseDialog() override {}
+ void ShowErrorMessage() override {}
+ autofill::PersonalDataManager* GetPersonalDataManager() override;
+ const std::string& GetApplicationLocale() const override;
+ bool IsIncognito() const override;
+ bool IsSslCertificateValid() override;
+ const GURL& GetLastCommittedURL() const override;
+ void DoFullCardRequest(
+ const autofill::CreditCard& credit_card,
+ base::WeakPtr<autofill::payments::FullCardRequest::ResultDelegate>
+ result_delegate) override;
+ AddressNormalizer* GetAddressNormalizer() override;
+ autofill::RegionDataLoader* GetRegionDataLoader() override;
+
+ TestAddressNormalizer* GetTestAddressNormalizer();
+
+ private:
+ autofill::PersonalDataManager* personal_data_manager_;
+ std::string locale_;
+ const GURL last_committed_url_;
+ TestAddressNormalizer address_normalizer_;
+
+ autofill::CreditCard full_card_request_card_;
+ base::WeakPtr<autofill::payments::FullCardRequest::ResultDelegate>
+ full_card_result_delegate_;
+ DISALLOW_COPY_AND_ASSIGN(TestPaymentRequestDelegate);
+};
+
+} // namespace payments
+
+#endif // COMPONENTS_PAYMENTS_CORE_TEST_PAYMENT_REQUEST_DELEGATE_H_
« no previous file with comments | « components/payments/core/test_address_normalizer.cc ('k') | components/payments/core/test_payment_request_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698