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

Unified Diff: net/quic/quic_connection_test.cc

Issue 396533003: Populate FasterExtraStats for QUIC requests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/quic_connection_stats.cc ('k') | net/quic/quic_sent_packet_manager.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 563fa8d9132c0486bccb20f1b24a1083417ea444..746d6e19801811cc6d2731714dd4aceb78703ad5 100644
--- a/net/quic/quic_connection_test.cc
+++ b/net/quic/quic_connection_test.cc
@@ -3563,6 +3563,10 @@ TEST_P(QuicConnectionTest, CheckSendStats) {
EXPECT_CALL(*send_algorithm_, BandwidthEstimate()).WillOnce(
Return(QuicBandwidth::Zero()));
+ const uint32 kSlowStartThreshold = 23u;
+ EXPECT_CALL(*send_algorithm_, GetSlowStartThreshold()).WillOnce(
+ Return(kSlowStartThreshold));
+
const QuicConnectionStats& stats = connection_.GetStats();
EXPECT_EQ(3 * first_packet_size + 2 * second_packet_size - kQuicVersionSize,
stats.bytes_sent);
@@ -3571,6 +3575,9 @@ TEST_P(QuicConnectionTest, CheckSendStats) {
stats.bytes_retransmitted);
EXPECT_EQ(3u, stats.packets_retransmitted);
EXPECT_EQ(1u, stats.rto_count);
+ EXPECT_EQ(kMaxPacketSize, stats.congestion_window);
+ EXPECT_EQ(kSlowStartThreshold, stats.slow_start_threshold);
+ EXPECT_EQ(kDefaultMaxPacketSize, stats.max_packet_size);
}
TEST_P(QuicConnectionTest, CheckReceiveStats) {
@@ -3585,6 +3592,9 @@ TEST_P(QuicConnectionTest, CheckReceiveStats) {
EXPECT_CALL(*send_algorithm_, BandwidthEstimate()).WillOnce(
Return(QuicBandwidth::Zero()));
+ const uint32 kSlowStartThreshold = 23u;
+ EXPECT_CALL(*send_algorithm_, GetSlowStartThreshold()).WillOnce(
+ Return(kSlowStartThreshold));
const QuicConnectionStats& stats = connection_.GetStats();
EXPECT_EQ(received_bytes, stats.bytes_received);
@@ -3592,6 +3602,8 @@ TEST_P(QuicConnectionTest, CheckReceiveStats) {
EXPECT_EQ(1u, stats.packets_revived);
EXPECT_EQ(1u, stats.packets_dropped);
+
+ EXPECT_EQ(kSlowStartThreshold, stats.slow_start_threshold);
}
TEST_P(QuicConnectionTest, TestFecGroupLimits) {
« no previous file with comments | « net/quic/quic_connection_stats.cc ('k') | net/quic/quic_sent_packet_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698