| OLD | NEW |
| 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 <cstdint> | 7 #include <cstdint> |
| 8 | 8 |
| 9 #include "base/logging.h" | |
| 10 #include "net/quic/core/quic_flags.h" | 9 #include "net/quic/core/quic_flags.h" |
| 11 #include "net/quic/test_tools/mock_clock.h" | 10 #include "net/quic/test_tools/mock_clock.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 12 |
| 14 namespace net { | 13 namespace net { |
| 15 namespace test { | 14 namespace test { |
| 16 | 15 |
| 17 const float kBeta = 0.7f; // Default Cubic backoff factor. | 16 const float kBeta = 0.7f; // Default Cubic backoff factor. |
| 18 const float kBetaLastMax = 0.85f; // Default Cubic backoff factor. | 17 const float kBetaLastMax = 0.85f; // Default Cubic backoff factor. |
| 19 const uint32_t kNumConnections = 2; | 18 const uint32_t kNumConnections = 2; |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 clock_.AdvanceTime(hundred_ms_); | 206 clock_.AdvanceTime(hundred_ms_); |
| 208 current_cwnd = cubic_.CongestionWindowAfterAck(current_cwnd, rtt_min, | 207 current_cwnd = cubic_.CongestionWindowAfterAck(current_cwnd, rtt_min, |
| 209 clock_.ApproximateNow()); | 208 clock_.ApproximateNow()); |
| 210 } | 209 } |
| 211 expected_cwnd = 399; | 210 expected_cwnd = 399; |
| 212 EXPECT_EQ(expected_cwnd, current_cwnd); | 211 EXPECT_EQ(expected_cwnd, current_cwnd); |
| 213 } | 212 } |
| 214 | 213 |
| 215 } // namespace test | 214 } // namespace test |
| 216 } // namespace net | 215 } // namespace net |
| OLD | NEW |