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

Unified Diff: content/browser/service_worker/service_worker_handle_unittest.cc

Issue 2638313002: Manage ServiceWorkerDispatcherHost in ServiceWorkerContextCore (Closed)
Patch Set: Rebase Created 3 years, 10 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/service_worker/service_worker_handle_unittest.cc
diff --git a/content/browser/service_worker/service_worker_handle_unittest.cc b/content/browser/service_worker/service_worker_handle_unittest.cc
index 1b6e78325dcc7a6010a759f338fe7437823a504e..24d01a17ade2698c860ee6b54ac769584c4564e6 100644
--- a/content/browser/service_worker/service_worker_handle_unittest.cc
+++ b/content/browser/service_worker/service_worker_handle_unittest.cc
@@ -76,6 +76,7 @@ class ServiceWorkerHandleTest : public testing::Test {
void SetUp() override {
helper_.reset(new EmbeddedWorkerTestHelper(base::FilePath()));
+ helper_->context()->RemoveDispatcherHost(helper_->mock_render_process_id());
dispatcher_host_ = new TestingServiceWorkerDispatcherHost(
helper_->mock_render_process_id(), helper_->context_wrapper(),
&resource_context_, helper_.get());
@@ -110,12 +111,10 @@ class ServiceWorkerHandleTest : public testing::Test {
base::RunLoop().RunUntilIdle();
ASSERT_EQ(SERVICE_WORKER_OK, status);
- provider_host_.reset(new ServiceWorkerProviderHost(
- helper_->mock_render_process_id(), kRenderFrameId, 1,
- SERVICE_WORKER_PROVIDER_FOR_WINDOW,
- ServiceWorkerProviderHost::FrameSecurityLevel::SECURE,
- helper_->context()->AsWeakPtr(), dispatcher_host_.get()));
-
+ provider_host_ = CreateProviderHostWithDispatcherHost(
+ helper_->mock_render_process_id(), 1 /* provider_id */,
+ helper_->context()->AsWeakPtr(), kRenderFrameId,
+ dispatcher_host_.get());
helper_->SimulateAddProcessToPattern(pattern,
helper_->mock_render_process_id());
}

Powered by Google App Engine
This is Rietveld 408576698