Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(478)

Side by Side Diff: net/quic/test_tools/quic_test_utils.h

Issue 2236463004: Rename QuicSupportedVersions to QuicAllSupportedVersions. Add QuicCurrentSupportedVersions which re… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@129437595
Patch Set: update more files outside net/ Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/test_tools/crypto_test_utils_test.cc ('k') | net/quic/test_tools/quic_test_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 // Returns an address for ::1. 70 // Returns an address for ::1.
71 IPAddress Loopback6(); 71 IPAddress Loopback6();
72 72
73 // Returns an address for 0.0.0.0. 73 // Returns an address for 0.0.0.0.
74 IPAddress Any4(); 74 IPAddress Any4();
75 75
76 void GenerateBody(std::string* body, int length); 76 void GenerateBody(std::string* body, int length);
77 77
78 // Create an encrypted packet for testing. 78 // Create an encrypted packet for testing.
79 // If versions == nullptr, uses &QuicSupportedVersions(). 79 // If versions == nullptr, uses &AllSupportedVersions().
80 // Note that the packet is encrypted with NullEncrypter, so to decrypt the 80 // Note that the packet is encrypted with NullEncrypter, so to decrypt the
81 // constructed packet, the framer must be set to use NullDecrypter. 81 // constructed packet, the framer must be set to use NullDecrypter.
82 QuicEncryptedPacket* ConstructEncryptedPacket( 82 QuicEncryptedPacket* ConstructEncryptedPacket(
83 QuicConnectionId connection_id, 83 QuicConnectionId connection_id,
84 bool version_flag, 84 bool version_flag,
85 bool multipath_flag, 85 bool multipath_flag,
86 bool reset_flag, 86 bool reset_flag,
87 QuicPathId path_id, 87 QuicPathId path_id,
88 QuicPacketNumber packet_number, 88 QuicPacketNumber packet_number,
89 const std::string& data, 89 const std::string& data,
90 QuicConnectionIdLength connection_id_length, 90 QuicConnectionIdLength connection_id_length,
91 QuicPacketNumberLength packet_number_length, 91 QuicPacketNumberLength packet_number_length,
92 QuicVersionVector* versions, 92 QuicVersionVector* versions,
93 Perspective perspective); 93 Perspective perspective);
94 94
95 // Create an encrypted packet for testing. 95 // Create an encrypted packet for testing.
96 // If versions == nullptr, uses &QuicSupportedVersions(). 96 // If versions == nullptr, uses &AllSupportedVersions().
97 // Note that the packet is encrypted with NullEncrypter, so to decrypt the 97 // Note that the packet is encrypted with NullEncrypter, so to decrypt the
98 // constructed packet, the framer must be set to use NullDecrypter. 98 // constructed packet, the framer must be set to use NullDecrypter.
99 QuicEncryptedPacket* ConstructEncryptedPacket( 99 QuicEncryptedPacket* ConstructEncryptedPacket(
100 QuicConnectionId connection_id, 100 QuicConnectionId connection_id,
101 bool version_flag, 101 bool version_flag,
102 bool multipath_flag, 102 bool multipath_flag,
103 bool reset_flag, 103 bool reset_flag,
104 QuicPathId path_id, 104 QuicPathId path_id,
105 QuicPacketNumber packet_number, 105 QuicPacketNumber packet_number,
106 const std::string& data, 106 const std::string& data,
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 TestQuicSpdyServerSession** server_session); 1023 TestQuicSpdyServerSession** server_session);
1024 1024
1025 // Helper to generate client side stream ids, generalizes 1025 // Helper to generate client side stream ids, generalizes
1026 // kClientDataStreamId1 etc. above. 1026 // kClientDataStreamId1 etc. above.
1027 QuicStreamId QuicClientDataStreamId(int i); 1027 QuicStreamId QuicClientDataStreamId(int i);
1028 1028
1029 } // namespace test 1029 } // namespace test
1030 } // namespace net 1030 } // namespace net
1031 1031
1032 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 1032 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « net/quic/test_tools/crypto_test_utils_test.cc ('k') | net/quic/test_tools/quic_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698