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

Side by Side Diff: net/quic/core/congestion_control/rtt_stats_test.cc

Issue 2848203002: Add a platform implementation of QuicTest and QuicTestWithParam (Closed)
Patch Set: net/quic/platform/impl/quic_test_impl.cc Created 3 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/rtt_stats.h" 5 #include "net/quic/core/congestion_control/rtt_stats.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/test/mock_log.h" 9 #include "base/test/mock_log.h"
10 #include "net/quic/platform/api/quic_test.h"
10 #include "net/quic/test_tools/rtt_stats_peer.h" 11 #include "net/quic/test_tools/rtt_stats_peer.h"
11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 using logging::LOG_WARNING; 13 using logging::LOG_WARNING;
14 using testing::HasSubstr; 14 using testing::HasSubstr;
15 using testing::Message; 15 using testing::Message;
16 using testing::_; 16 using testing::_;
17 17
18 namespace net { 18 namespace net {
19 namespace test { 19 namespace test {
20 20
21 class RttStatsTest : public ::testing::Test { 21 class RttStatsTest : public QuicTest {
22 protected: 22 protected:
23 RttStats rtt_stats_; 23 RttStats rtt_stats_;
24 }; 24 };
25 25
26 TEST_F(RttStatsTest, DefaultsBeforeUpdate) { 26 TEST_F(RttStatsTest, DefaultsBeforeUpdate) {
27 EXPECT_LT(0u, rtt_stats_.initial_rtt_us()); 27 EXPECT_LT(0u, rtt_stats_.initial_rtt_us());
28 EXPECT_EQ(QuicTime::Delta::Zero(), rtt_stats_.min_rtt()); 28 EXPECT_EQ(QuicTime::Delta::Zero(), rtt_stats_.min_rtt());
29 EXPECT_EQ(QuicTime::Delta::Zero(), rtt_stats_.smoothed_rtt()); 29 EXPECT_EQ(QuicTime::Delta::Zero(), rtt_stats_.smoothed_rtt());
30 } 30 }
31 31
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 // Reset rtt stats on connection migrations. 174 // Reset rtt stats on connection migrations.
175 rtt_stats_.OnConnectionMigration(); 175 rtt_stats_.OnConnectionMigration();
176 EXPECT_EQ(QuicTime::Delta::Zero(), rtt_stats_.latest_rtt()); 176 EXPECT_EQ(QuicTime::Delta::Zero(), rtt_stats_.latest_rtt());
177 EXPECT_EQ(QuicTime::Delta::Zero(), rtt_stats_.smoothed_rtt()); 177 EXPECT_EQ(QuicTime::Delta::Zero(), rtt_stats_.smoothed_rtt());
178 EXPECT_EQ(QuicTime::Delta::Zero(), rtt_stats_.min_rtt()); 178 EXPECT_EQ(QuicTime::Delta::Zero(), rtt_stats_.min_rtt());
179 } 179 }
180 180
181 } // namespace test 181 } // namespace test
182 } // namespace net 182 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/congestion_control/prr_sender_test.cc ('k') | net/quic/core/congestion_control/send_algorithm_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698