| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 MOCK_METHOD1(OnError, void(QuicFramer* framer)); | 93 MOCK_METHOD1(OnError, void(QuicFramer* framer)); |
| 94 // The constructor sets this up to return false by default. | 94 // The constructor sets this up to return false by default. |
| 95 MOCK_METHOD1(OnProtocolVersionMismatch, bool(QuicVersion version)); | 95 MOCK_METHOD1(OnProtocolVersionMismatch, bool(QuicVersion version)); |
| 96 MOCK_METHOD0(OnPacket, void()); | 96 MOCK_METHOD0(OnPacket, void()); |
| 97 MOCK_METHOD1(OnPublicResetPacket, void(const QuicPublicResetPacket& header)); | 97 MOCK_METHOD1(OnPublicResetPacket, void(const QuicPublicResetPacket& header)); |
| 98 MOCK_METHOD1(OnVersionNegotiationPacket, | 98 MOCK_METHOD1(OnVersionNegotiationPacket, |
| 99 void(const QuicVersionNegotiationPacket& packet)); | 99 void(const QuicVersionNegotiationPacket& packet)); |
| 100 MOCK_METHOD0(OnRevivedPacket, void()); | 100 MOCK_METHOD0(OnRevivedPacket, void()); |
| 101 // The constructor sets this up to return true by default. | 101 // The constructor sets this up to return true by default. |
| 102 MOCK_METHOD1(OnUnauthenticatedHeader, bool(const QuicPacketHeader& header)); | 102 MOCK_METHOD1(OnUnauthenticatedHeader, bool(const QuicPacketHeader& header)); |
| 103 // The constructor sets this up to return true by default. |
| 104 MOCK_METHOD1(OnUnauthenticatedPublicHeader, bool( |
| 105 const QuicPacketPublicHeader& header)); |
| 103 MOCK_METHOD1(OnPacketHeader, bool(const QuicPacketHeader& header)); | 106 MOCK_METHOD1(OnPacketHeader, bool(const QuicPacketHeader& header)); |
| 104 MOCK_METHOD1(OnFecProtectedPayload, void(base::StringPiece payload)); | 107 MOCK_METHOD1(OnFecProtectedPayload, void(base::StringPiece payload)); |
| 105 MOCK_METHOD1(OnStreamFrame, bool(const QuicStreamFrame& frame)); | 108 MOCK_METHOD1(OnStreamFrame, bool(const QuicStreamFrame& frame)); |
| 106 MOCK_METHOD1(OnAckFrame, bool(const QuicAckFrame& frame)); | 109 MOCK_METHOD1(OnAckFrame, bool(const QuicAckFrame& frame)); |
| 107 MOCK_METHOD1(OnCongestionFeedbackFrame, | 110 MOCK_METHOD1(OnCongestionFeedbackFrame, |
| 108 bool(const QuicCongestionFeedbackFrame& frame)); | 111 bool(const QuicCongestionFeedbackFrame& frame)); |
| 109 MOCK_METHOD1(OnFecData, void(const QuicFecData& fec)); | 112 MOCK_METHOD1(OnFecData, void(const QuicFecData& fec)); |
| 110 MOCK_METHOD1(OnRstStreamFrame, bool(const QuicRstStreamFrame& frame)); | 113 MOCK_METHOD1(OnRstStreamFrame, bool(const QuicRstStreamFrame& frame)); |
| 111 MOCK_METHOD1(OnConnectionCloseFrame, | 114 MOCK_METHOD1(OnConnectionCloseFrame, |
| 112 bool(const QuicConnectionCloseFrame& frame)); | 115 bool(const QuicConnectionCloseFrame& frame)); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 123 | 126 |
| 124 virtual void OnError(QuicFramer* framer) OVERRIDE {} | 127 virtual void OnError(QuicFramer* framer) OVERRIDE {} |
| 125 virtual void OnPacket() OVERRIDE {} | 128 virtual void OnPacket() OVERRIDE {} |
| 126 virtual void OnPublicResetPacket( | 129 virtual void OnPublicResetPacket( |
| 127 const QuicPublicResetPacket& packet) OVERRIDE {} | 130 const QuicPublicResetPacket& packet) OVERRIDE {} |
| 128 virtual void OnVersionNegotiationPacket( | 131 virtual void OnVersionNegotiationPacket( |
| 129 const QuicVersionNegotiationPacket& packet) OVERRIDE {} | 132 const QuicVersionNegotiationPacket& packet) OVERRIDE {} |
| 130 virtual void OnRevivedPacket() OVERRIDE {} | 133 virtual void OnRevivedPacket() OVERRIDE {} |
| 131 virtual bool OnProtocolVersionMismatch(QuicVersion version) OVERRIDE; | 134 virtual bool OnProtocolVersionMismatch(QuicVersion version) OVERRIDE; |
| 132 virtual bool OnUnauthenticatedHeader(const QuicPacketHeader& header) OVERRIDE; | 135 virtual bool OnUnauthenticatedHeader(const QuicPacketHeader& header) OVERRIDE; |
| 136 virtual bool OnUnauthenticatedPublicHeader( |
| 137 const QuicPacketPublicHeader& header) OVERRIDE; |
| 133 virtual bool OnPacketHeader(const QuicPacketHeader& header) OVERRIDE; | 138 virtual bool OnPacketHeader(const QuicPacketHeader& header) OVERRIDE; |
| 134 virtual void OnFecProtectedPayload(base::StringPiece payload) OVERRIDE {} | 139 virtual void OnFecProtectedPayload(base::StringPiece payload) OVERRIDE {} |
| 135 virtual bool OnStreamFrame(const QuicStreamFrame& frame) OVERRIDE; | 140 virtual bool OnStreamFrame(const QuicStreamFrame& frame) OVERRIDE; |
| 136 virtual bool OnAckFrame(const QuicAckFrame& frame) OVERRIDE; | 141 virtual bool OnAckFrame(const QuicAckFrame& frame) OVERRIDE; |
| 137 virtual bool OnCongestionFeedbackFrame( | 142 virtual bool OnCongestionFeedbackFrame( |
| 138 const QuicCongestionFeedbackFrame& frame) OVERRIDE; | 143 const QuicCongestionFeedbackFrame& frame) OVERRIDE; |
| 139 virtual void OnFecData(const QuicFecData& fec) OVERRIDE {} | 144 virtual void OnFecData(const QuicFecData& fec) OVERRIDE {} |
| 140 virtual bool OnRstStreamFrame(const QuicRstStreamFrame& frame) OVERRIDE; | 145 virtual bool OnRstStreamFrame(const QuicRstStreamFrame& frame) OVERRIDE; |
| 141 virtual bool OnConnectionCloseFrame( | 146 virtual bool OnConnectionCloseFrame( |
| 142 const QuicConnectionCloseFrame& frame) OVERRIDE; | 147 const QuicConnectionCloseFrame& frame) OVERRIDE; |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 MockAckNotifierDelegate(); | 463 MockAckNotifierDelegate(); |
| 459 virtual ~MockAckNotifierDelegate(); | 464 virtual ~MockAckNotifierDelegate(); |
| 460 | 465 |
| 461 MOCK_METHOD0(OnAckNotification, void()); | 466 MOCK_METHOD0(OnAckNotification, void()); |
| 462 }; | 467 }; |
| 463 | 468 |
| 464 } // namespace test | 469 } // namespace test |
| 465 } // namespace net | 470 } // namespace net |
| 466 | 471 |
| 467 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 472 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
| OLD | NEW |