| Index: net/quic/congestion_control/tcp_cubic_sender_packets_test.cc
|
| diff --git a/net/quic/congestion_control/tcp_cubic_sender_packets_test.cc b/net/quic/congestion_control/tcp_cubic_sender_packets_test.cc
|
| index 6f831061d4415a36640179a7a1400ae14ba81767..6684e8df8132a2878af14e8f8d9d20649a20063e 100644
|
| --- a/net/quic/congestion_control/tcp_cubic_sender_packets_test.cc
|
| +++ b/net/quic/congestion_control/tcp_cubic_sender_packets_test.cc
|
| @@ -47,6 +47,8 @@ class TcpCubicSenderPacketsPeer : public TcpCubicSenderPackets {
|
|
|
| QuicPacketCount congestion_window() { return congestion_window_; }
|
|
|
| + QuicPacketCount max_congestion_window() { return max_tcp_congestion_window_; }
|
| +
|
| QuicPacketCount slowstart_threshold() { return slowstart_threshold_; }
|
|
|
| const HybridSlowStart& hybrid_slow_start() const {
|
| @@ -961,5 +963,24 @@ TEST_F(TcpCubicSenderPacketsTest, ResetAfterConnectionMigration) {
|
| EXPECT_FALSE(sender_->hybrid_slow_start().started());
|
| }
|
|
|
| +TEST_F(TcpCubicSenderPacketsTest, DefaultMaxCwnd) {
|
| + ValueRestore<bool> old_flag(&FLAGS_quic_ignore_srbf, true);
|
| + RttStats rtt_stats;
|
| + QuicConnectionStats stats;
|
| + std::unique_ptr<SendAlgorithmInterface> sender(SendAlgorithmInterface::Create(
|
| + &clock_, &rtt_stats, kCubic, &stats, kInitialCongestionWindow));
|
| +
|
| + SendAlgorithmInterface::CongestionVector acked_packets;
|
| + SendAlgorithmInterface::CongestionVector missing_packets;
|
| + for (uint64_t i = 1; i < kDefaultMaxCongestionWindowPackets; ++i) {
|
| + acked_packets.clear();
|
| + acked_packets.push_back(std::make_pair(i, 1350));
|
| + sender->OnCongestionEvent(true, sender->GetCongestionWindow(),
|
| + acked_packets, missing_packets);
|
| + }
|
| + EXPECT_EQ(kDefaultMaxCongestionWindowPackets,
|
| + sender->GetCongestionWindow() / kDefaultTCPMSS);
|
| +}
|
| +
|
| } // namespace test
|
| } // namespace net
|
|
|