| 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 <stdint.h> |
| 9 |
| 8 #include <cstring> | 10 #include <cstring> |
| 9 #include <deque> | 11 #include <deque> |
| 10 #include <string> | 12 #include <string> |
| 11 #include <vector> | 13 #include <vector> |
| 12 | 14 |
| 13 #include "base/basictypes.h" | 15 #include "base/basictypes.h" |
| 14 #include "base/callback.h" | 16 #include "base/callback.h" |
| 15 #include "base/logging.h" | 17 #include "base/logging.h" |
| 16 #include "base/memory/ref_counted.h" | 18 #include "base/memory/ref_counted.h" |
| 17 #include "base/memory/scoped_ptr.h" | 19 #include "base/memory/scoped_ptr.h" |
| (...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1230 | 1232 |
| 1231 extern const char kSOCKS5GreetResponse[]; | 1233 extern const char kSOCKS5GreetResponse[]; |
| 1232 extern const int kSOCKS5GreetResponseLength; | 1234 extern const int kSOCKS5GreetResponseLength; |
| 1233 | 1235 |
| 1234 extern const char kSOCKS5OkRequest[]; | 1236 extern const char kSOCKS5OkRequest[]; |
| 1235 extern const int kSOCKS5OkRequestLength; | 1237 extern const int kSOCKS5OkRequestLength; |
| 1236 | 1238 |
| 1237 extern const char kSOCKS5OkResponse[]; | 1239 extern const char kSOCKS5OkResponse[]; |
| 1238 extern const int kSOCKS5OkResponseLength; | 1240 extern const int kSOCKS5OkResponseLength; |
| 1239 | 1241 |
| 1242 // Helper function to get the total data size of the MockReads in |reads|. |
| 1243 int64_t CountReadBytes(const MockRead reads[], size_t reads_size); |
| 1244 |
| 1245 // Helper function to get the total data size of the MockWrites in |writes|. |
| 1246 int64_t CountWriteBytes(const MockWrite writes[], size_t writes_size); |
| 1247 |
| 1240 } // namespace net | 1248 } // namespace net |
| 1241 | 1249 |
| 1242 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ | 1250 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ |
| OLD | NEW |