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

Side by Side Diff: components/payments/content/payment_response_helper_unittest.cc

Issue 2811593009: [Payments] move //components/payments/content/*.mojom files to //components/payments/mojom (Closed)
Patch Set: Reland after updating chrome_content_browser_client.cc to fix android build 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 "components/payments/content/payment_response_helper.h" 5 #include "components/payments/content/payment_response_helper.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
14 #include "components/autofill/core/browser/autofill_profile.h" 14 #include "components/autofill/core/browser/autofill_profile.h"
15 #include "components/autofill/core/browser/autofill_test_utils.h" 15 #include "components/autofill/core/browser/autofill_test_utils.h"
16 #include "components/autofill/core/browser/credit_card.h" 16 #include "components/autofill/core/browser/credit_card.h"
17 #include "components/autofill/core/browser/test_personal_data_manager.h" 17 #include "components/autofill/core/browser/test_personal_data_manager.h"
18 #include "components/payments/content/payment_request.mojom.h"
19 #include "components/payments/content/payment_request_spec.h" 18 #include "components/payments/content/payment_request_spec.h"
20 #include "components/payments/core/autofill_payment_instrument.h" 19 #include "components/payments/core/autofill_payment_instrument.h"
21 #include "components/payments/core/payment_request_delegate.h" 20 #include "components/payments/core/payment_request_delegate.h"
21 #include "components/payments/mojom/payment_request.mojom.h"
22 #include "testing/gtest/include/gtest/gtest.h" 22 #include "testing/gtest/include/gtest/gtest.h"
23 23
24 namespace payments { 24 namespace payments {
25 25
26 class FakePaymentRequestDelegate : public PaymentRequestDelegate { 26 class FakePaymentRequestDelegate : public PaymentRequestDelegate {
27 public: 27 public:
28 FakePaymentRequestDelegate( 28 FakePaymentRequestDelegate(
29 autofill::PersonalDataManager* personal_data_manager) 29 autofill::PersonalDataManager* personal_data_manager)
30 : personal_data_manager_(personal_data_manager), locale_("en-US") {} 30 : personal_data_manager_(personal_data_manager), locale_("en-US") {}
31 void ShowDialog(PaymentRequest* request) override {} 31 void ShowDialog(PaymentRequest* request) override {}
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 RecreateSpecWithOptions(std::move(options)); 291 RecreateSpecWithOptions(std::move(options));
292 292
293 PaymentResponseHelper helper("en-US", spec(), test_instrument(), 293 PaymentResponseHelper helper("en-US", spec(), test_instrument(),
294 test_address(), test_address(), this); 294 test_address(), test_address(), this);
295 295
296 // Check that the phone was formatted. 296 // Check that the phone was formatted.
297 EXPECT_EQ("+15151231234", response()->payer_phone.value()); 297 EXPECT_EQ("+15151231234", response()->payer_phone.value());
298 } 298 }
299 299
300 } // namespace payments 300 } // namespace payments
OLDNEW
« no previous file with comments | « components/payments/content/payment_response_helper.h ('k') | components/payments/content/payments_validators.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698