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/cache_storage/cache_storage_cache.h" | 5 #include "content/browser/cache_storage/cache_storage_cache.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "base/strings/string_split.h" | 21 #include "base/strings/string_split.h" |
22 #include "base/threading/thread_task_runner_handle.h" | 22 #include "base/threading/thread_task_runner_handle.h" |
23 #include "content/browser/blob_storage/chrome_blob_storage_context.h" | 23 #include "content/browser/blob_storage/chrome_blob_storage_context.h" |
24 #include "content/browser/cache_storage/cache_storage_cache_handle.h" | 24 #include "content/browser/cache_storage/cache_storage_cache_handle.h" |
25 #include "content/browser/quota/mock_quota_manager_proxy.h" | 25 #include "content/browser/quota/mock_quota_manager_proxy.h" |
26 #include "content/common/cache_storage/cache_storage_types.h" | 26 #include "content/common/cache_storage/cache_storage_types.h" |
27 #include "content/common/service_worker/service_worker_types.h" | 27 #include "content/common/service_worker/service_worker_types.h" |
28 #include "content/public/browser/browser_thread.h" | 28 #include "content/public/browser/browser_thread.h" |
29 #include "content/public/browser/storage_partition.h" | 29 #include "content/public/browser/storage_partition.h" |
30 #include "content/public/common/referrer.h" | 30 #include "content/public/common/referrer.h" |
31 #include "content/public/test/mock_special_storage_policy.h" | |
32 #include "content/public/test/test_browser_context.h" | 31 #include "content/public/test/test_browser_context.h" |
33 #include "content/public/test/test_browser_thread_bundle.h" | 32 #include "content/public/test/test_browser_thread_bundle.h" |
34 #include "net/base/test_completion_callback.h" | 33 #include "net/base/test_completion_callback.h" |
35 #include "net/url_request/url_request_context.h" | 34 #include "net/url_request/url_request_context.h" |
36 #include "net/url_request/url_request_context_getter.h" | 35 #include "net/url_request/url_request_context_getter.h" |
37 #include "net/url_request/url_request_job_factory_impl.h" | 36 #include "net/url_request/url_request_job_factory_impl.h" |
38 #include "storage/browser/blob/blob_data_builder.h" | 37 #include "storage/browser/blob/blob_data_builder.h" |
39 #include "storage/browser/blob/blob_data_handle.h" | 38 #include "storage/browser/blob/blob_data_handle.h" |
40 #include "storage/browser/blob/blob_data_snapshot.h" | 39 #include "storage/browser/blob/blob_data_snapshot.h" |
41 #include "storage/browser/blob/blob_storage_context.h" | 40 #include "storage/browser/blob/blob_storage_context.h" |
42 #include "storage/browser/blob/blob_url_request_job_factory.h" | 41 #include "storage/browser/blob/blob_url_request_job_factory.h" |
43 #include "storage/browser/quota/quota_manager_proxy.h" | 42 #include "storage/browser/quota/quota_manager_proxy.h" |
| 43 #include "storage/browser/test/mock_special_storage_policy.h" |
44 #include "testing/gtest/include/gtest/gtest.h" | 44 #include "testing/gtest/include/gtest/gtest.h" |
45 | 45 |
46 namespace content { | 46 namespace content { |
47 | 47 |
48 namespace { | 48 namespace { |
49 const char kTestData[] = "Hello World"; | 49 const char kTestData[] = "Hello World"; |
50 const char kOrigin[] = "http://example.com"; | 50 const char kOrigin[] = "http://example.com"; |
51 const char kCacheName[] = "test_cache"; | 51 const char kCacheName[] = "test_cache"; |
52 | 52 |
53 // Returns a BlobProtocolHandler that uses |blob_storage_context|. Caller owns | 53 // Returns a BlobProtocolHandler that uses |blob_storage_context|. Caller owns |
(...skipping 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1653 EXPECT_EQ(1, sequence_out); | 1653 EXPECT_EQ(1, sequence_out); |
1654 close_loop2->Run(); | 1654 close_loop2->Run(); |
1655 EXPECT_EQ(2, sequence_out); | 1655 EXPECT_EQ(2, sequence_out); |
1656 } | 1656 } |
1657 | 1657 |
1658 INSTANTIATE_TEST_CASE_P(CacheStorageCacheTest, | 1658 INSTANTIATE_TEST_CASE_P(CacheStorageCacheTest, |
1659 CacheStorageCacheTestP, | 1659 CacheStorageCacheTestP, |
1660 ::testing::Values(false, true)); | 1660 ::testing::Values(false, true)); |
1661 | 1661 |
1662 } // namespace content | 1662 } // namespace content |
OLD | NEW |