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 "net/quic/congestion_control/quic_send_scheduler.h" | 10 #include "net/quic/congestion_control/quic_send_scheduler.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 const char* expected, | 25 const char* expected, |
26 const int expected_len); | 26 const int expected_len); |
27 | 27 |
28 void CompareQuicDataWithHexError(const std::string& description, | 28 void CompareQuicDataWithHexError(const std::string& description, |
29 QuicData* actual, | 29 QuicData* actual, |
30 QuicData* expected); | 30 QuicData* expected); |
31 | 31 |
32 // Constructs a basic crypto handshake message | 32 // Constructs a basic crypto handshake message |
33 QuicPacket* ConstructHandshakePacket(QuicGuid guid, CryptoTag tag); | 33 QuicPacket* ConstructHandshakePacket(QuicGuid guid, CryptoTag tag); |
34 | 34 |
| 35 // Constructs a ClientHello crypto handshake message |
| 36 QuicPacket* ConstructClientHelloPacket(QuicGuid guid, |
| 37 QuicClock* clock, |
| 38 QuicRandom* random_generator); |
| 39 |
35 class MockFramerVisitor : public QuicFramerVisitorInterface { | 40 class MockFramerVisitor : public QuicFramerVisitorInterface { |
36 public: | 41 public: |
37 MockFramerVisitor(); | 42 MockFramerVisitor(); |
38 ~MockFramerVisitor(); | 43 ~MockFramerVisitor(); |
39 | 44 |
40 MOCK_METHOD1(OnError, void(QuicFramer* framer)); | 45 MOCK_METHOD1(OnError, void(QuicFramer* framer)); |
41 MOCK_METHOD2(OnPacket, void(const IPEndPoint& self_address, | 46 MOCK_METHOD2(OnPacket, void(const IPEndPoint& self_address, |
42 const IPEndPoint& peer_address)); | 47 const IPEndPoint& peer_address)); |
43 MOCK_METHOD0(OnRevivedPacket, void()); | 48 MOCK_METHOD0(OnRevivedPacket, void()); |
44 // The constructor set this up to return true by default. | 49 // The constructor set this up to return true by default. |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 223 |
219 private: | 224 private: |
220 DISALLOW_COPY_AND_ASSIGN(MockScheduler); | 225 DISALLOW_COPY_AND_ASSIGN(MockScheduler); |
221 }; | 226 }; |
222 | 227 |
223 } // namespace test | 228 } // namespace test |
224 | 229 |
225 } // namespace net | 230 } // namespace net |
226 | 231 |
227 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 232 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
OLD | NEW |