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 version->SetMainScriptHttpResponseInfo( | 63 version->SetMainScriptHttpResponseInfo( |
64 EmbeddedWorkerTestHelper::CreateHttpResponseInfo()); | 64 EmbeddedWorkerTestHelper::CreateHttpResponseInfo()); |
65 last_sw_registration_id_ = version->registration_id(); | 65 last_sw_registration_id_ = version->registration_id(); |
66 last_sw_scope_ = scope; | 66 last_sw_scope_ = scope; |
67 EmbeddedWorkerTestHelper::OnStartWorker( | 67 EmbeddedWorkerTestHelper::OnStartWorker( |
68 embedded_worker_id, service_worker_version_id, scope, script_url, | 68 embedded_worker_id, service_worker_version_id, scope, script_url, |
69 pause_after_download, std::move(request)); | 69 pause_after_download, std::move(request)); |
70 } | 70 } |
71 | 71 |
72 void OnPaymentRequestEvent( | 72 void OnPaymentRequestEvent( |
73 payments::mojom::PaymentAppRequestDataPtr data, | 73 payments::mojom::PaymentAppRequestPtr app_request, |
74 const mojom::ServiceWorkerEventDispatcher:: | 74 const mojom::ServiceWorkerEventDispatcher:: |
75 DispatchPaymentRequestEventCallback& callback) override { | 75 DispatchPaymentRequestEventCallback& callback) override { |
76 ASSERT_FALSE(was_dispatched_); | 76 ASSERT_FALSE(was_dispatched_); |
77 EmbeddedWorkerTestHelper::OnPaymentRequestEvent(std::move(data), callback); | 77 EmbeddedWorkerTestHelper::OnPaymentRequestEvent(std::move(app_request), |
| 78 callback); |
78 was_dispatched_ = true; | 79 was_dispatched_ = true; |
79 } | 80 } |
80 | 81 |
81 bool was_dispatched_; | 82 bool was_dispatched_; |
82 int64_t last_sw_registration_id_; | 83 int64_t last_sw_registration_id_; |
83 GURL last_sw_scope_; | 84 GURL last_sw_scope_; |
84 | 85 |
85 private: | 86 private: |
86 DISALLOW_COPY_AND_ASSIGN(PaymentAppForWorkerTestHelper); | 87 DISALLOW_COPY_AND_ASSIGN(PaymentAppForWorkerTestHelper); |
87 }; | 88 }; |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 StoragePartitionImpl* PaymentAppContentUnitTestBase::storage_partition() { | 217 StoragePartitionImpl* PaymentAppContentUnitTestBase::storage_partition() { |
217 return static_cast<StoragePartitionImpl*>( | 218 return static_cast<StoragePartitionImpl*>( |
218 BrowserContext::GetDefaultStoragePartition(browser_context())); | 219 BrowserContext::GetDefaultStoragePartition(browser_context())); |
219 } | 220 } |
220 | 221 |
221 PaymentAppContextImpl* PaymentAppContentUnitTestBase::payment_app_context() { | 222 PaymentAppContextImpl* PaymentAppContentUnitTestBase::payment_app_context() { |
222 return storage_partition()->GetPaymentAppContext(); | 223 return storage_partition()->GetPaymentAppContext(); |
223 } | 224 } |
224 | 225 |
225 } // namespace content | 226 } // namespace content |
OLD | NEW |