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

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

Issue 430993002: [ServiceWorker] CacheStorage tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
OLDNEW
1 importScripts('interfaces.js'); 1 importScripts('interfaces.js');
2 importScripts('worker-test-harness.js'); 2 importScripts('worker-test-harness.js');
3 3
4 test(function() { 4 test(function() {
5 var EVENT_HANDLER = 'object'; 5 var EVENT_HANDLER = 'object';
6 6
7 verifyInterface('ServiceWorkerGlobalScope', 7 verifyInterface('ServiceWorkerGlobalScope',
8 self, 8 self,
9 { 9 {
10 scope: 'string', 10 scope: 'string',
11 clients: 'object', 11 clients: 'object',
12 close: 'function', 12 close: 'function',
13 13
14 onactivate: EVENT_HANDLER, 14 onactivate: EVENT_HANDLER,
15 onfetch: EVENT_HANDLER, 15 onfetch: EVENT_HANDLER,
16 oninstall: EVENT_HANDLER, 16 oninstall: EVENT_HANDLER,
17 onmessage: EVENT_HANDLER 17 onmessage: EVENT_HANDLER
18 }); 18 });
19 19
20 verifyInterface('ServiceWorkerClients', 20 verifyInterface('ServiceWorkerClients',
21 self.clients, 21 self.clients,
22 { 22 {
23 getAll: 'function' 23 getAll: 'function'
24 }); 24 });
25 25
26 verifyInterface('ServiceWorkerClient'); 26 verifyInterface('ServiceWorkerClient');
27 // FIXME: Get an instance and test it, or ensure property exists on prototyp e. 27 // FIXME: Get an instance and test it, or ensure property exists on prototyp e.
28 28
29 }, 'Interfaces and attributes in ServiceWorkerGlobalScope'); 29 verifyInterface('CacheStorage',
30 self.caches,
31 {
32 match: 'function',
33 get: 'function',
34 has: 'function',
35 create: 'function',
36 delete: 'function',
37 keys: 'function'
38 });
39 }, 'Interfaces and attributes in ServiceWorkerGlobalScope');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698