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

Unified Diff: net/quic/quic_sent_packet_manager_test.cc

Issue 125253004: Simplify RTO interaction between the QUIC sent packet manager and the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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_sent_packet_manager.cc ('k') | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_sent_packet_manager_test.cc
diff --git a/net/quic/quic_sent_packet_manager_test.cc b/net/quic/quic_sent_packet_manager_test.cc
index 189638c8ea8e7d091133a1d35ddf9f9543ef39b6..2f1bef2d511082d134248dbeea1f218fec2a9313 100644
--- a/net/quic/quic_sent_packet_manager_test.cc
+++ b/net/quic/quic_sent_packet_manager_test.cc
@@ -868,11 +868,7 @@ TEST_F(QuicSentPacketManagerTest, TailLossProbeThenRTO) {
clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(1000));
// The final RTO abandons all of them.
- EXPECT_CALL(*send_algorithm_, RetransmissionDelay())
- .WillOnce(Return(QuicTime::Delta::FromMilliseconds(100)));
- EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout());
- EXPECT_CALL(*send_algorithm_, OnPacketAbandoned(_, _))
- .Times(kNumSentPackets + 2);
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
manager_.OnRetransmissionTimeout();
EXPECT_TRUE(manager_.HasPendingRetransmissions());
}
@@ -926,11 +922,7 @@ TEST_F(QuicSentPacketManagerTest, RetransmissionTimeout) {
SendDataPacket(i);
}
- EXPECT_CALL(*send_algorithm_, OnPacketAbandoned(_, _)).Times(kNumSentPackets);
-
- EXPECT_CALL(*send_algorithm_, RetransmissionDelay())
- .WillOnce(Return(QuicTime::Delta::FromMilliseconds(1)));
- EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout());
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
manager_.OnRetransmissionTimeout();
}
@@ -1013,8 +1005,7 @@ TEST_F(QuicSentPacketManagerTest, GetTransmissionTimeRTO) {
EXPECT_EQ(expected_time, manager_.GetRetransmissionTime());
// Retransmit the packet by invoking the retransmission timeout.
- EXPECT_CALL(*send_algorithm_, OnPacketAbandoned(_, _)).Times(2);
- EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout());
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
clock_.AdvanceTime(expected_rto_delay);
manager_.OnRetransmissionTimeout();
RetransmitNextPacket(3);
@@ -1053,8 +1044,7 @@ TEST_F(QuicSentPacketManagerTest, GetTransmissionDelay) {
EXPECT_EQ(delay,
QuicSentPacketManagerPeer::GetRetransmissionDelay(&manager_));
delay = delay.Add(delay);
- EXPECT_CALL(*send_algorithm_, OnPacketAbandoned(i + 1, _));
- EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout());
+ EXPECT_CALL(*send_algorithm_, OnRetransmissionTimeout(true));
manager_.OnRetransmissionTimeout();
RetransmitNextPacket(i + 2);
}
« no previous file with comments | « net/quic/quic_sent_packet_manager.cc ('k') | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698