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

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

Issue 1276983003: relnote: Limit the number of burst tokens in QUIC's pacing sender to the (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Preparation_for_changing_SpdyHeaderBlock_99394725
Patch Set: Created 5 years, 4 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/pacing_sender.cc ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/congestion_control/pacing_sender_test.cc
diff --git a/net/quic/congestion_control/pacing_sender_test.cc b/net/quic/congestion_control/pacing_sender_test.cc
index 8ffbd34d28adca8a6676a978cc4ed9acb45244ec..8412f34958107170f227b9388f69f85cfd18d259 100644
--- a/net/quic/congestion_control/pacing_sender_test.cc
+++ b/net/quic/congestion_control/pacing_sender_test.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
+#include "net/quic/quic_flags.h"
#include "net/quic/quic_protocol.h"
#include "net/quic/test_tools/mock_clock.h"
#include "net/quic/test_tools/quic_test_utils.h"
@@ -199,6 +200,10 @@ TEST_F(PacingSenderTest, InitialBurst) {
InitPacingRate(10, QuicBandwidth::FromBytesAndTimeDelta(
kMaxPacketSize, QuicTime::Delta::FromMilliseconds(1)));
+ if (FLAGS_quic_limit_pacing_burst) {
+ EXPECT_CALL(*mock_sender_, GetCongestionWindow())
+ .WillOnce(Return(10 * kDefaultTCPMSS));
+ }
// Update the RTT and verify that the first 10 packets aren't paced.
UpdateRtt();
@@ -235,6 +240,10 @@ TEST_F(PacingSenderTest, InitialBurstNoRttMeasurement) {
InitPacingRate(10, QuicBandwidth::FromBytesAndTimeDelta(
kMaxPacketSize, QuicTime::Delta::FromMilliseconds(1)));
+ if (FLAGS_quic_limit_pacing_burst) {
+ EXPECT_CALL(*mock_sender_, GetCongestionWindow())
+ .WillOnce(Return(10 * kDefaultTCPMSS));
+ }
// Send 10 packets, and verify that they are not paced.
for (int i = 0 ; i < kInitialBurstPackets; ++i) {
CheckPacketIsSentImmediately();
@@ -272,6 +281,10 @@ TEST_F(PacingSenderTest, FastSending) {
QuicBandwidth::FromBytesAndTimeDelta(
2 * kMaxPacketSize, QuicTime::Delta::FromMilliseconds(1)));
+ if (FLAGS_quic_limit_pacing_burst) {
+ EXPECT_CALL(*mock_sender_, GetCongestionWindow())
+ .WillOnce(Return(10 * kDefaultTCPMSS));
+ }
// Update the RTT and verify that the first 10 packets aren't paced.
UpdateRtt();
« no previous file with comments | « net/quic/congestion_control/pacing_sender.cc ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698