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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 public: | 292 public: |
293 // Uses a MockHelper, ConnectionId of 42, and 127.0.0.1:123. | 293 // Uses a MockHelper, ConnectionId of 42, and 127.0.0.1:123. |
294 explicit MockConnection(Perspective perspective); | 294 explicit MockConnection(Perspective perspective); |
295 | 295 |
296 // Uses a MockHelper, ConnectionId of 42, and 127.0.0.1:123. | 296 // Uses a MockHelper, ConnectionId of 42, and 127.0.0.1:123. |
297 MockConnection(Perspective perspective, bool is_secure); | 297 MockConnection(Perspective perspective, bool is_secure); |
298 | 298 |
299 // Uses a MockHelper, ConnectionId of 42. | 299 // Uses a MockHelper, ConnectionId of 42. |
300 MockConnection(IPEndPoint address, Perspective perspective); | 300 MockConnection(IPEndPoint address, Perspective perspective); |
301 | 301 |
302 // Uses a MockHelper, and 127.0.0.1:123 | 302 // Uses a MockHelper, and 127.0.0.1:123. |
303 MockConnection(QuicConnectionId connection_id, Perspective perspective); | 303 MockConnection(QuicConnectionId connection_id, Perspective perspective); |
304 | 304 |
| 305 // Uses a MockHelper, and 127.0.0.1:123. |
| 306 MockConnection(QuicConnectionId connection_id, |
| 307 Perspective perspective, |
| 308 bool is_secure); |
| 309 |
305 // Uses a Mock helper, ConnectionId of 42, and 127.0.0.1:123. | 310 // Uses a Mock helper, ConnectionId of 42, and 127.0.0.1:123. |
306 MockConnection(Perspective perspective, | 311 MockConnection(Perspective perspective, |
307 const QuicVersionVector& supported_versions); | 312 const QuicVersionVector& supported_versions); |
308 | 313 |
309 ~MockConnection() override; | 314 ~MockConnection() override; |
310 | 315 |
311 // If the constructor that uses a MockHelper has been used then this method | 316 // If the constructor that uses a MockHelper has been used then this method |
312 // will advance the time of the MockClock. | 317 // will advance the time of the MockClock. |
313 void AdvanceTime(QuicTime::Delta delta); | 318 void AdvanceTime(QuicTime::Delta delta); |
314 | 319 |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 // clears the pointer to it to prevent use-after-free. | 616 // clears the pointer to it to prevent use-after-free. |
612 void Unregister(PerConnectionPacketWriter* writer); | 617 void Unregister(PerConnectionPacketWriter* writer); |
613 | 618 |
614 PerConnectionPacketWriter* current_writer_; | 619 PerConnectionPacketWriter* current_writer_; |
615 }; | 620 }; |
616 | 621 |
617 } // namespace test | 622 } // namespace test |
618 } // namespace net | 623 } // namespace net |
619 | 624 |
620 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 625 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
OLD | NEW |