OLD | NEW |
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_request_state.h" | 5 #include "components/payments/content/payment_request_state.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/mojom/payment_request.mojom.h" | |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 | 18 |
19 namespace payments { | 19 namespace payments { |
20 | 20 |
21 class PaymentRequestStateTest : public testing::Test, | 21 class PaymentRequestStateTest : public testing::Test, |
22 public PaymentRequestState::Observer, | 22 public PaymentRequestState::Observer, |
23 public PaymentRequestState::Delegate { | 23 public PaymentRequestState::Delegate { |
24 protected: | 24 protected: |
25 PaymentRequestStateTest() | 25 PaymentRequestStateTest() |
26 : num_on_selected_information_changed_called_(0), | 26 : num_on_selected_information_changed_called_(0), |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 EXPECT_FALSE(state()->is_ready_to_pay()); | 241 EXPECT_FALSE(state()->is_ready_to_pay()); |
242 | 242 |
243 state()->SetSelectedContactProfile(test_address()); | 243 state()->SetSelectedContactProfile(test_address()); |
244 EXPECT_EQ(2, num_on_selected_information_changed_called()); | 244 EXPECT_EQ(2, num_on_selected_information_changed_called()); |
245 | 245 |
246 // Ready to pay! | 246 // Ready to pay! |
247 EXPECT_TRUE(state()->is_ready_to_pay()); | 247 EXPECT_TRUE(state()->is_ready_to_pay()); |
248 } | 248 } |
249 | 249 |
250 } // namespace payments | 250 } // namespace payments |
OLD | NEW |