| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 27 matching lines...) Expand all Loading... |
| 38 enum { | 38 enum { |
| 39 // A private network error code used by the socket test utility classes. | 39 // A private network error code used by the socket test utility classes. |
| 40 // If the |result| member of a MockRead is | 40 // If the |result| member of a MockRead is |
| 41 // ERR_TEST_PEER_CLOSE_AFTER_NEXT_MOCK_READ, that MockRead is just a | 41 // ERR_TEST_PEER_CLOSE_AFTER_NEXT_MOCK_READ, that MockRead is just a |
| 42 // marker that indicates the peer will close the connection after the next | 42 // marker that indicates the peer will close the connection after the next |
| 43 // MockRead. The other members of that MockRead are ignored. | 43 // MockRead. The other members of that MockRead are ignored. |
| 44 ERR_TEST_PEER_CLOSE_AFTER_NEXT_MOCK_READ = -10000, | 44 ERR_TEST_PEER_CLOSE_AFTER_NEXT_MOCK_READ = -10000, |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 class ClientSocket; | 47 class ClientSocket; |
| 48 class HttpRequestHeaders; | |
| 49 class HttpResponseHeaders; | |
| 50 class MockClientSocket; | 48 class MockClientSocket; |
| 51 class SSLClientSocket; | 49 class SSLClientSocket; |
| 52 | 50 |
| 53 struct MockConnect { | 51 struct MockConnect { |
| 54 // Asynchronous connection success. | 52 // Asynchronous connection success. |
| 55 MockConnect() : async(true), result(OK) { } | 53 MockConnect() : async(true), result(OK) { } |
| 56 MockConnect(bool a, int r) : async(a), result(r) { } | 54 MockConnect(bool a, int r) : async(a), result(r) { } |
| 57 | 55 |
| 58 bool async; | 56 bool async; |
| 59 int result; | 57 int result; |
| (...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 864 | 862 |
| 865 extern const char kSOCKS5OkRequest[]; | 863 extern const char kSOCKS5OkRequest[]; |
| 866 extern const int kSOCKS5OkRequestLength; | 864 extern const int kSOCKS5OkRequestLength; |
| 867 | 865 |
| 868 extern const char kSOCKS5OkResponse[]; | 866 extern const char kSOCKS5OkResponse[]; |
| 869 extern const int kSOCKS5OkResponseLength; | 867 extern const int kSOCKS5OkResponseLength; |
| 870 | 868 |
| 871 } // namespace net | 869 } // namespace net |
| 872 | 870 |
| 873 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ | 871 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ |
| OLD | NEW |