diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-21 22:07:37 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-21 22:07:37 +0000 |
commit | 7bd394d220e29b212b9480cb8a7f4986cb8275ce (patch) | |
tree | 18342f9a8c2b2b840af8cea6ccf127902b0d1253 /net/http/http_cache_unittest.cc | |
parent | 1db97ce76cad4c569c4ae79ad1422620ea5d97cf (diff) | |
download | chromium_src-7bd394d220e29b212b9480cb8a7f4986cb8275ce.zip chromium_src-7bd394d220e29b212b9480cb8a7f4986cb8275ce.tar.gz chromium_src-7bd394d220e29b212b9480cb8a7f4986cb8275ce.tar.bz2 |
Revert cl 24015
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/174260
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24026 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_cache_unittest.cc')
-rw-r--r-- | net/http/http_cache_unittest.cc | 45 |
1 files changed, 15 insertions, 30 deletions
diff --git a/net/http/http_cache_unittest.cc b/net/http/http_cache_unittest.cc index 90b0774..14299b0 100644 --- a/net/http/http_cache_unittest.cc +++ b/net/http/http_cache_unittest.cc @@ -1639,7 +1639,6 @@ TEST(HttpCache, SimplePOST_LoadOnlyFromCache_Hit) { TEST(HttpCache, RangeGET_SkipsCache) { MockHttpCache cache; - cache.http_cache()->set_enable_range_support(true); // Test that we skip the cache for range GET requests. Eventually, we will // want to cache these, but we'll still have cases where skipping the cache @@ -1671,7 +1670,6 @@ TEST(HttpCache, RangeGET_SkipsCache) { // Tests that receiving 206 for a regular request is handled correctly. TEST(HttpCache, GET_Crazy206) { MockHttpCache cache; - cache.http_cache()->set_enable_range_support(true); // Write to the cache. MockTransaction transaction(kRangeGET_TransactionOK); @@ -1688,16 +1686,15 @@ TEST(HttpCache, GET_Crazy206) { RunTransactionTest(cache.http_cache(), transaction); EXPECT_EQ(2, cache.network_layer()->transaction_count()); - EXPECT_EQ(0, cache.disk_cache()->open_count()); - EXPECT_EQ(2, cache.disk_cache()->create_count()); + EXPECT_EQ(1, cache.disk_cache()->open_count()); + EXPECT_EQ(1, cache.disk_cache()->create_count()); RemoveMockTransaction(&transaction); } // Tests that we can cache range requests and fetch random blocks from the // cache and the network. -TEST(HttpCache, RangeGET_OK) { +TEST(HttpCache, DISABLED_RangeGET_OK) { MockHttpCache cache; - cache.http_cache()->set_enable_range_support(true); AddMockTransaction(&kRangeGET_TransactionOK); std::string headers; @@ -1750,9 +1747,8 @@ TEST(HttpCache, RangeGET_OK) { } // Tests that we deal with 304s for range requests. -TEST(HttpCache, RangeGET_304) { +TEST(HttpCache, DISABLED_RangeGET_304) { MockHttpCache cache; - cache.http_cache()->set_enable_range_support(true); AddMockTransaction(&kRangeGET_TransactionOK); std::string headers; @@ -1780,9 +1776,8 @@ TEST(HttpCache, RangeGET_304) { } // Tests that we deal with 206s when revalidating range requests. -TEST(HttpCache, RangeGET_ModifiedResult) { +TEST(HttpCache, DISABLED_RangeGET_ModifiedResult) { MockHttpCache cache; - cache.http_cache()->set_enable_range_support(true); AddMockTransaction(&kRangeGET_TransactionOK); std::string headers; @@ -1817,9 +1812,8 @@ TEST(HttpCache, RangeGET_ModifiedResult) { // Tests that we can cache range requests when the start or end is unknown. // We start with one suffix request, followed by a request from a given point. -TEST(HttpCache, UnknownRangeGET_1) { +TEST(HttpCache, DISABLED_UnknownRangeGET_1) { MockHttpCache cache; - cache.http_cache()->set_enable_range_support(true); AddMockTransaction(&kRangeGET_TransactionOK); std::string headers; @@ -1853,9 +1847,8 @@ TEST(HttpCache, UnknownRangeGET_1) { // Tests that we can cache range requests when the start or end is unknown. // We start with one request from a given point, followed by a suffix request. // We'll also verify that synchronous cache responses work as intended. -TEST(HttpCache, UnknownRangeGET_2) { +TEST(HttpCache, DISABLED_UnknownRangeGET_2) { MockHttpCache cache; - cache.http_cache()->set_enable_range_support(true); std::string headers; MockTransaction transaction(kRangeGET_TransactionOK); @@ -1891,9 +1884,8 @@ TEST(HttpCache, UnknownRangeGET_2) { // Tests that receiving Not Modified when asking for an open range doesn't mess // up things. -TEST(HttpCache, UnknownRangeGET_304) { +TEST(HttpCache, DISABLED_UnknownRangeGET_304) { MockHttpCache cache; - cache.http_cache()->set_enable_range_support(true); std::string headers; MockTransaction transaction(kRangeGET_TransactionOK); @@ -1920,9 +1912,8 @@ TEST(HttpCache, UnknownRangeGET_304) { } // Tests that we can handle non-range requests when we have cached a range. -TEST(HttpCache, GET_Previous206) { +TEST(HttpCache, DISABLED_GET_Previous206) { MockHttpCache cache; - cache.http_cache()->set_enable_range_support(true); AddMockTransaction(&kRangeGET_TransactionOK); std::string headers; @@ -1951,9 +1942,8 @@ TEST(HttpCache, GET_Previous206) { } // Tests that we can handle cached 206 responses that are not sparse. -TEST(HttpCache, GET_Previous206_NotSparse) { +TEST(HttpCache, DISABLED_GET_Previous206_NotSparse) { MockHttpCache cache; - cache.http_cache()->set_enable_range_support(true); // Create a disk cache entry that stores 206 headers while not being sparse. disk_cache::Entry* entry; @@ -1993,9 +1983,8 @@ TEST(HttpCache, GET_Previous206_NotSparse) { // Tests that we can handle cached 206 responses that are not sparse. This time // we issue a range request and expect to receive a range. -TEST(HttpCache, RangeGET_Previous206_NotSparse_2) { +TEST(HttpCache, DISABLED_RangeGET_Previous206_NotSparse_2) { MockHttpCache cache; - cache.http_cache()->set_enable_range_support(true); AddMockTransaction(&kRangeGET_TransactionOK); // Create a disk cache entry that stores 206 headers while not being sparse. @@ -2034,9 +2023,8 @@ TEST(HttpCache, RangeGET_Previous206_NotSparse_2) { } // Tests that we can handle range requests with cached 200 responses. -TEST(HttpCache, RangeGET_Previous200) { +TEST(HttpCache, DISABLED_RangeGET_Previous200) { MockHttpCache cache; - cache.http_cache()->set_enable_range_support(true); // Store the whole thing with status 200. MockTransaction transaction(kTypicalGET_Transaction); @@ -2081,9 +2069,8 @@ TEST(HttpCache, RangeGET_Previous200) { } // Tests that we can handle a 200 response when dealing with sparse entries. -TEST(HttpCache, RangeRequestResultsIn200) { +TEST(HttpCache, DISABLED_RangeRequestResultsIn200) { MockHttpCache cache; - cache.http_cache()->set_enable_range_support(true); AddMockTransaction(&kRangeGET_TransactionOK); std::string headers; @@ -2122,9 +2109,8 @@ TEST(HttpCache, RangeRequestResultsIn200) { // Tests that a range request that falls outside of the size that we know about // only deletes the entry if the resource has indeed changed. -TEST(HttpCache, RangeGET_MoreThanCurrentSize) { +TEST(HttpCache, DISABLED_RangeGET_MoreThanCurrentSize) { MockHttpCache cache; - cache.http_cache()->set_enable_range_support(true); AddMockTransaction(&kRangeGET_TransactionOK); std::string headers; @@ -2156,9 +2142,8 @@ TEST(HttpCache, RangeGET_MoreThanCurrentSize) { #ifdef NDEBUG // This test hits a NOTREACHED so it is a release mode only test. -TEST(HttpCache, RangeGET_OK_LoadOnlyFromCache) { +TEST(HttpCache, DISABLED_RangeGET_OK_LoadOnlyFromCache) { MockHttpCache cache; - cache.http_cache()->set_enable_range_support(true); AddMockTransaction(&kRangeGET_TransactionOK); // Write to the cache (40-49). |