| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 private: | 128 private: |
| 129 DISALLOW_COPY_AND_ASSIGN(MockPacketWriter); | 129 DISALLOW_COPY_AND_ASSIGN(MockPacketWriter); |
| 130 }; | 130 }; |
| 131 | 131 |
| 132 class MockQuicServerSessionVisitor : public QuicServerSessionVisitor { | 132 class MockQuicServerSessionVisitor : public QuicServerSessionVisitor { |
| 133 public: | 133 public: |
| 134 MockQuicServerSessionVisitor(); | 134 MockQuicServerSessionVisitor(); |
| 135 virtual ~MockQuicServerSessionVisitor(); | 135 virtual ~MockQuicServerSessionVisitor(); |
| 136 MOCK_METHOD2(OnConnectionClosed, void(QuicConnectionId connection_id, | 136 MOCK_METHOD2(OnConnectionClosed, void(QuicConnectionId connection_id, |
| 137 QuicErrorCode error)); | 137 QuicErrorCode error)); |
| 138 MOCK_METHOD1(OnWriteBlocked, void(QuicBlockedWriterInterface* writer)); | 138 MOCK_METHOD1(OnWriteBlocked, |
| 139 void(QuicBlockedWriterInterface* blocked_writer)); |
| 139 | 140 |
| 140 private: | 141 private: |
| 141 DISALLOW_COPY_AND_ASSIGN(MockQuicServerSessionVisitor); | 142 DISALLOW_COPY_AND_ASSIGN(MockQuicServerSessionVisitor); |
| 142 }; | 143 }; |
| 143 | 144 |
| 144 class MockAckNotifierDelegate : public QuicAckNotifier::DelegateInterface { | 145 class MockAckNotifierDelegate : public QuicAckNotifier::DelegateInterface { |
| 145 public: | 146 public: |
| 146 MockAckNotifierDelegate(); | 147 MockAckNotifierDelegate(); |
| 147 | 148 |
| 148 MOCK_METHOD5(OnAckNotification, void(int num_original_packets, | 149 MOCK_METHOD5(OnAckNotification, void(int num_original_packets, |
| 149 int num_original_bytes, | 150 int num_original_bytes, |
| 150 int num_retransmitted_packets, | 151 int num_retransmitted_packets, |
| 151 int num_retransmitted_bytes, | 152 int num_retransmitted_bytes, |
| 152 QuicTime::Delta delta_largest_observed)); | 153 QuicTime::Delta delta_largest_observed)); |
| 153 | 154 |
| 154 protected: | 155 protected: |
| 155 // Object is ref counted. | 156 // Object is ref counted. |
| 156 virtual ~MockAckNotifierDelegate(); | 157 virtual ~MockAckNotifierDelegate(); |
| 157 | 158 |
| 158 DISALLOW_COPY_AND_ASSIGN(MockAckNotifierDelegate); | 159 DISALLOW_COPY_AND_ASSIGN(MockAckNotifierDelegate); |
| 159 }; | 160 }; |
| 160 | 161 |
| 161 } // namespace test | 162 } // namespace test |
| 162 } // namespace tools | 163 } // namespace tools |
| 163 } // namespace net | 164 } // namespace net |
| 164 | 165 |
| 165 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 166 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
| OLD | NEW |