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

Unified Diff: net/disk_cache/backend_unittest.cc

Issue 149218: Disk cache: Keep a map of all open entries.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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/disk_cache/backend_unittest.cc
===================================================================
--- net/disk_cache/backend_unittest.cc (revision 19788)
+++ net/disk_cache/backend_unittest.cc (working copy)
@@ -57,7 +57,7 @@
void BackendRecoverInsert();
void BackendRecoverRemove();
void BackendInvalidEntry2();
- void BackendNotMarkedButDirty();
+ void BackendNotMarkedButDirty(const std::wstring& name);
void BackendDoomAll();
void BackendDoomAll2();
void BackendInvalidRankings();
@@ -974,8 +974,8 @@
}
// We want to be able to deal with abnormal dirty entries.
-void DiskCacheBackendTest::BackendNotMarkedButDirty() {
- ASSERT_TRUE(CopyTestCache(L"dirty_entry"));
+void DiskCacheBackendTest::BackendNotMarkedButDirty(const std::wstring& name) {
+ ASSERT_TRUE(CopyTestCache(name));
DisableFirstCleanup();
InitCache();
@@ -986,14 +986,23 @@
}
TEST_F(DiskCacheBackendTest, NotMarkedButDirty) {
- BackendNotMarkedButDirty();
+ BackendNotMarkedButDirty(L"dirty_entry");
}
TEST_F(DiskCacheBackendTest, NewEvictionNotMarkedButDirty) {
SetNewEviction();
- BackendNotMarkedButDirty();
+ BackendNotMarkedButDirty(L"dirty_entry");
}
+TEST_F(DiskCacheBackendTest, NotMarkedButDirty2) {
+ BackendNotMarkedButDirty(L"dirty_entry2");
+}
+
+TEST_F(DiskCacheBackendTest, NewEvictionNotMarkedButDirty2) {
+ SetNewEviction();
+ BackendNotMarkedButDirty(L"dirty_entry2");
+}
+
// We want to be able to deal with messed up entries on disk.
void DiskCacheBackendTest::BackendInvalidRankings2() {
ASSERT_TRUE(CopyTestCache(L"bad_rankings"));

Powered by Google App Engine
This is Rietveld 408576698