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

Side by Side Diff: net/quic/congestion_control/tcp_cubic_sender_packets_test.cc

Issue 1908103002: Landing Recent QUIC changes until 4/15/2016 17:20 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/congestion_control/tcp_cubic_sender_packets.h" 5 #include "net/quic/congestion_control/tcp_cubic_sender_packets.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 expected_send_window += kDefaultTCPMSS; 289 expected_send_window += kDefaultTCPMSS;
290 EXPECT_EQ(expected_send_window, sender_->GetCongestionWindow()); 290 EXPECT_EQ(expected_send_window, sender_->GetCongestionWindow());
291 291
292 // Now RTO and ensure slow start gets reset. 292 // Now RTO and ensure slow start gets reset.
293 EXPECT_TRUE(sender_->hybrid_slow_start().started()); 293 EXPECT_TRUE(sender_->hybrid_slow_start().started());
294 sender_->OnRetransmissionTimeout(true); 294 sender_->OnRetransmissionTimeout(true);
295 EXPECT_FALSE(sender_->hybrid_slow_start().started()); 295 EXPECT_FALSE(sender_->hybrid_slow_start().started());
296 } 296 }
297 297
298 TEST_F(TcpCubicSenderPacketsTest, SlowStartHalfPacketLossWithLargeReduction) { 298 TEST_F(TcpCubicSenderPacketsTest, SlowStartHalfPacketLossWithLargeReduction) {
299 FLAGS_quic_sslr_byte_conservation = true;
300 QuicConfig config; 299 QuicConfig config;
301 QuicTagVector options; 300 QuicTagVector options;
302 options.push_back(kSSLR); 301 options.push_back(kSSLR);
303 QuicConfigPeer::SetReceivedConnectionOptions(&config, options); 302 QuicConfigPeer::SetReceivedConnectionOptions(&config, options);
304 sender_->SetFromConfig(config, Perspective::IS_SERVER); 303 sender_->SetFromConfig(config, Perspective::IS_SERVER);
305 304
306 sender_->SetNumEmulatedConnections(1); 305 sender_->SetNumEmulatedConnections(1);
307 const int kNumberOfAcks = 10; 306 const int kNumberOfAcks = 10;
308 for (int i = 0; i < kNumberOfAcks; ++i) { 307 for (int i = 0; i < kNumberOfAcks; ++i) {
309 // Send our full send window in half sized packets. 308 // Send our full send window in half sized packets.
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 906
908 // Resets cwnd and slow start threshold on connection migrations. 907 // Resets cwnd and slow start threshold on connection migrations.
909 sender_->OnConnectionMigration(); 908 sender_->OnConnectionMigration();
910 EXPECT_EQ(kDefaultWindowTCP, sender_->GetCongestionWindow()); 909 EXPECT_EQ(kDefaultWindowTCP, sender_->GetCongestionWindow());
911 EXPECT_EQ(kMaxCongestionWindow, sender_->slowstart_threshold()); 910 EXPECT_EQ(kMaxCongestionWindow, sender_->slowstart_threshold());
912 EXPECT_FALSE(sender_->hybrid_slow_start().started()); 911 EXPECT_FALSE(sender_->hybrid_slow_start().started());
913 } 912 }
914 913
915 } // namespace test 914 } // namespace test
916 } // namespace net 915 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender_packets.cc ('k') | net/quic/crypto/aes_128_gcm_12_decrypter_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698