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 22 matching lines...) Expand all Loading... |
33 *called = true; | 33 *called = true; |
34 } | 34 } |
35 | 35 |
36 } // namespace | 36 } // namespace |
37 | 37 |
38 PaymentAppContentUnitTestBase::PaymentAppContentUnitTestBase() | 38 PaymentAppContentUnitTestBase::PaymentAppContentUnitTestBase() |
39 : thread_bundle_( | 39 : thread_bundle_( |
40 new TestBrowserThreadBundle(TestBrowserThreadBundle::IO_MAINLOOP)), | 40 new TestBrowserThreadBundle(TestBrowserThreadBundle::IO_MAINLOOP)), |
41 embedded_worker_helper_(new EmbeddedWorkerTestHelper(base::FilePath())), | 41 embedded_worker_helper_(new EmbeddedWorkerTestHelper(base::FilePath())), |
42 storage_partition_impl_( | 42 storage_partition_impl_( |
43 new StoragePartitionImpl(embedded_worker_helper_->browser_context(), | 43 new StoragePartitionImpl( |
44 base::FilePath(), | 44 embedded_worker_helper_->browser_context(), base::FilePath(), |
45 nullptr)), | 45 nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, |
| 46 nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr)), |
46 payment_app_context_(new PaymentAppContextImpl()) { | 47 payment_app_context_(new PaymentAppContextImpl()) { |
47 embedded_worker_helper_->context_wrapper()->set_storage_partition( | 48 embedded_worker_helper_->context_wrapper()->set_storage_partition( |
48 storage_partition_impl_.get()); | 49 storage_partition_impl_.get()); |
49 payment_app_context_->Init(embedded_worker_helper_->context_wrapper()); | 50 payment_app_context_->Init(embedded_worker_helper_->context_wrapper()); |
50 base::RunLoop().RunUntilIdle(); | 51 base::RunLoop().RunUntilIdle(); |
51 } | 52 } |
52 | 53 |
53 PaymentAppContentUnitTestBase::~PaymentAppContentUnitTestBase() { | 54 PaymentAppContentUnitTestBase::~PaymentAppContentUnitTestBase() { |
54 payment_app_context_->Shutdown(); | 55 payment_app_context_->Shutdown(); |
55 base::RunLoop().RunUntilIdle(); | 56 base::RunLoop().RunUntilIdle(); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 void PaymentAppContentUnitTestBase::GetManifest( | 110 void PaymentAppContentUnitTestBase::GetManifest( |
110 PaymentAppManager* manager, | 111 PaymentAppManager* manager, |
111 const std::string& scope, | 112 const std::string& scope, |
112 const PaymentAppManager::GetManifestCallback& callback) { | 113 const PaymentAppManager::GetManifestCallback& callback) { |
113 ASSERT_NE(nullptr, manager); | 114 ASSERT_NE(nullptr, manager); |
114 manager->GetManifest(scope, callback); | 115 manager->GetManifest(scope, callback); |
115 base::RunLoop().RunUntilIdle(); | 116 base::RunLoop().RunUntilIdle(); |
116 } | 117 } |
117 | 118 |
118 } // namespace content | 119 } // namespace content |
OLD | NEW |