OLD | NEW |
1 if (self.importScripts) { | 1 if (self.importScripts) { |
2 importScripts('helpers.js'); | 2 importScripts('helpers.js'); |
3 | 3 |
4 if (get_current_scope() == 'ServiceWorker') | 4 if (get_current_scope() == 'ServiceWorker') |
5 importScripts('../../serviceworker/resources/worker-testharness.js'); | 5 importScripts('../../serviceworker/resources/worker-testharness.js'); |
6 else | 6 else |
7 importScripts('../../resources/testharness.js'); | 7 importScripts('../../resources/testharness.js'); |
8 | |
9 importScripts('../../resources/testharness-helpers.js'); | |
10 } | 8 } |
11 | 9 |
12 test(function() { | 10 test(function() { |
13 assert_own_property(self, 'Permissions'); | 11 assert_own_property(self, 'Permissions'); |
14 assert_will_be_idl_attribute(navigator, 'permissions', 'navigator.permission
s exists'); | 12 assert_idl_attribute(navigator, 'permissions', 'navigator.permissions exists
'); |
15 | 13 |
16 assert_inherits(navigator.permissions, 'query'); | 14 assert_inherits(navigator.permissions, 'query'); |
17 | 15 |
18 assert_own_property(self, 'PermissionStatus'); | 16 assert_own_property(self, 'PermissionStatus'); |
19 }, 'Check the Permissions API surface in the ' + get_current_scope() + ' scope.'
); | 17 }, 'Check the Permissions API surface in the ' + get_current_scope() + ' scope.'
); |
20 | 18 |
21 done(); | 19 done(); |
OLD | NEW |