OLD | NEW |
(Empty) | |
| 1 importScripts('/resources/testharness.js'); |
| 2 importScripts('/resources/testharness-helpers.js'); |
| 3 |
| 4 test(function() { |
| 5 assert_own_property(self, 'SyncManager', 'SyncManager needs to be exposed as
a global.'); |
| 6 assert_will_be_idl_attribute(registration, 'syncManager', 'syncManager needs
to be exposed on the registration.'); |
| 7 |
| 8 assert_inherits(registration.syncManager, 'register'); |
| 9 assert_inherits(registration.syncManager, 'getRegistration'); |
| 10 assert_inherits(registration.syncManager, 'getRegistrations'); |
| 11 // FIXME: Re-enable this once permissions are wired up |
| 12 //assert_inherits(registration.syncManager, 'hasPermission'); |
| 13 |
| 14 }, 'SyncManager should be exposed and have the expected interface.'); |
| 15 |
| 16 test(function() { |
| 17 assert_own_property(self, 'SyncRegistration', 'PushRegistration needs to be
exposed as a global.'); |
| 18 |
| 19 // FIXME: Assert existence of the attributes when they are properly |
| 20 // exposed in the prototype chain. https://crbug.com/43394 |
| 21 |
| 22 assert_own_property(SyncRegistration.prototype, 'unregister'); |
| 23 |
| 24 }, 'SyncRegistration should be exposed and have the expected interface.'); |
| 25 |
| 26 test(function() { |
| 27 assert_own_property(self, 'SyncEvent'); |
| 28 |
| 29 var event = new SyncEvent('SyncEvent', {id: 'SyncEvent'}); |
| 30 assert_will_be_idl_attribute(event, 'registration'); |
| 31 assert_equals(event.type, 'SyncEvent'); |
| 32 |
| 33 // SyncEvent should be extending ExtendableEvent. |
| 34 assert_inherits(event, 'waitUntil'); |
| 35 |
| 36 }, 'SyncEvent should be exposed and have the expected interface.'); |
| 37 |
OLD | NEW |