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 { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 add: 'function', | 64 add: 'function', |
65 addAll: 'function', | 65 addAll: 'function', |
66 put: 'function', | 66 put: 'function', |
67 delete: 'function', | 67 delete: 'function', |
68 keys: 'function' | 68 keys: 'function' |
69 }); | 69 }); |
70 }); | 70 }); |
71 }, 'Cache'); | 71 }, 'Cache'); |
72 | 72 |
73 test(function() { | 73 test(function() { |
74 assert_equals(new ExtendableEvent('ExtendableEvent').type, 'ExtendableEvent'
); | 74 assert_equals( |
| 75 new ExtendableEvent('ExtendableEvent').type, |
| 76 'ExtendableEvent', 'Type of ExtendableEvent should be ExtendableEvent:'); |
| 77 assert_equals( |
| 78 new FetchEvent('FetchEvent').type, |
| 79 'FetchEvent', 'Type of FetchEvent should be FetchEvent:'); |
| 80 assert_equals( |
| 81 new FetchEvent('FetchEvent').cancelable, |
| 82 true, 'Default FetchEvent.cancelable should be true:'); |
| 83 assert_equals( |
| 84 new FetchEvent('FetchEvent').bubbles, |
| 85 false, 'Default FetchEvent.bubbles should be true:'); |
| 86 assert_equals( |
| 87 new FetchEvent('FetchEvent').isReload, |
| 88 false, 'Default FetchEvent.isReload should be false:'); |
| 89 assert_equals( |
| 90 new FetchEvent('FetchEvent', {isReload : true}).isReload, true, |
| 91 'FetchEvent.isReload with option {isReload : true} should be true:'); |
| 92 var req = new Request('http://localhost/', |
| 93 {method: 'POST', |
| 94 headers: [['Content-Type', 'Text/Html']]}); |
| 95 assert_equals( |
| 96 new FetchEvent('FetchEvent',{request : req, isReload : true}).request.url, |
| 97 'http://localhost/', |
| 98 'FetchEvent.request.url should return the value it was initialized to:'); |
75 }, 'Event constructors'); | 99 }, 'Event constructors'); |
OLD | NEW |