| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <title>register() and scope</title> | 2 <title>register() and scope</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 script = 'resources/empty-worker.js'; | 10 var script = 'resources/empty-worker.js'; |
| 10 var script_url = new URL(script, location.href); | 11 var script_url = new URL(script, location.href); |
| 11 var expected_scope = new URL('./', script_url).href; | 12 var expected_scope = new URL('./', script_url).href; |
| 12 return service_worker_unregister(t, expected_scope) | 13 return service_worker_unregister(t, expected_scope) |
| 13 .then(function() { | 14 .then(function() { |
| 14 return navigator.serviceWorker.register('resources/empty-worker.js'); | 15 return navigator.serviceWorker.register('resources/empty-worker.js'); |
| 15 }).then(function(registration) { | 16 }).then(function(registration) { |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 }, | 57 }, |
| 57 function(error) { | 58 function(error) { |
| 58 assert_equals(error.name, 'SecurityError', | 59 assert_equals(error.name, 'SecurityError', |
| 59 'passing a null scope should be interpreted as ' + | 60 'passing a null scope should be interpreted as ' + |
| 60 'scope="null" which violates the path restriction'); | 61 'scope="null" which violates the path restriction'); |
| 61 t.done(); | 62 t.done(); |
| 62 }); | 63 }); |
| 63 }, 'null scope'); | 64 }, 'null scope'); |
| 64 | 65 |
| 65 </script> | 66 </script> |
| OLD | NEW |