| OLD | NEW | 
|---|
| 1 <!doctype html> | 1 <!doctype html> | 
| 2 <html> | 2 <html> | 
| 3   <head> | 3   <head> | 
| 4     <title>Push API: Verifies that the right Push API interfaces get exposed.</t
    itle> | 4     <title>Background Sync API: Verifies that the right Background Sync API inte
    rfaces get exposed.</title> | 
| 5     <script src="../resources/testharness.js"></script> | 5     <script src="../resources/testharness.js"></script> | 
| 6     <script src="../resources/testharnessreport.js"></script> | 6     <script src="../resources/testharnessreport.js"></script> | 
| 7     <script src="../serviceworker/resources/test-helpers.js"></script> | 7     <script src="../serviceworker/resources/test-helpers.js"></script> | 
| 8   </head> | 8   </head> | 
| 9   <body> | 9   <body> | 
| 10     <script> | 10     <script> | 
| 11       // Tests that the expected Push API interfaces are being exposed on both | 11       // Tests that the expected Background Sync API interfaces are being expose
    d on both | 
| 12       // the Service Worker and Document global scopes. | 12       // the Service Worker and Document global scopes. | 
| 13       service_worker_test( | 13       service_worker_test( | 
| 14           'resources/interfaces-worker.js', | 14           'resources/interfaces-worker.js', | 
| 15           'Exposure of interfaces in a Service Worker.'); | 15           'Exposure of interfaces in a Service Worker.'); | 
| 16 | 16 | 
| 17       test(function() { | 17       test(function() { | 
| 18           assert_own_property(self, 'PushManager', 'PushManager needs to be expo
    sed as a global.'); | 18           assert_own_property(self, 'SyncManager', 'SyncManager needs to be expo
    sed as a global.'); | 
| 19 | 19 | 
| 20           assert_own_property(PushManager.prototype, 'subscribe'); | 20           assert_own_property(SyncManager.prototype, 'register'); | 
| 21           assert_own_property(PushManager.prototype, 'getSubscription'); | 21           assert_own_property(SyncManager.prototype, 'getRegistration'); | 
| 22           assert_own_property(PushManager.prototype, 'hasPermission'); | 22           assert_own_property(SyncManager.prototype, 'getRegistrations'); | 
|  | 23           // FIXME: Re-enable this once permissions are wired up | 
|  | 24           //assert_own_property(SyncManager.prototype, 'hasPermission'); | 
| 23 | 25 | 
| 24       }, 'PushManager should be exposed and have the expected interface in a Doc
    ument.'); | 26       }, 'SyncManager should be exposed and have the expected interface in a Doc
    ument.'); | 
| 25 | 27 | 
| 26       test(function() { | 28       test(function() { | 
| 27           assert_own_property(self, 'PushSubscription', 'PushSubscription needs 
    to be exposed as a global.'); | 29           assert_own_property(self, 'SyncRegistration', 'SyncRegistration needs 
    to be exposed as a global.'); | 
| 28 | 30 | 
| 29           // FIXME: Assert existence of the attributes when they are properly | 31           // FIXME: Assert existence of the attributes when they are properly | 
| 30           // exposed in the prototype chain. https://crbug.com/43394 | 32           // exposed in the prototype chain. https://crbug.com/43394 | 
| 31 | 33 | 
| 32           assert_own_property(PushSubscription.prototype, 'unsubscribe'); | 34           assert_own_property(SyncRegistration.prototype, 'unregister'); | 
| 33 | 35 | 
| 34       }, 'PushSubscription should be exposed and have the expected interface in 
    a Document.'); | 36       }, 'SyncRegistration should be exposed and have the expected interface in 
    a Document.'); | 
| 35     </script> | 37     </script> | 
| 36   </body> | 38   </body> | 
| 37 </html> | 39 </html> | 
| OLD | NEW | 
|---|