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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/background_sync/interfaces.html

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 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Background Sync API: Verifies that the right Background Sync API inte rfaces get exposed.</title> 4 <title>Background Sync API: Verifies that the right Background Sync API inte rfaces get exposed.</title>
5 <script src="../resources/testharness.js"></script> 5 <script src="../resources/testharness.js"></script>
6 <script src="../resources/testharnessreport.js"></script> 6 <script src="../resources/testharnessreport.js"></script>
7 <script src="../serviceworker/resources/test-helpers.js"></script> 7 <script src="../serviceworker/resources/test-helpers.js"></script>
8 </head> 8 </head>
9 <body> 9 <body>
10 <script> 10 <script>
11 // Tests that the expected Background Sync API interfaces are being expose d on both 11 // Tests that the expected Background Sync API interfaces are being expose d on both
12 // the Service Worker and Document global scopes. 12 // the Service Worker and Document global scopes.
13 service_worker_test( 13 service_worker_test(
14 'resources/interfaces-worker.js', 14 'resources/interfaces-worker.js',
15 'Exposure of interfaces in a Service Worker.'); 15 'Exposure of interfaces in a Service Worker.');
16 16
17 test(function() { 17 test(function() {
18 assert_own_property(self, 'SyncManager', 'SyncManager needs to be expo sed as a global.'); 18 assert_own_property(self, 'SyncManager', 'SyncManager needs to be expo sed as a global.');
19 19
20 assert_own_property(SyncManager.prototype, 'register'); 20 assert_own_property(SyncManager.prototype, 'register');
21 assert_own_property(SyncManager.prototype, 'getRegistration'); 21 assert_own_property(SyncManager.prototype, 'getTags');
22 assert_own_property(SyncManager.prototype, 'getRegistrations');
23 assert_own_property(SyncManager.prototype, 'permissionState');
24 22
25 }, 'SyncManager should be exposed and have the expected interface in a Doc ument.'); 23 }, 'SyncManager should be exposed and have the expected interface in a Doc ument.');
26
27 test(function() {
28 assert_own_property(self, 'SyncRegistration', 'SyncRegistration needs to be exposed as a global.');
29
30 // FIXME: Assert existence of the attributes when they are properly
31 // exposed in the prototype chain. https://crbug.com/43394
32
33 assert_own_property(SyncRegistration.prototype, 'finished');
34 assert_own_property(SyncRegistration.prototype, 'unregister');
35 assert_own_property(SyncRegistration.prototype, 'tag');
36
37 }, 'SyncRegistration should be exposed and have the expected interface in a Document.');
38 </script> 24 </script>
39 </body> 25 </body>
40 </html> 26 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698