| 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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 private: | 531 private: |
| 532 DISALLOW_COPY_AND_ASSIGN(MockAckNotifierDelegate); | 532 DISALLOW_COPY_AND_ASSIGN(MockAckNotifierDelegate); |
| 533 }; | 533 }; |
| 534 | 534 |
| 535 class MockNetworkChangeVisitor : | 535 class MockNetworkChangeVisitor : |
| 536 public QuicSentPacketManager::NetworkChangeVisitor { | 536 public QuicSentPacketManager::NetworkChangeVisitor { |
| 537 public: | 537 public: |
| 538 MockNetworkChangeVisitor(); | 538 MockNetworkChangeVisitor(); |
| 539 virtual ~MockNetworkChangeVisitor(); | 539 virtual ~MockNetworkChangeVisitor(); |
| 540 | 540 |
| 541 MOCK_METHOD1(OnCongestionWindowChange, void(QuicByteCount)); | 541 MOCK_METHOD0(OnCongestionWindowChange, void()); |
| 542 | 542 |
| 543 private: | 543 private: |
| 544 DISALLOW_COPY_AND_ASSIGN(MockNetworkChangeVisitor); | 544 DISALLOW_COPY_AND_ASSIGN(MockNetworkChangeVisitor); |
| 545 }; | 545 }; |
| 546 | 546 |
| 547 // Creates per-connection packet writers that register themselves with the | 547 // Creates per-connection packet writers that register themselves with the |
| 548 // TestWriterFactory on each write so that TestWriterFactory::OnPacketSent can | 548 // TestWriterFactory on each write so that TestWriterFactory::OnPacketSent can |
| 549 // be routed to the appropriate QuicConnection. | 549 // be routed to the appropriate QuicConnection. |
| 550 class TestWriterFactory : public QuicDispatcher::PacketWriterFactory { | 550 class TestWriterFactory : public QuicDispatcher::PacketWriterFactory { |
| 551 public: | 551 public: |
| (...skipping 28 matching lines...) Expand all Loading... |
| 580 // clears the pointer to it to prevent use-after-free. | 580 // clears the pointer to it to prevent use-after-free. |
| 581 void Unregister(PerConnectionPacketWriter* writer); | 581 void Unregister(PerConnectionPacketWriter* writer); |
| 582 | 582 |
| 583 PerConnectionPacketWriter* current_writer_; | 583 PerConnectionPacketWriter* current_writer_; |
| 584 }; | 584 }; |
| 585 | 585 |
| 586 } // namespace test | 586 } // namespace test |
| 587 } // namespace net | 587 } // namespace net |
| 588 | 588 |
| 589 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 589 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
| OLD | NEW |