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

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

Issue 411823002: Land Recent QUIC Changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase TOT Created 6 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/congestion_control/rtt_stats.cc ('k') | net/quic/congestion_control/send_algorithm_interface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « net/quic/congestion_control/rtt_stats.cc ('k') | net/quic/congestion_control/send_algorithm_interface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698