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..81366ed7da4faf6a5f86523ce165248413bc7698 100644 |
--- a/content/browser/service_worker/embedded_worker_test_helper.h |
+++ b/content/browser/service_worker/embedded_worker_test_helper.h |
@@ -119,6 +119,14 @@ 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. |
+ void RegisterMockDispatcherHost( |
falken
2017/06/12 06:37:32
I think we don't need to say Mock since it takes a
shimazu
2017/06/12 06:51:08
I prefer saying Mock here because unittests should
falken
2017/06/12 07:08:20
I think it's confusing because all the other occur
shimazu
2017/06/12 08:04:07
I see, I agree with that.
|
+ int process_id, |
+ scoped_refptr<ServiceWorkerDispatcherHost> dispatcher_host); |
+ |
template <typename MockType, typename... Args> |
MockType* CreateAndRegisterMockInstanceClient(Args&&... args); |