4 <title>Background Sync API: Verifies that the right Background Sync API interfaces get exposed.
</title>
5 <script src=
"../resources/testharness.js"></script>
6 <script src=
"../resources/testharnessreport.js"></script>
7 <script src=
"../serviceworker/resources/test-helpers.js"></script>
11 // Tests that the expected Background Sync API interfaces are being exposed on both
12 // the Service Worker and Document global scopes.
14 'resources/interfaces-worker.js',
15 'Exposure of interfaces in a Service Worker.');
18 assert_own_property(self
, 'SyncManager', 'SyncManager needs to be exposed as a global.');
20 assert_own_property(SyncManager
.prototype, 'register');
21 assert_own_property(SyncManager
.prototype, 'getRegistration');
22 assert_own_property(SyncManager
.prototype, 'getRegistrations');
23 assert_own_property(SyncManager
.prototype, 'permissionState');
25 }, 'SyncManager should be exposed and have the expected interface in a Document.');
28 assert_own_property(self
, 'SyncRegistration', 'SyncRegistration needs to be exposed as a global.');
30 // FIXME: Assert existence of the attributes when they are properly
31 // exposed in the prototype chain. https://crbug.com/43394
33 assert_own_property(SyncRegistration
.prototype, 'done');
34 assert_own_property(SyncRegistration
.prototype, 'unregister');
35 assert_own_property(SyncRegistration
.prototype, 'tag');
37 }, 'SyncRegistration should be exposed and have the expected interface in a Document.');