OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <title>Service Worker: Load flushed script</title> | 2 <title>Service Worker: Load flushed script</title> |
3 <script src="../../resources/testharness.js"></script> | 3 <script src="../../resources/testharness.js"></script> |
4 <script src="../../resources/testharnessreport.js"></script> | 4 <script src="../../resources/testharnessreport.js"></script> |
5 <script src="../resources/test-helpers.js"></script> | 5 <script src="../resources/test-helpers.js"></script> |
6 <script> | 6 <script> |
7 async_test(function(t) { | 7 async_test(function(t) { |
8 var scope = 'resources/load-flushed-script.html'; | 8 var scope = 'resources/load-flushed-script.html'; |
9 service_worker_unregister_and_register( | 9 service_worker_unregister_and_register( |
10 t, 'resources/load-flushed-script.php', scope) | 10 t, 'resources/load-flushed-script.php', scope) |
11 .then(function(registration) { | 11 .then(function(registration) { |
12 return wait_for_update(t, registration); | |
13 }) | |
14 .then(function(sw) { | |
15 service_worker_unregister_and_done(t, scope); | 12 service_worker_unregister_and_done(t, scope); |
16 }) | 13 }) |
17 .catch(unreached_rejection(t)); | 14 .catch(unreached_rejection(t)); |
18 }, | 15 }, |
19 'Don\'t hang while registering a flushed Service Worker script.', | 16 'Don\'t hang while registering a flushed Service Worker script.', |
20 {timeout: 10000}); | 17 {timeout: 10000}); |
21 </script> | 18 </script> |
OLD | NEW |