| OLD | NEW |
| 1 importScripts('/resources/testharness.js'); | 1 importScripts('/resources/testharness.js'); |
| 2 importScripts('/resources/testharness-helpers.js'); | 2 importScripts('/resources/testharness-helpers.js'); |
| 3 | 3 |
| 4 test(function() { | 4 test(function() { |
| 5 assert_own_property(self, 'PushEvent'); | 5 assert_own_property(self, 'PushEvent'); |
| 6 | 6 |
| 7 var event = new PushEvent('PushEvent'); | 7 var event = new PushEvent('PushEvent'); |
| 8 assert_will_be_idl_attribute(event, 'data'); | 8 assert_will_be_idl_attribute(event, 'data'); |
| 9 assert_equals(event.type, 'PushEvent'); | 9 assert_equals(event.type, 'PushEvent'); |
| 10 | 10 |
| 11 // PushEvent should be extending ExtendableEvent. | 11 // PushEvent should be extending ExtendableEvent. |
| 12 assert_inherits(event, 'waitUntil'); | 12 assert_inherits(event, 'waitUntil'); |
| 13 | 13 |
| 14 }, 'PushEvent should be exposed and have the expected interface.'); | 14 }, 'PushEvent should be exposed and have the expected interface.'); |
| 15 | 15 |
| 16 test(function() { | 16 test(function() { |
| 17 assert_own_property(self, 'PushManager', 'PushManager needs to be exposed as
a global.'); | 17 assert_own_property(self, 'PushManager', 'PushManager needs to be exposed as
a global.'); |
| 18 assert_own_property(registration, 'pushManager', 'PushManager needs to be ex
posed on the registration.'); | 18 assert_will_be_idl_attribute(registration, 'pushManager', 'PushManager needs
to be exposed on the registration.'); |
| 19 | 19 |
| 20 assert_inherits(registration.pushManager, 'subscribe'); | 20 assert_inherits(registration.pushManager, 'subscribe'); |
| 21 assert_inherits(registration.pushManager, 'getSubscription'); | 21 assert_inherits(registration.pushManager, 'getSubscription'); |
| 22 assert_inherits(registration.pushManager, 'hasPermission'); | 22 assert_inherits(registration.pushManager, 'hasPermission'); |
| 23 | 23 |
| 24 }, 'PushManager should be exposed and have the expected interface.'); | 24 }, 'PushManager should be exposed and have the expected interface.'); |
| 25 | 25 |
| 26 test(function() { | 26 test(function() { |
| 27 assert_own_property(self, 'PushMessageData', 'PushMessageData needs to be ex
posed as a global.'); | 27 assert_own_property(self, 'PushMessageData', 'PushMessageData needs to be ex
posed as a global.'); |
| 28 | 28 |
| 29 var pushMessageData = new PushMessageData('SomeData'); | 29 var pushMessageData = new PushMessageData('SomeData'); |
| 30 assert_inherits(pushMessageData, 'arrayBuffer'); | 30 assert_inherits(pushMessageData, 'arrayBuffer'); |
| 31 assert_inherits(pushMessageData, 'blob'); | 31 assert_inherits(pushMessageData, 'blob'); |
| 32 assert_inherits(pushMessageData, 'json'); | 32 assert_inherits(pushMessageData, 'json'); |
| 33 assert_inherits(pushMessageData, 'text'); | 33 assert_inherits(pushMessageData, 'text'); |
| 34 | 34 |
| 35 }, 'PushMessageData should be exposed and have the expected interface.'); | 35 }, 'PushMessageData should be exposed and have the expected interface.'); |
| 36 | 36 |
| 37 test(function() { | 37 test(function() { |
| 38 assert_own_property(self, 'PushSubscription', 'PushSubscription needs to be
exposed as a global.'); | 38 assert_own_property(self, 'PushSubscription', 'PushSubscription needs to be
exposed as a global.'); |
| 39 | 39 |
| 40 // FIXME: Assert existence of the attributes when they are properly | 40 // FIXME: Assert existence of the attributes when they are properly |
| 41 // exposed in the prototype chain. https://crbug.com/43394 | 41 // exposed in the prototype chain. https://crbug.com/43394 |
| 42 | 42 |
| 43 assert_own_property(PushSubscription.prototype, 'unsubscribe'); | 43 assert_own_property(PushSubscription.prototype, 'unsubscribe'); |
| 44 | 44 |
| 45 }, 'PushSubscription should be exposed and have the expected interface.'); | 45 }, 'PushSubscription should be exposed and have the expected interface.'); |
| OLD | NEW |