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

Side by Side Diff: LayoutTests/http/tests/serviceworker/registration-service-worker-attributes.html

Issue 517223002: ServiceWorker: Tweak layout tests based on the latest install sequence (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 3 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/registration-end-to-end.html ('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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script> 2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="../resources/testharnessreport.js"></script>
4 <script src="resources/test-helpers.js"></script> 4 <script src="resources/test-helpers.js"></script>
5 <script> 5 <script>
6 async_test(function(t) { 6 async_test(function(t) {
7 var scope = 'scope/installing-waiting-active-after-registration'; 7 var scope = 'scope/installing-waiting-active-after-registration';
8 var worker_url = 'resources/empty-worker.js'; 8 var worker_url = 'resources/empty-worker.js';
9 var expected_url = normalizeURL(worker_url); 9 var expected_url = normalizeURL(worker_url);
10 10
11 service_worker_unregister_and_register(t, worker_url, scope) 11 service_worker_unregister_and_register(t, worker_url, scope)
12 .then(function(r) { 12 .then(function(r) {
13 registration = r; 13 registration = r;
14 assert_equals(registration.installing, null, 14 assert_equals(registration.installing.scriptURL, expected_url,
15 'installing before updatefound'); 15 'installing before updatefound');
16 assert_equals(registration.waiting, null, 16 assert_equals(registration.waiting, null,
17 'waiting before updatefound'); 17 'waiting before updatefound');
18 assert_equals(registration.active, null, 18 assert_equals(registration.active, null,
19 'active before updatefound'); 19 'active before updatefound');
20 return wait_for_update(t, registration); 20 return wait_for_update(t, registration);
21 }) 21 })
22 .then(function(worker) { 22 .then(function(worker) {
23 assert_equals(registration.installing.scriptURL, expected_url, 23 assert_equals(registration.installing.scriptURL, expected_url,
24 'installing after updatefound'); 24 'installing after updatefound');
(...skipping 29 matching lines...) Expand all
54 'installing after redundant'); 54 'installing after redundant');
55 assert_equals(registration.waiting, null, 55 assert_equals(registration.waiting, null,
56 'waiting after redundant'); 56 'waiting after redundant');
57 assert_equals(registration.active.scriptURL, expected_url, 57 assert_equals(registration.active.scriptURL, expected_url,
58 'active after redundant'); 58 'active after redundant');
59 t.done(); 59 t.done();
60 }) 60 })
61 .catch(unreached_rejection(t)); 61 .catch(unreached_rejection(t));
62 }, 'installing/waiting/active after registration'); 62 }, 'installing/waiting/active after registration');
63 </script> 63 </script>
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/serviceworker/registration-end-to-end.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698