diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-07 22:08:53 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-07 22:08:53 +0000 |
commit | 3473ff12dc6cbfcc67643cba8f5fff89e4a3e4f7 (patch) | |
tree | a45a0d632662247fce392b2e3f75096f3b088faf /net | |
parent | cfbf9bc770eea92b9412abb6069cb943bab4954e (diff) | |
download | chromium_src-3473ff12dc6cbfcc67643cba8f5fff89e4a3e4f7.zip chromium_src-3473ff12dc6cbfcc67643cba8f5fff89e4a3e4f7.tar.gz chromium_src-3473ff12dc6cbfcc67643cba8f5fff89e4a3e4f7.tar.bz2 |
Http cache: Unit test for cl 33919
BUG=25859
TEST=unittests
Review URL: http://codereview.chromium.org/465087
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33999 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/http/http_cache_unittest.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/http/http_cache_unittest.cc b/net/http/http_cache_unittest.cc index 0497df4..3a207ab 100644 --- a/net/http/http_cache_unittest.cc +++ b/net/http/http_cache_unittest.cc @@ -699,6 +699,13 @@ void RangeTransactionServer::RangeHandler(const net::HttpRequestInfo* request, EXPECT_LT(end, 80); + size_t if_range_header = request->extra_headers.find("If-Range"); + if (std::string::npos != if_range_header) { + // Check that If-Range isn't specified twice. + EXPECT_EQ(std::string::npos, + request->extra_headers.find("If-Range", if_range_header + 1)); + } + std::string content_range = StringPrintf("Content-Range: bytes %d-%d/80\n", start, end); response_headers->append(content_range); @@ -724,6 +731,9 @@ void RangeTransactionServer::RangeHandler(const net::HttpRequestInfo* request, response_status->assign("HTTP/1.1 200 Success"); } } else { + // Check that we use only one validation header. + EXPECT_EQ(std::string::npos, + request->extra_headers.find("If-Modified-Since")); response_status->assign("HTTP/1.1 304 Not Modified"); response_data->clear(); } |