| 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 <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/sha1.h" | 10 #include "base/sha1.h" |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 ON_CALL(*this, WritevData(_, _, _, _, _, _)) | 378 ON_CALL(*this, WritevData(_, _, _, _, _, _)) |
| 379 .WillByDefault(testing::Return(QuicConsumedData(0, false))); | 379 .WillByDefault(testing::Return(QuicConsumedData(0, false))); |
| 380 } | 380 } |
| 381 | 381 |
| 382 MockQuicSession::~MockQuicSession() { | 382 MockQuicSession::~MockQuicSession() { |
| 383 delete connection(); | 383 delete connection(); |
| 384 } | 384 } |
| 385 | 385 |
| 386 // static | 386 // static |
| 387 QuicConsumedData MockQuicSession::ConsumeAllData( | 387 QuicConsumedData MockQuicSession::ConsumeAllData( |
| 388 ReliableQuicStream* /*stream*/, | 388 QuicStream* /*stream*/, |
| 389 QuicStreamId /*id*/, | 389 QuicStreamId /*id*/, |
| 390 const QuicIOVector& data, | 390 const QuicIOVector& data, |
| 391 QuicStreamOffset /*offset*/, | 391 QuicStreamOffset /*offset*/, |
| 392 bool fin, | 392 bool fin, |
| 393 QuicAckListenerInterface* /*ack_notifier_delegate*/) { | 393 QuicAckListenerInterface* /*ack_notifier_delegate*/) { |
| 394 return QuicConsumedData(data.total_length, fin); | 394 return QuicConsumedData(data.total_length, fin); |
| 395 } | 395 } |
| 396 | 396 |
| 397 MockQuicSpdySession::MockQuicSpdySession(QuicConnection* connection) | 397 MockQuicSpdySession::MockQuicSpdySession(QuicConnection* connection) |
| 398 : QuicSpdySession(connection, nullptr, DefaultQuicConfig()) { | 398 : QuicSpdySession(connection, nullptr, DefaultQuicConfig()) { |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 926 // strike register worries that we've just overflowed a uint32_t time. | 926 // strike register worries that we've just overflowed a uint32_t time. |
| 927 (*server_connection)->AdvanceTime(connection_start_time); | 927 (*server_connection)->AdvanceTime(connection_start_time); |
| 928 } | 928 } |
| 929 | 929 |
| 930 QuicStreamId QuicClientDataStreamId(int i) { | 930 QuicStreamId QuicClientDataStreamId(int i) { |
| 931 return kClientDataStreamId1 + 2 * i; | 931 return kClientDataStreamId1 + 2 * i; |
| 932 } | 932 } |
| 933 | 933 |
| 934 } // namespace test | 934 } // namespace test |
| 935 } // namespace net | 935 } // namespace net |
| OLD | NEW |