OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/fileapi/fileapi_message_filter.h" | 5 #include "content/browser/fileapi/fileapi_message_filter.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/shared_memory.h" | 13 #include "base/memory/shared_memory.h" |
14 #include "base/process/process_handle.h" | 14 #include "base/process/process_handle.h" |
15 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
16 #include "content/browser/blob_storage/chrome_blob_storage_context.h" | 16 #include "content/browser/blob_storage/chrome_blob_storage_context.h" |
17 #include "content/browser/child_process_security_policy_impl.h" | 17 #include "content/browser/child_process_security_policy_impl.h" |
18 #include "content/browser/streams/stream_registry.h" | 18 #include "content/browser/streams/stream_registry.h" |
19 #include "content/common/fileapi/file_system_messages.h" | 19 #include "content/common/fileapi/file_system_messages.h" |
20 #include "content/common/fileapi/webblob_messages.h" | 20 #include "content/common/fileapi/webblob_messages.h" |
21 #include "content/public/browser/browser_context.h" | 21 #include "content/public/browser/browser_context.h" |
22 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
23 #include "content/public/browser/storage_partition.h" | 23 #include "content/public/browser/storage_partition.h" |
24 #include "content/public/common/common_param_traits.h" | 24 #include "content/public/common/common_param_traits.h" |
25 #include "content/public/test/mock_render_process_host.h" | 25 #include "content/public/test/mock_render_process_host.h" |
26 #include "content/public/test/test_browser_context.h" | 26 #include "content/public/test/test_browser_context.h" |
27 #include "content/public/test/test_browser_thread.h" | 27 #include "content/public/test/test_browser_thread.h" |
28 #include "content/public/test/test_browser_thread_bundle.h" | 28 #include "content/public/test/test_browser_thread_bundle.h" |
29 #include "content/public/test/test_file_system_context.h" | |
30 #include "net/base/io_buffer.h" | 29 #include "net/base/io_buffer.h" |
31 #include "storage/browser/blob/blob_storage_context.h" | 30 #include "storage/browser/blob/blob_storage_context.h" |
32 #include "storage/browser/fileapi/file_system_context.h" | 31 #include "storage/browser/fileapi/file_system_context.h" |
| 32 #include "storage/browser/test/test_file_system_context.h" |
33 #include "storage/common/data_element.h" | 33 #include "storage/common/data_element.h" |
34 #include "testing/gtest/include/gtest/gtest.h" | 34 #include "testing/gtest/include/gtest/gtest.h" |
35 | 35 |
36 namespace content { | 36 namespace content { |
37 | 37 |
38 namespace { | 38 namespace { |
39 | 39 |
40 const char kFakeBlobInternalUrlSpec[] = | 40 const char kFakeBlobInternalUrlSpec[] = |
41 "blob:blobinternal:///dc83ede4-9bbd-453b-be2e-60fd623fcc93"; | 41 "blob:blobinternal:///dc83ede4-9bbd-453b-be2e-60fd623fcc93"; |
42 const char kFakeBlobInternalUrlSpec2[] = | 42 const char kFakeBlobInternalUrlSpec2[] = |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 EXPECT_TRUE(filter_->OnMessageReceived(start_message)); | 304 EXPECT_TRUE(filter_->OnMessageReceived(start_message)); |
305 | 305 |
306 StreamHostMsg_Clone clone_message(kDestUrl, kUrl); | 306 StreamHostMsg_Clone clone_message(kDestUrl, kUrl); |
307 EXPECT_TRUE(filter_->OnMessageReceived(clone_message)); | 307 EXPECT_TRUE(filter_->OnMessageReceived(clone_message)); |
308 | 308 |
309 ASSERT_FALSE(stream_registry->GetStream(kUrl).get() == NULL); | 309 ASSERT_FALSE(stream_registry->GetStream(kUrl).get() == NULL); |
310 ASSERT_FALSE(stream_registry->GetStream(kDestUrl).get() == NULL); | 310 ASSERT_FALSE(stream_registry->GetStream(kDestUrl).get() == NULL); |
311 } | 311 } |
312 | 312 |
313 } // namespace content | 313 } // namespace content |
OLD | NEW |