Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/update-claim-worker.php |
| diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/update-claim-worker.php b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/update-claim-worker.php |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f6948b7374abf6a1885d3edec14979ec8c440e27 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/update-claim-worker.php |
| @@ -0,0 +1,22 @@ |
| +<?php |
| +header("Cache-Control: no-cache, must-revalidate"); |
| +header("Pragma: no-cache"); |
| +header('Content-Type:application/javascript'); |
| + |
| +echo '/* ', microtime(), ' */'; |
| +echo <<<EOF |
|
nhiroki
2016/08/19 05:26:52
Here-document may not be necessary if you put "?>"
shimazu
2016/08/19 09:43:16
Done.
|
| + |
| +addEventListener('fetch', function(event) { |
| + return; |
| + }); |
| + |
| +addEventListener('install', function(event) { |
| + console.log('install; skipwaiting'); |
| + self.skipWaiting(); |
| + }); |
| +addEventListener('activate', function(event) { |
| + console.log('activated; claim will be called'); |
| + self.clients.claim(); |
| + }) |
| +EOF; |
| +?> |