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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 MockSession::MockSession(QuicConnection* connection, bool is_server) | 292 MockSession::MockSession(QuicConnection* connection, bool is_server) |
293 : QuicSession(connection, DefaultQuicConfig(), is_server) { | 293 : QuicSession(connection, DefaultQuicConfig(), is_server) { |
294 ON_CALL(*this, WritevData(_, _, _, _, _, _)) | 294 ON_CALL(*this, WritevData(_, _, _, _, _, _)) |
295 .WillByDefault(testing::Return(QuicConsumedData(0, false))); | 295 .WillByDefault(testing::Return(QuicConsumedData(0, false))); |
296 } | 296 } |
297 | 297 |
298 MockSession::~MockSession() { | 298 MockSession::~MockSession() { |
299 } | 299 } |
300 | 300 |
301 TestSession::TestSession(QuicConnection* connection, | 301 TestSession::TestSession(QuicConnection* connection, |
302 const QuicConfig& config, | 302 const QuicConfig& config) |
303 bool is_server) | 303 : QuicSession(connection, config, connection->is_server()), |
304 : QuicSession(connection, config, is_server), | |
305 crypto_stream_(NULL) { | 304 crypto_stream_(NULL) { |
306 } | 305 } |
307 | 306 |
308 TestSession::~TestSession() {} | 307 TestSession::~TestSession() {} |
309 | 308 |
310 void TestSession::SetCryptoStream(QuicCryptoStream* stream) { | 309 void TestSession::SetCryptoStream(QuicCryptoStream* stream) { |
311 crypto_stream_ = stream; | 310 crypto_stream_ = stream; |
312 } | 311 } |
313 | 312 |
314 QuicCryptoStream* TestSession::GetCryptoStream() { | 313 QuicCryptoStream* TestSession::GetCryptoStream() { |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 data.AppendToString(&data_); | 516 data.AppendToString(&data_); |
518 return true; | 517 return true; |
519 } | 518 } |
520 | 519 |
521 void TestDecompressorVisitor::OnDecompressionError() { | 520 void TestDecompressorVisitor::OnDecompressionError() { |
522 error_ = true; | 521 error_ = true; |
523 } | 522 } |
524 | 523 |
525 } // namespace test | 524 } // namespace test |
526 } // namespace net | 525 } // namespace net |
OLD | NEW |