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

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

Issue 1437883002: [Background Sync] Align exposed API with spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src@remove-periodic
Patch Set: Rebase Created 5 years, 1 month 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
1 importScripts('/resources/testharness.js'); 1 importScripts('/resources/testharness.js');
2 importScripts('/resources/testharness-helpers.js'); 2 importScripts('/resources/testharness-helpers.js');
3 3
4 test(function() { 4 test(function() {
5 assert_own_property(self, 'SyncManager', 'SyncManager needs to be exposed as a global.'); 5 assert_own_property(self, 'SyncManager', 'SyncManager needs to be exposed as a global.');
6 assert_idl_attribute(registration, 'sync', 'One-shot SyncManager needs to be exposed on the registration.'); 6 assert_idl_attribute(registration, 'sync', 'One-shot SyncManager needs to be exposed on the registration.');
7 7
8 assert_inherits(registration.sync, 'register'); 8 assert_inherits(registration.sync, 'register');
9 assert_inherits(registration.sync, 'getRegistration'); 9 assert_inherits(registration.sync, 'getTags');
10 assert_inherits(registration.sync, 'getRegistrations');
11 assert_inherits(registration.sync, 'permissionState');
12 10
13 }, 'SyncManager should be exposed and have the expected interface.'); 11 }, 'SyncManager should be exposed and have the expected interface.');
14 12
15 test(function() { 13 test(function() {
16 assert_own_property(self, 'SyncRegistration', 'SyncRegistration needs to be exposed as a global.');
17
18 // FIXME: Assert existence of the attributes when they are properly
19 // exposed in the prototype chain. https://crbug.com/43394
20 assert_own_property(SyncRegistration.prototype, 'finished');
21 assert_own_property(SyncRegistration.prototype, 'unregister');
22 assert_own_property(SyncRegistration.prototype, 'tag');
23
24 }, 'SyncRegistration should be exposed and have the expected interface.');
25
26 test(function() {
27 assert_own_property(self, 'SyncEvent'); 14 assert_own_property(self, 'SyncEvent');
28 15
29 assert_will_be_idl_attribute(SyncEvent.prototype, 'registration'); 16 assert_will_be_idl_attribute(SyncEvent.prototype, 'tag');
30 17
31 // SyncEvent should be extending ExtendableEvent. 18 // SyncEvent should be extending ExtendableEvent.
32 assert_inherits(SyncEvent.prototype, 'waitUntil'); 19 assert_inherits(SyncEvent.prototype, 'waitUntil');
33 20
34 }, 'SyncEvent should be exposed and have the expected interface.'); 21 }, 'SyncEvent should be exposed and have the expected interface.');
35 22
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698