| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <title>Service Worker: Fetch Event Waits for Activate Event</title> | 2 <title>Service Worker: Fetch Event Waits for Activate Event</title> |
| 3 <meta name=timeout content=long> | 3 <meta name=timeout content=long> |
| 4 <script src="/resources/testharness.js"></script> | 4 <script src="/resources/testharness.js"></script> |
| 5 <script src="resources/testharness-helpers.js"></script> | 5 <script src="resources/testharness-helpers.js"></script> |
| 6 <script src="/resources/testharnessreport.js"></script> | 6 <script src="/resources/testharnessreport.js"></script> |
| 7 <script src="resources/get-host-info.sub.js"></script> | 7 <script src="/common/get-host-info.sub.js"></script> |
| 8 <script src="resources/test-helpers.sub.js"></script> | 8 <script src="resources/test-helpers.sub.js"></script> |
| 9 <body> | 9 <body> |
| 10 <script> | 10 <script> |
| 11 | 11 |
| 12 var worker = 'resources/fetch-waits-for-activate-worker.js'; | 12 var worker = 'resources/fetch-waits-for-activate-worker.js'; |
| 13 var expected_url = normalizeURL(worker); | 13 var expected_url = normalizeURL(worker); |
| 14 var scope = 'resources/fetch-waits-for-activate/'; | 14 var scope = 'resources/fetch-waits-for-activate/'; |
| 15 | 15 |
| 16 async_test(function(t) { | 16 async_test(function(t) { |
| 17 var registration; | 17 var registration; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 expected_url, 'frame should now be loaded and controlled'); | 54 expected_url, 'frame should now be loaded and controlled'); |
| 55 assert_equals(registration.active.state, 'activated', | 55 assert_equals(registration.active.state, 'activated', |
| 56 'active worker should be in activated state'); | 56 'active worker should be in activated state'); |
| 57 frame.remove(); | 57 frame.remove(); |
| 58 return service_worker_unregister_and_done(t, scope); | 58 return service_worker_unregister_and_done(t, scope); |
| 59 }).catch(unreached_rejection(t)); | 59 }).catch(unreached_rejection(t)); |
| 60 }, 'Fetch events should wait for the activate event to complete.'); | 60 }, 'Fetch events should wait for the activate event to complete.'); |
| 61 | 61 |
| 62 </script> | 62 </script> |
| 63 </body> | 63 </body> |
| OLD | NEW |