| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <title>Service Worker: Register wait-forever-in-install-worker</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 | |
| 8 promise_test(function(t) { | |
| 9 var bad_script = 'resources/wait-forever-in-install-worker.js'; | |
| 10 var good_script = 'resources/empty-worker.js'; | |
| 11 var scope = 'resources/wait-forever-in-install-worker'; | |
| 12 return navigator.serviceWorker.register(bad_script, {scope: scope}) | |
| 13 .then(function(registration) { | |
| 14 assert_equals(registration.installing.scriptURL, | |
| 15 normalizeURL(bad_script)); | |
| 16 return navigator.serviceWorker.register(good_script, {scope: scope}); | |
| 17 }) | |
| 18 .then(function(registration) { | |
| 19 assert_equals(registration.installing.scriptURL, | |
| 20 normalizeURL(good_script)); | |
| 21 return wait_for_state(t, registration.installing, 'activated'); | |
| 22 }) | |
| 23 .then(function() { | |
| 24 return service_worker_unregister_and_done(t, scope); | |
| 25 }) | |
| 26 }, 'register worker that calls waitUntil with a promise that never ' + | |
| 27 'resolves in oninstall'); | |
| 28 | |
| 29 </script> | |
| OLD | NEW |