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

Unified Diff: net/quic/congestion_control/time_loss_algorithm_test.cc

Issue 706203003: Update from https://crrev.com/303153 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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/congestion_control/time_loss_algorithm.cc ('k') | net/quic/crypto/quic_crypto_server_config.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/congestion_control/time_loss_algorithm_test.cc
diff --git a/net/quic/congestion_control/time_loss_algorithm_test.cc b/net/quic/congestion_control/time_loss_algorithm_test.cc
index 374e56358af1d2314f44f7d5203bb9bb9dc77336..b964d2863a47a13585f6d2cbc17ccc81bedd66d9 100644
--- a/net/quic/congestion_control/time_loss_algorithm_test.cc
+++ b/net/quic/congestion_control/time_loss_algorithm_test.cc
@@ -60,7 +60,7 @@ TEST_F(TimeLossAlgorithmTest, NoLossFor500Nacks) {
unacked_packets_.NackPacket(1, i);
VerifyLosses(2, nullptr, 0);
}
- EXPECT_EQ(rtt_stats_.SmoothedRtt().Multiply(1.25),
+ EXPECT_EQ(rtt_stats_.smoothed_rtt().Multiply(1.25),
loss_algorithm_.GetLossTimeout().Subtract(clock_.Now()));
}
@@ -69,7 +69,7 @@ TEST_F(TimeLossAlgorithmTest, NoLossUntilTimeout) {
// Transmit 10 packets at 1/10th an RTT interval.
for (size_t i = 1; i <= kNumSentPackets; ++i) {
SendDataPacket(i);
- clock_.AdvanceTime(rtt_stats_.SmoothedRtt().Multiply(0.1));
+ clock_.AdvanceTime(rtt_stats_.smoothed_rtt().Multiply(0.1));
}
// Expect the timer to not be set.
EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
@@ -78,11 +78,11 @@ TEST_F(TimeLossAlgorithmTest, NoLossUntilTimeout) {
unacked_packets_.RemoveFromInFlight(2);
VerifyLosses(2, nullptr, 0);
// Expect the timer to be set to 0.25 RTT's in the future.
- EXPECT_EQ(rtt_stats_.SmoothedRtt().Multiply(0.25),
+ EXPECT_EQ(rtt_stats_.smoothed_rtt().Multiply(0.25),
loss_algorithm_.GetLossTimeout().Subtract(clock_.Now()));
unacked_packets_.NackPacket(1, 5);
VerifyLosses(2, nullptr, 0);
- clock_.AdvanceTime(rtt_stats_.SmoothedRtt().Multiply(0.25));
+ clock_.AdvanceTime(rtt_stats_.smoothed_rtt().Multiply(0.25));
QuicPacketSequenceNumber lost[] = { 1 };
VerifyLosses(2, lost, arraysize(lost));
EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
@@ -93,7 +93,7 @@ TEST_F(TimeLossAlgorithmTest, NoLossWithoutNack) {
// Transmit 10 packets at 1/10th an RTT interval.
for (size_t i = 1; i <= kNumSentPackets; ++i) {
SendDataPacket(i);
- clock_.AdvanceTime(rtt_stats_.SmoothedRtt().Multiply(0.1));
+ clock_.AdvanceTime(rtt_stats_.smoothed_rtt().Multiply(0.1));
}
// Expect the timer to not be set.
EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
@@ -102,9 +102,9 @@ TEST_F(TimeLossAlgorithmTest, NoLossWithoutNack) {
VerifyLosses(1, nullptr, 0);
// The timer should still not be set.
EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
- clock_.AdvanceTime(rtt_stats_.SmoothedRtt().Multiply(0.25));
+ clock_.AdvanceTime(rtt_stats_.smoothed_rtt().Multiply(0.25));
VerifyLosses(1, nullptr, 0);
- clock_.AdvanceTime(rtt_stats_.SmoothedRtt());
+ clock_.AdvanceTime(rtt_stats_.smoothed_rtt());
VerifyLosses(1, nullptr, 0);
EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
@@ -116,7 +116,7 @@ TEST_F(TimeLossAlgorithmTest, MultipleLossesAtOnce) {
for (size_t i = 1; i <= kNumSentPackets; ++i) {
SendDataPacket(i);
}
- clock_.AdvanceTime(rtt_stats_.SmoothedRtt());
+ clock_.AdvanceTime(rtt_stats_.smoothed_rtt());
// Expect the timer to not be set.
EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
// The packet should not be lost until 1.25 RTTs pass.
@@ -126,9 +126,9 @@ TEST_F(TimeLossAlgorithmTest, MultipleLossesAtOnce) {
unacked_packets_.RemoveFromInFlight(10);
VerifyLosses(10, nullptr, 0);
// Expect the timer to be set to 0.25 RTT's in the future.
- EXPECT_EQ(rtt_stats_.SmoothedRtt().Multiply(0.25),
+ EXPECT_EQ(rtt_stats_.smoothed_rtt().Multiply(0.25),
loss_algorithm_.GetLossTimeout().Subtract(clock_.Now()));
- clock_.AdvanceTime(rtt_stats_.SmoothedRtt().Multiply(0.25));
+ clock_.AdvanceTime(rtt_stats_.smoothed_rtt().Multiply(0.25));
QuicPacketSequenceNumber lost[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
VerifyLosses(10, lost, arraysize(lost));
EXPECT_EQ(QuicTime::Zero(), loss_algorithm_.GetLossTimeout());
« no previous file with comments | « net/quic/congestion_control/time_loss_algorithm.cc ('k') | net/quic/crypto/quic_crypto_server_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698