Index: LayoutTests/http/tests/cachestorage/script-tests/cache-put.js |
diff --git a/LayoutTests/http/tests/cachestorage/script-tests/cache-put.js b/LayoutTests/http/tests/cachestorage/script-tests/cache-put.js |
index cc8c7c9e128c95eb4cae0e21a13a1bcce4e2e1e3..60c1152fcc81a2ce5df38590426d66931aa1a8d0 100644 |
--- a/LayoutTests/http/tests/cachestorage/script-tests/cache-put.js |
+++ b/LayoutTests/http/tests/cachestorage/script-tests/cache-put.js |
@@ -312,15 +312,12 @@ cache_test(function(cache) { |
assert_false(response.bodyUsed, |
'[https://fetch.spec.whatwg.org/#dom-body-bodyused] ' + |
'Response.bodyUsed should be initially false.'); |
- response.text().then(function() { |
- assert_true( |
+ return response.text().then(function() { |
+ assert_false( |
response.bodyUsed, |
'[https://fetch.spec.whatwg.org/#concept-body-consume-body] ' + |
- 'The text() method should consume the body of the response.'); |
- return assert_promise_rejects( |
- cache.put(new Request(test_url), response), |
- new TypeError(), |
- 'Cache.put should throw a TypeError for a response with used body.'); |
+ 'The text() method should not set "body passed" flag.'); |
+ return cache.put(new Request(test_url), response); |
}); |
}, 'Cache.put with a used response body'); |