| 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_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 7 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
| 8 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 8 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 private: | 110 private: |
| 111 QuicCryptoStream* crypto_stream_; | 111 QuicCryptoStream* crypto_stream_; |
| 112 DISALLOW_COPY_AND_ASSIGN(TestSession); | 112 DISALLOW_COPY_AND_ASSIGN(TestSession); |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 class MockPacketWriter : public QuicPacketWriter { | 115 class MockPacketWriter : public QuicPacketWriter { |
| 116 public: | 116 public: |
| 117 MockPacketWriter(); | 117 MockPacketWriter(); |
| 118 virtual ~MockPacketWriter(); | 118 virtual ~MockPacketWriter(); |
| 119 | 119 |
| 120 MOCK_METHOD5(WritePacket, | 120 MOCK_METHOD4(WritePacket, |
| 121 WriteResult(const char* buffer, | 121 WriteResult(const char* buffer, |
| 122 size_t buf_len, | 122 size_t buf_len, |
| 123 const IPAddressNumber& self_address, | 123 const IPAddressNumber& self_address, |
| 124 const IPEndPoint& peer_address, | 124 const IPEndPoint& peer_address)); |
| 125 QuicBlockedWriterInterface* blocked_writer)); | |
| 126 MOCK_CONST_METHOD0(IsWriteBlockedDataBuffered, bool()); | 125 MOCK_CONST_METHOD0(IsWriteBlockedDataBuffered, bool()); |
| 127 MOCK_CONST_METHOD0(IsWriteBlocked, bool()); | 126 MOCK_CONST_METHOD0(IsWriteBlocked, bool()); |
| 128 MOCK_METHOD0(SetWritable, void()); | 127 MOCK_METHOD0(SetWritable, void()); |
| 129 }; | 128 }; |
| 130 | 129 |
| 131 class MockQuicServerSessionVisitor : public QuicServerSessionVisitor { | 130 class MockQuicServerSessionVisitor : public QuicServerSessionVisitor { |
| 132 public: | 131 public: |
| 133 MockQuicServerSessionVisitor(); | 132 MockQuicServerSessionVisitor(); |
| 134 virtual ~MockQuicServerSessionVisitor(); | 133 virtual ~MockQuicServerSessionVisitor(); |
| 135 MOCK_METHOD2(OnConnectionClosed, void(QuicGuid guid, QuicErrorCode error)); | 134 MOCK_METHOD2(OnConnectionClosed, void(QuicGuid guid, QuicErrorCode error)); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 159 protected: | 158 protected: |
| 160 // Object is ref counted. | 159 // Object is ref counted. |
| 161 virtual ~MockAckNotifierDelegate(); | 160 virtual ~MockAckNotifierDelegate(); |
| 162 }; | 161 }; |
| 163 | 162 |
| 164 } // namespace test | 163 } // namespace test |
| 165 } // namespace tools | 164 } // namespace tools |
| 166 } // namespace net | 165 } // namespace net |
| 167 | 166 |
| 168 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 167 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
| OLD | NEW |