| Index: LayoutTests/http/tests/serviceworker/resources/skip-waiting-worker.js
|
| diff --git a/LayoutTests/http/tests/serviceworker/resources/skip-waiting-worker.js b/LayoutTests/http/tests/serviceworker/resources/skip-waiting-worker.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ab4f2f7954fbd4cb202b463b76bcf735947e56a2
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/serviceworker/resources/skip-waiting-worker.js
|
| @@ -0,0 +1,21 @@
|
| +importScripts('worker-testharness.js');
|
| +
|
| +promise_test(function() {
|
| + return self.skipWaiting()
|
| + .then(function(result) {
|
| + assert_equals(result, undefined,
|
| + 'Promise should be resolved with undefined');
|
| + })
|
| + .then(function() {
|
| + var promises = [];
|
| + for (var i = 0; i < 8; ++i)
|
| + promises.push(skipWaiting());
|
| + return Promise.all(promises);
|
| + })
|
| + .then(function(results) {
|
| + results.forEach(function(r) {
|
| + assert_equals(r, undefined,
|
| + 'Promises should be resolved with undefined');
|
| + });
|
| + });
|
| + }, 'skipWaiting');
|
|
|