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

Side by Side Diff: LayoutTests/http/tests/serviceworker/state.html

Issue 674133004: [ServiceWorker] Introduce the directory restriction of ServiceWorker scope [1/3 blink] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remove LayoutTests/http/tests/serviceworker/ServiceWorkerGlobalScope/scope-default.html Created 6 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
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 <body> 5 <body>
6 <script> 6 <script>
7 (function () { 7 (function () {
8 var t = async_test('Service Worker state property and "statechange" event'); 8 var t = async_test('Service Worker state property and "statechange" event');
9 var currentState = 'test-is-starting'; 9 var currentState = 'test-is-starting';
10 var scope = '/state/'; 10 var scope = 'resources/state/';
11 11
12 service_worker_unregister_and_register( 12 service_worker_unregister_and_register(
13 t, 'resources/empty-worker.js', scope) 13 t, 'resources/empty-worker.js', scope)
14 .then(t.step_func(function(registration) { 14 .then(t.step_func(function(registration) {
15 return wait_for_update(t, registration); 15 return wait_for_update(t, registration);
16 })) 16 }))
17 .then(t.step_func(function(sw) { 17 .then(t.step_func(function(sw) {
18 sw.addEventListener('statechange', t.step_func(onStateChange(sw))); 18 sw.addEventListener('statechange', t.step_func(onStateChange(sw)));
19 assert_in_array(sw.state, ['parsed', 'installing'], 19 assert_in_array(sw.state, ['parsed', 'installing'],
20 'the service worker should be in a state up to ' + 20 'the service worker should be in a state up to ' +
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 'the type of the event should be "statechange".'); 66 'the type of the event should be "statechange".');
67 67
68 checkStateTransition(event.target.state); 68 checkStateTransition(event.target.state);
69 69
70 if (event.target.state == 'activated') 70 if (event.target.state == 'activated')
71 service_worker_unregister_and_done(t, scope); 71 service_worker_unregister_and_done(t, scope);
72 }; 72 };
73 } 73 }
74 }()); 74 }());
75 </script> 75 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698