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

Unified Diff: net/quic/core/quic_packet_creator_test.cc

Issue 2242413002: Stop using next_packet_sequence_number_length in QuicPacketCreator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@130098258
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/quic_packet_creator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_packet_creator_test.cc
diff --git a/net/quic/core/quic_packet_creator_test.cc b/net/quic/core/quic_packet_creator_test.cc
index c207b20a9de9360e0a145d6afb420ffe2408b542..b7848b6fb2db21ec7c480842a0608d7be7a22980 100644
--- a/net/quic/core/quic_packet_creator_test.cc
+++ b/net/quic/core/quic_packet_creator_test.cc
@@ -178,7 +178,7 @@ class QuicPacketCreatorTest : public ::testing::TestWithParam<TestParams> {
// Returns the number of bytes consumed by the header of packet, including
// the version.
size_t GetPacketHeaderOverhead(QuicVersion version) {
- if (FLAGS_quic_simple_packet_number_length) {
+ if (FLAGS_quic_simple_packet_number_length_2) {
return GetPacketHeaderSize(
version, creator_.connection_id_length(), kIncludeVersion,
!kIncludePathId, !kIncludeDiversificationNonce,
@@ -279,7 +279,7 @@ TEST_P(QuicPacketCreatorTest, SerializeFrames) {
}
TEST_P(QuicPacketCreatorTest, SerializeChangingSequenceNumberLength) {
- FLAGS_quic_simple_packet_number_length = false;
+ FLAGS_quic_simple_packet_number_length_2 = false;
frames_.push_back(QuicFrame(new QuicAckFrame(MakeAckFrame(0u))));
creator_.AddSavedFrame(frames_[0]);
QuicPacketCreatorPeer::SetNextPacketNumberLength(&creator_,
@@ -328,7 +328,7 @@ TEST_P(QuicPacketCreatorTest, SerializeChangingSequenceNumberLength) {
}
TEST_P(QuicPacketCreatorTest, ChangeSequenceNumberLengthMidPacket) {
- FLAGS_quic_simple_packet_number_length = false;
+ FLAGS_quic_simple_packet_number_length_2 = false;
// Changing the packet number length with queued frames in the creator
// should hold the change until after any currently queued frames are
// serialized.
@@ -411,7 +411,7 @@ TEST_P(QuicPacketCreatorTest, ChangeSequenceNumberLengthMidPacket) {
}
TEST_P(QuicPacketCreatorTest, ChangeSequenceNumberLengthMidPacketDoesNothing) {
- FLAGS_quic_simple_packet_number_length = true;
+ FLAGS_quic_simple_packet_number_length_2 = true;
EXPECT_EQ(PACKET_1BYTE_PACKET_NUMBER,
QuicPacketCreatorPeer::GetPacketNumberLength(&creator_));
// Changing the packet number length with queued frames in the creator
@@ -433,7 +433,7 @@ TEST_P(QuicPacketCreatorTest, ReserializeFramesWithSequenceNumberLength) {
// If the original packet number length, the current packet number
// length, and the configured send packet number length are different, the
// retransmit must sent with the original length and the others do not change.
- if (!FLAGS_quic_simple_packet_number_length) {
+ if (!FLAGS_quic_simple_packet_number_length_2) {
QuicPacketCreatorPeer::SetNextPacketNumberLength(
&creator_, PACKET_4BYTE_PACKET_NUMBER);
}
@@ -450,7 +450,7 @@ TEST_P(QuicPacketCreatorTest, ReserializeFramesWithSequenceNumberLength) {
EXPECT_CALL(delegate_, OnSerializedPacket(_))
.WillOnce(Invoke(this, &QuicPacketCreatorTest::SaveSerializedPacket));
creator_.ReserializeAllFrames(retransmission, buffer, kMaxPacketSize);
- if (FLAGS_quic_simple_packet_number_length) {
+ if (FLAGS_quic_simple_packet_number_length_2) {
// The packet number length is updated after every packet is sent,
// so there is no need to restore the old length after sending.
EXPECT_EQ(PACKET_1BYTE_PACKET_NUMBER,
@@ -549,7 +549,7 @@ TEST_P(QuicPacketCreatorTest, ReserializeFramesWithSpecifiedPadding) {
PendingRetransmission retransmission(CreateRetransmission(
frames, false /* has_crypto_handshake */,
kNumPaddingBytes1 /* padding bytes */, ENCRYPTION_NONE,
- FLAGS_quic_simple_packet_number_length
+ FLAGS_quic_simple_packet_number_length_2
? QuicPacketCreatorPeer::GetPacketNumberLength(&creator_)
: QuicPacketCreatorPeer::NextPacketNumberLength(&creator_)));
EXPECT_CALL(delegate_, OnSerializedPacket(_))
@@ -811,7 +811,7 @@ TEST_P(QuicPacketCreatorTest, SerializeVersionNegotiationPacket) {
}
TEST_P(QuicPacketCreatorTest, UpdatePacketNumberLengthLeastAwaiting_Old) {
- FLAGS_quic_simple_packet_number_length = false;
+ FLAGS_quic_simple_packet_number_length_2 = false;
EXPECT_EQ(PACKET_1BYTE_PACKET_NUMBER,
QuicPacketCreatorPeer::NextPacketNumberLength(&creator_));
@@ -838,7 +838,7 @@ TEST_P(QuicPacketCreatorTest, UpdatePacketNumberLengthLeastAwaiting_Old) {
}
TEST_P(QuicPacketCreatorTest, UpdatePacketSequenceNumberLengthBandwidth_old) {
- FLAGS_quic_simple_packet_number_length = false;
+ FLAGS_quic_simple_packet_number_length_2 = false;
EXPECT_EQ(PACKET_1BYTE_PACKET_NUMBER,
QuicPacketCreatorPeer::NextPacketNumberLength(&creator_));
@@ -862,7 +862,7 @@ TEST_P(QuicPacketCreatorTest, UpdatePacketSequenceNumberLengthBandwidth_old) {
}
TEST_P(QuicPacketCreatorTest, UpdatePacketSequenceNumberLengthLeastAwaiting) {
- FLAGS_quic_simple_packet_number_length = true;
+ FLAGS_quic_simple_packet_number_length_2 = true;
EXPECT_EQ(PACKET_1BYTE_PACKET_NUMBER,
QuicPacketCreatorPeer::GetPacketNumberLength(&creator_));
@@ -889,7 +889,7 @@ TEST_P(QuicPacketCreatorTest, UpdatePacketSequenceNumberLengthLeastAwaiting) {
}
TEST_P(QuicPacketCreatorTest, UpdatePacketSequenceNumberLengthCwnd) {
- FLAGS_quic_simple_packet_number_length = true;
+ FLAGS_quic_simple_packet_number_length_2 = true;
EXPECT_EQ(PACKET_1BYTE_PACKET_NUMBER,
QuicPacketCreatorPeer::GetPacketNumberLength(&creator_));
@@ -1220,7 +1220,7 @@ TEST_P(QuicPacketCreatorTest, SetCurrentPath) {
TEST_P(QuicPacketCreatorTest,
SetCurrentPathAndUpdatePacketSequenceNumberLength) {
- FLAGS_quic_simple_packet_number_length = false;
+ FLAGS_quic_simple_packet_number_length_2 = false;
// Current path is the default path.
EXPECT_EQ(kDefaultPathId, QuicPacketCreatorPeer::GetCurrentPath(&creator_));
EXPECT_EQ(PACKET_1BYTE_PACKET_NUMBER,
« no previous file with comments | « net/quic/core/quic_packet_creator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698