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

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

Issue 1190823003: Remove dependency on headers stream from QuicSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0616
Patch Set: deleted an include Created 5 years, 6 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
« no previous file with comments | « net/quic/quic_connection_logger.cc ('k') | net/quic/quic_connection_test.cc » ('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 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/quic/quic_protocol.h" 7 #include "net/quic/quic_protocol.h"
8 #include "net/quic/test_tools/quic_test_utils.h" 8 #include "net/quic/test_tools/quic_test_utils.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 18 matching lines...) Expand all
29 } 29 }
30 }; 30 };
31 31
32 class QuicConnectionLoggerTest : public ::testing::Test { 32 class QuicConnectionLoggerTest : public ::testing::Test {
33 protected: 33 protected:
34 QuicConnectionLoggerTest() 34 QuicConnectionLoggerTest()
35 : session_(new MockConnection(Perspective::IS_CLIENT)), 35 : session_(new MockConnection(Perspective::IS_CLIENT)),
36 logger_(&session_, "CONNECTION_UNKNOWN", net_log_) {} 36 logger_(&session_, "CONNECTION_UNKNOWN", net_log_) {}
37 37
38 BoundNetLog net_log_; 38 BoundNetLog net_log_;
39 MockSession session_; 39 MockQuicSpdySession session_;
40 QuicConnectionLogger logger_; 40 QuicConnectionLogger logger_;
41 }; 41 };
42 42
43 TEST_F(QuicConnectionLoggerTest, TruncatedAcksSentNotChanged) { 43 TEST_F(QuicConnectionLoggerTest, TruncatedAcksSentNotChanged) {
44 QuicAckFrame frame; 44 QuicAckFrame frame;
45 logger_.OnFrameAddedToPacket(QuicFrame(&frame)); 45 logger_.OnFrameAddedToPacket(QuicFrame(&frame));
46 EXPECT_EQ(0u, QuicConnectionLoggerPeer::num_truncated_acks_sent(logger_)); 46 EXPECT_EQ(0u, QuicConnectionLoggerPeer::num_truncated_acks_sent(logger_));
47 47
48 for (QuicPacketSequenceNumber i = 0; i < 256; ++i) { 48 for (QuicPacketSequenceNumber i = 0; i < 256; ++i) {
49 frame.missing_packets.insert(i); 49 frame.missing_packets.insert(i);
(...skipping 13 matching lines...) Expand all
63 63
64 TEST_F(QuicConnectionLoggerTest, ReceivedPacketLossRate) { 64 TEST_F(QuicConnectionLoggerTest, ReceivedPacketLossRate) {
65 QuicConnectionLoggerPeer::set_num_packets_received(logger_, 1); 65 QuicConnectionLoggerPeer::set_num_packets_received(logger_, 1);
66 QuicConnectionLoggerPeer::set_largest_received_packet_sequence_number(logger_, 66 QuicConnectionLoggerPeer::set_largest_received_packet_sequence_number(logger_,
67 2); 67 2);
68 EXPECT_EQ(0.5f, logger_.ReceivedPacketLossRate()); 68 EXPECT_EQ(0.5f, logger_.ReceivedPacketLossRate());
69 } 69 }
70 70
71 } // namespace test 71 } // namespace test
72 } // namespace net 72 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection_logger.cc ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698