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

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

Issue 2816303003: Revert of [Payments] move //components/payments/content/*.mojom files to //components/payments/mojom (Closed)
Patch Set: 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 <utility> 7 #include <utility>
8 8
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "components/autofill/core/browser/autofill_profile.h" 11 #include "components/autofill/core/browser/autofill_profile.h"
12 #include "components/autofill/core/browser/autofill_test_utils.h" 12 #include "components/autofill/core/browser/autofill_test_utils.h"
13 #include "components/autofill/core/browser/credit_card.h" 13 #include "components/autofill/core/browser/credit_card.h"
14 #include "components/autofill/core/browser/test_personal_data_manager.h" 14 #include "components/autofill/core/browser/test_personal_data_manager.h"
15 #include "components/payments/content/payment_request.mojom.h"
15 #include "components/payments/content/payment_request_spec.h" 16 #include "components/payments/content/payment_request_spec.h"
16 #include "components/payments/core/autofill_payment_instrument.h" 17 #include "components/payments/core/autofill_payment_instrument.h"
17 #include "components/payments/core/payment_request_delegate.h" 18 #include "components/payments/core/payment_request_delegate.h"
18 #include "components/payments/mojom/payment_request.mojom.h"
19 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
20 20
21 namespace payments { 21 namespace payments {
22 22
23 class FakePaymentRequestDelegate : public PaymentRequestDelegate { 23 class FakePaymentRequestDelegate : public PaymentRequestDelegate {
24 public: 24 public:
25 FakePaymentRequestDelegate( 25 FakePaymentRequestDelegate(
26 autofill::PersonalDataManager* personal_data_manager) 26 autofill::PersonalDataManager* personal_data_manager)
27 : personal_data_manager_(personal_data_manager), locale_("en-US") {} 27 : personal_data_manager_(personal_data_manager), locale_("en-US") {}
28 void ShowDialog(PaymentRequest* request) override {} 28 void ShowDialog(PaymentRequest* request) override {}
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 PaymentResponseHelper helper("en-US", spec(), test_instrument(), 260 PaymentResponseHelper helper("en-US", spec(), test_instrument(),
261 test_address(), test_address(), this); 261 test_address(), test_address(), this);
262 262
263 // Check that the name was set, but not the other values. 263 // Check that the name was set, but not the other values.
264 EXPECT_EQ("John H. Doe", response()->payer_name.value()); 264 EXPECT_EQ("John H. Doe", response()->payer_name.value());
265 EXPECT_FALSE(response()->payer_phone.has_value()); 265 EXPECT_FALSE(response()->payer_phone.has_value());
266 EXPECT_FALSE(response()->payer_email.has_value()); 266 EXPECT_FALSE(response()->payer_email.has_value());
267 } 267 }
268 268
269 } // namespace payments 269 } // 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