| Index: LayoutTests/http/tests/background_sync/resources/interfaces-worker.js
|
| diff --git a/LayoutTests/http/tests/background_sync/resources/interfaces-worker.js b/LayoutTests/http/tests/background_sync/resources/interfaces-worker.js
|
| index 52c9d8628bd13c43a4fa7fe25398798868b7c318..dc5b2548386ea74bee48ba7f26f1c9d5d2b365bb 100644
|
| --- a/LayoutTests/http/tests/background_sync/resources/interfaces-worker.js
|
| +++ b/LayoutTests/http/tests/background_sync/resources/interfaces-worker.js
|
| @@ -3,18 +3,30 @@ importScripts('/resources/testharness-helpers.js');
|
|
|
| test(function() {
|
| assert_own_property(self, 'SyncManager', 'SyncManager needs to be exposed as a global.');
|
| - assert_will_be_idl_attribute(registration, 'syncManager', 'syncManager needs to be exposed on the registration.');
|
| + assert_will_be_idl_attribute(registration, 'sync', 'One-shot SyncManager needs to be exposed on the registration.');
|
|
|
| - assert_inherits(registration.syncManager, 'register');
|
| - assert_inherits(registration.syncManager, 'getRegistration');
|
| - assert_inherits(registration.syncManager, 'getRegistrations');
|
| + assert_inherits(registration.sync, 'register');
|
| + assert_inherits(registration.sync, 'getRegistration');
|
| + assert_inherits(registration.sync, 'getRegistrations');
|
| // FIXME: Re-enable this once permissions are wired up
|
| //assert_inherits(registration.syncManager, 'hasPermission');
|
|
|
| }, 'SyncManager should be exposed and have the expected interface.');
|
|
|
| test(function() {
|
| - assert_own_property(self, 'SyncRegistration', 'PushRegistration needs to be exposed as a global.');
|
| + assert_own_property(self, 'PeriodicSyncManager', 'PeriodicSyncManager needs to be exposed as a global.');
|
| + assert_will_be_idl_attribute(registration, 'periodicSync', 'Periodic SyncManager needs to be exposed on the registration.');
|
| +
|
| + assert_inherits(registration.periodicSync, 'register');
|
| + assert_inherits(registration.periodicSync, 'getRegistration');
|
| + assert_inherits(registration.periodicSync, 'getRegistrations');
|
| + // FIXME: Re-enable this once permissions are wired up
|
| + //assert_inherits(registration.syncManager, 'hasPermission');
|
| +
|
| +}, 'PeriodicSyncManager should be exposed and have the expected interface.');
|
| +
|
| +test(function() {
|
| + assert_own_property(self, 'SyncRegistration', 'SyncRegistration needs to be exposed as a global.');
|
|
|
| // FIXME: Assert existence of the attributes when they are properly
|
| // exposed in the prototype chain. https://crbug.com/43394
|
| @@ -24,9 +36,19 @@ test(function() {
|
| }, 'SyncRegistration should be exposed and have the expected interface.');
|
|
|
| test(function() {
|
| + assert_own_property(self, 'PeriodicSyncRegistration', 'PeriodicSyncRegistration needs to be exposed as a global.');
|
| +
|
| + // FIXME: Assert existence of the attributes when they are properly
|
| + // exposed in the prototype chain. https://crbug.com/43394
|
| +
|
| + assert_own_property(PeriodicSyncRegistration.prototype, 'unregister');
|
| +
|
| +}, 'PeriodicSyncRegistration should be exposed and have the expected interface.');
|
| +
|
| +test(function() {
|
| assert_own_property(self, 'SyncEvent');
|
|
|
| - var event = new SyncEvent('SyncEvent', {id: 'SyncEvent'});
|
| + var event = new SyncEvent('SyncEvent', {tag: 'SyncEvent'});
|
| assert_will_be_idl_attribute(event, 'registration');
|
| assert_equals(event.type, 'SyncEvent');
|
|
|
| @@ -35,3 +57,15 @@ test(function() {
|
|
|
| }, 'SyncEvent should be exposed and have the expected interface.');
|
|
|
| +test(function() {
|
| + assert_own_property(self, 'PeriodicSyncEvent');
|
| +
|
| + var event = new PeriodicSyncEvent('PeriodicSyncEvent', {tag: 'PeriodicSyncEvent'});
|
| + assert_will_be_idl_attribute(event, 'registration');
|
| + assert_equals(event.type, 'PeriodicSyncEvent');
|
| +
|
| + // PeriodicSyncEvent should be extending ExtendableEvent.
|
| + assert_inherits(event, 'waitUntil');
|
| +
|
| +}, 'PeriodicSyncEvent should be exposed and have the expected interface.');
|
| +
|
|
|