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

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

Issue 1898603002: Move Network Quality Estimator files to //net/nqe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/quic_connection_logger.h" 5 #include "net/quic/quic_connection_logger.h"
6 6
7 #include "net/base/socket_performance_watcher.h"
8 #include "net/quic/quic_protocol.h" 7 #include "net/quic/quic_protocol.h"
9 #include "net/quic/test_tools/quic_test_utils.h" 8 #include "net/quic/test_tools/quic_test_utils.h"
9 #include "net/socket/socket_performance_watcher.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 namespace net { 12 namespace net {
13 namespace test { 13 namespace test {
14 14
15 class QuicConnectionLoggerPeer { 15 class QuicConnectionLoggerPeer {
16 public: 16 public:
17 static size_t num_truncated_acks_sent(const QuicConnectionLogger& logger) { 17 static size_t num_truncated_acks_sent(const QuicConnectionLogger& logger) {
18 return logger.num_truncated_acks_sent_; 18 return logger.num_truncated_acks_sent_;
19 } 19 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 66 }
67 67
68 TEST_F(QuicConnectionLoggerTest, ReceivedPacketLossRate) { 68 TEST_F(QuicConnectionLoggerTest, ReceivedPacketLossRate) {
69 QuicConnectionLoggerPeer::set_num_packets_received(logger_, 1); 69 QuicConnectionLoggerPeer::set_num_packets_received(logger_, 1);
70 QuicConnectionLoggerPeer::set_largest_received_packet_number(logger_, 2); 70 QuicConnectionLoggerPeer::set_largest_received_packet_number(logger_, 2);
71 EXPECT_EQ(0.5f, logger_.ReceivedPacketLossRate()); 71 EXPECT_EQ(0.5f, logger_.ReceivedPacketLossRate());
72 } 72 }
73 73
74 } // namespace test 74 } // namespace test
75 } // namespace net 75 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698