OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/loader/mojo_async_resource_handler.h" | 5 #include "content/browser/loader/mojo_async_resource_handler.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/macros.h" | 16 #include "base/macros.h" |
17 #include "base/memory/ptr_util.h" | 17 #include "base/memory/ptr_util.h" |
18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
19 #include "base/run_loop.h" | 19 #include "base/run_loop.h" |
20 #include "base/test/test_simple_task_runner.h" | 20 #include "base/test/test_simple_task_runner.h" |
21 #include "content/browser/loader/mock_resource_loader.h" | 21 #include "content/browser/loader/mock_resource_loader.h" |
22 #include "content/browser/loader/resource_controller.h" | 22 #include "content/browser/loader/resource_controller.h" |
23 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 23 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
24 #include "content/browser/loader/resource_request_info_impl.h" | 24 #include "content/browser/loader/resource_request_info_impl.h" |
25 #include "content/browser/loader/resource_scheduler.h" | 25 #include "content/browser/loader/resource_scheduler.h" |
26 #include "content/browser/loader/test_url_loader_client.h" | 26 #include "content/browser/loader/test_url_loader_client.h" |
27 #include "content/common/resource_request_completion_status.h" | |
28 #include "content/common/url_loader.mojom.h" | |
29 #include "content/common/url_loader_factory.mojom.h" | |
30 #include "content/public/browser/appcache_service.h" | 27 #include "content/public/browser/appcache_service.h" |
31 #include "content/public/browser/navigation_data.h" | 28 #include "content/public/browser/navigation_data.h" |
32 #include "content/public/browser/resource_context.h" | 29 #include "content/public/browser/resource_context.h" |
33 #include "content/public/browser/resource_dispatcher_host_delegate.h" | 30 #include "content/public/browser/resource_dispatcher_host_delegate.h" |
34 #include "content/public/browser/resource_throttle.h" | 31 #include "content/public/browser/resource_throttle.h" |
35 #include "content/public/browser/stream_info.h" | 32 #include "content/public/browser/stream_info.h" |
36 #include "content/public/common/previews_state.h" | 33 #include "content/public/common/previews_state.h" |
| 34 #include "content/public/common/resource_request_completion_status.h" |
37 #include "content/public/common/resource_response.h" | 35 #include "content/public/common/resource_response.h" |
38 #include "content/public/common/resource_type.h" | 36 #include "content/public/common/resource_type.h" |
| 37 #include "content/public/common/url_loader.mojom.h" |
| 38 #include "content/public/common/url_loader_factory.mojom.h" |
39 #include "content/public/test/test_browser_context.h" | 39 #include "content/public/test/test_browser_context.h" |
40 #include "content/public/test/test_browser_thread_bundle.h" | 40 #include "content/public/test/test_browser_thread_bundle.h" |
41 #include "mojo/public/c/system/data_pipe.h" | 41 #include "mojo/public/c/system/data_pipe.h" |
42 #include "mojo/public/c/system/types.h" | 42 #include "mojo/public/c/system/types.h" |
43 #include "mojo/public/cpp/bindings/strong_binding.h" | 43 #include "mojo/public/cpp/bindings/strong_binding.h" |
44 #include "mojo/public/cpp/system/data_pipe.h" | 44 #include "mojo/public/cpp/system/data_pipe.h" |
45 #include "net/base/auth.h" | 45 #include "net/base/auth.h" |
46 #include "net/base/net_errors.h" | 46 #include "net/base/net_errors.h" |
47 #include "net/http/http_response_headers.h" | 47 #include "net/http/http_response_headers.h" |
48 #include "net/http/http_response_info.h" | 48 #include "net/http/http_response_info.h" |
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1362 } | 1362 } |
1363 } | 1363 } |
1364 EXPECT_EQ("B", body); | 1364 EXPECT_EQ("B", body); |
1365 } | 1365 } |
1366 | 1366 |
1367 INSTANTIATE_TEST_CASE_P(MojoAsyncResourceHandlerWithAllocationSizeTest, | 1367 INSTANTIATE_TEST_CASE_P(MojoAsyncResourceHandlerWithAllocationSizeTest, |
1368 MojoAsyncResourceHandlerWithAllocationSizeTest, | 1368 MojoAsyncResourceHandlerWithAllocationSizeTest, |
1369 ::testing::Values(8, 32 * 2014)); | 1369 ::testing::Values(8, 32 * 2014)); |
1370 } // namespace | 1370 } // namespace |
1371 } // namespace content | 1371 } // namespace content |
OLD | NEW |