| 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 "net/quic/crypto/crypto_framer.h" | 8 #include "net/quic/crypto/crypto_framer.h" |
| 9 #include "net/quic/crypto/crypto_handshake.h" | 9 #include "net/quic/crypto/crypto_handshake.h" |
| 10 #include "net/quic/crypto/crypto_utils.h" | 10 #include "net/quic/crypto/crypto_utils.h" |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 HasRetransmittableData retransmittable) { | 247 HasRetransmittableData retransmittable) { |
| 248 packets_.push_back(packet); | 248 packets_.push_back(packet); |
| 249 QuicEncryptedPacket* encrypted = | 249 QuicEncryptedPacket* encrypted = |
| 250 framer_.EncryptPacket(level, sequence_number, *packet); | 250 framer_.EncryptPacket(level, sequence_number, *packet); |
| 251 encrypted_packets_.push_back(encrypted); | 251 encrypted_packets_.push_back(encrypted); |
| 252 return true; | 252 return true; |
| 253 } | 253 } |
| 254 | 254 |
| 255 MockSession::MockSession(QuicConnection* connection, bool is_server) | 255 MockSession::MockSession(QuicConnection* connection, bool is_server) |
| 256 : QuicSession(connection, DefaultQuicConfig(), is_server) { | 256 : QuicSession(connection, DefaultQuicConfig(), is_server) { |
| 257 ON_CALL(*this, WriteData(_, _, _, _)) | 257 ON_CALL(*this, WritevData(_, _, _, _, _)) |
| 258 .WillByDefault(testing::Return(QuicConsumedData(0, false))); | 258 .WillByDefault(testing::Return(QuicConsumedData(0, false))); |
| 259 } | 259 } |
| 260 | 260 |
| 261 MockSession::~MockSession() { | 261 MockSession::~MockSession() { |
| 262 } | 262 } |
| 263 | 263 |
| 264 TestSession::TestSession(QuicConnection* connection, | 264 TestSession::TestSession(QuicConnection* connection, |
| 265 const QuicConfig& config, | 265 const QuicConfig& config, |
| 266 bool is_server) | 266 bool is_server) |
| 267 : QuicSession(connection, config, is_server), | 267 : QuicSession(connection, config, is_server), |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 data.AppendToString(&data_); | 442 data.AppendToString(&data_); |
| 443 return true; | 443 return true; |
| 444 } | 444 } |
| 445 | 445 |
| 446 void TestDecompressorVisitor::OnDecompressionError() { | 446 void TestDecompressorVisitor::OnDecompressionError() { |
| 447 error_ = true; | 447 error_ = true; |
| 448 } | 448 } |
| 449 | 449 |
| 450 } // namespace test | 450 } // namespace test |
| 451 } // namespace net | 451 } // namespace net |
| OLD | NEW |