Commit 7293599a authored by jsbell@chromium.org's avatar jsbell@chromium.org

Service Worker: Remove invalid test case for Cache.put() rejection

The test case was asserting that 'get' was not a valid method for
Cache.put(). But per the fetch spec, the Request's method is
normalized during construction so 'get' becomes 'GET' and that's
valid. There's a later test case which covers this using 'HEAD', so
just remove it.

BUG=374802
R=asanka@chromium.org

Review URL: https://codereview.chromium.org/678513002

git-svn-id: svn://svn.chromium.org/blink/trunk@184372 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 2c5b0abf
...@@ -11,7 +11,6 @@ PASS Cache.put with an string request ...@@ -11,7 +11,6 @@ PASS Cache.put with an string request
PASS Cache.put with an invalid response PASS Cache.put with an invalid response
PASS Cache.put with a non-HTTP/HTTPS request PASS Cache.put with a non-HTTP/HTTPS request
FAIL Cache.put with a relative URL assert_equals: Cache.put should accept a relative URL as the request. :[object].url expected "" but got "http://127.0.0.1:8000/serviceworker/resources/relative-url" FAIL Cache.put with a relative URL assert_equals: Cache.put should accept a relative URL as the request. :[object].url expected "" but got "http://127.0.0.1:8000/serviceworker/resources/relative-url"
FAIL Cache.put with a non-GET request assert_promise_rejects: Cache.put should throw a TypeError for non-GET requests. Promise did not reject.
PASS Cache.put with a non-GET request PASS Cache.put with a non-GET request
PASS Cache.put with an empty response PASS Cache.put with an empty response
Harness: the test ran to completion. Harness: the test ran to completion.
......
...@@ -191,14 +191,6 @@ cache_test(function(cache) { ...@@ -191,14 +191,6 @@ cache_test(function(cache) {
}); });
}, 'Cache.put with a relative URL'); }, 'Cache.put with a relative URL');
cache_test(function(cache) {
var request = new Request('http://example.com/foo', {method: 'get'});
return assert_promise_rejects(
cache.put(request, new_test_response()),
new TypeError(),
'Cache.put should throw a TypeError for non-GET requests.');
}, 'Cache.put with a non-GET request');
cache_test(function(cache) { cache_test(function(cache) {
var request = new Request('http://example.com/foo', {method: 'HEAD'}); var request = new Request('http://example.com/foo', {method: 'HEAD'});
return assert_promise_rejects( return assert_promise_rejects(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment