| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../resources/testharness.js"></script> | 2 <script src="../resources/testharness.js"></script> |
| 3 <script src="../resources/testharnessreport.js"></script> | 3 <script src="../resources/testharnessreport.js"></script> |
| 4 <script src="resources/test-helpers.js"></script> | 4 <script src="resources/test-helpers.js"></script> |
| 5 <script> | 5 <script> |
| 6 var worker_url = 'resources/empty-worker.js'; | 6 var worker_url = 'resources/empty-worker.js'; |
| 7 | 7 |
| 8 async_test(function(t) { | 8 async_test(function(t) { |
| 9 var scope = 'scope/register-waits-for-unregistered-registration-to-clear'; | 9 var scope = 'resources/scope/register-waits-for-unregistered-registration-to
-clear'; |
| 10 var new_worker_url = worker_url + '?new'; | 10 var new_worker_url = worker_url + '?new'; |
| 11 var iframe; | 11 var iframe; |
| 12 var registration; | 12 var registration; |
| 13 var unloaded = false; | 13 var unloaded = false; |
| 14 | 14 |
| 15 service_worker_unregister_and_register(t, worker_url, scope) | 15 service_worker_unregister_and_register(t, worker_url, scope) |
| 16 .then(function(r) { | 16 .then(function(r) { |
| 17 registration = r; | 17 registration = r; |
| 18 return wait_for_update(t, registration); | 18 return wait_for_update(t, registration); |
| 19 }) | 19 }) |
| (...skipping 25 matching lines...) Expand all Loading... |
| 45 return new_registration.unregister(); | 45 return new_registration.unregister(); |
| 46 }) | 46 }) |
| 47 .then(function() { | 47 .then(function() { |
| 48 t.done(); | 48 t.done(); |
| 49 }) | 49 }) |
| 50 .catch(unreached_rejection(t)); | 50 .catch(unreached_rejection(t)); |
| 51 }, 'Registering a new script URL does not resolve until unregistered ' + | 51 }, 'Registering a new script URL does not resolve until unregistered ' + |
| 52 'registration is cleared'); | 52 'registration is cleared'); |
| 53 | 53 |
| 54 async_test(function(t) { | 54 async_test(function(t) { |
| 55 var scope = 'scope/unregister-then-register-new-script-that-exists'; | 55 var scope = 'resources/scope/unregister-then-register-new-script-that-exists
'; |
| 56 var new_worker_url = worker_url + '?new'; | 56 var new_worker_url = worker_url + '?new'; |
| 57 var iframe; | 57 var iframe; |
| 58 var registration; | 58 var registration; |
| 59 | 59 |
| 60 service_worker_unregister_and_register(t, worker_url, scope) | 60 service_worker_unregister_and_register(t, worker_url, scope) |
| 61 .then(function(r) { | 61 .then(function(r) { |
| 62 registration = r; | 62 registration = r; |
| 63 return wait_for_update(t, registration); | 63 return wait_for_update(t, registration); |
| 64 }) | 64 }) |
| 65 .then(function(worker) { | 65 .then(function(worker) { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 unload_iframe(frame); | 111 unload_iframe(frame); |
| 112 return registration.unregister(); | 112 return registration.unregister(); |
| 113 }) | 113 }) |
| 114 .then(function() { | 114 .then(function() { |
| 115 t.done(); | 115 t.done(); |
| 116 }) | 116 }) |
| 117 .catch(unreached_rejection(t)); | 117 .catch(unreached_rejection(t)); |
| 118 }, 'Registering a new script URL while an unregistered registration is in use'); | 118 }, 'Registering a new script URL while an unregistered registration is in use'); |
| 119 | 119 |
| 120 async_test(function(t) { | 120 async_test(function(t) { |
| 121 var scope = 'scope/unregister-then-register-new-script-that-404s'; | 121 var scope = 'resources/scope/unregister-then-register-new-script-that-404s'; |
| 122 var iframe; | 122 var iframe; |
| 123 var registration; | 123 var registration; |
| 124 | 124 |
| 125 service_worker_unregister_and_register(t, worker_url, scope) | 125 service_worker_unregister_and_register(t, worker_url, scope) |
| 126 .then(function(r) { | 126 .then(function(r) { |
| 127 registration = r; | 127 registration = r; |
| 128 return wait_for_update(t, registration); | 128 return wait_for_update(t, registration); |
| 129 }) | 129 }) |
| 130 .then(function(worker) { | 130 .then(function(worker) { |
| 131 return wait_for_state(t, worker, 'activated'); | 131 return wait_for_state(t, worker, 'activated'); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 155 null, | 155 null, |
| 156 'document should not load with a controller'); | 156 'document should not load with a controller'); |
| 157 unload_iframe(frame); | 157 unload_iframe(frame); |
| 158 t.done(); | 158 t.done(); |
| 159 }) | 159 }) |
| 160 .catch(unreached_rejection(t)); | 160 .catch(unreached_rejection(t)); |
| 161 }, 'Registering a new script URL that 404s does not resurrect an ' + | 161 }, 'Registering a new script URL that 404s does not resurrect an ' + |
| 162 'unregistered registration'); | 162 'unregistered registration'); |
| 163 | 163 |
| 164 async_test(function(t) { | 164 async_test(function(t) { |
| 165 var scope = 'scope/unregister-then-register-reject-install-worker'; | 165 var scope = 'resources/scope/unregister-then-register-reject-install-worker'
; |
| 166 var iframe; | 166 var iframe; |
| 167 var registration; | 167 var registration; |
| 168 | 168 |
| 169 service_worker_unregister_and_register(t, worker_url, scope) | 169 service_worker_unregister_and_register(t, worker_url, scope) |
| 170 .then(function(r) { | 170 .then(function(r) { |
| 171 registration = r; | 171 registration = r; |
| 172 return wait_for_update(t, registration); | 172 return wait_for_update(t, registration); |
| 173 }) | 173 }) |
| 174 .then(function(worker) { | 174 .then(function(worker) { |
| 175 return wait_for_state(t, worker, 'activated'); | 175 return wait_for_state(t, worker, 'activated'); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 204 unload_iframe(frame); | 204 unload_iframe(frame); |
| 205 return registration.unregister(); | 205 return registration.unregister(); |
| 206 }) | 206 }) |
| 207 .then(function() { | 207 .then(function() { |
| 208 t.done(); | 208 t.done(); |
| 209 }) | 209 }) |
| 210 .catch(unreached_rejection(t)); | 210 .catch(unreached_rejection(t)); |
| 211 }, 'Registering a new script URL that fails to install does not resurrect ' + | 211 }, 'Registering a new script URL that fails to install does not resurrect ' + |
| 212 'an unregistered registration'); | 212 'an unregistered registration'); |
| 213 </script> | 213 </script> |
| OLD | NEW |