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

Unified Diff: content/browser/cache_storage/cache_storage_cache_unittest.cc

Issue 2112383002: [CacheStorage] Initialize the cache backend immediately upon opening (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 4 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: content/browser/cache_storage/cache_storage_cache_unittest.cc
diff --git a/content/browser/cache_storage/cache_storage_cache_unittest.cc b/content/browser/cache_storage/cache_storage_cache_unittest.cc
index e800a4b11d149e606a302ac38d464782451749e5..f52e741aae6910c49224bf1996fe63956d35964f 100644
--- a/content/browser/cache_storage/cache_storage_cache_unittest.cc
+++ b/content/browser/cache_storage/cache_storage_cache_unittest.cc
@@ -305,6 +305,8 @@ class TestCacheStorageCache : public CacheStorageCache {
return delayable_backend;
}
+ void Init() { InitBackend(); }
+
private:
std::unique_ptr<CacheStorageCacheHandle> CreateCacheHandle() override {
// Returns an empty handle. There is no need for CacheStorage and its
@@ -361,6 +363,7 @@ class CacheStorageCacheTest : public testing::Test {
BrowserContext::GetDefaultStoragePartition(&browser_context_)
->GetURLRequestContext(),
quota_manager_proxy_, blob_storage_context->context()->AsWeakPtr());
+ cache_->Init();
}
void TearDown() override {
@@ -1321,13 +1324,6 @@ TEST_P(CacheStorageCacheTestP, GetSizeThenClose) {
VerifyAllOpsFail();
}
-TEST_P(CacheStorageCacheTestP, OpsFailOnClosedBackendNeverCreated) {
- cache_->set_delay_backend_creation(
- true); // Will hang the test if a backend is created.
- EXPECT_TRUE(Close());
- VerifyAllOpsFail();
-}
-
TEST_P(CacheStorageCacheTestP, OpsFailOnClosedBackend) {
// Create the backend and put something in it.
EXPECT_TRUE(Put(body_request_, body_response_));
« no previous file with comments | « content/browser/cache_storage/cache_storage_cache.cc ('k') | content/browser/cache_storage/cache_storage_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698