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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/foreign-fetch-worker.js

Issue 2676733002: Upstream foreign fetch tests. (Closed)
Patch Set: rebase Created 3 years, 10 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
1 self.addEventListener('install', function(event) { 1 self.addEventListener('install', function(event) {
2 var params = JSON.parse(decodeURIComponent(location.search.substring(1))); 2 var params = JSON.parse(decodeURIComponent(location.search.substring(1)));
3 if (!('scopes' in params)) { 3 if (!('scopes' in params)) {
4 if ('relscopes' in params) { 4 if ('relscopes' in params) {
5 params.scopes = params.relscopes.map(s => registration.scope + s); 5 params.scopes = params.relscopes.map(s => registration.scope + s);
6 } else { 6 } else {
7 params.scopes = [registration.scope]; 7 params.scopes = [registration.scope];
8 } 8 }
9 } 9 }
10 if (!('origins' in params)) 10 if (!('origins' in params))
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 } 69 }
70 } 70 }
71 71
72 if (handler) { 72 if (handler) {
73 handler.fn(event); 73 handler.fn(event);
74 } else { 74 } else {
75 event.respondWith({origin: event.origin, 75 event.respondWith({origin: event.origin,
76 response: new Response('unexpected request')}); 76 response: new Response('unexpected request')});
77 } 77 }
78 }); 78 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698