Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 if ('ServiceWorkerGlobalScope' in self && | 1 if ('ServiceWorkerGlobalScope' in self && |
| 2 self instanceof ServiceWorkerGlobalScope) { | 2 self instanceof ServiceWorkerGlobalScope) { |
| 3 // ServiceWorker case | 3 // ServiceWorker case |
| 4 importScripts('/serviceworker/resources/worker-testharness.js'); | 4 importScripts('/serviceworker/resources/worker-testharness.js'); |
| 5 importScripts('/serviceworker/resources/test-helpers.js'); | 5 importScripts('/serviceworker/resources/test-helpers.js'); |
| 6 importScripts('/serviceworker/resources/fetch-test-options.js'); | 6 importScripts('/serviceworker/resources/fetch-test-options.js'); |
| 7 } else if (self.importScripts) { | 7 } else if (self.importScripts) { |
| 8 // Other workers cases | 8 // Other workers cases |
| 9 importScripts('/resources/testharness.js'); | 9 importScripts('/resources/testharness.js'); |
| 10 importScripts('/serviceworker/resources/test-helpers.js'); | 10 importScripts('/serviceworker/resources/test-helpers.js'); |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 175 var VALID_REASON_PHRASE = [ | 175 var VALID_REASON_PHRASE = [ |
| 176 '\t', ' ', '"', '(', ')', ',', '/', ':', ';', '<', '=', '>', '?', '@', '[', | 176 '\t', ' ', '"', '(', ')', ',', '/', ':', ';', '<', '=', '>', '?', '@', '[', |
| 177 '\\', ']', '{', '}', | 177 '\\', ']', '{', '}', |
| 178 '!', '#', '$', '%', '&', '\'', '*', '+', '-', '.', '^', '_', '`', '|', '~', | 178 '!', '#', '$', '%', '&', '\'', '*', '+', '-', '.', '^', '_', '`', '|', '~', |
| 179 // non-CHAR | 179 // non-CHAR |
| 180 '\x80', '\xff', | 180 '\x80', '\xff', |
| 181 // Valid strings. | 181 // Valid strings. |
| 182 '', '0123456789', '404 Not Found', 'HTTP/1.1 404 Not Found', 'AZ\u00ffaz', | 182 '', '0123456789', '404 Not Found', 'HTTP/1.1 404 Not Found', 'AZ\u00ffaz', |
| 183 'x'.repeat(100000)]; | 183 'x'.repeat(100000)]; |
| 184 | 184 |
| 185 var INVALID_URLS = | |
| 186 ['http://', | |
| 187 'https://', | |
| 188 'http://ex%00ample.com', | |
| 189 'http://ex%0dample.com', | |
| 190 'http://ex%0aample.com', | |
| 191 'http://ex%08ample.com']; | |
|
hiroshige
2015/04/27 11:47:25
Could you also add the following? (I'd like to tes
shiva.jm
2015/04/28 06:06:48
when tried with 'http://ex\x0dample.com', it did n
hiroshige
2015/04/28 10:48:23
Hmm.
'http://ex\x00ample.com' throws TypeError.
'h
| |
| 192 | |
| 185 function size(headers) { | 193 function size(headers) { |
| 186 var count = 0; | 194 var count = 0; |
| 187 for (var header of headers) { | 195 for (var header of headers) { |
| 188 ++count; | 196 ++count; |
| 189 } | 197 } |
| 190 return count; | 198 return count; |
| 191 } | 199 } |
| 192 | 200 |
| 193 function testBlockMixedContent(mode) { | 201 function testBlockMixedContent(mode) { |
| 194 promise_test(function(t) { | 202 promise_test(function(t) { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 247 function() { | 255 function() { |
| 248 if (mode !== 'same-origin') { | 256 if (mode !== 'same-origin') { |
| 249 assert_unreached( | 257 assert_unreached( |
| 250 'Test 5: Cross-origin HTTPS request must success: ' + | 258 'Test 5: Cross-origin HTTPS request must success: ' + |
| 251 'mode = ' + mode); | 259 'mode = ' + mode); |
| 252 } | 260 } |
| 253 }); | 261 }); |
| 254 }); | 262 }); |
| 255 }, 'Block fetch() as mixed content (' + mode + ')'); | 263 }, 'Block fetch() as mixed content (' + mode + ')'); |
| 256 } | 264 } |
| OLD | NEW |