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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/resources/navigate-window-worker.js

Issue 2415873002: Import w3c tests for the service workers (Closed)
Patch Set: Rebase Created 4 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 addEventListener('message', function(evt) {
2 if (evt.data.type === 'GET_CLIENTS') {
3 clients.matchAll(evt.data.opts).then(function(clientList) {
4 var resultList = clientList.map(function(c) {
5 return { url: c.url, frameType: c.frameType, id: c.id };
6 });
7 evt.source.postMessage({ type: 'success', detail: resultList });
8 }).catch(function(err) {
9 evt.source.postMessage({
10 type: 'failure',
11 detail: 'matchAll() rejected with "' + err + '"'
12 });
13 });
14 return;
15 }
16
17 evt.source.postMessage({
18 type: 'failure',
19 detail: 'Unexpected message type "' + evt.data.type + '"'
20 });
21 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698