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

Side by Side Diff: net/quic/core/congestion_control/cubic_test.cc

Issue 2516033003: Landing Recent QUIC changes until Mon Nov 14 04:43:50 2016 +0000 (Closed)
Patch Set: Remove unused UpdatePacketGapSentHistogram() function. Created 4 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/core/congestion_control/cubic.h" 5 #include "net/quic/core/congestion_control/cubic.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "net/quic/core/quic_flags.h" 8 #include "net/quic/core/quic_flags.h"
9 #include "net/quic/test_tools/mock_clock.h" 9 #include "net/quic/test_tools/mock_clock.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 EXPECT_EQ(expected_cwnd, 99 EXPECT_EQ(expected_cwnd,
100 cubic_.CongestionWindowAfterPacketLoss(current_cwnd)); 100 cubic_.CongestionWindowAfterPacketLoss(current_cwnd));
101 current_cwnd = expected_cwnd; 101 current_cwnd = expected_cwnd;
102 // First update after loss to initialize the epoch. 102 // First update after loss to initialize the epoch.
103 current_cwnd = cubic_.CongestionWindowAfterAck(current_cwnd, rtt_min); 103 current_cwnd = cubic_.CongestionWindowAfterAck(current_cwnd, rtt_min);
104 // Cubic phase. 104 // Cubic phase.
105 for (int i = 0; i < 40; ++i) { 105 for (int i = 0; i < 40; ++i) {
106 clock_.AdvanceTime(hundred_ms_); 106 clock_.AdvanceTime(hundred_ms_);
107 current_cwnd = cubic_.CongestionWindowAfterAck(current_cwnd, rtt_min); 107 current_cwnd = cubic_.CongestionWindowAfterAck(current_cwnd, rtt_min);
108 } 108 }
109 expected_cwnd = FLAGS_quic_limit_cubic_cwnd_increase ? 399 : 422; 109 expected_cwnd = 399;
110 EXPECT_EQ(expected_cwnd, current_cwnd); 110 EXPECT_EQ(expected_cwnd, current_cwnd);
111 } 111 }
112 112
113 } // namespace test 113 } // namespace test
114 } // namespace net 114 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/congestion_control/cubic_bytes_test.cc ('k') | net/quic/core/congestion_control/general_loss_algorithm_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698