Index: net/quic/congestion_control/rtt_stats_test.cc |
diff --git a/net/quic/congestion_control/rtt_stats_test.cc b/net/quic/congestion_control/rtt_stats_test.cc |
index a24016cc49b7cd24660d2aa40c7e4bb76325e85d..6b5ff7d41e44cbb6a3adcae7c673ffc7ee81ff85 100644 |
--- a/net/quic/congestion_control/rtt_stats_test.cc |
+++ b/net/quic/congestion_control/rtt_stats_test.cc |
@@ -172,6 +172,13 @@ TEST_F(RttStatsTest, ExpireSmoothedMetrics) { |
rtt_stats_.ExpireSmoothedMetrics(); |
EXPECT_EQ(doubled_rtt, rtt_stats_.SmoothedRtt()); |
EXPECT_EQ(initial_rtt.Multiply(0.875), rtt_stats_.mean_deviation()); |
+ |
+ // Now go back down to 5ms and expire the smoothed metrics, and ensure the |
+ // mean deviation increases to 15ms. |
+ QuicTime::Delta half_rtt = initial_rtt.Multiply(0.5); |
+ rtt_stats_.UpdateRtt(half_rtt, QuicTime::Delta::Zero(), QuicTime::Zero()); |
+ EXPECT_GT(doubled_rtt, rtt_stats_.SmoothedRtt()); |
+ EXPECT_LT(initial_rtt, rtt_stats_.mean_deviation()); |
} |
} // namespace test |