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 21b99de59b2d9a183a4fc80188eca337eefe6e38..ff3d6ec3ce05f284a23938b4c556b34d73d140ba 100644 |
--- a/content/browser/service_worker/embedded_worker_test_helper.cc |
+++ b/content/browser/service_worker/embedded_worker_test_helper.cc |
@@ -187,6 +187,8 @@ bool EmbeddedWorkerTestHelper::OnMessageToWorker( |
current_embedded_worker_id_ = embedded_worker_id; |
IPC_BEGIN_MESSAGE_MAP(EmbeddedWorkerTestHelper, message) |
IPC_MESSAGE_HANDLER(ServiceWorkerMsg_ActivateEvent, OnActivateEventStub) |
+ IPC_MESSAGE_HANDLER(ServiceWorkerMsg_ExtendableMessageEvent, |
+ OnExtendableMessageEventStub) |
IPC_MESSAGE_HANDLER(ServiceWorkerMsg_InstallEvent, OnInstallEventStub) |
IPC_MESSAGE_HANDLER(ServiceWorkerMsg_FetchEvent, OnFetchEventStub) |
IPC_MESSAGE_HANDLER(ServiceWorkerMsg_PushEvent, OnPushEventStub) |
@@ -207,6 +209,13 @@ void EmbeddedWorkerTestHelper::OnActivateEvent(int embedded_worker_id, |
blink::WebServiceWorkerEventResultCompleted)); |
} |
+void EmbeddedWorkerTestHelper::OnExtendableMessageEvent(int embedded_worker_id, |
+ int request_id) { |
+ SimulateSend(new ServiceWorkerHostMsg_ExtendableMessageEventFinished( |
+ embedded_worker_id, request_id, |
+ blink::WebServiceWorkerEventResultCompleted)); |
+} |
+ |
void EmbeddedWorkerTestHelper::OnInstallEvent(int embedded_worker_id, |
int request_id) { |
// The installing worker may have been doomed and terminated. |
@@ -362,11 +371,18 @@ void EmbeddedWorkerTestHelper::OnMessageToWorkerStub( |
void EmbeddedWorkerTestHelper::OnActivateEventStub(int request_id) { |
base::ThreadTaskRunnerHandle::Get()->PostTask( |
- FROM_HERE, |
- base::Bind(&EmbeddedWorkerTestHelper::OnActivateEvent, |
- weak_factory_.GetWeakPtr(), |
- current_embedded_worker_id_, |
- request_id)); |
+ FROM_HERE, base::Bind(&EmbeddedWorkerTestHelper::OnActivateEvent, |
+ weak_factory_.GetWeakPtr(), |
+ current_embedded_worker_id_, request_id)); |
+} |
+ |
+void EmbeddedWorkerTestHelper::OnExtendableMessageEventStub( |
+ int request_id, |
+ const ServiceWorkerMsg_ExtendableMessageEvent_Params& params) { |
+ base::ThreadTaskRunnerHandle::Get()->PostTask( |
+ FROM_HERE, base::Bind(&EmbeddedWorkerTestHelper::OnExtendableMessageEvent, |
+ weak_factory_.GetWeakPtr(), |
+ current_embedded_worker_id_, request_id)); |
} |
void EmbeddedWorkerTestHelper::OnInstallEventStub(int request_id) { |