Chromium Code Reviews| Index: LayoutTests/http/tests/serviceworker/resources/cache-put-worker.js |
| diff --git a/LayoutTests/http/tests/serviceworker/resources/cache-put-worker.js b/LayoutTests/http/tests/serviceworker/resources/cache-put-worker.js |
| index c8af0230afdbfccacff3f24df3197f926b15dae6..124037222baac3dc59c15d45d31bff0f8408cf07 100644 |
| --- a/LayoutTests/http/tests/serviceworker/resources/cache-put-worker.js |
| +++ b/LayoutTests/http/tests/serviceworker/resources/cache-put-worker.js |
| @@ -154,11 +154,15 @@ cache_test(function(cache) { |
| }, 'Cache.put called twice with same Request and different Responses'); |
| cache_test(function(cache) { |
| - return assert_promise_rejects( |
| - cache.put('http://example.com/foo', new_test_response()), |
| - new TypeError(), |
| - 'Cache.put should only accept a Request object as the request.'); |
| - }, 'Cache.put with an invalid request'); |
| + var url = 'http://example.com/foo'; |
| + return cache.put(url, new_test_response('some body')) |
| + .then(function() { return cache.match(url); }) |
| + .then(function(response) { return response.text(); }) |
| + .then(function(body) { |
| + assert_equals(body, 'some body', |
| + 'Cache.put should accept a string as request'); |
|
asanka
2014/10/24 04:59:07
Minor nit: I've been including the ending period i
|
| + }); |
| + }, 'Cache.put with an string request'); |
| cache_test(function(cache) { |
| return assert_promise_rejects( |