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

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

Issue 1467453006: Deprecate FLAGS_reset_cubic_epoch_when_app_limited. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@107709890
Patch Set: Created 5 years, 1 month 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.h" 5 #include "net/quic/congestion_control/tcp_cubic_sender.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 // Send our full send window. 478 // Send our full send window.
479 SendAvailableSendWindow(); 479 SendAvailableSendWindow();
480 AckNPackets(2); 480 AckNPackets(2);
481 } 481 }
482 482
483 QuicByteCount expected_send_window = kMaxCongestionWindowTCP * kDefaultTCPMSS; 483 QuicByteCount expected_send_window = kMaxCongestionWindowTCP * kDefaultTCPMSS;
484 EXPECT_EQ(expected_send_window, sender_->GetCongestionWindow()); 484 EXPECT_EQ(expected_send_window, sender_->GetCongestionWindow());
485 } 485 }
486 486
487 TEST_F(TcpCubicSenderTest, TcpCubicResetEpochOnQuiescence) { 487 TEST_F(TcpCubicSenderTest, TcpCubicResetEpochOnQuiescence) {
488 ValueRestore<bool> old_flag(&FLAGS_reset_cubic_epoch_when_app_limited, true);
489 const int kMaxCongestionWindow = 50; 488 const int kMaxCongestionWindow = 50;
490 const QuicByteCount kMaxCongestionWindowBytes = 489 const QuicByteCount kMaxCongestionWindowBytes =
491 kMaxCongestionWindow * kDefaultTCPMSS; 490 kMaxCongestionWindow * kDefaultTCPMSS;
492 sender_.reset(new TcpCubicSenderPeer(&clock_, false, kMaxCongestionWindow)); 491 sender_.reset(new TcpCubicSenderPeer(&clock_, false, kMaxCongestionWindow));
493 492
494 int num_sent = SendAvailableSendWindow(); 493 int num_sent = SendAvailableSendWindow();
495 494
496 // Make sure we fall out of slow start. 495 // Make sure we fall out of slow start.
497 QuicByteCount saved_cwnd = sender_->GetCongestionWindow(); 496 QuicByteCount saved_cwnd = sender_->GetCongestionWindow();
498 LoseNPackets(1); 497 LoseNPackets(1);
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 EXPECT_TRUE(sender_->TimeUntilSend(QuicTime::Zero(), 2 * kDefaultTCPMSS, 794 EXPECT_TRUE(sender_->TimeUntilSend(QuicTime::Zero(), 2 * kDefaultTCPMSS,
796 HAS_RETRANSMITTABLE_DATA).IsZero()); 795 HAS_RETRANSMITTABLE_DATA).IsZero());
797 EXPECT_TRUE(sender_->TimeUntilSend(QuicTime::Zero(), 3 * kDefaultTCPMSS, 796 EXPECT_TRUE(sender_->TimeUntilSend(QuicTime::Zero(), 3 * kDefaultTCPMSS,
798 HAS_RETRANSMITTABLE_DATA).IsZero()); 797 HAS_RETRANSMITTABLE_DATA).IsZero());
799 EXPECT_FALSE(sender_->TimeUntilSend(QuicTime::Zero(), 4 * kDefaultTCPMSS, 798 EXPECT_FALSE(sender_->TimeUntilSend(QuicTime::Zero(), 4 * kDefaultTCPMSS,
800 HAS_RETRANSMITTABLE_DATA).IsZero()); 799 HAS_RETRANSMITTABLE_DATA).IsZero());
801 } 800 }
802 801
803 } // namespace test 802 } // namespace test
804 } // namespace net 803 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698