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

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

Issue 125403006: Various QUIC cleanups to sync with internal code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comments Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
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
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
OLDNEW
« no previous file with comments | « net/quic/congestion_control/inter_arrival_probe.cc ('k') | net/quic/congestion_control/inter_arrival_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698