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

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

Issue 1295633003: Cache Storage: replace assert_object_equals w/ assert_response_equals (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/cachestorage/script-tests/cache-match.js
diff --git a/LayoutTests/http/tests/cachestorage/script-tests/cache-match.js b/LayoutTests/http/tests/cachestorage/script-tests/cache-match.js
index b5e5a8c04630e0085d7ea06829a3567b4e5159bb..25e4799684ca93b2b8d23d7ed19e9648dab60663 100644
--- a/LayoutTests/http/tests/cachestorage/script-tests/cache-match.js
+++ b/LayoutTests/http/tests/cachestorage/script-tests/cache-match.js
@@ -128,7 +128,7 @@ var vary_entries = [
prepopulated_cache_test(simple_entries, function(cache, entries) {
return cache.matchAll('not-present-in-the-cache')
.then(function(result) {
- assert_array_equivalent(
+ assert_response_array_equivalent(
result, [],
'Cache.matchAll should resolve with an empty array on failure.');
});
@@ -145,7 +145,7 @@ prepopulated_cache_test(simple_entries, function(cache, entries) {
prepopulated_cache_test(simple_entries, function(cache, entries) {
return cache.matchAll(entries.a.request.url)
.then(function(result) {
- assert_array_equivalent(result, [entries.a.response],
+ assert_response_array_equivalent(result, [entries.a.response],
'Cache.matchAll should match by URL.');
});
}, 'Cache.matchAll with URL');
@@ -153,7 +153,7 @@ prepopulated_cache_test(simple_entries, function(cache, entries) {
prepopulated_cache_test(simple_entries, function(cache, entries) {
return cache.match(entries.a.request.url)
.then(function(result) {
- assert_object_equals_fixed(result, entries.a.response,
+ assert_response_equals(result, entries.a.response,
'Cache.match should match by URL.');
});
}, 'Cache.match with URL');
@@ -161,7 +161,7 @@ prepopulated_cache_test(simple_entries, function(cache, entries) {
prepopulated_cache_test(simple_entries, function(cache, entries) {
return cache.matchAll(entries.a.request)
.then(function(result) {
- assert_array_equivalent(result, [entries.a.response],
+ assert_response_array_equivalent(result, [entries.a.response],
'Cache.matchAll should match by Request.');
});
}, 'Cache.matchAll with Request');
@@ -169,7 +169,7 @@ prepopulated_cache_test(simple_entries, function(cache, entries) {
prepopulated_cache_test(simple_entries, function(cache, entries) {
return cache.match(entries.a.request)
.then(function(result) {
- assert_object_equals_fixed(result, entries.a.response,
+ assert_response_equals(result, entries.a.response,
'Cache.match should match by Request.');
});
}, 'Cache.match with Request');
@@ -177,7 +177,7 @@ prepopulated_cache_test(simple_entries, function(cache, entries) {
prepopulated_cache_test(simple_entries, function(cache, entries) {
return cache.matchAll(new Request(entries.a.request.url))
.then(function(result) {
- assert_array_equivalent(result, [entries.a.response],
+ assert_response_array_equivalent(result, [entries.a.response],
'Cache.matchAll should match by Request.');
});
}, 'Cache.matchAll with new Request');
@@ -185,7 +185,7 @@ prepopulated_cache_test(simple_entries, function(cache, entries) {
prepopulated_cache_test(simple_entries, function(cache, entries) {
return cache.match(new Request(entries.a.request.url))
.then(function(result) {
- assert_object_equals_fixed(result, entries.a.response,
+ assert_response_equals(result, entries.a.response,
'Cache.match should match by Request.');
});
}, 'Cache.match with new Request');
@@ -194,7 +194,7 @@ prepopulated_cache_test(simple_entries, function(cache, entries) {
return cache.matchAll(entries.a.request,
{ignoreSearch: true})
.then(function(result) {
- assert_array_equivalent(
+ assert_response_array_equivalent(
result,
[
entries.a.response,
@@ -211,7 +211,7 @@ prepopulated_cache_test(simple_entries, function(cache, entries) {
return cache.match(entries.a.request,
{ignoreSearch: true})
.then(function(result) {
- assert_object_in_array(
+ assert_response_in_array(
result,
[
entries.a.response,
@@ -228,7 +228,7 @@ prepopulated_cache_test(simple_entries, function(cache, entries) {
return cache.matchAll(entries.a_with_query.request,
{ignoreSearch: true})
.then(function(result) {
- assert_array_equivalent(
+ assert_response_array_equivalent(
result,
[
entries.a.response,
@@ -244,7 +244,7 @@ prepopulated_cache_test(simple_entries, function(cache, entries) {
return cache.match(entries.a_with_query.request,
{ignoreSearch: true})
.then(function(result) {
- assert_object_in_array(
+ assert_response_in_array(
result,
[
entries.a.response,
@@ -259,7 +259,7 @@ prepopulated_cache_test(simple_entries, function(cache, entries) {
prepopulated_cache_test(simple_entries, function(cache, entries) {
return cache.matchAll(entries.cat.request.url + '#mouse')
.then(function(result) {
- assert_array_equivalent(
+ assert_response_array_equivalent(
result,
[
entries.cat.response,
@@ -271,7 +271,7 @@ prepopulated_cache_test(simple_entries, function(cache, entries) {
prepopulated_cache_test(simple_entries, function(cache, entries) {
return cache.match(entries.cat.request.url + '#mouse')
.then(function(result) {
- assert_object_equals_fixed(result, entries.cat.response,
+ assert_response_equals(result, entries.cat.response,
'Cache.match should ignore URL fragment.');
});
}, 'Cache.match with URL containing fragment');
@@ -279,7 +279,7 @@ prepopulated_cache_test(simple_entries, function(cache, entries) {
prepopulated_cache_test(simple_entries, function(cache, entries) {
return cache.matchAll('http')
.then(function(result) {
- assert_array_equivalent(
+ assert_response_array_equivalent(
result, [],
'Cache.matchAll should treat query as a URL and not ' +
'just a string fragment.');
@@ -299,7 +299,7 @@ prepopulated_cache_test(simple_entries, function(cache, entries) {
prepopulated_cache_test(simple_entries, function(cache, entries) {
return cache.matchAll(entries.secret_cat.request.url)
.then(function(result) {
- assert_array_equivalent(
+ assert_response_array_equivalent(
result, [entries.secret_cat.response],
'Cache.matchAll should not ignore embedded credentials');
});
@@ -308,7 +308,7 @@ prepopulated_cache_test(simple_entries, function(cache, entries) {
prepopulated_cache_test(simple_entries, function(cache, entries) {
return cache.match(entries.secret_cat.request.url)
.then(function(result) {
- assert_object_equals_fixed(
+ assert_response_equals(
result, entries.secret_cat.response,
'Cache.match should not ignore embedded credentials');
});
@@ -317,7 +317,7 @@ prepopulated_cache_test(simple_entries, function(cache, entries) {
prepopulated_cache_test(vary_entries, function(cache, entries) {
return cache.matchAll('http://example.com/c')
.then(function(result) {
- assert_array_equivalent(
+ assert_response_array_equivalent(
result,
[
entries.vary_wildcard.response,
@@ -334,7 +334,7 @@ prepopulated_cache_test(vary_entries, function(cache, entries) {
{headers: {'Cookies': 'none-of-the-above'}}));
})
.then(function(result) {
- assert_array_equivalent(
+ assert_response_array_equivalent(
result,
[
entries.vary_wildcard.response
@@ -350,7 +350,7 @@ prepopulated_cache_test(vary_entries, function(cache, entries) {
{headers: {'Cookies': 'is-for-cookie'}}));
})
.then(function(result) {
- assert_array_equivalent(
+ assert_response_array_equivalent(
result,
[entries.vary_cookie_is_cookie.response],
'Cache.matchAll should match the entire header if a vary header ' +
@@ -361,7 +361,7 @@ prepopulated_cache_test(vary_entries, function(cache, entries) {
prepopulated_cache_test(vary_entries, function(cache, entries) {
return cache.match('http://example.com/c')
.then(function(result) {
- assert_object_in_array(
+ assert_response_in_array(
result,
[
entries.vary_wildcard.response,
@@ -375,7 +375,7 @@ prepopulated_cache_test(vary_entries, function(cache, entries) {
return cache.matchAll('http://example.com/c',
{ignoreVary: true})
.then(function(result) {
- assert_array_equivalent(
+ assert_response_array_equivalent(
result,
[
entries.vary_cookie_is_cookie.response,
@@ -404,7 +404,7 @@ cache_test(function(cache) {
return cache.match(request.url);
})
.then(function(result) {
- assert_object_equals_fixed(
+ assert_response_equals(
result, response,
'Cache.match should return a Response object that has the same ' +
'properties as the stored response.');
@@ -460,7 +460,7 @@ prepopulated_cache_test(simple_entries, function(cache, entries) {
var response = entries.non_2xx_response.response;
return cache.match(entries.non_2xx_response.request.url)
.then(function(result) {
- assert_object_equals_fixed(
+ assert_response_equals(
result, entries.non_2xx_response.response,
'Cache.match should return a Response object that has the ' +
'same properties as a stored non-2xx response.');
@@ -471,7 +471,7 @@ prepopulated_cache_test(simple_entries, function(cache, entries) {
var response = entries.error_response.response;
return cache.match(entries.error_response.request.url)
.then(function(result) {
- assert_object_equals_fixed(
+ assert_response_equals(
result, entries.error_response.response,
'Cache.match should return a Response object that has the ' +
'same properties as a stored network error response.');

Powered by Google App Engine
This is Rietveld 408576698