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

Unified Diff: content/browser/service_worker/service_worker_cache_storage_manager_unittest.cc

Issue 459003002: Plumbs URLRequestContext and CacheBlobStorageContext down to cache. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cache1
Patch Set: Created 6 years, 4 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/service_worker/service_worker_cache_storage_manager_unittest.cc
diff --git a/content/browser/service_worker/service_worker_cache_storage_manager_unittest.cc b/content/browser/service_worker/service_worker_cache_storage_manager_unittest.cc
index 0ec9c2e80f65b63802e2ed7c9695b4511968a3be..baadd23bb2d3cc615c30e1ed4e3c7b4bbb358d27 100644
--- a/content/browser/service_worker/service_worker_cache_storage_manager_unittest.cc
+++ b/content/browser/service_worker/service_worker_cache_storage_manager_unittest.cc
@@ -8,8 +8,11 @@
#include "base/files/scoped_temp_dir.h"
#include "base/message_loop/message_loop_proxy.h"
#include "base/run_loop.h"
+#include "content/browser/fileapi/chrome_blob_storage_context.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/test/test_browser_context.h"
#include "content/public/test/test_browser_thread_bundle.h"
+#include "net/url_request/url_request_context_getter.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace content {
@@ -26,13 +29,23 @@ class ServiceWorkerCacheStorageManagerTest : public testing::Test {
origin2_("http://example2.com") {}
virtual void SetUp() OVERRIDE {
+ ChromeBlobStorageContext* blob_storage_context =
+ ChromeBlobStorageContext::GetFor(&browser_context_);
+ net::URLRequestContext* url_request_context =
+ browser_context_.GetRequestContext()->GetURLRequestContext();
if (MemoryOnly()) {
cache_manager_ = ServiceWorkerCacheStorageManager::Create(
- base::FilePath(), base::MessageLoopProxy::current());
+ base::FilePath(),
+ base::MessageLoopProxy::current(),
+ url_request_context,
+ blob_storage_context);
} else {
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
cache_manager_ = ServiceWorkerCacheStorageManager::Create(
- temp_dir_.path(), base::MessageLoopProxy::current());
+ temp_dir_.path(),
+ base::MessageLoopProxy::current(),
+ url_request_context,
+ blob_storage_context);
}
}
@@ -160,6 +173,7 @@ class ServiceWorkerCacheStorageManagerTest : public testing::Test {
}
protected:
+ TestBrowserContext browser_context_;
TestBrowserThreadBundle browser_thread_bundle_;
base::ScopedTempDir temp_dir_;

Powered by Google App Engine
This is Rietveld 408576698