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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/ServiceWorkerGlobalScope/resources/update-worker.py

Issue 2415873002: Import w3c tests for the service workers (Closed)
Patch Set: Rebase Created 4 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 import os
2 import time
3
4 def main(request, response):
5 # update() does not bypass cache so set the max-age to 0 such that update()
6 # can find a new version in the network.
7 headers = [('Cache-Control', 'max-age: 0'),
8 ('Content-Type', 'application/javascript')]
9 with open(os.path.join(os.path.dirname(__file__),
10 'update-worker.js'), 'r') as file:
11 script = file.read()
12 # Return a different script for each access.
13 return headers, '// %s\n%s' % (time.time(), script)
14
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698