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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 const IPEndPoint& peer_address, | 308 const IPEndPoint& peer_address, |
309 const QuicEncryptedPacket& packet) { | 309 const QuicEncryptedPacket& packet) { |
310 QuicConnection::ProcessUdpPacket(self_address, peer_address, packet); | 310 QuicConnection::ProcessUdpPacket(self_address, peer_address, packet); |
311 } | 311 } |
312 | 312 |
313 virtual bool OnProtocolVersionMismatch(QuicVersion version) OVERRIDE { | 313 virtual bool OnProtocolVersionMismatch(QuicVersion version) OVERRIDE { |
314 return false; | 314 return false; |
315 } | 315 } |
316 | 316 |
317 private: | 317 private: |
318 scoped_ptr<QuicPacketWriter> writer_; | |
319 scoped_ptr<QuicConnectionHelperInterface> helper_; | 318 scoped_ptr<QuicConnectionHelperInterface> helper_; |
320 | 319 |
321 DISALLOW_COPY_AND_ASSIGN(MockConnection); | 320 DISALLOW_COPY_AND_ASSIGN(MockConnection); |
322 }; | 321 }; |
323 | 322 |
324 class PacketSavingConnection : public MockConnection { | 323 class PacketSavingConnection : public MockConnection { |
325 public: | 324 public: |
326 explicit PacketSavingConnection(bool is_server); | 325 explicit PacketSavingConnection(bool is_server); |
327 | 326 |
328 PacketSavingConnection(bool is_server, | 327 PacketSavingConnection(bool is_server, |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 MOCK_METHOD1(OnCongestionWindowChange, void(QuicByteCount)); | 540 MOCK_METHOD1(OnCongestionWindowChange, void(QuicByteCount)); |
542 | 541 |
543 private: | 542 private: |
544 DISALLOW_COPY_AND_ASSIGN(MockNetworkChangeVisitor); | 543 DISALLOW_COPY_AND_ASSIGN(MockNetworkChangeVisitor); |
545 }; | 544 }; |
546 | 545 |
547 } // namespace test | 546 } // namespace test |
548 } // namespace net | 547 } // namespace net |
549 | 548 |
550 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 549 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
OLD | NEW |