OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <cstring> | 9 #include <cstring> |
10 #include <deque> | 10 #include <deque> |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 // SSLSocketDataProviders only need to keep track of the return code from calls | 257 // SSLSocketDataProviders only need to keep track of the return code from calls |
258 // to Connect(). | 258 // to Connect(). |
259 struct SSLSocketDataProvider { | 259 struct SSLSocketDataProvider { |
260 SSLSocketDataProvider(bool async, int result); | 260 SSLSocketDataProvider(bool async, int result); |
261 ~SSLSocketDataProvider(); | 261 ~SSLSocketDataProvider(); |
262 | 262 |
263 MockConnect connect; | 263 MockConnect connect; |
264 SSLClientSocket::NextProtoStatus next_proto_status; | 264 SSLClientSocket::NextProtoStatus next_proto_status; |
265 std::string next_proto; | 265 std::string next_proto; |
266 bool was_npn_negotiated; | 266 bool was_npn_negotiated; |
| 267 bool client_cert_sent; |
267 net::SSLCertRequestInfo* cert_request_info; | 268 net::SSLCertRequestInfo* cert_request_info; |
268 scoped_refptr<X509Certificate> cert_; | 269 scoped_refptr<X509Certificate> cert; |
269 }; | 270 }; |
270 | 271 |
271 // A DataProvider where the client must write a request before the reads (e.g. | 272 // A DataProvider where the client must write a request before the reads (e.g. |
272 // the response) will complete. | 273 // the response) will complete. |
273 class DelayedSocketData : public StaticSocketDataProvider, | 274 class DelayedSocketData : public StaticSocketDataProvider, |
274 public base::RefCounted<DelayedSocketData> { | 275 public base::RefCounted<DelayedSocketData> { |
275 public: | 276 public: |
276 // |write_delay| the number of MockWrites to complete before allowing | 277 // |write_delay| the number of MockWrites to complete before allowing |
277 // a MockRead to complete. | 278 // a MockRead to complete. |
278 // |reads| the list of MockRead completions. | 279 // |reads| the list of MockRead completions. |
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1033 | 1034 |
1034 extern const char kSOCKS5OkRequest[]; | 1035 extern const char kSOCKS5OkRequest[]; |
1035 extern const int kSOCKS5OkRequestLength; | 1036 extern const int kSOCKS5OkRequestLength; |
1036 | 1037 |
1037 extern const char kSOCKS5OkResponse[]; | 1038 extern const char kSOCKS5OkResponse[]; |
1038 extern const int kSOCKS5OkResponseLength; | 1039 extern const int kSOCKS5OkResponseLength; |
1039 | 1040 |
1040 } // namespace net | 1041 } // namespace net |
1041 | 1042 |
1042 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ | 1043 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ |
OLD | NEW |