| 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 // Common utilities for Quic tests | 5 // Common utilities for Quic tests |
| 6 | 6 |
| 7 #ifndef NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 7 #ifndef NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
| 8 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 8 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 // Lower limit on versions we support. | 31 // Lower limit on versions we support. |
| 32 QuicVersion QuicVersionMin(); | 32 QuicVersion QuicVersionMin(); |
| 33 | 33 |
| 34 void CompareCharArraysWithHexError(const std::string& description, | 34 void CompareCharArraysWithHexError(const std::string& description, |
| 35 const char* actual, | 35 const char* actual, |
| 36 const int actual_len, | 36 const int actual_len, |
| 37 const char* expected, | 37 const char* expected, |
| 38 const int expected_len); | 38 const int expected_len); |
| 39 | 39 |
| 40 bool DecodeHexString(const base::StringPiece& hex, std::string* bytes); |
| 41 |
| 40 // Returns the length of a QuicPacket that is capable of holding either a | 42 // Returns the length of a QuicPacket that is capable of holding either a |
| 41 // stream frame or a minimal ack frame. Sets |*payload_length| to the number | 43 // stream frame or a minimal ack frame. Sets |*payload_length| to the number |
| 42 // of bytes of stream data that will fit in such a packet. | 44 // of bytes of stream data that will fit in such a packet. |
| 43 size_t GetPacketLengthForOneStream( | 45 size_t GetPacketLengthForOneStream( |
| 44 QuicVersion version, | 46 QuicVersion version, |
| 45 bool include_version, | 47 bool include_version, |
| 46 QuicSequenceNumberLength sequence_number_length, | 48 QuicSequenceNumberLength sequence_number_length, |
| 47 InFecGroup is_in_fec_group, | 49 InFecGroup is_in_fec_group, |
| 48 size_t* payload_length); | 50 size_t* payload_length); |
| 49 | 51 |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 MockAckNotifierDelegate(); | 416 MockAckNotifierDelegate(); |
| 415 virtual ~MockAckNotifierDelegate(); | 417 virtual ~MockAckNotifierDelegate(); |
| 416 | 418 |
| 417 MOCK_METHOD0(OnAckNotification, void()); | 419 MOCK_METHOD0(OnAckNotification, void()); |
| 418 }; | 420 }; |
| 419 | 421 |
| 420 } // namespace test | 422 } // namespace test |
| 421 } // namespace net | 423 } // namespace net |
| 422 | 424 |
| 423 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 425 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
| OLD | NEW |