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

Unified Diff: net/disk_cache/backend_unittest.cc

Issue 27345: New disk cache eviction algorithm. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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/disk_cache/backend_impl.cc ('k') | net/disk_cache/disk_cache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/backend_unittest.cc
===================================================================
--- net/disk_cache/backend_unittest.cc (revision 11078)
+++ net/disk_cache/backend_unittest.cc (working copy)
@@ -259,11 +259,7 @@
SetMaxSize(cache_size);
- // Verify that the cache is 95% full.
- ASSERT_TRUE(cache_->OpenEntry(first, &entry));
- EXPECT_EQ(cache_size * 3 / 4, entry->GetDataSize(0));
- EXPECT_EQ(cache_size / 5, entry->GetDataSize(1));
- entry->Close();
+ // The cache is 95% full.
ASSERT_TRUE(cache_->CreateEntry(second, &entry));
EXPECT_EQ(cache_size / 10, entry->WriteData(0, 0, buffer, cache_size / 10,
@@ -692,6 +688,8 @@
ASSERT_TRUE(cache_->CreateEntry("fourth", &entry));
entry->Close();
+ ASSERT_TRUE(cache_->OpenEntry("fourth", &entry));
+ entry->Close();
PlatformThread::Sleep(20);
Time final = Time::Now();
« no previous file with comments | « net/disk_cache/backend_impl.cc ('k') | net/disk_cache/disk_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698