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 <stddef.h> | 10 #include <stddef.h> |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 const int expected_len); | 143 const int expected_len); |
144 | 144 |
145 bool DecodeHexString(const StringPiece& hex, std::string* bytes); | 145 bool DecodeHexString(const StringPiece& hex, std::string* bytes); |
146 | 146 |
147 // Returns the length of a QuicPacket that is capable of holding either a | 147 // Returns the length of a QuicPacket that is capable of holding either a |
148 // stream frame or a minimal ack frame. Sets |*payload_length| to the number | 148 // stream frame or a minimal ack frame. Sets |*payload_length| to the number |
149 // of bytes of stream data that will fit in such a packet. | 149 // of bytes of stream data that will fit in such a packet. |
150 size_t GetPacketLengthForOneStream(QuicVersion version, | 150 size_t GetPacketLengthForOneStream(QuicVersion version, |
151 bool include_version, | 151 bool include_version, |
152 bool include_path_id, | 152 bool include_path_id, |
| 153 bool include_diversification_nonce, |
153 QuicConnectionIdLength connection_id_length, | 154 QuicConnectionIdLength connection_id_length, |
154 QuicPacketNumberLength packet_number_length, | 155 QuicPacketNumberLength packet_number_length, |
155 size_t* payload_length); | 156 size_t* payload_length); |
156 | 157 |
157 // Returns QuicConfig set to default values. | 158 // Returns QuicConfig set to default values. |
158 QuicConfig DefaultQuicConfig(); | 159 QuicConfig DefaultQuicConfig(); |
159 | 160 |
160 // Returns a QuicConfig set to default values that supports stateless rejects. | 161 // Returns a QuicConfig set to default values that supports stateless rejects. |
161 QuicConfig DefaultQuicConfigStatelessRejects(); | 162 QuicConfig DefaultQuicConfigStatelessRejects(); |
162 | 163 |
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
850 TestQuicSpdyServerSession** server_session); | 851 TestQuicSpdyServerSession** server_session); |
851 | 852 |
852 // Helper to generate client side stream ids, generalizes | 853 // Helper to generate client side stream ids, generalizes |
853 // kClientDataStreamId1 etc. above. | 854 // kClientDataStreamId1 etc. above. |
854 QuicStreamId QuicClientDataStreamId(int i); | 855 QuicStreamId QuicClientDataStreamId(int i); |
855 | 856 |
856 } // namespace test | 857 } // namespace test |
857 } // namespace net | 858 } // namespace net |
858 | 859 |
859 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 860 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
OLD | NEW |