OLD | NEW |
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'; | 5 var EVENT_HANDLER = 'object'; |
6 | 6 |
7 test(function() { | 7 test(function() { |
8 verify_interface('ServiceWorkerGlobalScope', | 8 verify_interface('ServiceWorkerGlobalScope', |
9 self, | 9 self, |
10 { | 10 { |
11 clients: 'object', | 11 clients: 'object', |
12 close: 'function', | 12 close: 'function', |
13 registration: 'object', | 13 registration: 'object', |
14 skipWaiting: 'function', | 14 skipWaiting: 'function', |
15 | 15 |
16 onactivate: EVENT_HANDLER, | 16 onactivate: EVENT_HANDLER, |
17 onfetch: EVENT_HANDLER, | 17 onfetch: EVENT_HANDLER, |
18 oninstall: EVENT_HANDLER, | 18 oninstall: EVENT_HANDLER, |
19 onmessage: EVENT_HANDLER | 19 onmessage: EVENT_HANDLER |
20 }); | 20 }); |
21 }, 'ServiceWorkerGlobalScope'); | 21 }, 'ServiceWorkerGlobalScope'); |
22 | 22 |
23 test(function() { | 23 test(function() { |
24 verify_interface('Clients', | 24 verify_interface('Clients', |
25 self.clients, | 25 self.clients, |
26 { | 26 { |
| 27 claim: 'function', |
27 getAll: 'function' | 28 getAll: 'function' |
28 }); | 29 }); |
29 }, 'Clients'); | 30 }, 'Clients'); |
30 | 31 |
31 test(function() { | 32 test(function() { |
32 verify_interface('Client'); | 33 verify_interface('Client'); |
33 // FIXME: Get an instance and test it, or ensure property exists on | 34 // FIXME: Get an instance and test it, or ensure property exists on |
34 // prototype. | 35 // prototype. |
35 }, 'Client'); | 36 }, 'Client'); |
36 | 37 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 72 |
72 test(function() { | 73 test(function() { |
73 assert_equals(new ExtendableEvent('ExtendableEvent').type, 'ExtendableEvent'
); | 74 assert_equals(new ExtendableEvent('ExtendableEvent').type, 'ExtendableEvent'
); |
74 assert_equals(new InstallEvent('InstallEvent').type, 'InstallEvent'); | 75 assert_equals(new InstallEvent('InstallEvent').type, 'InstallEvent'); |
75 | 76 |
76 assert_equals(new InstallEvent('InstallEvent').cancelable, false); | 77 assert_equals(new InstallEvent('InstallEvent').cancelable, false); |
77 assert_equals(new InstallEvent('InstallEvent').bubbles, false); | 78 assert_equals(new InstallEvent('InstallEvent').bubbles, false); |
78 assert_equals(new InstallEvent('InstallEvent', { cancelable : true }).cancel
able, true); | 79 assert_equals(new InstallEvent('InstallEvent', { cancelable : true }).cancel
able, true); |
79 assert_equals(new InstallEvent('InstallEvent', { bubbles : true }).bubbles,
true); | 80 assert_equals(new InstallEvent('InstallEvent', { bubbles : true }).bubbles,
true); |
80 }, 'Event constructors'); | 81 }, 'Event constructors'); |
OLD | NEW |