Index: content/browser/service_worker/link_header_support_unittest.cc |
diff --git a/content/browser/service_worker/link_header_support_unittest.cc b/content/browser/service_worker/link_header_support_unittest.cc |
index e77c68d9517028742911f3d5173f06adc8a90dbd..e019f1934d52f4ae3f787728effa0cd07f1c99ba 100644 |
--- a/content/browser/service_worker/link_header_support_unittest.cc |
+++ b/content/browser/service_worker/link_header_support_unittest.cc |
@@ -106,17 +106,6 @@ class LinkHeaderServiceWorkerTest : public ::testing::Test { |
} |
void CreateServiceWorkerProviderHost() { |
- remote_endpoints_.emplace_back(); |
- std::unique_ptr<ServiceWorkerProviderHost> host = |
- CreateProviderHostForServiceWorkerContext( |
- render_process_id(), kMockProviderId, |
- true /* is_parent_frame_secure */, context()->AsWeakPtr(), |
- &remote_endpoints_.back()); |
- provider_host_ = host->AsWeakPtr(); |
- EXPECT_FALSE( |
- context()->GetProviderHost(host->process_id(), host->provider_id())); |
- context()->AddProviderHost(std::move(host)); |
- |
scoped_refptr<ServiceWorkerRegistration> registration = |
new ServiceWorkerRegistration(GURL("https://host/scope"), 1L, |
context()->AsWeakPtr()); |
@@ -124,7 +113,15 @@ class LinkHeaderServiceWorkerTest : public ::testing::Test { |
registration.get(), GURL("https://host/script.js"), 1L, |
context()->AsWeakPtr()); |
- provider_host_->running_hosted_version_ = version; |
+ remote_endpoints_.emplace_back(); |
+ std::unique_ptr<ServiceWorkerProviderHost> host = |
+ CreateProviderHostForServiceWorkerContext( |
+ render_process_id(), true /* is_parent_frame_secure */, |
+ version.get(), context()->AsWeakPtr(), &remote_endpoints_.back()); |
+ provider_host_ = host->AsWeakPtr(); |
+ EXPECT_FALSE( |
+ context()->GetProviderHost(host->process_id(), host->provider_id())); |
+ context()->AddProviderHost(std::move(host)); |
} |
std::unique_ptr<net::URLRequest> CreateRequest(const GURL& request_url, |