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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 private: | 433 private: |
434 DISALLOW_COPY_AND_ASSIGN(MockPacketWriter); | 434 DISALLOW_COPY_AND_ASSIGN(MockPacketWriter); |
435 }; | 435 }; |
436 | 436 |
437 class MockSendAlgorithm : public SendAlgorithmInterface { | 437 class MockSendAlgorithm : public SendAlgorithmInterface { |
438 public: | 438 public: |
439 MockSendAlgorithm(); | 439 MockSendAlgorithm(); |
440 virtual ~MockSendAlgorithm(); | 440 virtual ~MockSendAlgorithm(); |
441 | 441 |
442 MOCK_METHOD2(SetFromConfig, void(const QuicConfig& config, bool is_server)); | 442 MOCK_METHOD2(SetFromConfig, void(const QuicConfig& config, bool is_server)); |
| 443 MOCK_METHOD1(SetNumEmulatedConnections, void(int num_connections)); |
443 MOCK_METHOD1(SetMaxPacketSize, void(QuicByteCount max_packet_size)); | 444 MOCK_METHOD1(SetMaxPacketSize, void(QuicByteCount max_packet_size)); |
444 MOCK_METHOD2(OnIncomingQuicCongestionFeedbackFrame, | 445 MOCK_METHOD2(OnIncomingQuicCongestionFeedbackFrame, |
445 void(const QuicCongestionFeedbackFrame&, | 446 void(const QuicCongestionFeedbackFrame&, |
446 QuicTime feedback_receive_time)); | 447 QuicTime feedback_receive_time)); |
447 MOCK_METHOD4(OnCongestionEvent, void(bool rtt_updated, | 448 MOCK_METHOD4(OnCongestionEvent, void(bool rtt_updated, |
448 QuicByteCount bytes_in_flight, | 449 QuicByteCount bytes_in_flight, |
449 const CongestionVector& acked_packets, | 450 const CongestionVector& acked_packets, |
450 const CongestionVector& lost_packets)); | 451 const CongestionVector& lost_packets)); |
451 MOCK_METHOD5(OnPacketSent, | 452 MOCK_METHOD5(OnPacketSent, |
452 bool(QuicTime, QuicByteCount, QuicPacketSequenceNumber, | 453 bool(QuicTime, QuicByteCount, QuicPacketSequenceNumber, |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 // clears the pointer to it to prevent use-after-free. | 582 // clears the pointer to it to prevent use-after-free. |
582 void Unregister(PerConnectionPacketWriter* writer); | 583 void Unregister(PerConnectionPacketWriter* writer); |
583 | 584 |
584 PerConnectionPacketWriter* current_writer_; | 585 PerConnectionPacketWriter* current_writer_; |
585 }; | 586 }; |
586 | 587 |
587 } // namespace test | 588 } // namespace test |
588 } // namespace net | 589 } // namespace net |
589 | 590 |
590 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 591 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
OLD | NEW |