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 #ifndef NET_SOCKET_SOCKET_TEST_UTIL_H_ | 5 #ifndef NET_SOCKET_SOCKET_TEST_UTIL_H_ |
6 #define NET_SOCKET_SOCKET_TEST_UTIL_H_ | 6 #define NET_SOCKET_SOCKET_TEST_UTIL_H_ |
7 | 7 |
8 #include <cstring> | 8 #include <cstring> |
9 #include <deque> | 9 #include <deque> |
10 #include <string> | 10 #include <string> |
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 int write_result_; | 734 int write_result_; |
735 | 735 |
736 MockRead read_data_; | 736 MockRead read_data_; |
737 | 737 |
738 IOBuffer* read_buf_; | 738 IOBuffer* read_buf_; |
739 int read_buf_len_; | 739 int read_buf_len_; |
740 bool read_pending_; | 740 bool read_pending_; |
741 CompletionCallback read_callback_; | 741 CompletionCallback read_callback_; |
742 DeterministicSocketData* data_; | 742 DeterministicSocketData* data_; |
743 bool was_used_to_convey_data_; | 743 bool was_used_to_convey_data_; |
| 744 bool peer_closed_connection_; |
744 }; | 745 }; |
745 | 746 |
746 class MockSSLClientSocket : public MockClientSocket, public AsyncSocket { | 747 class MockSSLClientSocket : public MockClientSocket, public AsyncSocket { |
747 public: | 748 public: |
748 MockSSLClientSocket( | 749 MockSSLClientSocket( |
749 ClientSocketHandle* transport_socket, | 750 ClientSocketHandle* transport_socket, |
750 const HostPortPair& host_and_port, | 751 const HostPortPair& host_and_port, |
751 const SSLConfig& ssl_config, | 752 const SSLConfig& ssl_config, |
752 SSLSocketDataProvider* socket); | 753 SSLSocketDataProvider* socket); |
753 virtual ~MockSSLClientSocket(); | 754 virtual ~MockSSLClientSocket(); |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1067 | 1068 |
1068 extern const char kSOCKS5OkRequest[]; | 1069 extern const char kSOCKS5OkRequest[]; |
1069 extern const int kSOCKS5OkRequestLength; | 1070 extern const int kSOCKS5OkRequestLength; |
1070 | 1071 |
1071 extern const char kSOCKS5OkResponse[]; | 1072 extern const char kSOCKS5OkResponse[]; |
1072 extern const int kSOCKS5OkResponseLength; | 1073 extern const int kSOCKS5OkResponseLength; |
1073 | 1074 |
1074 } // namespace net | 1075 } // namespace net |
1075 | 1076 |
1076 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ | 1077 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ |
OLD | NEW |