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

Unified Diff: net/disk_cache/entry_unittest.cc

Issue 225833002: simple cache: testing: AddDelay() between evictable entry sets (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/entry_unittest.cc
diff --git a/net/disk_cache/entry_unittest.cc b/net/disk_cache/entry_unittest.cc
index d8334f3b9c42d5fb38fe256b94cc5fd857ecd82f..33b6819d28dc8694adda7e02f1d11e75641c1d81 100644
--- a/net/disk_cache/entry_unittest.cc
+++ b/net/disk_cache/entry_unittest.cc
@@ -3235,6 +3235,11 @@ TEST_F(DiskCacheEntryTest, SimpleCacheEvictOldEntries) {
std::string key2("the key prefix");
for (int i = 0; i < kNumExtraEntries; i++) {
+ if (i == kNumExtraEntries - 2) {
+ // Create a distinct timestamp for the last two entries. These entries
+ // will be checked for outliving the eviction.
+ AddDelay();
+ }
ASSERT_EQ(net::OK, CreateEntry(key2 + base::StringPrintf("%d", i), &entry));
ScopedEntryPtr entry_closer(entry);
EXPECT_EQ(kWriteSize,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698