| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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)); | 125 QuicBlockedWriterInterface* blocked_writer)); |
| 126 MOCK_CONST_METHOD0(IsWriteBlockedDataBuffered, bool()); | 126 MOCK_CONST_METHOD0(IsWriteBlockedDataBuffered, bool()); |
| 127 MOCK_CONST_METHOD0(IsWriteBlocked, bool()); | 127 MOCK_CONST_METHOD0(IsWriteBlocked, bool()); |
| 128 MOCK_METHOD0(SetWritable, void()); | 128 MOCK_METHOD0(SetWritable, void()); |
| 129 }; | 129 }; |
| 130 | 130 |
| 131 class MockQuicSessionOwner : public QuicSessionOwner { | 131 class MockQuicServerSessionVisitor : public QuicServerSessionVisitor { |
| 132 public: | 132 public: |
| 133 MockQuicSessionOwner(); | 133 MockQuicServerSessionVisitor(); |
| 134 virtual ~MockQuicSessionOwner(); | 134 virtual ~MockQuicServerSessionVisitor(); |
| 135 MOCK_METHOD2(OnConnectionClosed, void(QuicGuid guid, QuicErrorCode error)); | 135 MOCK_METHOD2(OnConnectionClosed, void(QuicGuid guid, QuicErrorCode error)); |
| 136 MOCK_METHOD1(OnWriteBlocked, void(QuicBlockedWriterInterface* writer)); |
| 136 }; | 137 }; |
| 137 | 138 |
| 138 class TestDecompressorVisitor : public QuicSpdyDecompressor::Visitor { | 139 class TestDecompressorVisitor : public QuicSpdyDecompressor::Visitor { |
| 139 public: | 140 public: |
| 140 virtual ~TestDecompressorVisitor() {} | 141 virtual ~TestDecompressorVisitor() {} |
| 141 virtual bool OnDecompressedData(base::StringPiece data) OVERRIDE; | 142 virtual bool OnDecompressedData(base::StringPiece data) OVERRIDE; |
| 142 virtual void OnDecompressionError() OVERRIDE; | 143 virtual void OnDecompressionError() OVERRIDE; |
| 143 | 144 |
| 144 std::string data() { return data_; } | 145 std::string data() { return data_; } |
| 145 bool error() { return error_; } | 146 bool error() { return error_; } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 158 protected: | 159 protected: |
| 159 // Object is ref counted. | 160 // Object is ref counted. |
| 160 virtual ~MockAckNotifierDelegate(); | 161 virtual ~MockAckNotifierDelegate(); |
| 161 }; | 162 }; |
| 162 | 163 |
| 163 } // namespace test | 164 } // namespace test |
| 164 } // namespace tools | 165 } // namespace tools |
| 165 } // namespace net | 166 } // namespace net |
| 166 | 167 |
| 167 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 168 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
| OLD | NEW |