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 <stddef.h> | 10 #include <stddef.h> |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 class PacketSavingConnection : public MockConnection { | 424 class PacketSavingConnection : public MockConnection { |
425 public: | 425 public: |
426 PacketSavingConnection(MockConnectionHelper* helper, Perspective perspective); | 426 PacketSavingConnection(MockConnectionHelper* helper, Perspective perspective); |
427 | 427 |
428 PacketSavingConnection(MockConnectionHelper* helper, | 428 PacketSavingConnection(MockConnectionHelper* helper, |
429 Perspective perspective, | 429 Perspective perspective, |
430 const QuicVersionVector& supported_versions); | 430 const QuicVersionVector& supported_versions); |
431 | 431 |
432 ~PacketSavingConnection() override; | 432 ~PacketSavingConnection() override; |
433 | 433 |
434 void SendOrQueuePacket(QueuedPacket packet) override; | 434 void SendOrQueuePacket(SerializedPacket* packet) override; |
435 | 435 |
436 std::vector<QuicEncryptedPacket*> encrypted_packets_; | 436 std::vector<QuicEncryptedPacket*> encrypted_packets_; |
437 | 437 |
438 private: | 438 private: |
439 DISALLOW_COPY_AND_ASSIGN(PacketSavingConnection); | 439 DISALLOW_COPY_AND_ASSIGN(PacketSavingConnection); |
440 }; | 440 }; |
441 | 441 |
442 class MockQuicSpdySession : public QuicSpdySession { | 442 class MockQuicSpdySession : public QuicSpdySession { |
443 public: | 443 public: |
444 explicit MockQuicSpdySession(QuicConnection* connection); | 444 explicit MockQuicSpdySession(QuicConnection* connection); |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 TestQuicSpdyServerSession** server_session); | 839 TestQuicSpdyServerSession** server_session); |
840 | 840 |
841 // Helper to generate client side stream ids, generalizes | 841 // Helper to generate client side stream ids, generalizes |
842 // kClientDataStreamId1 etc. above. | 842 // kClientDataStreamId1 etc. above. |
843 QuicStreamId QuicClientDataStreamId(int i); | 843 QuicStreamId QuicClientDataStreamId(int i); |
844 | 844 |
845 } // namespace test | 845 } // namespace test |
846 } // namespace net | 846 } // namespace net |
847 | 847 |
848 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 848 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
OLD | NEW |