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

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

Issue 1926813004: Replace assert_promise_rejects with upstream promise_rejects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove all testharness-helpers.js references Created 4 years, 7 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 (self.importScripts) { 1 if (self.importScripts) {
2 importScripts('/resources/testharness.js'); 2 importScripts('/resources/testharness.js');
3 importScripts('/resources/testharness-helpers.js');
4 importScripts('../resources/test-helpers.js'); 3 importScripts('../resources/test-helpers.js');
5 } 4 }
6 5
7 prepopulated_cache_test(simple_entries, function(cache, entries) { 6 prepopulated_cache_test(simple_entries, function(cache, entries) {
8 return cache.match('not-present-in-the-cache') 7 return cache.match('not-present-in-the-cache')
9 .then(function(result) { 8 .then(function(result) {
10 assert_equals(result, undefined, 9 assert_equals(result, undefined,
11 'Cache.match failures should resolve with undefined.'); 10 'Cache.match failures should resolve with undefined.');
12 }); 11 });
13 }, 'Cache.match with no matching entries'); 12 }, 'Cache.match with no matching entries');
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 return cache.match(entries.error_response.request.url) 230 return cache.match(entries.error_response.request.url)
232 .then(function(result) { 231 .then(function(result) {
233 assert_response_equals( 232 assert_response_equals(
234 result, entries.error_response.response, 233 result, entries.error_response.response,
235 'Cache.match should return a Response object that has the ' + 234 'Cache.match should return a Response object that has the ' +
236 'same properties as a stored network error response.'); 235 'same properties as a stored network error response.');
237 }); 236 });
238 }, 'Cache.match with a network error Response'); 237 }, 'Cache.match with a network error Response');
239 238
240 done(); 239 done();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698