Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/update-claim-worker.py |
| diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/update-claim-worker.php b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/update-claim-worker.py |
| similarity index 57% |
| copy from third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/update-claim-worker.php |
| copy to third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/update-claim-worker.py |
| index bd75fc1345f8499cedbae120976eeeb3513885c6..551246c96abfc88752a2b9695f454dc1b8fdb769 100644 |
| --- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/update-claim-worker.php |
| +++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/update-claim-worker.py |
| @@ -1,10 +1,9 @@ |
| -<?php |
| -header("Cache-Control: no-cache, must-revalidate"); |
| -header("Pragma: no-cache"); |
| -header('Content-Type:application/javascript'); |
| +import time |
| -echo '// ', microtime(); |
| -?> |
| +script = ''' |
| +// Time stamp: %s |
| +// (This ensures the source text is *not* a byte-for-byte match with any |
| +// previously-fetched version of this script.) |
|
mike3
2017/03/23 15:56:55
This is becoming something of a pattern in WPT. I
|
| // This no-op fetch handler is necessary to bypass explicitly the no fetch |
| // handler optimization by which this service worker script can be skipped. |
| @@ -18,4 +17,8 @@ addEventListener('install', event => { |
| addEventListener('activate', event => { |
| event.waitUntil(self.clients.claim()); |
| - }); |
| + });''' |
| + |
| + |
| +def main(request, response): |
| + return [('Content-Type', 'application/javascript')], script % time.time() |