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

Side by Side Diff: LayoutTests/http/tests/serviceworker/resources/fetch-access-control-util.js

Issue 921673003: [Fetch] Split layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « LayoutTests/http/tests/fetch/workers/fetch-access-control-redirect-nocors-other-https.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var SCOPE = BASE_ORIGIN + 1 var SCOPE = BASE_ORIGIN +
2 '/serviceworker/resources/fetch-access-control-iframe.html?' + TEST_OPTIONS; 2 '/serviceworker/resources/fetch-access-control-iframe.html?' + TEST_OPTIONS;
3 var IFRAME_ORIGIN = BASE_ORIGIN; 3 var IFRAME_ORIGIN = BASE_ORIGIN;
4 var BASE_URL = BASE_ORIGIN + 4 var BASE_URL = BASE_ORIGIN +
5 '/serviceworker/resources/fetch-access-control.php?'; 5 '/serviceworker/resources/fetch-access-control.php?';
6 var OTHER_BASE_URL = OTHER_ORIGIN + 6 var OTHER_BASE_URL = OTHER_ORIGIN +
7 '/serviceworker/resources/fetch-access-control.php?'; 7 '/serviceworker/resources/fetch-access-control.php?';
8 var REDIRECT_URL = BASE_ORIGIN + 8 var REDIRECT_URL = BASE_ORIGIN +
9 '/serviceworker/resources/redirect.php?Redirect='; 9 '/serviceworker/resources/redirect.php?Redirect=';
10 var OTHER_REDIRECT_URL = OTHER_ORIGIN + 10 var OTHER_REDIRECT_URL = OTHER_ORIGIN +
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 return Promise.resolve({fetchResult: 'error'}); 361 return Promise.resolve({fetchResult: 'error'});
362 } 362 }
363 } 363 }
364 364
365 var report_data = {}; 365 var report_data = {};
366 function report(data) { 366 function report(data) {
367 report_data = data; 367 report_data = data;
368 } 368 }
369 369
370 function executeTest(test_target) { 370 function executeTest(test_target) {
371 if (test_target.length == 0) {
372 return Promise.resolve();
373 }
371 return doFetch(test_target[0]) 374 return doFetch(test_target[0])
372 .then(function(message) { 375 .then(function(message) {
373 var checks = test_target[1].concat(showComment); 376 var checks = test_target[1].concat(showComment);
374 checks.forEach(function(checkFunc) { 377 checks.forEach(function(checkFunc) {
375 checkFunc.call(this, test_target[0], message); 378 checkFunc.call(this, test_target[0], message);
376 }); 379 });
377 380
378 if (test_target[2]) { 381 if (test_target[2]) {
379 report_data = {}; 382 report_data = {};
380 if (message.fetchResult !== 'resolved' || 383 if (message.fetchResult !== 'resolved' ||
(...skipping 30 matching lines...) Expand all
411 return executePromiseTest(test_targets[counter], 414 return executePromiseTest(test_targets[counter],
412 "executeTest-" + counter); 415 "executeTest-" + counter);
413 }.bind(this, i)).catch(function(e) { 416 }.bind(this, i)).catch(function(e) {
414 // The error was already reported. Continue to the next test. 417 // The error was already reported. Continue to the next test.
415 }); 418 });
416 } 419 }
417 promise.then(function() {t.done();}); 420 promise.then(function() {t.done();});
418 }, 421 },
419 'executeTests'); 422 'executeTests');
420 } 423 }
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/fetch/workers/fetch-access-control-redirect-nocors-other-https.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698