Chromium Code Reviews| 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..72a1b6ecf6f7b524216dbdf367ebc7c33df04c0c 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,9 +8,13 @@ |
| #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" |
| +#include "webkit/browser/blob/blob_storage_context.h" |
| namespace content { |
| @@ -26,14 +30,25 @@ class ServiceWorkerCacheStorageManagerTest : public testing::Test { |
| origin2_("http://example2.com") {} |
| virtual void SetUp() OVERRIDE { |
| + ChromeBlobStorageContext* blob_storage_context( |
| + ChromeBlobStorageContext::GetFor(&browser_context_)); |
| + // Wait for ChromeBlobStorageContext to finish initializing. |
| + base::RunLoop().RunUntilIdle(); |
| + |
| + net::URLRequestContext* url_request_context = |
| + browser_context_.GetRequestContext()->GetURLRequestContext(); |
| if (MemoryOnly()) { |
| cache_manager_ = ServiceWorkerCacheStorageManager::Create( |
| base::FilePath(), base::MessageLoopProxy::current()); |
| + |
|
jkarlin
2014/08/12 19:22:15
I'll remove this line.
jkarlin
2014/08/13 00:14:00
Done.
|
| } else { |
| ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
| cache_manager_ = ServiceWorkerCacheStorageManager::Create( |
| temp_dir_.path(), base::MessageLoopProxy::current()); |
| } |
| + |
| + cache_manager_->SetBlobParametersForCache( |
| + url_request_context, blob_storage_context->context()->AsWeakPtr()); |
| } |
| virtual bool MemoryOnly() { return false; } |
| @@ -160,6 +175,7 @@ class ServiceWorkerCacheStorageManagerTest : public testing::Test { |
| } |
| protected: |
| + TestBrowserContext browser_context_; |
| TestBrowserThreadBundle browser_thread_bundle_; |
| base::ScopedTempDir temp_dir_; |