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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 | 324 |
325 class PacketSavingConnection : public MockConnection { | 325 class PacketSavingConnection : public MockConnection { |
326 public: | 326 public: |
327 explicit PacketSavingConnection(bool is_server); | 327 explicit PacketSavingConnection(bool is_server); |
328 | 328 |
329 PacketSavingConnection(bool is_server, | 329 PacketSavingConnection(bool is_server, |
330 const QuicVersionVector& supported_versions); | 330 const QuicVersionVector& supported_versions); |
331 | 331 |
332 virtual ~PacketSavingConnection(); | 332 virtual ~PacketSavingConnection(); |
333 | 333 |
334 virtual void SendOrQueuePacket(EncryptionLevel level, | 334 virtual void SendOrQueuePacket(QueuedPacket packet) OVERRIDE; |
335 const SerializedPacket& packet, | |
336 TransmissionType transmission_type) OVERRIDE; | |
337 | 335 |
338 std::vector<QuicPacket*> packets_; | 336 std::vector<QuicPacket*> packets_; |
339 std::vector<QuicEncryptedPacket*> encrypted_packets_; | 337 std::vector<QuicEncryptedPacket*> encrypted_packets_; |
340 | 338 |
341 private: | 339 private: |
342 DISALLOW_COPY_AND_ASSIGN(PacketSavingConnection); | 340 DISALLOW_COPY_AND_ASSIGN(PacketSavingConnection); |
343 }; | 341 }; |
344 | 342 |
345 class MockSession : public QuicSession { | 343 class MockSession : public QuicSession { |
346 public: | 344 public: |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 // clears the pointer to it to prevent use-after-free. | 581 // clears the pointer to it to prevent use-after-free. |
584 void Unregister(PerConnectionPacketWriter* writer); | 582 void Unregister(PerConnectionPacketWriter* writer); |
585 | 583 |
586 PerConnectionPacketWriter* current_writer_; | 584 PerConnectionPacketWriter* current_writer_; |
587 }; | 585 }; |
588 | 586 |
589 } // namespace test | 587 } // namespace test |
590 } // namespace net | 588 } // namespace net |
591 | 589 |
592 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 590 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
OLD | NEW |