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

Side by Side Diff: LayoutTests/http/tests/serviceworker/ServiceWorkerGlobalScope/resources/update-worker.php

Issue 1288653002: Service Worker: Change last update check location and HTTP cache bypass rule (1/2) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <?php 1 <?php
2 // Force the browser to cache this script. update() should always bypass this 2 // Update obeys max-age, so set it to 0 for update() to find a new version.
3 // cache and fetch a new version. 3 header('Cache-Control: max-age=0');
4 header('Cache-Control: max-age=86400');
5 4
6 // Return a different script for each access. 5 // Return a different script for each access.
7 header('Content-Type:application/javascript'); 6 header('Content-Type:application/javascript');
8 echo '// ' . microtime(); 7 echo '// ' . microtime();
9 ?> 8 ?>
10 9
11 importScripts('../../resources/test-helpers.js'); 10 importScripts('../../resources/test-helpers.js');
12 importScripts('../../resources/worker-testharness.js'); 11 importScripts('../../resources/worker-testharness.js');
13 12
14 var events_seen = []; 13 var events_seen = [];
(...skipping 11 matching lines...) Expand all
26 e.respondWith(new Response(events_seen)); 25 e.respondWith(new Response(events_seen));
27 }); 26 });
28 27
29 self.addEventListener('message', function(e) { 28 self.addEventListener('message', function(e) {
30 events_seen.push('message'); 29 events_seen.push('message');
31 self.registration.update(); 30 self.registration.update();
32 }); 31 });
33 32
34 // update() during the script evaluation should be ignored. 33 // update() during the script evaluation should be ignored.
35 self.registration.update(); 34 self.registration.update();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698