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

Unified Diff: net/quic/quic_connection_test.cc

Issue 2179713004: Deprecate FLAGS_quic_always_write_queued_retransmissions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@128171703
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
« no previous file with comments | « net/quic/quic_connection.cc ('k') | net/quic/quic_flags.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection_test.cc
diff --git a/net/quic/quic_connection_test.cc b/net/quic/quic_connection_test.cc
index e1fb275d383e2e1525914a7e773d21b00c947fb7..38ec8f6d25da8ce9fecbc2a06951e0c0bac965f9 100644
--- a/net/quic/quic_connection_test.cc
+++ b/net/quic/quic_connection_test.cc
@@ -2149,48 +2149,7 @@ TEST_P(QuicConnectionTest, SendPendingRetransmissionForQuicRstStreamNoError) {
EXPECT_EQ(0u, writer_->rst_stream_frames().size());
}
-TEST_P(QuicConnectionTest, DiscardRetransmit) {
- FLAGS_quic_always_write_queued_retransmissions = false;
- QuicPacketNumber last_packet;
- SendStreamDataToPeer(1, "foo", 0, !kFin, &last_packet); // Packet 1
- SendStreamDataToPeer(1, "foos", 3, !kFin, &last_packet); // Packet 2
- SendStreamDataToPeer(1, "fooos", 7, !kFin, &last_packet); // Packet 3
-
- EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
-
- // Instigate a loss with an ack.
- QuicAckFrame nack_two = InitAckFrame(3);
- NackPacket(2, &nack_two);
- // The first nack should trigger a fast retransmission, but we'll be
- // write blocked, so the packet will be queued.
- BlockOnNextWrite();
-
- SendAlgorithmInterface::CongestionVector lost_packets;
- lost_packets.push_back(std::make_pair(2, kMaxPacketSize));
- EXPECT_CALL(*loss_algorithm_, DetectLosses(_, _, _, _, _))
- .WillOnce(SetArgPointee<4>(lost_packets));
- EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _));
- ProcessAckPacket(&nack_two);
- EXPECT_EQ(1u, connection_.NumQueuedPackets());
-
- // Now, ack the previous transmission.
- EXPECT_CALL(*loss_algorithm_, DetectLosses(_, _, _, _, _));
- QuicAckFrame ack_all = InitAckFrame(3);
- ProcessAckPacket(&ack_all);
-
- // Unblock the socket and attempt to send the queued packets. However,
- // since the previous transmission has been acked, we will not
- // send the retransmission.
- EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(0);
-
- writer_->SetWritable();
- connection_.OnCanWrite();
-
- EXPECT_EQ(0u, connection_.NumQueuedPackets());
-}
-
TEST_P(QuicConnectionTest, RetransmitAckedPacket) {
- FLAGS_quic_always_write_queued_retransmissions = true;
QuicPacketNumber last_packet;
SendStreamDataToPeer(1, "foo", 0, !kFin, &last_packet); // Packet 1
SendStreamDataToPeer(1, "foos", 3, !kFin, &last_packet); // Packet 2
@@ -2227,8 +2186,8 @@ TEST_P(QuicConnectionTest, RetransmitAckedPacket) {
EXPECT_EQ(0u, connection_.NumQueuedPackets());
// We do not store retransmittable frames of this retransmission.
- EXPECT_FALSE(connection_.sent_packet_manager().HasRetransmittableFrames(
- kDefaultPathId, 4));
+ EXPECT_FALSE(QuicConnectionPeer::HasRetransmittableFrames(&connection_,
+ kDefaultPathId, 4));
}
TEST_P(QuicConnectionTest, RetransmitNackedLargestObserved) {
@@ -2331,8 +2290,8 @@ TEST_P(QuicConnectionTest, RetransmitWriteBlockedAckedOriginalThenSent) {
connection_.OnCanWrite();
// There is now a pending packet, but with no retransmittable frames.
EXPECT_TRUE(connection_.GetRetransmissionAlarm()->IsSet());
- EXPECT_FALSE(connection_.sent_packet_manager().HasRetransmittableFrames(
- ack.path_id, 2));
+ EXPECT_FALSE(QuicConnectionPeer::HasRetransmittableFrames(&connection_,
+ ack.path_id, 2));
}
TEST_P(QuicConnectionTest, AlarmsWhenWriteBlocked) {
« no previous file with comments | « net/quic/quic_connection.cc ('k') | net/quic/quic_flags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698