OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "net/http/http_response_body_drainer.h" | 5 #include "net/http/http_response_body_drainer.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <cstring> | 9 #include <cstring> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/location.h" | 13 #include "base/location.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "base/message_loop/message_loop.h" | 16 #include "base/message_loop/message_loop.h" |
17 #include "base/single_thread_task_runner.h" | 17 #include "base/single_thread_task_runner.h" |
18 #include "base/thread_task_runner_handle.h" | 18 #include "base/threading/thread_task_runner_handle.h" |
19 #include "net/base/io_buffer.h" | 19 #include "net/base/io_buffer.h" |
20 #include "net/base/net_errors.h" | 20 #include "net/base/net_errors.h" |
21 #include "net/base/test_completion_callback.h" | 21 #include "net/base/test_completion_callback.h" |
22 #include "net/http/http_network_session.h" | 22 #include "net/http/http_network_session.h" |
23 #include "net/http/http_server_properties_impl.h" | 23 #include "net/http/http_server_properties_impl.h" |
24 #include "net/http/http_stream.h" | 24 #include "net/http/http_stream.h" |
25 #include "net/http/transport_security_state.h" | 25 #include "net/http/transport_security_state.h" |
26 #include "net/proxy/proxy_service.h" | 26 #include "net/proxy/proxy_service.h" |
27 #include "net/ssl/ssl_config_service_defaults.h" | 27 #include "net/ssl/ssl_config_service_defaults.h" |
28 #include "testing/gtest/include/gtest/gtest.h" | 28 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 too_many_chunks += 1; // Now it's too large. | 311 too_many_chunks += 1; // Now it's too large. |
312 | 312 |
313 mock_stream_->set_num_chunks(too_many_chunks); | 313 mock_stream_->set_num_chunks(too_many_chunks); |
314 drainer_->Start(session_.get()); | 314 drainer_->Start(session_.get()); |
315 EXPECT_TRUE(result_waiter_.WaitForResult()); | 315 EXPECT_TRUE(result_waiter_.WaitForResult()); |
316 } | 316 } |
317 | 317 |
318 } // namespace | 318 } // namespace |
319 | 319 |
320 } // namespace net | 320 } // namespace net |
OLD | NEW |