| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <title>Service Worker: Skip waiting</title> | 2 <title>Service Worker: Skip waiting</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/testharness-helpers.js"></script> |
| 5 <script src="resources/test-helpers.js"></script> | 5 <script src="/resources/testharnessreport.js"></script> |
| 6 <script src="resources/test-helpers.sub.js"></script> |
| 6 <script> | 7 <script> |
| 7 | 8 |
| 8 promise_test(function(t) { | 9 promise_test(function(t) { |
| 9 var scope = 'resources/blank.html'; | 10 var scope = 'resources/blank.html'; |
| 10 var url1 = 'resources/empty.js'; | 11 var url1 = 'resources/empty.js'; |
| 11 var url2 = 'resources/empty-worker.js'; | 12 var url2 = 'resources/empty-worker.js'; |
| 12 var url3 = 'resources/skip-waiting-worker.js'; | 13 var url3 = 'resources/skip-waiting-worker.js'; |
| 13 var frame, sw_registration, activated_worker, waiting_worker; | 14 var frame, sw_registration, activated_worker, waiting_worker; |
| 14 return service_worker_unregister_and_register(t, url1, scope) | 15 return service_worker_unregister_and_register(t, url1, scope) |
| 15 .then(function(registration) { | 16 .then(function(registration) { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 44 assert_equals(waiting_worker.state, 'redundant', | 45 assert_equals(waiting_worker.state, 'redundant', |
| 45 'Worker with url2 should be redundant'); | 46 'Worker with url2 should be redundant'); |
| 46 assert_equals(sw_registration.active.scriptURL, normalizeURL(url3), | 47 assert_equals(sw_registration.active.scriptURL, normalizeURL(url3), |
| 47 'Worker with url3 should be activated'); | 48 'Worker with url3 should be activated'); |
| 48 frame.remove(); | 49 frame.remove(); |
| 49 return service_worker_unregister_and_done(t, scope); | 50 return service_worker_unregister_and_done(t, scope); |
| 50 }); | 51 }); |
| 51 }, 'Test skipWaiting with both active and waiting workers'); | 52 }, 'Test skipWaiting with both active and waiting workers'); |
| 52 | 53 |
| 53 </script> | 54 </script> |
| OLD | NEW |