Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(827)

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/update-claim-worker.py

Issue 2763123002: Upstream service worker `claim` tests to WPT (Closed)
Patch Set: Persist Chromium-specific version of test Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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()

Powered by Google App Engine
This is Rietveld 408576698