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

Unified Diff: net/quic/quic_connection_test.cc

Issue 2176323002: Deprecate FLAGS_quic_disable_pre_30. Remove QUIC versions [25-29]. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@127879468
Patch Set: Created 4 years, 5 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
Index: net/quic/quic_connection_test.cc
diff --git a/net/quic/quic_connection_test.cc b/net/quic/quic_connection_test.cc
index 4e857190dfdf189669eee1cc0a001602a495dcf3..e1fb275d383e2e1525914a7e773d21b00c947fb7 100644
--- a/net/quic/quic_connection_test.cc
+++ b/net/quic/quic_connection_test.cc
@@ -2001,13 +2001,8 @@ TEST_P(QuicConnectionTest, SendQueuedPacketForQuicRstStreamNoError) {
connection_.SendRstStream(stream_id, QUIC_STREAM_NO_ERROR, 14);
// Unblock the connection and verify that the RST_STREAM is sent and the data
- // packet is sent on QUIC_VERSION_29 or later versions.
- if (version() > QUIC_VERSION_28) {
- EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _))
- .Times(AtLeast(2));
- } else {
- EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(1);
- }
+ // packet is sent.
+ EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(AtLeast(2));
writer_->SetWritable();
connection_.OnCanWrite();
EXPECT_EQ(1u, writer_->frame_count());
@@ -2044,8 +2039,7 @@ TEST_P(QuicConnectionTest, RetransmitForQuicRstStreamNoErrorOnNack) {
EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(1);
connection_.SendRstStream(stream_id, QUIC_STREAM_NO_ERROR, 14);
- // Lose a packet, ensure it triggers retransmission on QUIC_VERSION_29
- // or later versions.
+ // Lose a packet, ensure it triggers retransmission.
QuicAckFrame nack_two = InitAckFrame(last_packet);
NackPacket(last_packet - 1, &nack_two);
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
@@ -2054,12 +2048,7 @@ TEST_P(QuicConnectionTest, RetransmitForQuicRstStreamNoErrorOnNack) {
EXPECT_CALL(*loss_algorithm_, DetectLosses(_, _, _, _, _))
.WillOnce(SetArgPointee<4>(lost_packets));
EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _));
- if (version() > QUIC_VERSION_28) {
- EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _))
- .Times(AtLeast(1));
- } else {
- EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(0);
- }
+ EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(AtLeast(1));
ProcessAckPacket(&nack_two);
}
@@ -2091,13 +2080,8 @@ TEST_P(QuicConnectionTest, RetransmitForQuicRstStreamNoErrorOnRTO) {
connection_.SendRstStream(stream_id, QUIC_STREAM_NO_ERROR, 14);
// Fire the RTO and verify that the RST_STREAM is resent, the stream data
- // is only sent on QUIC_VERSION_29 or later versions.
- if (version() > QUIC_VERSION_28) {
- EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _))
- .Times(AtLeast(2));
- } else {
- EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(1);
- }
+ // is sent.
+ EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(AtLeast(2));
clock_.AdvanceTime(DefaultRetransmissionTime());
connection_.GetRetransmissionAlarm()->Fire();
EXPECT_EQ(1u, writer_->frame_count());
@@ -2157,23 +2141,12 @@ TEST_P(QuicConnectionTest, SendPendingRetransmissionForQuicRstStreamNoError) {
connection_.SendRstStream(stream_id, QUIC_STREAM_NO_ERROR, 14);
// Unblock the connection and verify that the RST_STREAM is sent and the
- // second data packet or a retransmit is only sent on QUIC_VERSION_29 or
- // later versions.
- if (version() > QUIC_VERSION_28) {
- EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _))
- .Times(AtLeast(2));
- } else {
- EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(1);
- }
+ // second data packet or a retransmit is sent.
+ EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(AtLeast(2));
writer_->SetWritable();
connection_.OnCanWrite();
EXPECT_EQ(1u, writer_->frame_count());
- if (version() > QUIC_VERSION_28) {
- EXPECT_EQ(0u, writer_->rst_stream_frames().size());
- } else {
- EXPECT_EQ(1u, writer_->rst_stream_frames().size());
- EXPECT_EQ(stream_id, writer_->rst_stream_frames().front().stream_id);
- }
+ EXPECT_EQ(0u, writer_->rst_stream_frames().size());
}
TEST_P(QuicConnectionTest, DiscardRetransmit) {

Powered by Google App Engine
This is Rietveld 408576698