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

Unified Diff: net/disk_cache/backend_unittest.cc

Issue 683113005: Update from chromium https://crrev.com/302282 (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/cookies/cookie_store.h ('k') | net/disk_cache/blockfile/disk_cache_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/backend_unittest.cc
diff --git a/net/disk_cache/backend_unittest.cc b/net/disk_cache/backend_unittest.cc
index e06efd953fa7a47eac5f1560c214b07b620f5dda..843a6199df700671fad43d253d30ebde381fe277 100644
--- a/net/disk_cache/backend_unittest.cc
+++ b/net/disk_cache/backend_unittest.cc
@@ -3144,11 +3144,6 @@ TEST_F(DiskCacheBackendTest, ShaderCacheUpdateRankForExternalCacheHit) {
entry->Close();
}
-// The Simple Cache backend requires a few guarantees from the filesystem like
-// atomic renaming of recently open files. Those guarantees are not provided in
-// general on Windows.
-#if defined(OS_POSIX)
-
TEST_F(DiskCacheBackendTest, SimpleCacheShutdownWithPendingCreate) {
SetCacheType(net::APP_CACHE);
SetSimpleCacheMode();
@@ -3487,4 +3482,14 @@ TEST_F(DiskCacheBackendTest, SimpleCacheEnumerationDestruction) {
// This test passes if we don't leak memory.
}
-#endif // defined(OS_POSIX)
+// Tests that a SimpleCache doesn't crash when files are deleted very quickly
+// after closing.
+// NOTE: IF THIS TEST IS FLAKY THEN IT IS FAILING. See https://crbug.com/416940
+TEST_F(DiskCacheBackendTest, SimpleCacheDeleteQuickly) {
+ SetSimpleCacheMode();
+ for (int i = 0; i < 100; ++i) {
+ InitCache();
+ cache_.reset();
+ EXPECT_TRUE(CleanupCacheDir());
+ }
+}
« no previous file with comments | « net/cookies/cookie_store.h ('k') | net/disk_cache/blockfile/disk_cache_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698