| 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..da3e20d6d8ff60772fe466a809d941d93746bc57 100644
|
| --- a/LayoutTests/http/tests/background_sync/resources/interfaces-worker.js
|
| +++ b/LayoutTests/http/tests/background_sync/resources/interfaces-worker.js
|
| @@ -3,18 +3,28 @@ 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');
|
| - // FIXME: Re-enable this once permissions are wired up
|
| - //assert_inherits(registration.syncManager, 'hasPermission');
|
| + assert_inherits(registration.sync, 'register');
|
| + assert_inherits(registration.sync, 'getRegistration');
|
| + assert_inherits(registration.sync, 'getRegistrations');
|
| + assert_inherits(registration.sync, 'permissionState');
|
|
|
| }, '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');
|
| + assert_inherits(registration.periodicSync, 'permissionState');
|
| +
|
| +}, '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,14 +34,28 @@ test(function() {
|
| }, 'SyncRegistration should be exposed and have the expected interface.');
|
|
|
| test(function() {
|
| - assert_own_property(self, 'SyncEvent');
|
| + 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
|
|
|
| - var event = new SyncEvent('SyncEvent', {id: 'SyncEvent'});
|
| - assert_will_be_idl_attribute(event, 'registration');
|
| - assert_equals(event.type, 'SyncEvent');
|
| + assert_own_property(PeriodicSyncRegistration.prototype, 'unregister');
|
| +
|
| +}, 'PeriodicSyncRegistration should be exposed and have the expected interface.');
|
| +
|
| +test(function() {
|
| + assert_own_property(self, 'SyncEvent');
|
|
|
| // SyncEvent should be extending ExtendableEvent.
|
| - assert_inherits(event, 'waitUntil');
|
| + assert_inherits(SyncEvent.prototype, 'waitUntil');
|
|
|
| }, 'SyncEvent should be exposed and have the expected interface.');
|
|
|
| +test(function() {
|
| + assert_own_property(self, 'PeriodicSyncEvent');
|
| +
|
| + // PeriodicSyncEvent should be extending ExtendableEvent.
|
| + assert_inherits(PeriodicSyncEvent.prototype, 'waitUntil');
|
| +
|
| +}, 'PeriodicSyncEvent should be exposed and have the expected interface.');
|
| +
|
|
|