summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/disk_cache_test_util.cc
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-17 00:50:04 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-17 00:50:04 +0000
commit220d7100e2095b875c401e32c3aab2830d4405e0 (patch)
treeaaebd1ff70fb44f4d4a835411b49f9ae2b17694e /net/disk_cache/disk_cache_test_util.cc
parent4eaa87f37d0fd5af2487f60aee9323882c39f2e9 (diff)
downloadchromium_src-220d7100e2095b875c401e32c3aab2830d4405e0.zip
chromium_src-220d7100e2095b875c401e32c3aab2830d4405e0.tar.gz
chromium_src-220d7100e2095b875c401e32c3aab2830d4405e0.tar.bz2
Disk cache: Modify the unit tests so that they test both
eviction algorithms without having to recompile the code. Review URL: http://codereview.chromium.org/79031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13909 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/disk_cache_test_util.cc')
-rw-r--r--net/disk_cache/disk_cache_test_util.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/disk_cache/disk_cache_test_util.cc b/net/disk_cache/disk_cache_test_util.cc
index 9744f74..013c27a 100644
--- a/net/disk_cache/disk_cache_test_util.cc
+++ b/net/disk_cache/disk_cache_test_util.cc
@@ -77,10 +77,12 @@ bool DeleteCache(const wchar_t* path) {
return true;
}
-bool CheckCacheIntegrity(const std::wstring& path) {
+bool CheckCacheIntegrity(const std::wstring& path, bool new_eviction) {
scoped_ptr<disk_cache::BackendImpl> cache(new disk_cache::BackendImpl(path));
if (!cache.get())
return false;
+ if (new_eviction)
+ cache->SetNewEviction();
if (!cache->Init())
return false;
return cache->SelfCheck() >= 0;