OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/service_worker/service_worker_cache.h" | 5 #include "content/browser/service_worker/service_worker_cache.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
11 #include "content/browser/fileapi/chrome_blob_storage_context.h" | 11 #include "content/browser/fileapi/chrome_blob_storage_context.h" |
12 #include "content/browser/fileapi/mock_url_request_delegate.h" | 12 #include "content/browser/fileapi/mock_url_request_delegate.h" |
13 #include "content/common/service_worker/service_worker_types.h" | 13 #include "content/common/service_worker/service_worker_types.h" |
14 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
15 #include "content/public/test/test_browser_context.h" | 15 #include "content/public/test/test_browser_context.h" |
16 #include "content/public/test/test_browser_thread_bundle.h" | 16 #include "content/public/test/test_browser_thread_bundle.h" |
17 #include "net/url_request/url_request_context.h" | 17 #include "net/url_request/url_request_context.h" |
18 #include "net/url_request/url_request_context_getter.h" | 18 #include "net/url_request/url_request_context_getter.h" |
19 #include "net/url_request/url_request_job_factory_impl.h" | 19 #include "net/url_request/url_request_job_factory_impl.h" |
| 20 #include "storage/browser/blob/blob_data_handle.h" |
| 21 #include "storage/browser/blob/blob_storage_context.h" |
| 22 #include "storage/browser/blob/blob_url_request_job_factory.h" |
20 #include "storage/common/blob/blob_data.h" | 23 #include "storage/common/blob/blob_data.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
22 #include "webkit/browser/blob/blob_data_handle.h" | |
23 #include "webkit/browser/blob/blob_storage_context.h" | |
24 #include "webkit/browser/blob/blob_url_request_job_factory.h" | |
25 | 25 |
26 namespace content { | 26 namespace content { |
27 | 27 |
28 namespace { | 28 namespace { |
29 const char kTestData[] = "Hello World"; | 29 const char kTestData[] = "Hello World"; |
30 | 30 |
31 // Returns a BlobProtocolHandler that uses |blob_storage_context|. Caller owns | 31 // Returns a BlobProtocolHandler that uses |blob_storage_context|. Caller owns |
32 // the memory. | 32 // the memory. |
33 storage::BlobProtocolHandler* CreateMockBlobProtocolHandler( | 33 storage::BlobProtocolHandler* CreateMockBlobProtocolHandler( |
34 storage::BlobStorageContext* blob_storage_context) { | 34 storage::BlobStorageContext* blob_storage_context) { |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 ASSERT_TRUE(Match(body_request_.get())); | 302 ASSERT_TRUE(Match(body_request_.get())); |
303 ASSERT_TRUE(Delete(body_request_.get())); | 303 ASSERT_TRUE(Delete(body_request_.get())); |
304 } | 304 } |
305 } | 305 } |
306 | 306 |
307 INSTANTIATE_TEST_CASE_P(ServiceWorkerCacheTest, | 307 INSTANTIATE_TEST_CASE_P(ServiceWorkerCacheTest, |
308 ServiceWorkerCacheTestP, | 308 ServiceWorkerCacheTestP, |
309 ::testing::Values(false, true)); | 309 ::testing::Values(false, true)); |
310 | 310 |
311 } // namespace content | 311 } // namespace content |
OLD | NEW |