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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 base::StringPiece headers_data)); | 442 base::StringPiece headers_data)); |
443 MOCK_METHOD2(OnStreamHeadersPriority, void(QuicStreamId stream_id, | 443 MOCK_METHOD2(OnStreamHeadersPriority, void(QuicStreamId stream_id, |
444 QuicPriority priority)); | 444 QuicPriority priority)); |
445 MOCK_METHOD3(OnStreamHeadersComplete, void(QuicStreamId stream_id, | 445 MOCK_METHOD3(OnStreamHeadersComplete, void(QuicStreamId stream_id, |
446 bool fin, | 446 bool fin, |
447 size_t frame_len)); | 447 size_t frame_len)); |
448 MOCK_METHOD3(SendRstStream, void(QuicStreamId stream_id, | 448 MOCK_METHOD3(SendRstStream, void(QuicStreamId stream_id, |
449 QuicRstStreamErrorCode error, | 449 QuicRstStreamErrorCode error, |
450 QuicStreamOffset bytes_written)); | 450 QuicStreamOffset bytes_written)); |
451 MOCK_METHOD0(IsCryptoHandshakeConfirmed, bool()); | 451 MOCK_METHOD0(IsCryptoHandshakeConfirmed, bool()); |
| 452 MOCK_METHOD1(OnHeadersHeadOfLineBlocking, void(QuicTime::Delta delta)); |
452 | 453 |
453 using QuicSession::ActivateStream; | 454 using QuicSession::ActivateStream; |
454 | 455 |
455 private: | 456 private: |
456 scoped_ptr<QuicCryptoStream> crypto_stream_; | 457 scoped_ptr<QuicCryptoStream> crypto_stream_; |
457 | 458 |
458 DISALLOW_COPY_AND_ASSIGN(MockQuicSpdySession); | 459 DISALLOW_COPY_AND_ASSIGN(MockQuicSpdySession); |
459 }; | 460 }; |
460 | 461 |
461 class TestQuicSpdyServerSession : public QuicSpdySession { | 462 class TestQuicSpdyServerSession : public QuicSpdySession { |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 TestQuicSpdyServerSession** server_session); | 769 TestQuicSpdyServerSession** server_session); |
769 | 770 |
770 // Helper to generate client side stream ids, generalizes | 771 // Helper to generate client side stream ids, generalizes |
771 // kClientDataStreamId1 etc. above. | 772 // kClientDataStreamId1 etc. above. |
772 QuicStreamId QuicClientDataStreamId(int i); | 773 QuicStreamId QuicClientDataStreamId(int i); |
773 | 774 |
774 } // namespace test | 775 } // namespace test |
775 } // namespace net | 776 } // namespace net |
776 | 777 |
777 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 778 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
OLD | NEW |