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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/update-max-aged-worker-imported-script.py

Issue 2668783003: Import wpt@767dc2a4f049c761bd146d61de2ea860a895a624 (Closed)
Patch Set: Update test expectations and baselines. Created 3 years, 11 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-max-aged-worker-imported-script.py
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/update-max-aged-worker-imported-script.py b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/update-max-aged-worker-imported-script.py
new file mode 100644
index 0000000000000000000000000000000000000000..e166143e2bb2b0eb01a688d68dfcfb1a7767d2e0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/update-max-aged-worker-imported-script.py
@@ -0,0 +1,22 @@
+import time
+
+def main(request, response):
+ headers = [('Cache-Control', 'max-age=86400'),
+ ('Content-Type', 'application/javascript'),
+ ('Last-Modified', time.strftime("%a, %d %b %Y %H:%M:%S GMT",
+ time.gmtime()))]
+
+
+ revalidate = request.headers.has_key('if-modified-since');
+
+ body = '''
+ self.addEventListener('message', function(e) {
+ e.data.port.postMessage({
+ from: "imported",
+ type: "%s",
+ value: %s
+ });
+ });
+ ''' % ('revalidate' if revalidate else 'normal', time.time())
+
+ return headers, body

Powered by Google App Engine
This is Rietveld 408576698