| Index: content/browser/service_worker/foreign_fetch_request_handler_unittest.cc
|
| diff --git a/content/browser/service_worker/foreign_fetch_request_handler_unittest.cc b/content/browser/service_worker/foreign_fetch_request_handler_unittest.cc
|
| index 9ea842496c06fe23221eb6dd2cfbe7fdcab7b891..abbf3000d7eb21360d168d12e1ad12268d0a9ea2 100644
|
| --- a/content/browser/service_worker/foreign_fetch_request_handler_unittest.cc
|
| +++ b/content/browser/service_worker/foreign_fetch_request_handler_unittest.cc
|
| @@ -146,7 +146,7 @@ class ForeignFetchRequestHandlerTest : public testing::Test {
|
| request_->set_initiator(url::Origin(GURL(initiator)));
|
| ForeignFetchRequestHandler::InitializeHandler(
|
| request_.get(), context_wrapper(), &blob_storage_context_,
|
| - helper_->mock_render_process_id(), kMockProviderId,
|
| + helper_->mock_render_process_id(), provider_host_->provider_id(),
|
| ServiceWorkerMode::ALL, FETCH_REQUEST_MODE_CORS,
|
| FETCH_CREDENTIALS_MODE_OMIT, FetchRedirectMode::FOLLOW_MODE,
|
| resource_type, REQUEST_CONTEXT_TYPE_FETCH,
|
| @@ -171,17 +171,6 @@ class ForeignFetchRequestHandlerTest : public testing::Test {
|
| }
|
|
|
| void CreateServiceWorkerTypeProviderHost() {
|
| - remote_endpoints_.emplace_back();
|
| - std::unique_ptr<ServiceWorkerProviderHost> host =
|
| - CreateProviderHostForServiceWorkerContext(
|
| - helper_->mock_render_process_id(), kMockProviderId,
|
| - true /* is_parent_frame_secure */, helper_->context()->AsWeakPtr(),
|
| - &remote_endpoints_.back());
|
| - EXPECT_FALSE(
|
| - context()->GetProviderHost(host->process_id(), host->provider_id()));
|
| - provider_host_ = host->AsWeakPtr();
|
| - context()->AddProviderHost(std::move(host));
|
| -
|
| // Create another worker whose requests will be intercepted by the foreign
|
| // fetch event handler.
|
| scoped_refptr<ServiceWorkerRegistration> registration =
|
| @@ -204,7 +193,16 @@ class ForeignFetchRequestHandlerTest : public testing::Test {
|
| base::Bind(&ServiceWorkerUtils::NoOpStatusCallback));
|
| base::RunLoop().RunUntilIdle();
|
|
|
| - provider_host_->running_hosted_version_ = version;
|
| + remote_endpoints_.emplace_back();
|
| + std::unique_ptr<ServiceWorkerProviderHost> host =
|
| + CreateProviderHostForServiceWorkerContext(
|
| + helper_->mock_render_process_id(),
|
| + true /* is_parent_frame_secure */, version.get(),
|
| + helper_->context()->AsWeakPtr(), &remote_endpoints_.back());
|
| + EXPECT_FALSE(
|
| + context()->GetProviderHost(host->process_id(), host->provider_id()));
|
| + provider_host_ = host->AsWeakPtr();
|
| + context()->AddProviderHost(std::move(host));
|
| }
|
|
|
| private:
|
|
|