OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "base/files/file_util.h" | 5 #include "base/files/file_util.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "base/test/scoped_task_environment.h" | 8 #include "base/test/scoped_task_environment.h" |
9 #include "base/threading/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
10 #include "content/browser/loader/test_url_loader_client.h" | |
11 #include "content/network/network_context.h" | 10 #include "content/network/network_context.h" |
12 #include "content/network/url_loader_impl.h" | 11 #include "content/network/url_loader_impl.h" |
13 #include "content/public/common/content_paths.h" | 12 #include "content/public/common/content_paths.h" |
| 13 #include "content/public/test/test_url_loader_client.h" |
14 #include "mojo/public/c/system/data_pipe.h" | 14 #include "mojo/public/c/system/data_pipe.h" |
15 #include "mojo/public/cpp/system/wait.h" | 15 #include "mojo/public/cpp/system/wait.h" |
16 #include "net/test/embedded_test_server/embedded_test_server.h" | 16 #include "net/test/embedded_test_server/embedded_test_server.h" |
17 #include "net/traffic_annotation/network_traffic_annotation_test_helper.h" | 17 #include "net/traffic_annotation/network_traffic_annotation_test_helper.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 | 19 |
20 namespace content { | 20 namespace content { |
21 | 21 |
22 namespace { | 22 namespace { |
23 | 23 |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 // client receiving a connection error. | 185 // client receiving a connection error. |
186 DestroyContext(); | 186 DestroyContext(); |
187 EXPECT_FALSE(loader_impl); | 187 EXPECT_FALSE(loader_impl); |
188 | 188 |
189 client.RunUntilConnectionError(); | 189 client.RunUntilConnectionError(); |
190 EXPECT_FALSE(client.has_received_completion()); | 190 EXPECT_FALSE(client.has_received_completion()); |
191 EXPECT_EQ(0u, client.download_data_length()); | 191 EXPECT_EQ(0u, client.download_data_length()); |
192 } | 192 } |
193 | 193 |
194 } // namespace content | 194 } // namespace content |
OLD | NEW |