OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/inter_arrival_probe.h" |
| 6 |
5 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
6 #include "base/logging.h" | 8 #include "base/logging.h" |
7 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
8 #include "net/quic/congestion_control/inter_arrival_probe.h" | |
9 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
10 | 11 |
11 namespace net { | 12 namespace net { |
12 namespace test { | 13 namespace test { |
13 | 14 |
14 class InterArrivalProbeTest : public ::testing::Test { | 15 class InterArrivalProbeTest : public ::testing::Test { |
15 protected: | 16 protected: |
16 InterArrivalProbeTest() | 17 InterArrivalProbeTest() |
17 : probe_(kDefaultMaxPacketSize), | 18 : probe_(kDefaultMaxPacketSize), |
18 start_(QuicTime::Zero()) { | 19 start_(QuicTime::Zero()) { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 time_sent = time_sent.Add(QuicTime::Delta::FromMilliseconds(1)); | 76 time_sent = time_sent.Add(QuicTime::Delta::FromMilliseconds(1)); |
76 time_received = time_received.Add(QuicTime::Delta::FromMilliseconds(10)); | 77 time_received = time_received.Add(QuicTime::Delta::FromMilliseconds(10)); |
77 } | 78 } |
78 EXPECT_TRUE(probe_.GetEstimate(&available_channel_estimate)); | 79 EXPECT_TRUE(probe_.GetEstimate(&available_channel_estimate)); |
79 EXPECT_EQ(kDefaultMaxPacketSize * 50, | 80 EXPECT_EQ(kDefaultMaxPacketSize * 50, |
80 static_cast<uint64>(available_channel_estimate.ToBytesPerSecond())); | 81 static_cast<uint64>(available_channel_estimate.ToBytesPerSecond())); |
81 } | 82 } |
82 | 83 |
83 } // namespace test | 84 } // namespace test |
84 } // namespace net | 85 } // namespace net |
OLD | NEW |