OLD | NEW |
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/tools/quic/test_tools/quic_test_utils.h" | 5 #include "net/tools/quic/test_tools/quic_test_utils.h" |
6 | 6 |
7 #include "net/quic/quic_connection.h" | 7 #include "net/quic/quic_connection.h" |
8 #include "net/quic/test_tools/quic_connection_peer.h" | 8 #include "net/quic/test_tools/quic_connection_peer.h" |
9 #include "net/quic/test_tools/quic_test_utils.h" | 9 #include "net/quic/test_tools/quic_test_utils.h" |
10 #include "net/tools/quic/quic_epoll_connection_helper.h" | 10 #include "net/tools/quic/quic_epoll_connection_helper.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 least_unacked); | 73 least_unacked); |
74 // Add enough missing packets to get num_nack_ranges nack ranges. | 74 // Add enough missing packets to get num_nack_ranges nack ranges. |
75 for (QuicPacketSequenceNumber i = 1; i < 2 * num_nack_ranges; i += 2) { | 75 for (QuicPacketSequenceNumber i = 1; i < 2 * num_nack_ranges; i += 2) { |
76 ack.received_info.missing_packets.insert(least_unacked + i); | 76 ack.received_info.missing_packets.insert(least_unacked + i); |
77 } | 77 } |
78 return ack; | 78 return ack; |
79 } | 79 } |
80 | 80 |
81 TestSession::TestSession(QuicConnection* connection, | 81 TestSession::TestSession(QuicConnection* connection, |
82 const QuicConfig& config) | 82 const QuicConfig& config) |
83 : QuicSession(connection, config), | 83 : QuicSession(connection, config), |
84 crypto_stream_(NULL) { | 84 crypto_stream_(NULL) { |
| 85 InitializeSession(); |
85 } | 86 } |
86 | 87 |
87 TestSession::~TestSession() {} | 88 TestSession::~TestSession() {} |
88 | 89 |
89 void TestSession::SetCryptoStream(QuicCryptoStream* stream) { | 90 void TestSession::SetCryptoStream(QuicCryptoStream* stream) { |
90 crypto_stream_ = stream; | 91 crypto_stream_ = stream; |
91 } | 92 } |
92 | 93 |
93 QuicCryptoStream* TestSession::GetCryptoStream() { | 94 QuicCryptoStream* TestSession::GetCryptoStream() { |
94 return crypto_stream_; | 95 return crypto_stream_; |
(...skipping 13 matching lines...) Expand all Loading... |
108 | 109 |
109 MockAckNotifierDelegate::MockAckNotifierDelegate() { | 110 MockAckNotifierDelegate::MockAckNotifierDelegate() { |
110 } | 111 } |
111 | 112 |
112 MockAckNotifierDelegate::~MockAckNotifierDelegate() { | 113 MockAckNotifierDelegate::~MockAckNotifierDelegate() { |
113 } | 114 } |
114 | 115 |
115 } // namespace test | 116 } // namespace test |
116 } // namespace tools | 117 } // namespace tools |
117 } // namespace net | 118 } // namespace net |
OLD | NEW |