OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <title>ServiceWorkerGlobalScope: scope property is default value</title> | 2 <title>ServiceWorkerGlobalScope: scope property is default value</title> |
3 <script src="../../resources/testharness.js"></script> | 3 <script src="../../resources/testharness.js"></script> |
| 4 <script src="../../resources/testharness-helpers.js"></script> |
4 <script src="../../resources/testharnessreport.js"></script> | 5 <script src="../../resources/testharnessreport.js"></script> |
5 <script src="../resources/test-helpers.js"></script> | 6 <script src="../resources/test-helpers.js"></script> |
6 <script src="resources/scope.js"></script> | 7 <script src="resources/scope.js"></script> |
7 <script> | 8 <script> |
8 async_test(function(t) { | 9 |
9 scope_test(t, 'resources/scope-worker.js'); | 10 promise_test(function(t) { |
10 }, 'Verify the scope property: default scope'); | 11 return assert_promise_rejects( |
| 12 navigator.serviceWorker.register('resources/scope-worker.js'), |
| 13 'SecurityError', |
| 14 'Registering a script not in the root directory for the default scope' + |
| 15 'should fail with SecurityError.'); |
| 16 }, 'Register a script not in the root directory for the default scope.'); |
11 </script> | 17 </script> |
OLD | NEW |