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/socket/socks_client_socket_pool.h" | 5 #include "net/socket/socks_client_socket_pool.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "net/base/load_timing_info.h" | 10 #include "net/base/load_timing_info.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 102 |
103 int StartRequestV5(const std::string& group_name, RequestPriority priority) { | 103 int StartRequestV5(const std::string& group_name, RequestPriority priority) { |
104 return test_base_.StartRequestUsingPool( | 104 return test_base_.StartRequestUsingPool( |
105 &pool_, group_name, priority, CreateSOCKSv5Params()); | 105 &pool_, group_name, priority, CreateSOCKSv5Params()); |
106 } | 106 } |
107 | 107 |
108 int GetOrderOfRequest(size_t index) const { | 108 int GetOrderOfRequest(size_t index) const { |
109 return test_base_.GetOrderOfRequest(index); | 109 return test_base_.GetOrderOfRequest(index); |
110 } | 110 } |
111 | 111 |
112 ScopedVector<TestSocketRequest>* requests() { return test_base_.requests(); } | 112 std::vector<scoped_ptr<TestSocketRequest>>* requests() { |
| 113 return test_base_.requests(); |
| 114 } |
113 | 115 |
114 MockClientSocketFactory transport_client_socket_factory_; | 116 MockClientSocketFactory transport_client_socket_factory_; |
115 MockTransportClientSocketPool transport_socket_pool_; | 117 MockTransportClientSocketPool transport_socket_pool_; |
116 | 118 |
117 MockHostResolver host_resolver_; | 119 MockHostResolver host_resolver_; |
118 SOCKSClientSocketPool pool_; | 120 SOCKSClientSocketPool pool_; |
119 ClientSocketPoolTest test_base_; | 121 ClientSocketPoolTest test_base_; |
120 }; | 122 }; |
121 | 123 |
122 TEST_F(SOCKSClientSocketPoolTest, Simple) { | 124 TEST_F(SOCKSClientSocketPoolTest, Simple) { |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 | 334 |
333 (*requests())[0]->handle()->Reset(); | 335 (*requests())[0]->handle()->Reset(); |
334 (*requests())[1]->handle()->Reset(); | 336 (*requests())[1]->handle()->Reset(); |
335 } | 337 } |
336 | 338 |
337 // It would be nice to also test the timeouts in SOCKSClientSocketPool. | 339 // It would be nice to also test the timeouts in SOCKSClientSocketPool. |
338 | 340 |
339 } // namespace | 341 } // namespace |
340 | 342 |
341 } // namespace net | 343 } // namespace net |
OLD | NEW |