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 e47827a63d6e5a116ddcb5f0f9cfcf76ef0b9bbf..f0f3aa9d1c3876380e1ae798a01e9d8b6bf08746 100644 |
--- a/LayoutTests/http/tests/serviceworker/resources/cache-match-worker.js |
+++ b/LayoutTests/http/tests/serviceworker/resources/cache-match-worker.js |
@@ -338,7 +338,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); |
@@ -398,7 +398,8 @@ cache_test(function(cache) { |
function prepopulated_cache_test(entries, test_function, description) { |
cache_test(function(cache) { |
return Promise.all(Object.keys(entries).map(function(k) { |
- return cache.put(entries[k].request, entries[k].response); |
+ return cache.put(entries[k].request.clone(), |
+ entries[k].response.clone()); |
})) |
.catch(function(reason) { |
assert_unreached('Test setup failed: ' + reason.message); |