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

Unified Diff: LayoutTests/http/tests/serviceworker/resources/cache-match-worker.js

Issue 708703002: Service Worker: Cache.put() consumes request/response bodies (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Inline hasBody methods Created 6 years, 1 month 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/serviceworker/resources/cache-match-worker.js
diff --git a/LayoutTests/http/tests/serviceworker/resources/cache-match-worker.js b/LayoutTests/http/tests/serviceworker/resources/cache-match-worker.js
index 3b7cd65bdbe8b2d7a9ebafddbc4567e20e0638fc..26de8ce2ac273a8745bfd0a0a36287caa6fc8c28 100644
--- a/LayoutTests/http/tests/serviceworker/resources/cache-match-worker.js
+++ b/LayoutTests/http/tests/serviceworker/resources/cache-match-worker.js
@@ -510,7 +510,7 @@ cache_test(function(cache) {
response.url, request_url,
'[https://fetch.spec.whatwg.org/#dom-response-url] ' +
'Reponse.url should return the URL of the response.');
- return cache.put(request, response);
+ return cache.put(request, response.clone());
})
.then(function() {
return cache.match(request.url);
@@ -574,7 +574,8 @@ function prepopulated_cache_test(entries, test_function, description) {
var hash = {};
entries.forEach(function(entry) {
p = p.then(function() {
- return cache.put(entry.request, entry.response)
+ return cache.put(entry.request.clone(),
+ entry.response.clone())
.catch(function(e) {
assert_unreached('Test setup failed for entry ' +
entry.name + ': ' + e);

Powered by Google App Engine
This is Rietveld 408576698