diff options
Diffstat (limited to 'net/http/http_response_headers_unittest.cc')
-rw-r--r-- | net/http/http_response_headers_unittest.cc | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/net/http/http_response_headers_unittest.cc b/net/http/http_response_headers_unittest.cc index 24ca9869..c78c597 100644 --- a/net/http/http_response_headers_unittest.cc +++ b/net/http/http_response_headers_unittest.cc @@ -1109,6 +1109,13 @@ TEST(HttpResponseHeaders, GetContentRange) { 51 }, { "HTTP/1.1 206 Partial Content\n" + "Content-Range: bytes\t0-50/51", + false, + -1, + -1, + -1 + }, + { "HTTP/1.1 206 Partial Content\n" "Content-Range: bytes 0-50/51", true, 0, @@ -1116,7 +1123,22 @@ TEST(HttpResponseHeaders, GetContentRange) { 51 }, { "HTTP/1.1 206 Partial Content\n" - "Content-Range: bytes 0 - 50 / 51", + "Content-Range: bytes 0 - 50 \t / \t51", + true, + 0, + 50, + 51 + }, + { "HTTP/1.1 206 Partial Content\n" + "Content-Range: bytes 0\t-\t50\t/\t51\t", + true, + 0, + 50, + 51 + }, + + { "HTTP/1.1 206 Partial Content\n" + "Content-Range: \t bytes \t 0 - 50 / 5 1", false, -1, -1, @@ -1136,6 +1158,13 @@ TEST(HttpResponseHeaders, GetContentRange) { -1, -1 }, + { "HTTP/1.1 416 Requested range not satisfiable\n" + "Content-Range: bytes * / * ", + true, + -1, + -1, + -1 + }, { "HTTP/1.1 206 Partial Content\n" "Content-Range: bytes 0-50/*", true, @@ -1144,6 +1173,13 @@ TEST(HttpResponseHeaders, GetContentRange) { -1 }, { "HTTP/1.1 206 Partial Content\n" + "Content-Range: bytes 0-50 / * ", + true, + 0, + 50, + -1 + }, + { "HTTP/1.1 206 Partial Content\n" "Content-Range: bytes 0-10000000000/10000000001", true, 0, |