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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/ServiceWorkerGlobalScope/resources/extendable-message-event-loopback-worker.js

Issue 2751113005: Upstream service worker message event tests to WPT (Closed)
Patch Set: Incorporate review feedback Created 3 years, 9 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: 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;
- }
- });

Powered by Google App Engine
This is Rietveld 408576698