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

Unified Diff: net/disk_cache/backend_unittest.cc

Issue 8658001: Disk cache: Add a hash to the entry's internal data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 110637)
+++ net/disk_cache/backend_unittest.cc (working copy)
@@ -58,7 +58,6 @@
void BackendInvalidEntry10(bool eviction);
void BackendInvalidEntry11(bool eviction);
void BackendTrimInvalidEntry12();
- void BackendNotMarkedButDirty(const std::string& name);
void BackendDoomAll();
void BackendDoomAll2();
void BackendInvalidRankings();
@@ -699,7 +698,7 @@
for (int i = 0; i < kNumEntries / 2; i++) {
disk_cache::Entry* entry;
- EXPECT_EQ(net::OK, OpenEntry(keys[i], &entry));
+ ASSERT_EQ(net::OK, OpenEntry(keys[i], &entry));
entry->Close();
}
@@ -1843,36 +1842,6 @@
BackendTrimInvalidEntry12();
}
-// We want to be able to deal with abnormal dirty entries.
-void DiskCacheBackendTest::BackendNotMarkedButDirty(const std::string& name) {
- ASSERT_TRUE(CopyTestCache(name));
- DisableFirstCleanup();
- InitCache();
-
- disk_cache::Entry *entry1, *entry2;
- ASSERT_EQ(net::OK, OpenEntry("the first key", &entry1));
- EXPECT_NE(net::OK, OpenEntry("some other key", &entry2));
- entry1->Close();
-}
-
-TEST_F(DiskCacheBackendTest, NotMarkedButDirty) {
- BackendNotMarkedButDirty("dirty_entry");
-}
-
-TEST_F(DiskCacheBackendTest, NewEvictionNotMarkedButDirty) {
- SetNewEviction();
- BackendNotMarkedButDirty("dirty_entry");
-}
-
-TEST_F(DiskCacheBackendTest, NotMarkedButDirty2) {
- BackendNotMarkedButDirty("dirty_entry2");
-}
-
-TEST_F(DiskCacheBackendTest, NewEvictionNotMarkedButDirty2) {
- SetNewEviction();
- BackendNotMarkedButDirty("dirty_entry2");
-}
-
// We want to be able to deal with messed up entries on disk.
void DiskCacheBackendTest::BackendInvalidRankings2() {
ASSERT_TRUE(CopyTestCache("bad_rankings"));

Powered by Google App Engine
This is Rietveld 408576698