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

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

Issue 2653493009: Add two interfaces for ServiceWorkerProviderContext/ProviderHost (Closed)
Patch Set: Addressed comments from falken Created 3 years, 7 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/embedded_worker_test_helper.cc
diff --git a/content/browser/service_worker/embedded_worker_test_helper.cc b/content/browser/service_worker/embedded_worker_test_helper.cc
index 7ef395e156d88a82a425ad8c61115793d385bb42..d1bb82fe22a51a42bad5f253c0d21b474e83539e 100644
--- a/content/browser/service_worker/embedded_worker_test_helper.cc
+++ b/content/browser/service_worker/embedded_worker_test_helper.cc
@@ -575,14 +575,16 @@ void EmbeddedWorkerTestHelper::SimulateWorkerThreadStarted(
int provider_id) {
EmbeddedWorkerInstance* worker = registry()->GetWorker(embedded_worker_id);
ASSERT_TRUE(worker);
+ ASSERT_TRUE(embedded_worker_id_instance_host_ptr_map_[embedded_worker_id]);
+
// Prepare a provider host to be used by following OnThreadStarted().
std::unique_ptr<ServiceWorkerProviderHost> host =
CreateProviderHostForServiceWorkerContext(
worker->process_id(), provider_id, true /* is_parent_frame_secure */,
- context()->AsWeakPtr());
+ context()->AsWeakPtr(),
+ &embedded_worker_id_remote_provider_map_[embedded_worker_id]);
context()->AddProviderHost(std::move(host));
- ASSERT_TRUE(embedded_worker_id_instance_host_ptr_map_[embedded_worker_id]);
embedded_worker_id_instance_host_ptr_map_[embedded_worker_id]
->OnThreadStarted(thread_id, provider_id);
base::RunLoop().RunUntilIdle();

Powered by Google App Engine
This is Rietveld 408576698