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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 DISALLOW_COPY_AND_ASSIGN(MockAckNotifierDelegate); | 553 DISALLOW_COPY_AND_ASSIGN(MockAckNotifierDelegate); |
554 }; | 554 }; |
555 | 555 |
556 class MockNetworkChangeVisitor : | 556 class MockNetworkChangeVisitor : |
557 public QuicSentPacketManager::NetworkChangeVisitor { | 557 public QuicSentPacketManager::NetworkChangeVisitor { |
558 public: | 558 public: |
559 MockNetworkChangeVisitor(); | 559 MockNetworkChangeVisitor(); |
560 ~MockNetworkChangeVisitor() override; | 560 ~MockNetworkChangeVisitor() override; |
561 | 561 |
562 MOCK_METHOD0(OnCongestionWindowChange, void()); | 562 MOCK_METHOD0(OnCongestionWindowChange, void()); |
| 563 MOCK_METHOD0(OnRttChange, void()); |
563 | 564 |
564 private: | 565 private: |
565 DISALLOW_COPY_AND_ASSIGN(MockNetworkChangeVisitor); | 566 DISALLOW_COPY_AND_ASSIGN(MockNetworkChangeVisitor); |
566 }; | 567 }; |
567 | 568 |
568 // Creates per-connection packet writers that register themselves with the | 569 // Creates per-connection packet writers that register themselves with the |
569 // TestWriterFactory on each write so that TestWriterFactory::OnPacketSent can | 570 // TestWriterFactory on each write so that TestWriterFactory::OnPacketSent can |
570 // be routed to the appropriate QuicConnection. | 571 // be routed to the appropriate QuicConnection. |
571 class TestWriterFactory : public QuicDispatcher::PacketWriterFactory { | 572 class TestWriterFactory : public QuicDispatcher::PacketWriterFactory { |
572 public: | 573 public: |
(...skipping 28 matching lines...) Expand all Loading... |
601 // clears the pointer to it to prevent use-after-free. | 602 // clears the pointer to it to prevent use-after-free. |
602 void Unregister(PerConnectionPacketWriter* writer); | 603 void Unregister(PerConnectionPacketWriter* writer); |
603 | 604 |
604 PerConnectionPacketWriter* current_writer_; | 605 PerConnectionPacketWriter* current_writer_; |
605 }; | 606 }; |
606 | 607 |
607 } // namespace test | 608 } // namespace test |
608 } // namespace net | 609 } // namespace net |
609 | 610 |
610 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 611 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
OLD | NEW |