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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/resources/extendable-event-waituntil.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
1 var pendingPorts = []; 1 var pendingPorts = [];
2 var portResolves = []; 2 var portResolves = [];
3 3
4 onmessage = function(e) { 4 onmessage = function(e) {
5 var message = e.data; 5 var message = e.data;
6 if ('port' in message) { 6 if ('port' in message) {
7 var resolve = self.portResolves.shift(); 7 var resolve = self.portResolves.shift();
8 if (resolve) 8 if (resolve)
9 resolve(message.port); 9 resolve(message.port);
10 else 10 else
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 onactivate = function(e) { 66 onactivate = function(e) {
67 switch (stripScopeName(self.location.href)) { 67 switch (stripScopeName(self.location.href)) {
68 case 'activate-fulfilled': 68 case 'activate-fulfilled':
69 e.waitUntil(fulfillPromise()); 69 e.waitUntil(fulfillPromise());
70 break; 70 break;
71 case 'activate-rejected': 71 case 'activate-rejected':
72 e.waitUntil(rejectPromise()); 72 e.waitUntil(rejectPromise());
73 break; 73 break;
74 } 74 }
75 }; 75 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698