OLD | NEW |
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.sub.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 = 'resources/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) { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 'the type of the event should be "statechange".'); | 60 'the type of the event should be "statechange".'); |
61 | 61 |
62 checkStateTransition(event.target.state); | 62 checkStateTransition(event.target.state); |
63 | 63 |
64 if (event.target.state == 'activated') | 64 if (event.target.state == 'activated') |
65 service_worker_unregister_and_done(t, scope); | 65 service_worker_unregister_and_done(t, scope); |
66 }; | 66 }; |
67 } | 67 } |
68 }()); | 68 }()); |
69 </script> | 69 </script> |
OLD | NEW |