| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 ServiceWorkerVersion* version = | 62 ServiceWorkerVersion* version = |
| 63 context()->GetLiveVersion(service_worker_version_id); | 63 context()->GetLiveVersion(service_worker_version_id); |
| 64 last_sw_registration_id_ = version->registration_id(); | 64 last_sw_registration_id_ = version->registration_id(); |
| 65 last_sw_scope_ = scope; | 65 last_sw_scope_ = scope; |
| 66 EmbeddedWorkerTestHelper::OnStartWorker( | 66 EmbeddedWorkerTestHelper::OnStartWorker( |
| 67 embedded_worker_id, service_worker_version_id, scope, script_url, | 67 embedded_worker_id, service_worker_version_id, scope, script_url, |
| 68 pause_after_download, std::move(request), std::move(instance_host)); | 68 pause_after_download, std::move(request), std::move(instance_host)); |
| 69 } | 69 } |
| 70 | 70 |
| 71 void OnPaymentRequestEvent( | 71 void OnPaymentRequestEvent( |
| 72 payments::mojom::PaymentAppRequestPtr app_request, | 72 payments::mojom::PaymentRequestEventDataPtr event_data, |
| 73 payments::mojom::PaymentAppResponseCallbackPtr response_callback, | 73 payments::mojom::PaymentAppResponseCallbackPtr response_callback, |
| 74 mojom::ServiceWorkerEventDispatcher::DispatchPaymentRequestEventCallback | 74 mojom::ServiceWorkerEventDispatcher::DispatchPaymentRequestEventCallback |
| 75 callback) override { | 75 callback) override { |
| 76 EmbeddedWorkerTestHelper::OnPaymentRequestEvent( | 76 EmbeddedWorkerTestHelper::OnPaymentRequestEvent( |
| 77 std::move(app_request), std::move(response_callback), | 77 std::move(event_data), std::move(response_callback), |
| 78 std::move(callback)); | 78 std::move(callback)); |
| 79 } | 79 } |
| 80 | 80 |
| 81 int64_t last_sw_registration_id_; | 81 int64_t last_sw_registration_id_; |
| 82 GURL last_sw_scope_; | 82 GURL last_sw_scope_; |
| 83 | 83 |
| 84 private: | 84 private: |
| 85 DISALLOW_COPY_AND_ASSIGN(PaymentAppForWorkerTestHelper); | 85 DISALLOW_COPY_AND_ASSIGN(PaymentAppForWorkerTestHelper); |
| 86 }; | 86 }; |
| 87 | 87 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 StoragePartitionImpl* PaymentAppContentUnitTestBase::storage_partition() { | 172 StoragePartitionImpl* PaymentAppContentUnitTestBase::storage_partition() { |
| 173 return static_cast<StoragePartitionImpl*>( | 173 return static_cast<StoragePartitionImpl*>( |
| 174 BrowserContext::GetDefaultStoragePartition(browser_context())); | 174 BrowserContext::GetDefaultStoragePartition(browser_context())); |
| 175 } | 175 } |
| 176 | 176 |
| 177 PaymentAppContextImpl* PaymentAppContentUnitTestBase::payment_app_context() { | 177 PaymentAppContextImpl* PaymentAppContentUnitTestBase::payment_app_context() { |
| 178 return storage_partition()->GetPaymentAppContext(); | 178 return storage_partition()->GetPaymentAppContext(); |
| 179 } | 179 } |
| 180 | 180 |
| 181 } // namespace content | 181 } // namespace content |
| OLD | NEW |