OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "content/browser/payments/payment_app_content_unittest_base.h" | 5 #include "content/browser/payments/payment_app_content_unittest_base.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 last_sw_registration_id_ = version->registration_id(); | 63 last_sw_registration_id_ = version->registration_id(); |
64 last_sw_scope_ = scope; | 64 last_sw_scope_ = scope; |
65 EmbeddedWorkerTestHelper::OnStartWorker( | 65 EmbeddedWorkerTestHelper::OnStartWorker( |
66 embedded_worker_id, service_worker_version_id, scope, script_url, | 66 embedded_worker_id, service_worker_version_id, scope, script_url, |
67 pause_after_download, std::move(request), std::move(instance_host)); | 67 pause_after_download, std::move(request), std::move(instance_host)); |
68 } | 68 } |
69 | 69 |
70 void OnPaymentRequestEvent( | 70 void OnPaymentRequestEvent( |
71 payments::mojom::PaymentAppRequestPtr app_request, | 71 payments::mojom::PaymentAppRequestPtr app_request, |
72 payments::mojom::PaymentAppResponseCallbackPtr response_callback, | 72 payments::mojom::PaymentAppResponseCallbackPtr response_callback, |
73 const mojom::ServiceWorkerEventDispatcher:: | 73 mojom::ServiceWorkerEventDispatcher::DispatchPaymentRequestEventCallback |
74 DispatchPaymentRequestEventCallback& callback) override { | 74 callback) override { |
75 EmbeddedWorkerTestHelper::OnPaymentRequestEvent( | 75 EmbeddedWorkerTestHelper::OnPaymentRequestEvent( |
76 std::move(app_request), std::move(response_callback), callback); | 76 std::move(app_request), std::move(response_callback), |
| 77 std::move(callback)); |
77 } | 78 } |
78 | 79 |
79 int64_t last_sw_registration_id_; | 80 int64_t last_sw_registration_id_; |
80 GURL last_sw_scope_; | 81 GURL last_sw_scope_; |
81 | 82 |
82 private: | 83 private: |
83 DISALLOW_COPY_AND_ASSIGN(PaymentAppForWorkerTestHelper); | 84 DISALLOW_COPY_AND_ASSIGN(PaymentAppForWorkerTestHelper); |
84 }; | 85 }; |
85 | 86 |
86 PaymentAppContentUnitTestBase::PaymentAppContentUnitTestBase() | 87 PaymentAppContentUnitTestBase::PaymentAppContentUnitTestBase() |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 StoragePartitionImpl* PaymentAppContentUnitTestBase::storage_partition() { | 206 StoragePartitionImpl* PaymentAppContentUnitTestBase::storage_partition() { |
206 return static_cast<StoragePartitionImpl*>( | 207 return static_cast<StoragePartitionImpl*>( |
207 BrowserContext::GetDefaultStoragePartition(browser_context())); | 208 BrowserContext::GetDefaultStoragePartition(browser_context())); |
208 } | 209 } |
209 | 210 |
210 PaymentAppContextImpl* PaymentAppContentUnitTestBase::payment_app_context() { | 211 PaymentAppContextImpl* PaymentAppContentUnitTestBase::payment_app_context() { |
211 return storage_partition()->GetPaymentAppContext(); | 212 return storage_partition()->GetPaymentAppContext(); |
212 } | 213 } |
213 | 214 |
214 } // namespace content | 215 } // namespace content |
OLD | NEW |