| OLD | NEW |
| 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 | 12 |
| 13 onactivate: EVENT_HANDLER, | 13 onactivate: EVENT_HANDLER, |
| 14 onfetch: EVENT_HANDLER, | 14 onfetch: EVENT_HANDLER, |
| 15 oninstall: EVENT_HANDLER, | 15 oninstall: EVENT_HANDLER, |
| 16 onmessage: EVENT_HANDLER | 16 onmessage: EVENT_HANDLER |
| 17 }); | 17 }); |
| 18 | 18 |
| 19 verifyInterface('ServiceWorkerClients', | 19 verifyInterface('ServiceWorkerClients', |
| 20 self.clients, | 20 self.clients, |
| 21 { | 21 { |
| 22 getServiced: 'function' | 22 getServiced: 'function' |
| 23 }); | 23 }); |
| 24 | 24 |
| 25 verifyInterface('Client'); | 25 verifyInterface('Client'); |
| 26 // FIXME: Get an instance and test it, or ensure property exists on prototyp
e. | 26 // FIXME: Get an instance and test it, or ensure property exists on prototyp
e. |
| 27 | 27 |
| 28 verifyInterface('CacheStorage', | 28 verifyInterface('CacheStorage', |
| 29 self.caches, | 29 self.caches, |
| 30 { | 30 { |
| 31 match: 'function', | 31 match: 'function', |
| 32 get: 'function', | 32 get: 'function', |
| 33 has: 'function', | 33 has: 'function', |
| 34 create: 'function', | 34 create: 'function', |
| 35 delete: 'function', | 35 delete: 'function', |
| 36 keys: 'function' | 36 keys: 'function' |
| 37 }); | 37 }); |
| 38 | 38 |
| 39 verifyInterface('Cache', | 39 verifyInterface('Cache', |
| 40 new Cache(), | 40 new Cache(), |
| 41 { | 41 { |
| 42 match: 'function', | 42 match: 'function', |
| 43 matchAll: 'function', | 43 matchAll: 'function', |
| 44 add: 'function', | 44 add: 'function', |
| 45 put: 'function', delete: 'function', | 45 put: 'function', delete: 'function', |
| 46 keys: 'function', | 46 keys: 'function', |
| 47 batch: 'function' | 47 batch: 'function' |
| 48 }); | 48 }); |
| 49 }, 'Interfaces and attributes in ServiceWorkerGlobalScope'); | 49 }, 'Interfaces and attributes in ServiceWorkerGlobalScope'); |
| OLD | NEW |