Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Unified Diff: net/http/http_cache_unittest.cc

Issue 21297003: Add ability to set resolution on external display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
« ash/display/display_info.cc ('K') | « chromeos/display/real_output_configurator_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698