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 24 matching lines...) Expand all Loading... |
35 static const uint16 kTestPort = 123; | 35 static const uint16 kTestPort = 123; |
36 static const uint32 kInitialStreamFlowControlWindowForTest = | 36 static const uint32 kInitialStreamFlowControlWindowForTest = |
37 32 * 1024; // 32 KB | 37 32 * 1024; // 32 KB |
38 static const uint32 kInitialSessionFlowControlWindowForTest = | 38 static const uint32 kInitialSessionFlowControlWindowForTest = |
39 64 * 1024; // 64 KB | 39 64 * 1024; // 64 KB |
40 | 40 |
41 // Data stream IDs start at 5: the crypto stream is 1, headers stream is 3. | 41 // Data stream IDs start at 5: the crypto stream is 1, headers stream is 3. |
42 static const QuicStreamId kClientDataStreamId1 = 5; | 42 static const QuicStreamId kClientDataStreamId1 = 5; |
43 static const QuicStreamId kClientDataStreamId2 = 7; | 43 static const QuicStreamId kClientDataStreamId2 = 7; |
44 static const QuicStreamId kClientDataStreamId3 = 9; | 44 static const QuicStreamId kClientDataStreamId3 = 9; |
45 static const QuicStreamId kClientDataStreamId4 = 11; | |
46 | 45 |
47 // Returns the test peer IP address. | 46 // Returns the test peer IP address. |
48 IPAddressNumber TestPeerIPAddress(); | 47 IPAddressNumber TestPeerIPAddress(); |
49 | 48 |
50 // Upper limit on versions we support. | 49 // Upper limit on versions we support. |
51 QuicVersion QuicVersionMax(); | 50 QuicVersion QuicVersionMax(); |
52 | 51 |
53 // Lower limit on versions we support. | 52 // Lower limit on versions we support. |
54 QuicVersion QuicVersionMin(); | 53 QuicVersion QuicVersionMin(); |
55 | 54 |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 // clears the pointer to it to prevent use-after-free. | 597 // clears the pointer to it to prevent use-after-free. |
599 void Unregister(PerConnectionPacketWriter* writer); | 598 void Unregister(PerConnectionPacketWriter* writer); |
600 | 599 |
601 PerConnectionPacketWriter* current_writer_; | 600 PerConnectionPacketWriter* current_writer_; |
602 }; | 601 }; |
603 | 602 |
604 } // namespace test | 603 } // namespace test |
605 } // namespace net | 604 } // namespace net |
606 | 605 |
607 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 606 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
OLD | NEW |