Chromium Code Reviews| Index: net/http/http_cache_unittest.cc |
| diff --git a/net/http/http_cache_unittest.cc b/net/http/http_cache_unittest.cc |
| index 52565c9b55ca165204a11beeb8935cb365bb4ac1..31d50c95e89b4fa0801a53bbfd1bf334f19b9dc0 100644 |
| --- a/net/http/http_cache_unittest.cc |
| +++ b/net/http/http_cache_unittest.cc |
| @@ -5316,59 +5316,6 @@ TEST(HttpCache, CachedRedirect) { |
| EXPECT_EQ(1, cache.disk_cache()->create_count()); |
| } |
| -// Verify that no-cache resources are stored in cache, but are not fetched from |
|
Jun Mukai
2013/07/31 23:10:00
why these tests are removed?
oshima
2013/07/31 23:29:26
This change has already been reverted and shouldn'
|
| -// cache during normal loads. |
| -TEST(HttpCache, CacheControlNoCacheNormalLoad) { |
| - MockHttpCache cache; |
| - |
| - ScopedMockTransaction transaction(kSimpleGET_Transaction); |
| - transaction.response_headers = "cache-control: no-cache\n"; |
| - |
| - // Initial load. |
| - RunTransactionTest(cache.http_cache(), transaction); |
| - |
| - EXPECT_EQ(1, cache.network_layer()->transaction_count()); |
| - EXPECT_EQ(0, cache.disk_cache()->open_count()); |
| - EXPECT_EQ(1, cache.disk_cache()->create_count()); |
| - |
| - // Try loading again; it should result in a network fetch. |
| - RunTransactionTest(cache.http_cache(), transaction); |
| - |
| - EXPECT_EQ(2, cache.network_layer()->transaction_count()); |
| - EXPECT_EQ(1, cache.disk_cache()->open_count()); |
| - EXPECT_EQ(1, cache.disk_cache()->create_count()); |
| - |
| - disk_cache::Entry* entry; |
| - EXPECT_TRUE(cache.OpenBackendEntry(transaction.url, &entry)); |
| -} |
| - |
| -// Verify that no-cache resources are stored in cache and fetched from cache |
| -// when the LOAD_PREFERRING_CACHE flag is set. |
| -TEST(HttpCache, CacheControlNoCacheHistoryLoad) { |
| - MockHttpCache cache; |
| - |
| - ScopedMockTransaction transaction(kSimpleGET_Transaction); |
| - transaction.response_headers = "cache-control: no-cache\n"; |
| - |
| - // Initial load. |
| - RunTransactionTest(cache.http_cache(), transaction); |
| - |
| - EXPECT_EQ(1, cache.network_layer()->transaction_count()); |
| - EXPECT_EQ(0, cache.disk_cache()->open_count()); |
| - EXPECT_EQ(1, cache.disk_cache()->create_count()); |
| - |
| - // Try loading again with LOAD_PREFERRING_CACHE. |
| - transaction.load_flags = net::LOAD_PREFERRING_CACHE; |
| - RunTransactionTest(cache.http_cache(), transaction); |
| - |
| - EXPECT_EQ(1, cache.network_layer()->transaction_count()); |
| - EXPECT_EQ(1, cache.disk_cache()->open_count()); |
| - EXPECT_EQ(1, cache.disk_cache()->create_count()); |
| - |
| - disk_cache::Entry* entry; |
| - EXPECT_TRUE(cache.OpenBackendEntry(transaction.url, &entry)); |
| -} |
| - |
| TEST(HttpCache, CacheControlNoStore) { |
| MockHttpCache cache; |