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 e019f1934d52f4ae3f787728effa0cd07f1c99ba..e77c68d9517028742911f3d5173f06adc8a90dbd 100644 |
--- a/content/browser/service_worker/link_header_support_unittest.cc |
+++ b/content/browser/service_worker/link_header_support_unittest.cc |
@@ -106,22 +106,25 @@ class LinkHeaderServiceWorkerTest : public ::testing::Test { |
} |
void CreateServiceWorkerProviderHost() { |
- scoped_refptr<ServiceWorkerRegistration> registration = |
- new ServiceWorkerRegistration(GURL("https://host/scope"), 1L, |
- context()->AsWeakPtr()); |
- scoped_refptr<ServiceWorkerVersion> version = new ServiceWorkerVersion( |
- registration.get(), GURL("https://host/script.js"), 1L, |
- context()->AsWeakPtr()); |
- |
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()); |
+ 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()); |
+ scoped_refptr<ServiceWorkerVersion> version = new ServiceWorkerVersion( |
+ registration.get(), GURL("https://host/script.js"), 1L, |
+ context()->AsWeakPtr()); |
+ |
+ provider_host_->running_hosted_version_ = version; |
} |
std::unique_ptr<net::URLRequest> CreateRequest(const GURL& request_url, |