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.sub.js"></script> |
5 <script> | 5 <script> |
6 async_test(function(t) { | 6 async_test(function(t) { |
7 var scope = 'resources/scope/unregister-twice'; | 7 var scope = 'resources/scope/unregister-twice'; |
8 var registration; | 8 var registration; |
9 navigator.serviceWorker.register('resources/empty-worker.js', | 9 navigator.serviceWorker.register('resources/empty-worker.js', |
10 {scope: scope}) | 10 {scope: scope}) |
11 .then(function(r) { | 11 .then(function(r) { |
12 registration = r; | 12 registration = r; |
13 return registration.unregister(); | 13 return registration.unregister(); |
14 }) | 14 }) |
(...skipping 16 matching lines...) Expand all Loading... |
31 return registration.unregister(); | 31 return registration.unregister(); |
32 }) | 32 }) |
33 .then(function(value) { | 33 .then(function(value) { |
34 assert_equals(value, true, | 34 assert_equals(value, true, |
35 'unregistration should resolve with true'); | 35 'unregistration should resolve with true'); |
36 t.done(); | 36 t.done(); |
37 }) | 37 }) |
38 .catch(unreached_rejection(t)); | 38 .catch(unreached_rejection(t)); |
39 }, 'Register then unregister'); | 39 }, 'Register then unregister'); |
40 </script> | 40 </script> |
OLD | NEW |