| Index: content/browser/service_worker/embedded_worker_test_helper.h
|
| diff --git a/content/browser/service_worker/embedded_worker_test_helper.h b/content/browser/service_worker/embedded_worker_test_helper.h
|
| index bb4f98b38aebf1f352f77fb77e8c6e50475b6aed..b94ffebb7bace031b23f346e9cf5a7610e86630c 100644
|
| --- a/content/browser/service_worker/embedded_worker_test_helper.h
|
| +++ b/content/browser/service_worker/embedded_worker_test_helper.h
|
| @@ -119,6 +119,16 @@ class EmbeddedWorkerTestHelper : public IPC::Sender,
|
| void RegisterMockInstanceClient(
|
| std::unique_ptr<MockEmbeddedWorkerInstanceClient> client);
|
|
|
| + // Registers the dispatcher host for the process to a map managed by this test
|
| + // helper. If there is a existing dispatcher host, it'll removed before adding
|
| + // to the map. This should be called before ServiceWorkerDispatcherHost::Init
|
| + // because it internally calls ServiceWorkerContextCore::AddDispatcherHost.
|
| + // If |dispatcher_host| is nullptr, this method just removes the existing
|
| + // dispatcher host from the map.
|
| + void RegisterDispatcherHost(
|
| + int process_id,
|
| + scoped_refptr<ServiceWorkerDispatcherHost> dispatcher_host);
|
| +
|
| template <typename MockType, typename... Args>
|
| MockType* CreateAndRegisterMockInstanceClient(Args&&... args);
|
|
|
|
|