Index: content/browser/background_fetch/background_fetch_service_unittest.cc |
diff --git a/content/browser/background_fetch/background_fetch_service_unittest.cc b/content/browser/background_fetch/background_fetch_service_unittest.cc |
index 46b495da2571d48a36e41af44400be2cc7d9d564..4f405523182447f70c0cb4402c9a665650df1352 100644 |
--- a/content/browser/background_fetch/background_fetch_service_unittest.cc |
+++ b/content/browser/background_fetch/background_fetch_service_unittest.cc |
@@ -121,12 +121,14 @@ class BackgroundFetchServiceTest : public BackgroundFetchTestBase { |
void SetUp() override { |
BackgroundFetchTestBase::SetUp(); |
+ // StoragePartition creates its own BackgroundFetchContext, but this test |
+ // doesn't use that since it has the wrong ServiceWorkerContextWrapper; this |
+ // test just uses the StoragePartition to get a URLRequestContext. |
StoragePartitionImpl* storage_partition = |
static_cast<StoragePartitionImpl*>( |
BrowserContext::GetDefaultStoragePartition(browser_context())); |
- |
context_ = new BackgroundFetchContext( |
- browser_context(), storage_partition, |
+ browser_context(), |
make_scoped_refptr(embedded_worker_test_helper()->context_wrapper())); |
context_->InitializeOnIOThread( |
make_scoped_refptr(storage_partition->GetURLRequestContext())); |
@@ -140,7 +142,6 @@ class BackgroundFetchServiceTest : public BackgroundFetchTestBase { |
service_.reset(); |
- context_->Shutdown(); |
context_ = nullptr; |
// Give pending shutdown operations a chance to finish. |