Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: LayoutTests/http/tests/fetch/resources/fetch-test-helpers.js

Issue 1098473003: Implement redirect() API for Fetch Response (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698