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

Side by Side Diff: LayoutTests/http/tests/cachestorage/script-tests/cache-match.js

Issue 1209033011: Pull in the latest upstream testharness.js changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@bluetooth-temp
Patch Set: Fix rtcpeerconnection-idl test Created 5 years, 5 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 | « no previous file | LayoutTests/http/tests/resources/testharness.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 if (self.importScripts) { 1 if (self.importScripts) {
2 importScripts('/resources/testharness.js'); 2 importScripts('/resources/testharness.js');
3 importScripts('/resources/testharness-helpers.js'); 3 importScripts('/resources/testharness-helpers.js');
4 importScripts('../resources/test-helpers.js'); 4 importScripts('../resources/test-helpers.js');
5 } 5 }
6 6
7 // A set of Request/Response pairs to be used with prepopulated_cache_test(). 7 // A set of Request/Response pairs to be used with prepopulated_cache_test().
8 var simple_entries = [ 8 var simple_entries = [
9 { 9 {
10 name: 'a', 10 name: 'a',
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 return result.text(); 443 return result.text();
444 }) 444 })
445 .then(function(body_text) { 445 .then(function(body_text) {
446 assert_equals(body_text, 'a simple text file\n', 446 assert_equals(body_text, 'a simple text file\n',
447 'Cache.match should return a Response object with a ' + 447 'Cache.match should return a Response object with a ' +
448 'valid body each time it is called.'); 448 'valid body each time it is called.');
449 }); 449 });
450 }, 'Cache.match invoked multiple times for the same Request/Response'); 450 }, 'Cache.match invoked multiple times for the same Request/Response');
451 451
452 prepopulated_cache_test(simple_entries, function(cache, entries) { 452 prepopulated_cache_test(simple_entries, function(cache, entries) {
453 var request = new Request(entries.a.request, {method: 'POST'}); 453 var request = new Request(entries.a.request.clone(), {method: 'POST'});
jsbell 2015/07/09 23:44:37 Rebase to eliminate this diff. :)
454 return cache.match(request) 454 return cache.match(request)
455 .then(function(result) { 455 .then(function(result) {
456 assert_equals(result, undefined, 456 assert_equals(result, undefined,
457 'Cache.match should not find a match'); 457 'Cache.match should not find a match');
458 }); 458 });
459 }, 'Cache.match with POST Request'); 459 }, 'Cache.match with POST Request');
460 460
461 prepopulated_cache_test(simple_entries, function(cache, entries) { 461 prepopulated_cache_test(simple_entries, function(cache, entries) {
462 var response = entries.non_2xx_response.response; 462 var response = entries.non_2xx_response.response;
463 return cache.match(entries.non_2xx_response.request.url) 463 return cache.match(entries.non_2xx_response.request.url)
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 assert_equals(Object.keys(hash).length, entries.length); 508 assert_equals(Object.keys(hash).length, entries.length);
509 }); 509 });
510 510
511 return p.then(function() { 511 return p.then(function() {
512 return test_function(cache, hash); 512 return test_function(cache, hash);
513 }); 513 });
514 }, description); 514 }, description);
515 } 515 }
516 516
517 done(); 517 done();
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/resources/testharness.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698