Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / serviceworker / resources / skip-waiting-worker.js
blob4b09af52e3f7176ed48d461a4a36e4c0e9701937
1 importScripts('worker-testharness.js');
3 promise_test(function() {
4     return self.skipWaiting()
5       .then(function(result) {
6           assert_equals(result, undefined,
7                         'Promise should be resolved with undefined');
8         })
9       .then(function() {
10           var promises = [];
11           for (var i = 0; i < 8; ++i)
12             promises.push(self.skipWaiting());
13           return Promise.all(promises);
14         })
15       .then(function(results) {
16           results.forEach(function(r) {
17               assert_equals(r, undefined,
18                             'Promises should be resolved with undefined');
19             });
20         });
21   }, 'skipWaiting');