| 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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 TransmissionType transmission_type) { | 318 TransmissionType transmission_type) { |
| 319 packets_.push_back(packet.packet); | 319 packets_.push_back(packet.packet); |
| 320 QuicEncryptedPacket* encrypted = QuicConnectionPeer::GetFramer(this)-> | 320 QuicEncryptedPacket* encrypted = QuicConnectionPeer::GetFramer(this)-> |
| 321 EncryptPacket(level, packet.sequence_number, *packet.packet); | 321 EncryptPacket(level, packet.sequence_number, *packet.packet); |
| 322 encrypted_packets_.push_back(encrypted); | 322 encrypted_packets_.push_back(encrypted); |
| 323 return true; | 323 return true; |
| 324 } | 324 } |
| 325 | 325 |
| 326 MockSession::MockSession(QuicConnection* connection) | 326 MockSession::MockSession(QuicConnection* connection) |
| 327 : QuicSession(connection, DefaultQuicConfig()) { | 327 : QuicSession(connection, DefaultQuicConfig()) { |
| 328 ON_CALL(*this, WritevData(_, _, _, _, _, _)) | 328 ON_CALL(*this, WritevData(_, _, _, _, _)) |
| 329 .WillByDefault(testing::Return(QuicConsumedData(0, false))); | 329 .WillByDefault(testing::Return(QuicConsumedData(0, false))); |
| 330 } | 330 } |
| 331 | 331 |
| 332 MockSession::~MockSession() { | 332 MockSession::~MockSession() { |
| 333 } | 333 } |
| 334 | 334 |
| 335 TestSession::TestSession(QuicConnection* connection, | 335 TestSession::TestSession(QuicConnection* connection, |
| 336 const QuicConfig& config) | 336 const QuicConfig& config) |
| 337 : QuicSession(connection, config), | 337 : QuicSession(connection, config), |
| 338 crypto_stream_(NULL) { | 338 crypto_stream_(NULL) { |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 data.AppendToString(&data_); | 552 data.AppendToString(&data_); |
| 553 return true; | 553 return true; |
| 554 } | 554 } |
| 555 | 555 |
| 556 void TestDecompressorVisitor::OnDecompressionError() { | 556 void TestDecompressorVisitor::OnDecompressionError() { |
| 557 error_ = true; | 557 error_ = true; |
| 558 } | 558 } |
| 559 | 559 |
| 560 } // namespace test | 560 } // namespace test |
| 561 } // namespace net | 561 } // namespace net |
| OLD | NEW |