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

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

Issue 435453002: [ServiceWorker] Update formatting for tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 importScripts('interfaces.js'); 1 importScripts('interfaces.js');
2 importScripts('worker-testharness.js'); 2 importScripts('worker-testharness.js');
3 importScripts('/resources/testharness-helpers.js'); 3 importScripts('/resources/testharness-helpers.js');
4 4
5 var EVENT_HANDLER = 'object';
6
5 test(function() { 7 test(function() {
6 var EVENT_HANDLER = 'object'; 8 verify_interface('ServiceWorkerGlobalScope',
9 self,
10 {
11 scope: 'string',
12 clients: 'object',
13 close: 'function',
7 14
8 verifyInterface('ServiceWorkerGlobalScope', 15 onactivate: EVENT_HANDLER,
9 self, 16 onfetch: EVENT_HANDLER,
10 { 17 oninstall: EVENT_HANDLER,
11 scope: 'string', 18 onmessage: EVENT_HANDLER
12 clients: 'object', 19 });
13 close: 'function', 20 }, 'ServiceWorkerGlobalScope');
14 21
15 onactivate: EVENT_HANDLER, 22 test(function() {
16 onfetch: EVENT_HANDLER, 23 verify_interface('ServiceWorkerClients',
17 oninstall: EVENT_HANDLER, 24 self.clients,
18 onmessage: EVENT_HANDLER 25 {
19 }); 26 getAll: 'function'
27 });
28 }, 'ServiceWorkerClients');
20 29
21 verifyInterface('ServiceWorkerClients', 30 test(function() {
22 self.clients, 31 verify_interface('ServiceWorkerClient');
23 { 32 // FIXME: Get an instance and test it, or ensure property exists on
24 getAll: 'function' 33 // prototype.
25 }); 34 }, 'ServiceWorkerClient');
26 35
27 verifyInterface('ServiceWorkerClient'); 36 test(function() {
28 // FIXME: Get an instance and test it, or ensure property exists on prototyp e. 37 verify_interface('CacheStorage',
29 38 self.caches,
30 verifyInterface('CacheStorage', 39 {
31 self.caches, 40 match: 'function',
32 { 41 get: 'function',
33 match: 'function', 42 has: 'function',
34 get: 'function', 43 create: 'function',
35 has: 'function', 44 delete: 'function',
36 create: 'function', 45 keys: 'function'
37 delete: 'function', 46 });
38 keys: 'function' 47 }, 'CacheStorage');
39 });
40 }, 'Interfaces and attributes in ServiceWorkerGlobalScope');
41 48
42 promise_test(function(t) { 49 promise_test(function(t) {
43 return create_temporary_cache(t) 50 return create_temporary_cache(t)
44 .then(function(cache) { 51 .then(function(cache) {
45 verifyInterface('Cache', 52 verify_interface('Cache',
46 cache, 53 cache,
47 { 54 {
48 match: 'function', 55 match: 'function',
49 matchAll: 'function', 56 matchAll: 'function',
50 add: 'function', 57 add: 'function',
51 addAll: 'function', 58 addAll: 'function',
52 put: 'function', 59 put: 'function',
53 delete: 'function', 60 delete: 'function',
54 keys: 'function' 61 keys: 'function'
55 }); 62 });
56 }); 63 });
57 }, 'Cache'); 64 }, 'Cache');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698