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

Unified Diff: net/quic/test_tools/quic_test_utils.cc

Issue 981193003: Implement the "sanity checks" described in b/9509040: Incoming packets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Change_null_value_87819844
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/test_tools/quic_test_utils.h ('k') | net/tools/quic/quic_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/quic_test_utils.cc
diff --git a/net/quic/test_tools/quic_test_utils.cc b/net/quic/test_tools/quic_test_utils.cc
index b504b756cb2c1f1a6f30aa1036278a68a8f0c2da..4ab3d0c2de0d1398a5dd581ffd6fea95b200d85f 100644
--- a/net/quic/test_tools/quic_test_utils.cc
+++ b/net/quic/test_tools/quic_test_utils.cc
@@ -473,12 +473,25 @@ QuicEncryptedPacket* ConstructEncryptedPacket(
bool reset_flag,
QuicPacketSequenceNumber sequence_number,
const string& data) {
+ return ConstructEncryptedPacket(
+ connection_id, version_flag, reset_flag, sequence_number, data,
+ PACKET_8BYTE_CONNECTION_ID, PACKET_6BYTE_SEQUENCE_NUMBER);
+}
+
+QuicEncryptedPacket* ConstructEncryptedPacket(
+ QuicConnectionId connection_id,
+ bool version_flag,
+ bool reset_flag,
+ QuicPacketSequenceNumber sequence_number,
+ const string& data,
+ QuicConnectionIdLength connection_id_length,
+ QuicSequenceNumberLength sequence_number_length) {
QuicPacketHeader header;
header.public_header.connection_id = connection_id;
- header.public_header.connection_id_length = PACKET_8BYTE_CONNECTION_ID;
+ header.public_header.connection_id_length = connection_id_length;
header.public_header.version_flag = version_flag;
header.public_header.reset_flag = reset_flag;
- header.public_header.sequence_number_length = PACKET_6BYTE_SEQUENCE_NUMBER;
+ header.public_header.sequence_number_length = sequence_number_length;
header.packet_sequence_number = sequence_number;
header.entropy_flag = false;
header.entropy_hash = 0;
« no previous file with comments | « net/quic/test_tools/quic_test_utils.h ('k') | net/tools/quic/quic_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698