| 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/socks5_client_socket.h" | 5 #include "net/socket/socks5_client_socket.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <iterator> | 8 #include <iterator> |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 SOCKS5ClientSocketTest(); | 33 SOCKS5ClientSocketTest(); |
| 34 // Create a SOCKSClientSocket on top of a MockSocket. | 34 // Create a SOCKSClientSocket on top of a MockSocket. |
| 35 scoped_ptr<SOCKS5ClientSocket> BuildMockSocket(MockRead reads[], | 35 scoped_ptr<SOCKS5ClientSocket> BuildMockSocket(MockRead reads[], |
| 36 size_t reads_count, | 36 size_t reads_count, |
| 37 MockWrite writes[], | 37 MockWrite writes[], |
| 38 size_t writes_count, | 38 size_t writes_count, |
| 39 const std::string& hostname, | 39 const std::string& hostname, |
| 40 int port, | 40 int port, |
| 41 NetLog* net_log); | 41 NetLog* net_log); |
| 42 | 42 |
| 43 virtual void SetUp(); | 43 void SetUp() override; |
| 44 | 44 |
| 45 protected: | 45 protected: |
| 46 const uint16 kNwPort; | 46 const uint16 kNwPort; |
| 47 CapturingNetLog net_log_; | 47 CapturingNetLog net_log_; |
| 48 scoped_ptr<SOCKS5ClientSocket> user_sock_; | 48 scoped_ptr<SOCKS5ClientSocket> user_sock_; |
| 49 AddressList address_list_; | 49 AddressList address_list_; |
| 50 // Filled in by BuildMockSocket() and owned by its return value | 50 // Filled in by BuildMockSocket() and owned by its return value |
| 51 // (which |user_sock| is set to). | 51 // (which |user_sock| is set to). |
| 52 StreamSocket* tcp_sock_; | 52 StreamSocket* tcp_sock_; |
| 53 TestCompletionCallback callback_; | 53 TestCompletionCallback callback_; |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 EXPECT_TRUE(user_sock_->IsConnected()); | 370 EXPECT_TRUE(user_sock_->IsConnected()); |
| 371 net_log_.GetEntries(&net_log_entries); | 371 net_log_.GetEntries(&net_log_entries); |
| 372 EXPECT_TRUE(LogContainsEndEvent(net_log_entries, -1, | 372 EXPECT_TRUE(LogContainsEndEvent(net_log_entries, -1, |
| 373 NetLog::TYPE_SOCKS5_CONNECT)); | 373 NetLog::TYPE_SOCKS5_CONNECT)); |
| 374 } | 374 } |
| 375 } | 375 } |
| 376 | 376 |
| 377 } // namespace | 377 } // namespace |
| 378 | 378 |
| 379 } // namespace net | 379 } // namespace net |
| OLD | NEW |