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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 false, 'Default FetchEvent.bubbles should be false'); | 85 false, 'Default FetchEvent.bubbles should be false'); |
86 assert_equals( | 86 assert_equals( |
87 new FetchEvent('FetchEvent').isReload, | 87 new FetchEvent('FetchEvent').isReload, |
88 false, 'Default FetchEvent.isReload should be false'); | 88 false, 'Default FetchEvent.isReload should be false'); |
89 assert_equals( | 89 assert_equals( |
90 new FetchEvent('FetchEvent', {cancelable: false}).cancelable, | 90 new FetchEvent('FetchEvent', {cancelable: false}).cancelable, |
91 false, 'FetchEvent.cancelable should be false'); | 91 false, 'FetchEvent.cancelable should be false'); |
92 assert_equals( | 92 assert_equals( |
93 new FetchEvent('FetchEvent', {isReload : true}).isReload, true, | 93 new FetchEvent('FetchEvent', {isReload : true}).isReload, true, |
94 'FetchEvent.isReload with option {isReload : true} should be true'); | 94 'FetchEvent.isReload with option {isReload : true} should be true'); |
95 var req = new Request('http://localhost/', | 95 var req = new Request('https://www.example.com/', {method: 'POST'}); |
96 {method: 'POST', | |
97 headers: [['Content-Type', 'Text/Html']]}); | |
98 assert_equals( | 96 assert_equals( |
99 new FetchEvent('FetchEvent', {request : req, isReload : true}).request.url
, | 97 new FetchEvent('FetchEvent', {request: req, isReload: true}).request.url, |
100 'http://localhost/', | 98 'https://www.example.com/', |
101 'FetchEvent.request.url should return the value it was initialized to'); | 99 'FetchEvent.request.url should return the value it was initialized to'); |
102 }, 'Event constructors'); | 100 }, 'Event constructors'); |
OLD | NEW |