Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/ServiceWorkerGlobalScope/resources/extendable-message-event-loopback-worker.js |
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/ServiceWorkerGlobalScope/resources/extendable-message-event-loopback-worker.js b/third_party/WebKit/LayoutTests/http/tests/serviceworker/ServiceWorkerGlobalScope/resources/extendable-message-event-loopback-worker.js |
deleted file mode 100644 |
index a8885163a817f25404ee525e9cc20c1af665936f..0000000000000000000000000000000000000000 |
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/ServiceWorkerGlobalScope/resources/extendable-message-event-loopback-worker.js |
+++ /dev/null |
@@ -1,44 +0,0 @@ |
-self.addEventListener('message', function(event) { |
- switch (event.data.type) { |
- case 'start': |
- self.registration.active.postMessage( |
- {type: '1st', client_id: event.source.id}); |
- break; |
- case '1st': |
- // 1st loopback message via ServiceWorkerRegistration.active. |
- var results = [ |
- '1st loopback: ' + event, |
- ' event.origin: ' + event.origin, |
- ' event.lastEventId: ' + event.lastEventId, |
- ' event.source: ' + event.source, |
- ' event.source.scriptURL: ' + event.source.scriptURL, |
- ' event.source.state: ' + event.source.state, |
- ' event.ports: ' + event.ports, |
- ]; |
- var client_id = event.data.client_id; |
- event.source.postMessage({type: '2nd', client_id: client_id}); |
- event.waitUntil(clients.get(client_id) |
- .then(function(client) { |
- client.postMessage({type: 'record', results: results}); |
- })); |
- break; |
- case '2nd': |
- // 2nd loopback message via ExtendableMessageEvent.source. |
- var results = [ |
- '2nd loopback: ' + event, |
- ' event.origin: ' + event.origin, |
- ' event.lastEventId: ' + event.lastEventId, |
- ' event.source: ' + event.source, |
- ' event.source.scriptURL: ' + event.source.scriptURL, |
- ' event.source.state: ' + event.source.state, |
- ' event.ports: ' + event.ports, |
- ]; |
- var client_id = event.data.client_id; |
- event.waitUntil(clients.get(client_id) |
- .then(function(client) { |
- client.postMessage({type: 'record', results: results}); |
- client.postMessage({type: 'finish'}); |
- })); |
- break; |
- } |
- }); |