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

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

Issue 1335443002: Landing Recent QUIC changes until 8/26/2015 19:47 UTC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | net/quic/congestion_control/hybrid_slow_start_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/cubic.h"
6
5 #include "base/basictypes.h" 7 #include "base/basictypes.h"
6 #include "base/logging.h" 8 #include "base/logging.h"
7 #include "net/quic/congestion_control/cubic.h"
8 #include "net/quic/quic_connection_stats.h" 9 #include "net/quic/quic_connection_stats.h"
9 #include "net/quic/test_tools/mock_clock.h" 10 #include "net/quic/test_tools/mock_clock.h"
10 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
11 12
12 namespace net { 13 namespace net {
13 namespace test { 14 namespace test {
14 15
15 const float kBeta = 0.7f; // Default Cubic backoff factor. 16 const float kBeta = 0.7f; // Default Cubic backoff factor.
16 const uint32 kNumConnections = 2; 17 const uint32 kNumConnections = 2;
17 const float kNConnectionBeta = (kNumConnections - 1 + kBeta) / kNumConnections; 18 const float kNConnectionBeta = (kNumConnections - 1 + kBeta) / kNumConnections;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 for (int i = 0; i < 40 ; ++i) { 138 for (int i = 0; i < 40 ; ++i) {
138 clock_.AdvanceTime(hundred_ms_); 139 clock_.AdvanceTime(hundred_ms_);
139 current_cwnd = cubic_.CongestionWindowAfterAck(current_cwnd, rtt_min); 140 current_cwnd = cubic_.CongestionWindowAfterAck(current_cwnd, rtt_min);
140 } 141 }
141 expected_cwnd = 422; 142 expected_cwnd = 422;
142 EXPECT_EQ(expected_cwnd, current_cwnd); 143 EXPECT_EQ(expected_cwnd, current_cwnd);
143 } 144 }
144 145
145 } // namespace test 146 } // namespace test
146 } // namespace net 147 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/congestion_control/hybrid_slow_start_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698