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

Unified Diff: net/disk_cache/disk_cache_test_base.cc

Issue 13517004: Test cache creation retry via public interface only. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: check cache integrity after destroying the backend Created 7 years, 8 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/disk_cache_test_base.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/disk_cache_test_base.cc
diff --git a/net/disk_cache/disk_cache_test_base.cc b/net/disk_cache/disk_cache_test_base.cc
index 6e04a9316ba9de660b3aa71402778b58e90bf7f5..df913fbf5484031bbf9563545cc1d2177cf9c3ef 100644
--- a/net/disk_cache/disk_cache_test_base.cc
+++ b/net/disk_cache/disk_cache_test_base.cc
@@ -259,25 +259,6 @@ void DiskCacheTestWithCache::InitDiskCache() {
CreateBackend(disk_cache::kNoRandom, &cache_thread_);
}
-// Testing backend creation retry logic is hard because the CacheCreator and
-// cache backend(s) are tightly coupled. So we take the default backend often.
-// Tests themselves need to be adjusted for platforms where the BackendImpl is
-// not the default backend.
-void DiskCacheTestWithCache::InitDefaultCacheViaCreator() {
- if (!cache_thread_.IsRunning()) {
- ASSERT_TRUE(cache_thread_.StartWithOptions(
- base::Thread::Options(MessageLoop::TYPE_IO, 0)));
- }
- ASSERT_TRUE(cache_thread_.message_loop() != NULL);
-
- net::TestCompletionCallback cb;
- disk_cache::CacheCreator* creator = new disk_cache::CacheCreator(
- cache_path_, true, 0, net::DISK_CACHE, disk_cache::kNoRandom,
- cache_thread_.message_loop_proxy(), NULL, &cache_, cb.callback());
- int rv = creator->Run();
- ASSERT_EQ(net::OK, cb.GetResult(rv));
-}
-
void DiskCacheTestWithCache::CreateBackend(uint32 flags, base::Thread* thread) {
base::MessageLoopProxy* runner;
if (use_current_thread_)
« no previous file with comments | « net/disk_cache/disk_cache_test_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698