Skip to content

Commit

Permalink
Update async waitUntil microtask issue
Browse files Browse the repository at this point in the history
Fixed the async waitUntil microtask tests to reflect the spec
  • Loading branch information
aliams committed Feb 23, 2018
1 parent 4fda935 commit 1019138
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ self.addEventListener('message', function(event) {
async_task_waituntil(event).then(reportResultExpecting('InvalidStateError'));
break;
case 'no-current-extension-different-microtask':
async_microtask_waituntil(event).then(reportResultExpecting('InvalidStateError'));
async_microtask_waituntil(event).then(reportResultExpecting('OK'));
break;
case 'current-extension-different-task':
event.waitUntil(new Promise((res) => { resolveTestPromise = res; }));
Expand All @@ -36,7 +36,7 @@ self.addEventListener('message', function(event) {
waitPromise = Promise.resolve();
event.waitUntil(waitPromise);
waitPromise.then(() => { return async_microtask_waituntil(event); })
.then(reportResultExpecting('InvalidStateError'))
.then(reportResultExpecting('OK'))
break;
case 'current-extension-expired-different-task':
event.waitUntil(Promise.resolve());
Expand Down Expand Up @@ -67,7 +67,7 @@ self.addEventListener('fetch', function(event) {
response = Promise.resolve(new Response('RESP'));
event.respondWith(response);
response.then(() => { return async_microtask_waituntil(event); })
.then(reportResultExpecting('InvalidStateError'))
.then(reportResultExpecting('OK'))
}
});

Expand Down

0 comments on commit 1019138

Please sign in to comment.