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

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

Issue 963683002: Add IDL and initial Blink API for Background Sync (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add missing serviceWorkerRegistration.syncManager to interface tests Created 5 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 importScripts('/resources/testharness.js');
2 importScripts('/resources/testharness-helpers.js');
3
4 test(function() {
5 assert_own_property(self, 'SyncManager', 'SyncManager needs to be exposed as a global.');
6 assert_will_be_idl_attribute(registration, 'syncManager', 'syncManager needs to be exposed on the registration.');
7
8 assert_inherits(registration.syncManager, 'register');
9 assert_inherits(registration.syncManager, 'getRegistration');
10 assert_inherits(registration.syncManager, 'getRegistrations');
11 // FIXME: Re-enable this once permissions are wired up
12 //assert_inherits(registration.syncManager, 'hasPermission');
13
14 }, 'SyncManager should be exposed and have the expected interface.');
15
16 test(function() {
17 assert_own_property(self, 'SyncRegistration', 'PushRegistration needs to be exposed as a global.');
18
19 // FIXME: Assert existence of the attributes when they are properly
20 // exposed in the prototype chain. https://crbug.com/43394
21
22 assert_own_property(SyncRegistration.prototype, 'unregister');
23
24 }, 'SyncRegistration should be exposed and have the expected interface.');
25
26 test(function() {
27 assert_own_property(self, 'SyncEvent');
28
29 var event = new SyncEvent('SyncEvent', {id: 'SyncEvent'});
30 assert_will_be_idl_attribute(event, 'registration');
31 assert_equals(event.type, 'SyncEvent');
32
33 // SyncEvent should be extending ExtendableEvent.
34 assert_inherits(event, 'waitUntil');
35
36 }, 'SyncEvent should be exposed and have the expected interface.');
37
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698