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

Side by Side Diff: LayoutTests/http/tests/serviceworker/update-served-from-cache.html

Issue 1332303002: Make registration.update() no longer force bypassing the HTTP cache (1/2) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Create a test file to split tests. Created 5 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
« no previous file with comments | « LayoutTests/http/tests/serviceworker/resources/update-served-from-cache-worker.php ('k') | 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
(Empty)
1 <!DOCTYPE html>
2 <title>Service Worker: Registration update() served from cache</title>
3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5 <script src="resources/test-helpers.js"></script>
6 <script>
7 promise_test(function(t) {
8 var scope = 'resources/scope/update-served-from-cache';
9 var worker_url = 'resources/update-served-from-cache-worker.php';
10 var registration;
11
12 return service_worker_unregister_and_register(t, worker_url, scope)
13 .then(function(r) {
14 // The script resource for this register() having a non-zero max-age
15 // value was cached.
16 registration = r;
17 return wait_for_state(t, registration.installing, 'activated');
18 })
19 .then(function() {
20 // update() should consult the cache. The returned promise should
21 // resolve when the script is retrieved from the cache.
22 return registration.update();
23 })
24 .then(function() {
25 // installing should be null as update() does not trigger install.
26 assert_equals(
27 registration.installing,
28 null,
29 'installing should be null as the script was served from cache.');
30 return service_worker_unregister_and_done(t, scope);
31 });
32 }, 'Update a registration served from cache.');
33 </script>
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/serviceworker/resources/update-served-from-cache-worker.php ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698