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

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

Issue 2515613002: deprecate FLAGS_quic_disable_pre_34 (Closed)
Patch Set: Created 4 years, 1 month 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_sent_packet_manager.cc ('k') | net/quic/core/quic_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_sent_packet_manager_test.cc
diff --git a/net/quic/core/quic_sent_packet_manager_test.cc b/net/quic/core/quic_sent_packet_manager_test.cc
index d3b34850b8198a173099ca3f3a4f889a48115c17..6d5e6b8af35a5770c2015bf9168b1890957ab16a 100644
--- a/net/quic/core/quic_sent_packet_manager_test.cc
+++ b/net/quic/core/quic_sent_packet_manager_test.cc
@@ -56,27 +56,7 @@ class MockDebugDelegate : public QuicSentPacketManagerInterface::DebugDelegate {
QuicTime detection_time));
};
-// Run tests with different ack frame packets set mode.
-struct TestParams {
- explicit TestParams(bool missing) : missing(missing) {}
-
- friend std::ostream& operator<<(std::ostream& os, const TestParams& p) {
- os << "{ ack frame packets set mode: " << p.missing << " }";
- return os;
- }
-
- bool missing;
-};
-
-std::vector<TestParams> GetTestParams() {
- std::vector<TestParams> params;
- for (bool missing : {true, false}) {
- params.push_back(TestParams(missing));
- }
- return params;
-}
-
-class QuicSentPacketManagerTest : public ::testing::TestWithParam<TestParams> {
+class QuicSentPacketManagerTest : public ::testing::Test {
protected:
QuicSentPacketManagerTest()
: manager_(Perspective::IS_SERVER,
@@ -222,7 +202,7 @@ class QuicSentPacketManagerTest : public ::testing::TestWithParam<TestParams> {
bool retransmittable) {
SerializedPacket packet(kDefaultPathId, packet_number,
PACKET_6BYTE_PACKET_NUMBER, nullptr, kDefaultLength,
- 0u, false, false);
+ false, false);
if (retransmittable) {
packet.retransmittable_frames.push_back(
QuicFrame(new QuicStreamFrame(kStreamId, false, 0, StringPiece())));
@@ -283,11 +263,8 @@ class QuicSentPacketManagerTest : public ::testing::TestWithParam<TestParams> {
// Initialize a frame acknowledging all packets up to largest_observed.
const QuicAckFrame InitAckFrame(QuicPacketNumber largest_observed) {
QuicAckFrame frame(MakeAckFrame(largest_observed));
- frame.missing = GetParam().missing;
- if (!GetParam().missing) {
- if (largest_observed > 0) {
- frame.packets.Add(1, largest_observed + 1);
- }
+ if (largest_observed > 0) {
+ frame.packets.Add(1, largest_observed + 1);
}
return frame;
}
@@ -296,11 +273,7 @@ class QuicSentPacketManagerTest : public ::testing::TestWithParam<TestParams> {
void NackPackets(QuicPacketNumber lower,
QuicPacketNumber higher,
QuicAckFrame* frame) {
- if (frame->missing) {
- frame->packets.Add(lower, higher);
- } else {
- frame->packets.Remove(lower, higher);
- }
+ frame->packets.Remove(lower, higher);
}
QuicFlagSaver flags_; // Save/restore all QUIC flag values.
@@ -311,11 +284,7 @@ class QuicSentPacketManagerTest : public ::testing::TestWithParam<TestParams> {
std::unique_ptr<MockNetworkChangeVisitor> network_change_visitor_;
};
-INSTANTIATE_TEST_CASE_P(QuicSentPacketManagerTest,
- QuicSentPacketManagerTest,
- ::testing::ValuesIn(GetTestParams()));
-
-TEST_P(QuicSentPacketManagerTest, IsUnacked) {
+TEST_F(QuicSentPacketManagerTest, IsUnacked) {
VerifyUnackedPackets(nullptr, 0);
SendDataPacket(1);
@@ -325,7 +294,7 @@ TEST_P(QuicSentPacketManagerTest, IsUnacked) {
VerifyRetransmittablePackets(retransmittable, arraysize(retransmittable));
}
-TEST_P(QuicSentPacketManagerTest, IsUnAckedRetransmit) {
+TEST_F(QuicSentPacketManagerTest, IsUnAckedRetransmit) {
SendDataPacket(1);
RetransmitAndSendPacket(1, 2);
@@ -337,7 +306,7 @@ TEST_P(QuicSentPacketManagerTest, IsUnAckedRetransmit) {
VerifyRetransmittablePackets(retransmittable, arraysize(retransmittable));
}
-TEST_P(QuicSentPacketManagerTest, RetransmitThenAck) {
+TEST_F(QuicSentPacketManagerTest, RetransmitThenAck) {
SendDataPacket(1);
RetransmitAndSendPacket(1, 2);
@@ -354,7 +323,7 @@ TEST_P(QuicSentPacketManagerTest, RetransmitThenAck) {
VerifyRetransmittablePackets(nullptr, 0);
}
-TEST_P(QuicSentPacketManagerTest, RetransmitThenAckBeforeSend) {
+TEST_F(QuicSentPacketManagerTest, RetransmitThenAckBeforeSend) {
SendDataPacket(1);
QuicSentPacketManagerPeer::MarkForRetransmission(&manager_, kDefaultPathId, 1,
TLP_RETRANSMISSION);
@@ -374,7 +343,7 @@ TEST_P(QuicSentPacketManagerTest, RetransmitThenAckBeforeSend) {
EXPECT_EQ(0u, stats_.packets_spuriously_retransmitted);
}
-TEST_P(QuicSentPacketManagerTest, RetransmitThenStopRetransmittingBeforeSend) {
+TEST_F(QuicSentPacketManagerTest, RetransmitThenStopRetransmittingBeforeSend) {
SendDataPacket(1);
QuicSentPacketManagerPeer::MarkForRetransmission(&manager_, kDefaultPathId, 1,
TLP_RETRANSMISSION);
@@ -391,7 +360,7 @@ TEST_P(QuicSentPacketManagerTest, RetransmitThenStopRetransmittingBeforeSend) {
EXPECT_EQ(0u, stats_.packets_spuriously_retransmitted);
}
-TEST_P(QuicSentPacketManagerTest, RetransmitThenAckPrevious) {
+TEST_F(QuicSentPacketManagerTest, RetransmitThenAckPrevious) {
SendDataPacket(1);
RetransmitAndSendPacket(1, 2);
QuicTime::Delta rtt = QuicTime::Delta::FromMilliseconds(15);
@@ -411,7 +380,7 @@ TEST_P(QuicSentPacketManagerTest, RetransmitThenAckPrevious) {
EXPECT_EQ(1u, stats_.packets_spuriously_retransmitted);
}
-TEST_P(QuicSentPacketManagerTest, RetransmitThenAckPreviousThenNackRetransmit) {
+TEST_F(QuicSentPacketManagerTest, RetransmitThenAckPreviousThenNackRetransmit) {
SendDataPacket(1);
RetransmitAndSendPacket(1, 2);
QuicTime::Delta rtt = QuicTime::Delta::FromMilliseconds(15);
@@ -453,7 +422,7 @@ TEST_P(QuicSentPacketManagerTest, RetransmitThenAckPreviousThenNackRetransmit) {
EXPECT_EQ(QuicTime::Zero(), manager_.GetRetransmissionTime());
}
-TEST_P(QuicSentPacketManagerTest,
+TEST_F(QuicSentPacketManagerTest,
DISABLED_RetransmitTwiceThenAckPreviousBeforeSend) {
SendDataPacket(1);
RetransmitAndSendPacket(1, 2);
@@ -483,7 +452,7 @@ TEST_P(QuicSentPacketManagerTest,
EXPECT_EQ(QuicTime::Zero(), manager_.GetRetransmissionTime());
}
-TEST_P(QuicSentPacketManagerTest, RetransmitTwiceThenAckFirst) {
+TEST_F(QuicSentPacketManagerTest, RetransmitTwiceThenAckFirst) {
StrictMock<MockDebugDelegate> debug_delegate;
EXPECT_CALL(debug_delegate, OnSpuriousPacketRetransmission(TLP_RETRANSMISSION,
kDefaultLength))
@@ -531,7 +500,7 @@ TEST_P(QuicSentPacketManagerTest, RetransmitTwiceThenAckFirst) {
EXPECT_EQ(2u, stats_.packets_spuriously_retransmitted);
}
-TEST_P(QuicSentPacketManagerTest, AckOriginalTransmission) {
+TEST_F(QuicSentPacketManagerTest, AckOriginalTransmission) {
auto loss_algorithm = base::MakeUnique<MockLossAlgorithm>();
QuicSentPacketManagerPeer::SetLossAlgorithm(&manager_, loss_algorithm.get());
@@ -566,16 +535,16 @@ TEST_P(QuicSentPacketManagerTest, AckOriginalTransmission) {
}
}
-TEST_P(QuicSentPacketManagerTest, GetLeastUnacked) {
+TEST_F(QuicSentPacketManagerTest, GetLeastUnacked) {
EXPECT_EQ(1u, manager_.GetLeastUnacked(kDefaultPathId));
}
-TEST_P(QuicSentPacketManagerTest, GetLeastUnackedUnacked) {
+TEST_F(QuicSentPacketManagerTest, GetLeastUnackedUnacked) {
SendDataPacket(1);
EXPECT_EQ(1u, manager_.GetLeastUnacked(kDefaultPathId));
}
-TEST_P(QuicSentPacketManagerTest, AckAckAndUpdateRtt) {
+TEST_F(QuicSentPacketManagerTest, AckAckAndUpdateRtt) {
SendDataPacket(1);
SendAckPacket(2);
@@ -594,7 +563,7 @@ TEST_P(QuicSentPacketManagerTest, AckAckAndUpdateRtt) {
manager_.OnIncomingAck(ack_frame, clock_.Now());
}
-TEST_P(QuicSentPacketManagerTest, Rtt) {
+TEST_F(QuicSentPacketManagerTest, Rtt) {
QuicPacketNumber packet_number = 1;
QuicTime::Delta expected_rtt = QuicTime::Delta::FromMilliseconds(15);
SendDataPacket(packet_number);
@@ -607,7 +576,7 @@ TEST_P(QuicSentPacketManagerTest, Rtt) {
EXPECT_EQ(expected_rtt, manager_.GetRttStats()->latest_rtt());
}
-TEST_P(QuicSentPacketManagerTest, RttWithInvalidDelta) {
+TEST_F(QuicSentPacketManagerTest, RttWithInvalidDelta) {
// Expect that the RTT is equal to the local time elapsed, since the
// ack_delay_time is larger than the local time elapsed
// and is hence invalid.
@@ -623,7 +592,7 @@ TEST_P(QuicSentPacketManagerTest, RttWithInvalidDelta) {
EXPECT_EQ(expected_rtt, manager_.GetRttStats()->latest_rtt());
}
-TEST_P(QuicSentPacketManagerTest, RttWithInfiniteDelta) {
+TEST_F(QuicSentPacketManagerTest, RttWithInfiniteDelta) {
// Expect that the RTT is equal to the local time elapsed, since the
// ack_delay_time is infinite, and is hence invalid.
QuicPacketNumber packet_number = 1;
@@ -638,7 +607,7 @@ TEST_P(QuicSentPacketManagerTest, RttWithInfiniteDelta) {
EXPECT_EQ(expected_rtt, manager_.GetRttStats()->latest_rtt());
}
-TEST_P(QuicSentPacketManagerTest, RttZeroDelta) {
+TEST_F(QuicSentPacketManagerTest, RttZeroDelta) {
// Expect that the RTT is the time between send and receive since the
// ack_delay_time is zero.
QuicPacketNumber packet_number = 1;
@@ -653,7 +622,7 @@ TEST_P(QuicSentPacketManagerTest, RttZeroDelta) {
EXPECT_EQ(expected_rtt, manager_.GetRttStats()->latest_rtt());
}
-TEST_P(QuicSentPacketManagerTest, TailLossProbeTimeout) {
+TEST_F(QuicSentPacketManagerTest, TailLossProbeTimeout) {
QuicSentPacketManagerPeer::SetMaxTailLossProbes(&manager_, 2);
// Send 1 packet.
@@ -710,7 +679,7 @@ TEST_P(QuicSentPacketManagerTest, TailLossProbeTimeout) {
EXPECT_EQ(0u, stats_.rto_count);
}
-TEST_P(QuicSentPacketManagerTest, TailLossProbeThenRTO) {
+TEST_F(QuicSentPacketManagerTest, TailLossProbeThenRTO) {
QuicSentPacketManagerPeer::SetMaxTailLossProbes(&manager_, 2);
// Send 100 packets.
@@ -780,7 +749,7 @@ TEST_P(QuicSentPacketManagerTest, TailLossProbeThenRTO) {
EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
}
-TEST_P(QuicSentPacketManagerTest, CryptoHandshakeTimeout) {
+TEST_F(QuicSentPacketManagerTest, CryptoHandshakeTimeout) {
// Send 2 crypto packets and 3 data packets.
const size_t kNumSentCryptoPackets = 2;
for (size_t i = 1; i <= kNumSentCryptoPackets; ++i) {
@@ -823,7 +792,7 @@ TEST_P(QuicSentPacketManagerTest, CryptoHandshakeTimeout) {
EXPECT_FALSE(QuicSentPacketManagerPeer::HasUnackedCryptoPackets(&manager_));
}
-TEST_P(QuicSentPacketManagerTest, CryptoHandshakeTimeoutVersionNegotiation) {
+TEST_F(QuicSentPacketManagerTest, CryptoHandshakeTimeoutVersionNegotiation) {
// Send 2 crypto packets and 3 data packets.
const size_t kNumSentCryptoPackets = 2;
for (size_t i = 1; i <= kNumSentCryptoPackets; ++i) {
@@ -873,7 +842,7 @@ TEST_P(QuicSentPacketManagerTest, CryptoHandshakeTimeoutVersionNegotiation) {
EXPECT_EQ(10u, manager_.GetLeastUnacked(kDefaultPathId));
}
-TEST_P(QuicSentPacketManagerTest, CryptoHandshakeSpuriousRetransmission) {
+TEST_F(QuicSentPacketManagerTest, CryptoHandshakeSpuriousRetransmission) {
// Send 1 crypto packet.
SendCryptoPacket(1);
EXPECT_TRUE(QuicSentPacketManagerPeer::HasUnackedCryptoPackets(&manager_));
@@ -898,7 +867,7 @@ TEST_P(QuicSentPacketManagerTest, CryptoHandshakeSpuriousRetransmission) {
VerifyUnackedPackets(unacked, arraysize(unacked));
}
-TEST_P(QuicSentPacketManagerTest, CryptoHandshakeTimeoutUnsentDataPacket) {
+TEST_F(QuicSentPacketManagerTest, CryptoHandshakeTimeoutUnsentDataPacket) {
// Send 2 crypto packets and 1 data packet.
const size_t kNumSentCryptoPackets = 2;
for (size_t i = 1; i <= kNumSentCryptoPackets; ++i) {
@@ -915,7 +884,7 @@ TEST_P(QuicSentPacketManagerTest, CryptoHandshakeTimeoutUnsentDataPacket) {
EXPECT_TRUE(QuicSentPacketManagerPeer::HasUnackedCryptoPackets(&manager_));
}
-TEST_P(QuicSentPacketManagerTest,
+TEST_F(QuicSentPacketManagerTest,
CryptoHandshakeRetransmissionThenRetransmitAll) {
// Send 1 crypto packet.
SendCryptoPacket(1);
@@ -935,7 +904,7 @@ TEST_P(QuicSentPacketManagerTest,
EXPECT_FALSE(QuicSentPacketManagerPeer::HasPendingPackets(&manager_));
}
-TEST_P(QuicSentPacketManagerTest,
+TEST_F(QuicSentPacketManagerTest,
CryptoHandshakeRetransmissionThenNeuterAndAck) {
// Send 1 crypto packet.
SendCryptoPacket(1);
@@ -971,7 +940,7 @@ TEST_P(QuicSentPacketManagerTest,
VerifyRetransmittablePackets(nullptr, 0);
}
-TEST_P(QuicSentPacketManagerTest, RetransmissionTimeout) {
+TEST_F(QuicSentPacketManagerTest, RetransmissionTimeout) {
StrictMock<MockDebugDelegate> debug_delegate;
manager_.SetDebugDelegate(&debug_delegate);
@@ -1008,7 +977,7 @@ TEST_P(QuicSentPacketManagerTest, RetransmissionTimeout) {
manager_.OnIncomingAck(ack_frame, clock_.Now());
}
-TEST_P(QuicSentPacketManagerTest, NewRetransmissionTimeout) {
+TEST_F(QuicSentPacketManagerTest, NewRetransmissionTimeout) {
QuicConfig client_config;
QuicTagVector options;
options.push_back(kNRTO);
@@ -1050,7 +1019,7 @@ TEST_P(QuicSentPacketManagerTest, NewRetransmissionTimeout) {
manager_.OnIncomingAck(ack_frame, clock_.Now());
}
-TEST_P(QuicSentPacketManagerTest, TwoRetransmissionTimeoutsAckSecond) {
+TEST_F(QuicSentPacketManagerTest, TwoRetransmissionTimeoutsAckSecond) {
// Send 1 packet.
SendDataPacket(1);
@@ -1083,7 +1052,7 @@ TEST_P(QuicSentPacketManagerTest, TwoRetransmissionTimeoutsAckSecond) {
QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
}
-TEST_P(QuicSentPacketManagerTest, TwoRetransmissionTimeoutsAckFirst) {
+TEST_F(QuicSentPacketManagerTest, TwoRetransmissionTimeoutsAckFirst) {
// Send 1 packet.
SendDataPacket(1);
@@ -1116,7 +1085,7 @@ TEST_P(QuicSentPacketManagerTest, TwoRetransmissionTimeoutsAckFirst) {
QuicSentPacketManagerPeer::GetBytesInFlight(&manager_));
}
-TEST_P(QuicSentPacketManagerTest, OnPathDegrading) {
+TEST_F(QuicSentPacketManagerTest, OnPathDegrading) {
SendDataPacket(1);
for (size_t i = 1; i < kMinTimeoutsBeforePathDegrading; ++i) {
manager_.OnRetransmissionTimeout();
@@ -1128,11 +1097,11 @@ TEST_P(QuicSentPacketManagerTest, OnPathDegrading) {
manager_.OnRetransmissionTimeout();
}
-TEST_P(QuicSentPacketManagerTest, GetTransmissionTime) {
+TEST_F(QuicSentPacketManagerTest, GetTransmissionTime) {
EXPECT_EQ(QuicTime::Zero(), manager_.GetRetransmissionTime());
}
-TEST_P(QuicSentPacketManagerTest, GetTransmissionTimeCryptoHandshake) {
+TEST_F(QuicSentPacketManagerTest, GetTransmissionTimeCryptoHandshake) {
SendCryptoPacket(1);
// Check the min.
@@ -1159,7 +1128,7 @@ TEST_P(QuicSentPacketManagerTest, GetTransmissionTimeCryptoHandshake) {
EXPECT_EQ(expected_time, manager_.GetRetransmissionTime());
}
-TEST_P(QuicSentPacketManagerTest,
+TEST_F(QuicSentPacketManagerTest,
GetConservativeTransmissionTimeCryptoHandshake) {
FLAGS_quic_conservative_handshake_retransmits = true;
QuicConfig config;
@@ -1201,7 +1170,7 @@ TEST_P(QuicSentPacketManagerTest,
EXPECT_EQ(expected_time, manager_.GetRetransmissionTime());
}
-TEST_P(QuicSentPacketManagerTest, GetTransmissionTimeTailLossProbe) {
+TEST_F(QuicSentPacketManagerTest, GetTransmissionTimeTailLossProbe) {
QuicSentPacketManagerPeer::SetMaxTailLossProbes(&manager_, 2);
SendDataPacket(1);
SendDataPacket(2);
@@ -1240,7 +1209,7 @@ TEST_P(QuicSentPacketManagerTest, GetTransmissionTimeTailLossProbe) {
EXPECT_EQ(expected_time, manager_.GetRetransmissionTime());
}
-TEST_P(QuicSentPacketManagerTest, GetTransmissionTimeSpuriousRTO) {
+TEST_F(QuicSentPacketManagerTest, GetTransmissionTimeSpuriousRTO) {
RttStats* rtt_stats = const_cast<RttStats*>(manager_.GetRttStats());
rtt_stats->UpdateRtt(QuicTime::Delta::FromMilliseconds(100),
QuicTime::Delta::Zero(), QuicTime::Zero());
@@ -1294,7 +1263,7 @@ TEST_P(QuicSentPacketManagerTest, GetTransmissionTimeSpuriousRTO) {
EXPECT_EQ(expected_time, manager_.GetRetransmissionTime());
}
-TEST_P(QuicSentPacketManagerTest, GetTransmissionDelayMin) {
+TEST_F(QuicSentPacketManagerTest, GetTransmissionDelayMin) {
SendDataPacket(1);
// Provide a 1ms RTT sample.
const_cast<RttStats*>(manager_.GetRttStats())
@@ -1314,7 +1283,7 @@ TEST_P(QuicSentPacketManagerTest, GetTransmissionDelayMin) {
}
}
-TEST_P(QuicSentPacketManagerTest, GetTransmissionDelayMax) {
+TEST_F(QuicSentPacketManagerTest, GetTransmissionDelayMax) {
SendDataPacket(1);
// Provide a 60s RTT sample.
const_cast<RttStats*>(manager_.GetRttStats())
@@ -1325,7 +1294,7 @@ TEST_P(QuicSentPacketManagerTest, GetTransmissionDelayMax) {
QuicSentPacketManagerPeer::GetRetransmissionDelay(&manager_));
}
-TEST_P(QuicSentPacketManagerTest, GetTransmissionDelayExponentialBackoff) {
+TEST_F(QuicSentPacketManagerTest, GetTransmissionDelayExponentialBackoff) {
SendDataPacket(1);
QuicTime::Delta delay = QuicTime::Delta::FromMilliseconds(500);
@@ -1374,7 +1343,7 @@ TEST_F(QuicSentPacketManagerTest, RetransmissionDelay) {
1);
}
-TEST_P(QuicSentPacketManagerTest, GetLossDelay) {
+TEST_F(QuicSentPacketManagerTest, GetLossDelay) {
auto loss_algorithm = base::MakeUnique<MockLossAlgorithm>();
QuicSentPacketManagerPeer::SetLossAlgorithm(&manager_, loss_algorithm.get());
@@ -1402,7 +1371,7 @@ TEST_P(QuicSentPacketManagerTest, GetLossDelay) {
manager_.OnRetransmissionTimeout();
}
-TEST_P(QuicSentPacketManagerTest, NegotiateTimeLossDetectionFromOptions) {
+TEST_F(QuicSentPacketManagerTest, NegotiateTimeLossDetectionFromOptions) {
EXPECT_EQ(kNack, QuicSentPacketManagerPeer::GetLossAlgorithm(&manager_)
->GetLossDetectionType());
@@ -1418,7 +1387,7 @@ TEST_P(QuicSentPacketManagerTest, NegotiateTimeLossDetectionFromOptions) {
->GetLossDetectionType());
}
-TEST_P(QuicSentPacketManagerTest, NegotiateCongestionControlFromOptions) {
+TEST_F(QuicSentPacketManagerTest, NegotiateCongestionControlFromOptions) {
FLAGS_quic_allow_new_bbr = true;
QuicConfig config;
QuicTagVector options;
@@ -1461,7 +1430,7 @@ TEST_P(QuicSentPacketManagerTest, NegotiateCongestionControlFromOptions) {
->GetCongestionControlType());
}
-TEST_P(QuicSentPacketManagerTest, NegotiateNumConnectionsFromOptions) {
+TEST_F(QuicSentPacketManagerTest, NegotiateNumConnectionsFromOptions) {
QuicConfig config;
QuicTagVector options;
@@ -1481,7 +1450,7 @@ TEST_P(QuicSentPacketManagerTest, NegotiateNumConnectionsFromOptions) {
manager_.SetFromConfig(client_config);
}
-TEST_P(QuicSentPacketManagerTest, NegotiateNConnectionFromOptions) {
+TEST_F(QuicSentPacketManagerTest, NegotiateNConnectionFromOptions) {
// By default, changing the number of open streams does nothing.
manager_.SetNumOpenStreams(5);
@@ -1498,7 +1467,7 @@ TEST_P(QuicSentPacketManagerTest, NegotiateNConnectionFromOptions) {
manager_.SetNumOpenStreams(5);
}
-TEST_P(QuicSentPacketManagerTest, NegotiateNoTLPFromOptionsAtServer) {
+TEST_F(QuicSentPacketManagerTest, NegotiateNoTLPFromOptionsAtServer) {
QuicConfig config;
QuicTagVector options;
@@ -1510,7 +1479,7 @@ TEST_P(QuicSentPacketManagerTest, NegotiateNoTLPFromOptionsAtServer) {
EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetMaxTailLossProbes(&manager_));
}
-TEST_P(QuicSentPacketManagerTest, NegotiateNoTLPFromOptionsAtClient) {
+TEST_F(QuicSentPacketManagerTest, NegotiateNoTLPFromOptionsAtClient) {
QuicConfig client_config;
QuicTagVector options;
@@ -1523,7 +1492,7 @@ TEST_P(QuicSentPacketManagerTest, NegotiateNoTLPFromOptionsAtClient) {
EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetMaxTailLossProbes(&manager_));
}
-TEST_P(QuicSentPacketManagerTest, NegotiateTLPRttFromOptionsAtServer) {
+TEST_F(QuicSentPacketManagerTest, NegotiateTLPRttFromOptionsAtServer) {
QuicConfig config;
QuicTagVector options;
@@ -1536,7 +1505,7 @@ TEST_P(QuicSentPacketManagerTest, NegotiateTLPRttFromOptionsAtServer) {
QuicSentPacketManagerPeer::GetEnableHalfRttTailLossProbe(&manager_));
}
-TEST_P(QuicSentPacketManagerTest, NegotiateTLPRttFromOptionsAtClient) {
+TEST_F(QuicSentPacketManagerTest, NegotiateTLPRttFromOptionsAtClient) {
QuicConfig client_config;
QuicTagVector options;
@@ -1550,7 +1519,7 @@ TEST_P(QuicSentPacketManagerTest, NegotiateTLPRttFromOptionsAtClient) {
QuicSentPacketManagerPeer::GetEnableHalfRttTailLossProbe(&manager_));
}
-TEST_P(QuicSentPacketManagerTest, NegotiateNewRTOFromOptionsAtServer) {
+TEST_F(QuicSentPacketManagerTest, NegotiateNewRTOFromOptionsAtServer) {
EXPECT_FALSE(QuicSentPacketManagerPeer::GetUseNewRto(&manager_));
QuicConfig config;
QuicTagVector options;
@@ -1563,7 +1532,7 @@ TEST_P(QuicSentPacketManagerTest, NegotiateNewRTOFromOptionsAtServer) {
EXPECT_TRUE(QuicSentPacketManagerPeer::GetUseNewRto(&manager_));
}
-TEST_P(QuicSentPacketManagerTest, NegotiateNewRTOFromOptionsAtClient) {
+TEST_F(QuicSentPacketManagerTest, NegotiateNewRTOFromOptionsAtClient) {
EXPECT_FALSE(QuicSentPacketManagerPeer::GetUseNewRto(&manager_));
QuicConfig client_config;
QuicTagVector options;
@@ -1577,7 +1546,7 @@ TEST_P(QuicSentPacketManagerTest, NegotiateNewRTOFromOptionsAtClient) {
EXPECT_TRUE(QuicSentPacketManagerPeer::GetUseNewRto(&manager_));
}
-TEST_P(QuicSentPacketManagerTest, NegotiateUndoFromOptionsAtServer) {
+TEST_F(QuicSentPacketManagerTest, NegotiateUndoFromOptionsAtServer) {
EXPECT_FALSE(QuicSentPacketManagerPeer::GetUndoRetransmits(&manager_));
QuicConfig config;
QuicTagVector options;
@@ -1628,7 +1597,7 @@ TEST_P(QuicSentPacketManagerTest, NegotiateUndoFromOptionsAtServer) {
EXPECT_EQ(3u * kDefaultLength, BytesInFlight());
}
-TEST_P(QuicSentPacketManagerTest, NegotiateUndoFromOptionsAtClient) {
+TEST_F(QuicSentPacketManagerTest, NegotiateUndoFromOptionsAtClient) {
EXPECT_FALSE(QuicSentPacketManagerPeer::GetUndoRetransmits(&manager_));
QuicConfig client_config;
QuicTagVector options;
@@ -1642,7 +1611,7 @@ TEST_P(QuicSentPacketManagerTest, NegotiateUndoFromOptionsAtClient) {
EXPECT_TRUE(QuicSentPacketManagerPeer::GetUndoRetransmits(&manager_));
}
-TEST_P(QuicSentPacketManagerTest, UseInitialRoundTripTimeToSend) {
+TEST_F(QuicSentPacketManagerTest, UseInitialRoundTripTimeToSend) {
uint32_t initial_rtt_us = 325000;
EXPECT_NE(initial_rtt_us,
manager_.GetRttStats()->smoothed_rtt().ToMicroseconds());
@@ -1657,7 +1626,7 @@ TEST_P(QuicSentPacketManagerTest, UseInitialRoundTripTimeToSend) {
EXPECT_EQ(initial_rtt_us, manager_.GetRttStats()->initial_rtt_us());
}
-TEST_P(QuicSentPacketManagerTest, ResumeConnectionState) {
+TEST_F(QuicSentPacketManagerTest, ResumeConnectionState) {
// The sent packet manager should use the RTT from CachedNetworkParameters if
// it is provided.
const int kRttMs = 1234;
@@ -1670,7 +1639,7 @@ TEST_P(QuicSentPacketManagerTest, ResumeConnectionState) {
static_cast<uint64_t>(manager_.GetRttStats()->initial_rtt_us()));
}
-TEST_P(QuicSentPacketManagerTest, ConnectionMigrationUnspecifiedChange) {
+TEST_F(QuicSentPacketManagerTest, ConnectionMigrationUnspecifiedChange) {
RttStats* rtt_stats = const_cast<RttStats*>(manager_.GetRttStats());
int64_t default_init_rtt = rtt_stats->initial_rtt_us();
rtt_stats->set_initial_rtt_us(default_init_rtt * 2);
@@ -1689,7 +1658,7 @@ TEST_P(QuicSentPacketManagerTest, ConnectionMigrationUnspecifiedChange) {
EXPECT_EQ(0u, manager_.GetConsecutiveTlpCount());
}
-TEST_P(QuicSentPacketManagerTest, ConnectionMigrationIPSubnetChange) {
+TEST_F(QuicSentPacketManagerTest, ConnectionMigrationIPSubnetChange) {
RttStats* rtt_stats = const_cast<RttStats*>(manager_.GetRttStats());
int64_t default_init_rtt = rtt_stats->initial_rtt_us();
rtt_stats->set_initial_rtt_us(default_init_rtt * 2);
@@ -1707,7 +1676,7 @@ TEST_P(QuicSentPacketManagerTest, ConnectionMigrationIPSubnetChange) {
EXPECT_EQ(2u, manager_.GetConsecutiveTlpCount());
}
-TEST_P(QuicSentPacketManagerTest, ConnectionMigrationPortChange) {
+TEST_F(QuicSentPacketManagerTest, ConnectionMigrationPortChange) {
RttStats* rtt_stats = const_cast<RttStats*>(manager_.GetRttStats());
int64_t default_init_rtt = rtt_stats->initial_rtt_us();
rtt_stats->set_initial_rtt_us(default_init_rtt * 2);
@@ -1725,12 +1694,12 @@ TEST_P(QuicSentPacketManagerTest, ConnectionMigrationPortChange) {
EXPECT_EQ(2u, manager_.GetConsecutiveTlpCount());
}
-TEST_P(QuicSentPacketManagerTest, PathMtuIncreased) {
+TEST_F(QuicSentPacketManagerTest, PathMtuIncreased) {
EXPECT_CALL(*send_algorithm_, OnPacketSent(_, BytesInFlight(), 1, _, _))
.Times(1)
.WillOnce(Return(true));
SerializedPacket packet(kDefaultPathId, 1, PACKET_6BYTE_PACKET_NUMBER,
- nullptr, kDefaultLength + 100, 0u, false, false);
+ nullptr, kDefaultLength + 100, false, false);
manager_.OnPacketSent(&packet, kInvalidPathId, 0, clock_.Now(),
NOT_RETRANSMISSION, HAS_RETRANSMITTABLE_DATA);
« no previous file with comments | « net/quic/core/quic_sent_packet_manager.cc ('k') | net/quic/core/quic_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698