| 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 // Common utilities for Quic tests | 5 // Common utilities for Quic tests |
| 6 | 6 |
| 7 #ifndef NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 7 #ifndef NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
| 8 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 8 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 }; | 319 }; |
| 320 | 320 |
| 321 class MockSession : public QuicSession { | 321 class MockSession : public QuicSession { |
| 322 public: | 322 public: |
| 323 explicit MockSession(QuicConnection* connection); | 323 explicit MockSession(QuicConnection* connection); |
| 324 virtual ~MockSession(); | 324 virtual ~MockSession(); |
| 325 MOCK_METHOD2(OnConnectionClosed, void(QuicErrorCode error, bool from_peer)); | 325 MOCK_METHOD2(OnConnectionClosed, void(QuicErrorCode error, bool from_peer)); |
| 326 MOCK_METHOD1(CreateIncomingDataStream, QuicDataStream*(QuicStreamId id)); | 326 MOCK_METHOD1(CreateIncomingDataStream, QuicDataStream*(QuicStreamId id)); |
| 327 MOCK_METHOD0(GetCryptoStream, QuicCryptoStream*()); | 327 MOCK_METHOD0(GetCryptoStream, QuicCryptoStream*()); |
| 328 MOCK_METHOD0(CreateOutgoingDataStream, QuicDataStream*()); | 328 MOCK_METHOD0(CreateOutgoingDataStream, QuicDataStream*()); |
| 329 MOCK_METHOD5(WritevData, | 329 MOCK_METHOD6(WritevData, |
| 330 QuicConsumedData(QuicStreamId id, | 330 QuicConsumedData(QuicStreamId id, |
| 331 const IOVector& data, | 331 const IOVector& data, |
| 332 QuicStreamOffset offset, | 332 QuicStreamOffset offset, |
| 333 bool fin, | 333 bool fin, |
| 334 FecProtection fec_protection, |
| 334 QuicAckNotifier::DelegateInterface*)); | 335 QuicAckNotifier::DelegateInterface*)); |
| 335 MOCK_METHOD2(OnStreamHeaders, void(QuicStreamId stream_id, | 336 MOCK_METHOD2(OnStreamHeaders, void(QuicStreamId stream_id, |
| 336 base::StringPiece headers_data)); | 337 base::StringPiece headers_data)); |
| 337 MOCK_METHOD2(OnStreamHeadersPriority, void(QuicStreamId stream_id, | 338 MOCK_METHOD2(OnStreamHeadersPriority, void(QuicStreamId stream_id, |
| 338 QuicPriority priority)); | 339 QuicPriority priority)); |
| 339 MOCK_METHOD3(OnStreamHeadersComplete, void(QuicStreamId stream_id, | 340 MOCK_METHOD3(OnStreamHeadersComplete, void(QuicStreamId stream_id, |
| 340 bool fin, | 341 bool fin, |
| 341 size_t frame_len)); | 342 size_t frame_len)); |
| 342 MOCK_METHOD3(SendRstStream, void(QuicStreamId stream_id, | 343 MOCK_METHOD3(SendRstStream, void(QuicStreamId stream_id, |
| 343 QuicRstStreamErrorCode error, | 344 QuicRstStreamErrorCode error, |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 virtual ~MockAckNotifierDelegate(); | 501 virtual ~MockAckNotifierDelegate(); |
| 501 | 502 |
| 502 private: | 503 private: |
| 503 DISALLOW_COPY_AND_ASSIGN(MockAckNotifierDelegate); | 504 DISALLOW_COPY_AND_ASSIGN(MockAckNotifierDelegate); |
| 504 }; | 505 }; |
| 505 | 506 |
| 506 } // namespace test | 507 } // namespace test |
| 507 } // namespace net | 508 } // namespace net |
| 508 | 509 |
| 509 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 510 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
| OLD | NEW |