| 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/congestion_control/hybrid_slow_start.h" |
| 6 |
| 5 #include "base/logging.h" | 7 #include "base/logging.h" |
| 6 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 7 #include "net/quic/congestion_control/hybrid_slow_start.h" | |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 10 |
| 10 namespace net { | 11 namespace net { |
| 11 namespace test { | 12 namespace test { |
| 12 | 13 |
| 13 class HybridSlowStartTest : public ::testing::Test { | 14 class HybridSlowStartTest : public ::testing::Test { |
| 14 protected: | 15 protected: |
| 15 HybridSlowStartTest() | 16 HybridSlowStartTest() |
| 16 : one_ms_(QuicTime::Delta::FromMilliseconds(1)), | 17 : one_ms_(QuicTime::Delta::FromMilliseconds(1)), |
| 17 rtt_(QuicTime::Delta::FromMilliseconds(60)) { | 18 rtt_(QuicTime::Delta::FromMilliseconds(60)) { |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 rtt_.Add(QuicTime::Delta::FromMilliseconds(n + 10)), rtt_, 100)); | 67 rtt_.Add(QuicTime::Delta::FromMilliseconds(n + 10)), rtt_, 100)); |
| 67 } | 68 } |
| 68 // Expect to trigger since all packets in this burst was above the long term | 69 // Expect to trigger since all packets in this burst was above the long term |
| 69 // RTT provided. | 70 // RTT provided. |
| 70 EXPECT_TRUE(slow_start_->ShouldExitSlowStart( | 71 EXPECT_TRUE(slow_start_->ShouldExitSlowStart( |
| 71 rtt_.Add(QuicTime::Delta::FromMilliseconds(10)), rtt_, 100)); | 72 rtt_.Add(QuicTime::Delta::FromMilliseconds(10)), rtt_, 100)); |
| 72 } | 73 } |
| 73 | 74 |
| 74 } // namespace test | 75 } // namespace test |
| 75 } // namespace net | 76 } // namespace net |
| OLD | NEW |