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/quic/test_tools/quic_test_utils.h" | 5 #include "net/quic/test_tools/quic_test_utils.h" |
6 | 6 |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "net/quic/crypto/crypto_framer.h" | 9 #include "net/quic/crypto/crypto_framer.h" |
10 #include "net/quic/crypto/crypto_handshake.h" | 10 #include "net/quic/crypto/crypto_handshake.h" |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 packets_.push_back(packet.packet); | 287 packets_.push_back(packet.packet); |
288 QuicEncryptedPacket* encrypted = QuicConnectionPeer::GetFramer(this)-> | 288 QuicEncryptedPacket* encrypted = QuicConnectionPeer::GetFramer(this)-> |
289 EncryptPacket(level, packet.sequence_number, *packet.packet); | 289 EncryptPacket(level, packet.sequence_number, *packet.packet); |
290 encrypted_packets_.push_back(encrypted); | 290 encrypted_packets_.push_back(encrypted); |
291 return true; | 291 return true; |
292 } | 292 } |
293 | 293 |
294 MockSession::MockSession(QuicConnection* connection) | 294 MockSession::MockSession(QuicConnection* connection) |
295 : QuicSession(connection, kInitialFlowControlWindowForTest, | 295 : QuicSession(connection, kInitialFlowControlWindowForTest, |
296 DefaultQuicConfig()) { | 296 DefaultQuicConfig()) { |
297 ON_CALL(*this, WritevData(_, _, _, _, _)) | 297 ON_CALL(*this, WritevData(_, _, _, _, _, _)) |
298 .WillByDefault(testing::Return(QuicConsumedData(0, false))); | 298 .WillByDefault(testing::Return(QuicConsumedData(0, false))); |
299 } | 299 } |
300 | 300 |
301 MockSession::~MockSession() { | 301 MockSession::~MockSession() { |
302 } | 302 } |
303 | 303 |
304 TestSession::TestSession(QuicConnection* connection, const QuicConfig& config) | 304 TestSession::TestSession(QuicConnection* connection, const QuicConfig& config) |
305 : QuicSession(connection, kInitialFlowControlWindowForTest, config), | 305 : QuicSession(connection, kInitialFlowControlWindowForTest, config), |
306 crypto_stream_(NULL) {} | 306 crypto_stream_(NULL) {} |
307 | 307 |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 } | 582 } |
583 | 583 |
584 QuicVersionVector SupportedVersions(QuicVersion version) { | 584 QuicVersionVector SupportedVersions(QuicVersion version) { |
585 QuicVersionVector versions; | 585 QuicVersionVector versions; |
586 versions.push_back(version); | 586 versions.push_back(version); |
587 return versions; | 587 return versions; |
588 } | 588 } |
589 | 589 |
590 } // namespace test | 590 } // namespace test |
591 } // namespace net | 591 } // namespace net |
OLD | NEW |