| 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 = 'resources/scope/subsequent-register-from-same-window'; | 9 var scope = 'resources/scope/subsequent-register-from-same-window'; |
| 10 var registration; | 10 var registration; |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 for (var i = 0; i < 10; ++i) { | 97 for (var i = 0; i < 10; ++i) { |
| 98 promises.push(navigator.serviceWorker.register(worker_url, | 98 promises.push(navigator.serviceWorker.register(worker_url, |
| 99 { scope: scope })); | 99 { scope: scope })); |
| 100 } | 100 } |
| 101 return Promise.all(promises); | 101 return Promise.all(promises); |
| 102 }) | 102 }) |
| 103 .then(function(registrations) { | 103 .then(function(registrations) { |
| 104 registrations.forEach(function(registration) { | 104 registrations.forEach(function(registration) { |
| 105 assert_equals(registration, registrations[0], | 105 assert_equals(registration, registrations[0], |
| 106 'register should resolve to the same registration'); | 106 'register should resolve to the same registration'); |
| 107 }); | 107 }); |
| 108 return registrations[0].unregister(); | 108 return registrations[0].unregister(); |
| 109 }) | 109 }) |
| 110 .then(function() { t.done(); }) | 110 .then(function() { t.done(); }) |
| 111 .catch(unreached_rejection(t)); | 111 .catch(unreached_rejection(t)); |
| 112 }, 'Concurrent registrations resolve to the same registration object'); | 112 }, 'Concurrent registrations resolve to the same registration object'); |
| 113 | 113 |
| 114 </script> | 114 </script> |
| OLD | NEW |