Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(939)

Unified Diff: content/browser/payments/payment_app_content_unittest_base.cc

Issue 2609103002: PaymentApp: Add PaymentAppProvider class. (Closed)
Patch Set: PaymentApp: Add PaymentAppProvider class. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/payments/payment_app_content_unittest_base.cc
diff --git a/content/browser/payments/payment_app_content_unittest_base.cc b/content/browser/payments/payment_app_content_unittest_base.cc
index 939ac9b483b389809d23b8c9b87c16a68b2ab25d..0281afd779b255d4c9c52d2d7616d424c453d83b 100644
--- a/content/browser/payments/payment_app_content_unittest_base.cc
+++ b/content/browser/payments/payment_app_content_unittest_base.cc
@@ -45,21 +45,20 @@ PaymentAppContentUnitTestBase::PaymentAppContentUnitTestBase()
: thread_bundle_(
new TestBrowserThreadBundle(TestBrowserThreadBundle::IO_MAINLOOP)),
embedded_worker_helper_(new EmbeddedWorkerTestHelper(base::FilePath())),
- storage_partition_impl_(
- new StoragePartitionImpl(
- embedded_worker_helper_->browser_context(), base::FilePath(),
- nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
- nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr)),
- payment_app_context_(new PaymentAppContextImpl()) {
+ storage_partition_impl_(static_cast<StoragePartitionImpl*>(
+ BrowserContext::GetDefaultStoragePartition(browser_context()))),
+ payment_app_context_(storage_partition_impl_->GetPaymentAppContext()) {
embedded_worker_helper_->context_wrapper()->set_storage_partition(
- storage_partition_impl_.get());
+ storage_partition_impl_);
payment_app_context_->Init(embedded_worker_helper_->context_wrapper());
base::RunLoop().RunUntilIdle();
}
-PaymentAppContentUnitTestBase::~PaymentAppContentUnitTestBase() {
- payment_app_context_->Shutdown();
- base::RunLoop().RunUntilIdle();
+PaymentAppContentUnitTestBase::~PaymentAppContentUnitTestBase() {}
+
+BrowserContext* PaymentAppContentUnitTestBase::browser_context() {
+ DCHECK(embedded_worker_helper_);
+ return embedded_worker_helper_->browser_context();
}
PaymentAppManager* PaymentAppContentUnitTestBase::CreatePaymentAppManager(

Powered by Google App Engine
This is Rietveld 408576698