Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/test.js |
| diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/test.js b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/test.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c8d22b94f0761f1b9a3bc5e15a588611c357f583 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/test.js |
| @@ -0,0 +1,17 @@ |
| +function receive_message() |
| +{ |
| + return new Promise(function(resolve) { |
| + self.onmessage = function(e) { |
| + console.log(e); |
| + resolve(); |
| + }; |
| + }); |
| +} |
| +/* |
| +self.oninstall = function(e) { |
| + e.waitUntil(receive_message()); |
| +}; |
| +*/ |
| +self.onactivate = function(e) { |
| + e.waitUntil(receive_message()); |
|
nhiroki
2016/02/08 04:54:02
A promise returned by receive_message() is never s
|
| +}; |