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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 QuicPacketEntropyHash(QuicPacketSequenceNumber sequence_number)); | 532 QuicPacketEntropyHash(QuicPacketSequenceNumber sequence_number)); |
533 | 533 |
534 private: | 534 private: |
535 DISALLOW_COPY_AND_ASSIGN(MockEntropyCalculator); | 535 DISALLOW_COPY_AND_ASSIGN(MockEntropyCalculator); |
536 }; | 536 }; |
537 | 537 |
538 class MockAckNotifierDelegate : public QuicAckNotifier::DelegateInterface { | 538 class MockAckNotifierDelegate : public QuicAckNotifier::DelegateInterface { |
539 public: | 539 public: |
540 MockAckNotifierDelegate(); | 540 MockAckNotifierDelegate(); |
541 | 541 |
542 MOCK_METHOD5(OnAckNotification, void(int num_original_packets, | 542 MOCK_METHOD3(OnAckNotification, |
543 int num_original_bytes, | 543 void(int num_retransmitted_packets, |
544 int num_retransmitted_packets, | 544 int num_retransmitted_bytes, |
545 int num_retransmitted_bytes, | 545 QuicTime::Delta delta_largest_observed)); |
546 QuicTime::Delta delta_largest_observed)); | |
547 | 546 |
548 protected: | 547 protected: |
549 // Object is ref counted. | 548 // Object is ref counted. |
550 ~MockAckNotifierDelegate() override; | 549 ~MockAckNotifierDelegate() override; |
551 | 550 |
552 private: | 551 private: |
553 DISALLOW_COPY_AND_ASSIGN(MockAckNotifierDelegate); | 552 DISALLOW_COPY_AND_ASSIGN(MockAckNotifierDelegate); |
554 }; | 553 }; |
555 | 554 |
556 class MockNetworkChangeVisitor : | 555 class MockNetworkChangeVisitor : |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 // clears the pointer to it to prevent use-after-free. | 601 // clears the pointer to it to prevent use-after-free. |
603 void Unregister(PerConnectionPacketWriter* writer); | 602 void Unregister(PerConnectionPacketWriter* writer); |
604 | 603 |
605 PerConnectionPacketWriter* current_writer_; | 604 PerConnectionPacketWriter* current_writer_; |
606 }; | 605 }; |
607 | 606 |
608 } // namespace test | 607 } // namespace test |
609 } // namespace net | 608 } // namespace net |
610 | 609 |
611 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 610 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
OLD | NEW |