| 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 <stddef.h> | 10 #include <stddef.h> |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 MOCK_METHOD1(OnStreamFrame, void(const QuicStreamFrame& frame)); | 289 MOCK_METHOD1(OnStreamFrame, void(const QuicStreamFrame& frame)); |
| 290 MOCK_METHOD1(OnWindowUpdateFrame, void(const QuicWindowUpdateFrame& frame)); | 290 MOCK_METHOD1(OnWindowUpdateFrame, void(const QuicWindowUpdateFrame& frame)); |
| 291 MOCK_METHOD1(OnBlockedFrame, void(const QuicBlockedFrame& frame)); | 291 MOCK_METHOD1(OnBlockedFrame, void(const QuicBlockedFrame& frame)); |
| 292 MOCK_METHOD1(OnRstStream, void(const QuicRstStreamFrame& frame)); | 292 MOCK_METHOD1(OnRstStream, void(const QuicRstStreamFrame& frame)); |
| 293 MOCK_METHOD1(OnGoAway, void(const QuicGoAwayFrame& frame)); | 293 MOCK_METHOD1(OnGoAway, void(const QuicGoAwayFrame& frame)); |
| 294 MOCK_METHOD2(OnConnectionClosed, void(QuicErrorCode error, bool from_peer)); | 294 MOCK_METHOD2(OnConnectionClosed, void(QuicErrorCode error, bool from_peer)); |
| 295 MOCK_METHOD0(OnWriteBlocked, void()); | 295 MOCK_METHOD0(OnWriteBlocked, void()); |
| 296 MOCK_METHOD0(OnCanWrite, void()); | 296 MOCK_METHOD0(OnCanWrite, void()); |
| 297 MOCK_METHOD1(OnCongestionWindowChange, void(QuicTime now)); | 297 MOCK_METHOD1(OnCongestionWindowChange, void(QuicTime now)); |
| 298 MOCK_METHOD0(OnConnectionMigration, void()); | 298 MOCK_METHOD0(OnConnectionMigration, void()); |
| 299 MOCK_METHOD0(OnPathDegrading, void()); |
| 299 MOCK_CONST_METHOD0(WillingAndAbleToWrite, bool()); | 300 MOCK_CONST_METHOD0(WillingAndAbleToWrite, bool()); |
| 300 MOCK_CONST_METHOD0(HasPendingHandshake, bool()); | 301 MOCK_CONST_METHOD0(HasPendingHandshake, bool()); |
| 301 MOCK_CONST_METHOD0(HasOpenDynamicStreams, bool()); | 302 MOCK_CONST_METHOD0(HasOpenDynamicStreams, bool()); |
| 302 MOCK_METHOD1(OnSuccessfulVersionNegotiation, | 303 MOCK_METHOD1(OnSuccessfulVersionNegotiation, |
| 303 void(const QuicVersion& version)); | 304 void(const QuicVersion& version)); |
| 304 MOCK_METHOD0(OnConfigNegotiated, void()); | 305 MOCK_METHOD0(OnConfigNegotiated, void()); |
| 305 MOCK_METHOD0(PostProcessAfterData, void()); | 306 MOCK_METHOD0(PostProcessAfterData, void()); |
| 306 | 307 |
| 307 private: | 308 private: |
| 308 DISALLOW_COPY_AND_ASSIGN(MockConnectionVisitor); | 309 DISALLOW_COPY_AND_ASSIGN(MockConnectionVisitor); |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 }; | 689 }; |
| 689 | 690 |
| 690 class MockNetworkChangeVisitor | 691 class MockNetworkChangeVisitor |
| 691 : public QuicSentPacketManager::NetworkChangeVisitor { | 692 : public QuicSentPacketManager::NetworkChangeVisitor { |
| 692 public: | 693 public: |
| 693 MockNetworkChangeVisitor(); | 694 MockNetworkChangeVisitor(); |
| 694 ~MockNetworkChangeVisitor() override; | 695 ~MockNetworkChangeVisitor() override; |
| 695 | 696 |
| 696 MOCK_METHOD0(OnCongestionWindowChange, void()); | 697 MOCK_METHOD0(OnCongestionWindowChange, void()); |
| 697 MOCK_METHOD0(OnRttChange, void()); | 698 MOCK_METHOD0(OnRttChange, void()); |
| 699 MOCK_METHOD0(OnPathDegrading, void()); |
| 698 | 700 |
| 699 private: | 701 private: |
| 700 DISALLOW_COPY_AND_ASSIGN(MockNetworkChangeVisitor); | 702 DISALLOW_COPY_AND_ASSIGN(MockNetworkChangeVisitor); |
| 701 }; | 703 }; |
| 702 | 704 |
| 703 class MockQuicConnectionDebugVisitor : public QuicConnectionDebugVisitor { | 705 class MockQuicConnectionDebugVisitor : public QuicConnectionDebugVisitor { |
| 704 public: | 706 public: |
| 705 MockQuicConnectionDebugVisitor(); | 707 MockQuicConnectionDebugVisitor(); |
| 706 ~MockQuicConnectionDebugVisitor() override; | 708 ~MockQuicConnectionDebugVisitor() override; |
| 707 | 709 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 TestQuicSpdyServerSession** server_session); | 815 TestQuicSpdyServerSession** server_session); |
| 814 | 816 |
| 815 // Helper to generate client side stream ids, generalizes | 817 // Helper to generate client side stream ids, generalizes |
| 816 // kClientDataStreamId1 etc. above. | 818 // kClientDataStreamId1 etc. above. |
| 817 QuicStreamId QuicClientDataStreamId(int i); | 819 QuicStreamId QuicClientDataStreamId(int i); |
| 818 | 820 |
| 819 } // namespace test | 821 } // namespace test |
| 820 } // namespace net | 822 } // namespace net |
| 821 | 823 |
| 822 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 824 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
| OLD | NEW |