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

Unified Diff: net/http/http_cache_unittest.cc

Issue 670183003: Update from chromium 62675d9fb31fb8cedc40f68e78e8445a74f362e7 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « net/http/http_cache_transaction.cc ('k') | net/quic/quic_connection_logger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache_unittest.cc
diff --git a/net/http/http_cache_unittest.cc b/net/http/http_cache_unittest.cc
index a0225e87d0a809a36f87031e66eb73f55c65eb71..519936829b735347b954a8506a88a24891391e0a 100644
--- a/net/http/http_cache_unittest.cc
+++ b/net/http/http_cache_unittest.cc
@@ -2741,6 +2741,18 @@ TEST(HttpCache, SimplePOST_SkipsCache) {
EXPECT_EQ(0, cache.disk_cache()->create_count());
}
+// Tests POST handling with a disabled cache (no DCHECK).
+TEST(HttpCache, SimplePOST_DisabledCache) {
+ MockHttpCache cache;
+ cache.http_cache()->set_mode(net::HttpCache::Mode::DISABLE);
+
+ RunTransactionTest(cache.http_cache(), kSimplePOST_Transaction);
+
+ EXPECT_EQ(1, cache.network_layer()->transaction_count());
+ EXPECT_EQ(0, cache.disk_cache()->open_count());
+ EXPECT_EQ(0, cache.disk_cache()->create_count());
+}
+
TEST(HttpCache, SimplePOST_LoadOnlyFromCache_Miss) {
MockHttpCache cache;
« no previous file with comments | « net/http/http_cache_transaction.cc ('k') | net/quic/quic_connection_logger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698