| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="/resources/testharness.js"></script> |
| 3 <script src="/resources/testharnessreport.js"></script> |
| 4 <script src="../resources/test-helpers.js"></script> |
| 5 <body> |
| 6 <script> |
| 7 promise_test(function(t) { |
| 8 var url = 'resources/stop-worker-with-pending-fetch.js'; |
| 9 var scope = 'resources/stop-worker-with-pending-fetch-scope/'; |
| 10 var registration; |
| 11 |
| 12 return service_worker_unregister_and_register(t, url, scope) |
| 13 .then(reg => { |
| 14 registration = reg; |
| 15 return wait_for_state(t, reg.installing, 'activated'); |
| 16 }) |
| 17 .then(_ => with_iframe(scope)) |
| 18 .then(_ => internals.terminateServiceWorker(registration.active)) |
| 19 .then(_ => with_iframe(scope)) // Check the sanity of the SW. |
| 20 .then(_ => service_worker_unregister(t, scope)); |
| 21 }, 'Stopping SW with pending fetch event should not cause crash.'); |
| 22 </script> |
| 23 </body> |
| OLD | NEW |