Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Unified Diff: LayoutTests/http/tests/background_sync/resources/interfaces-worker.js

Issue 1096503002: [Background Sync] Converting Blink code to the MVP API (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Unregister method requires the sync registration tag Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/webexposed/global-interface-listing-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.');
+
« no previous file with comments | « no previous file | LayoutTests/webexposed/global-interface-listing-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698