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

Side by Side Diff: net/quic/quic_bandwidth_test.cc

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « net/quic/quic_bandwidth.cc ('k') | net/quic/quic_config.h » ('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/quic_bandwidth.h" 5 #include "net/quic/quic_bandwidth.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 7
8 namespace net { 8 namespace net {
9 namespace test { 9 namespace test {
10 10
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 QuicTime::Delta::FromMilliseconds(1))); 74 QuicTime::Delta::FromMilliseconds(1)));
75 EXPECT_EQ(200000u, QuicBandwidth::FromKBytesPerSecond(2000).ToBytesPerPeriod( 75 EXPECT_EQ(200000u, QuicBandwidth::FromKBytesPerSecond(2000).ToBytesPerPeriod(
76 QuicTime::Delta::FromMilliseconds(100))); 76 QuicTime::Delta::FromMilliseconds(100)));
77 EXPECT_EQ(200u, QuicBandwidth::FromKBytesPerSecond(2000).ToKBytesPerPeriod( 77 EXPECT_EQ(200u, QuicBandwidth::FromKBytesPerSecond(2000).ToKBytesPerPeriod(
78 QuicTime::Delta::FromMilliseconds(100))); 78 QuicTime::Delta::FromMilliseconds(100)));
79 } 79 }
80 80
81 TEST_F(QuicBandwidthTest, TransferTime) { 81 TEST_F(QuicBandwidthTest, TransferTime) {
82 EXPECT_EQ(QuicTime::Delta::FromSeconds(1), 82 EXPECT_EQ(QuicTime::Delta::FromSeconds(1),
83 QuicBandwidth::FromKBytesPerSecond(1).TransferTime(1000)); 83 QuicBandwidth::FromKBytesPerSecond(1).TransferTime(1000));
84 EXPECT_EQ(QuicTime::Delta::Zero(), QuicBandwidth::Zero().TransferTime(1000));
84 } 85 }
85 86
86 } // namespace test 87 } // namespace test
87 } // namespace net 88 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_bandwidth.cc ('k') | net/quic/quic_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698