Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(306)

Side by Side Diff: net/quic/test_tools/quic_test_utils.h

Issue 1023203004: Limit QUIC's send algorithm max CWND by the peer's receive buffer and (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Improve_tests_88744988
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/quic_sent_packet_manager_test.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 class MockSendAlgorithm : public SendAlgorithmInterface { 470 class MockSendAlgorithm : public SendAlgorithmInterface {
471 public: 471 public:
472 MockSendAlgorithm(); 472 MockSendAlgorithm();
473 ~MockSendAlgorithm() override; 473 ~MockSendAlgorithm() override;
474 474
475 MOCK_METHOD3(SetFromConfig, 475 MOCK_METHOD3(SetFromConfig,
476 void(const QuicConfig& config, 476 void(const QuicConfig& config,
477 Perspective perspective, 477 Perspective perspective,
478 bool using_pacing)); 478 bool using_pacing));
479 MOCK_METHOD1(SetNumEmulatedConnections, void(int num_connections)); 479 MOCK_METHOD1(SetNumEmulatedConnections, void(int num_connections));
480 MOCK_METHOD1(SetMaxPacketSize, void(QuicByteCount max_packet_size)); 480 MOCK_METHOD1(SetMaxCongestionWindow,
481 void(QuicByteCount max_congestion_window));
481 MOCK_METHOD4(OnCongestionEvent, void(bool rtt_updated, 482 MOCK_METHOD4(OnCongestionEvent, void(bool rtt_updated,
482 QuicByteCount bytes_in_flight, 483 QuicByteCount bytes_in_flight,
483 const CongestionVector& acked_packets, 484 const CongestionVector& acked_packets,
484 const CongestionVector& lost_packets)); 485 const CongestionVector& lost_packets));
485 MOCK_METHOD5(OnPacketSent, 486 MOCK_METHOD5(OnPacketSent,
486 bool(QuicTime, QuicByteCount, QuicPacketSequenceNumber, 487 bool(QuicTime, QuicByteCount, QuicPacketSequenceNumber,
487 QuicByteCount, HasRetransmittableData)); 488 QuicByteCount, HasRetransmittableData));
488 MOCK_METHOD1(OnRetransmissionTimeout, void(bool)); 489 MOCK_METHOD1(OnRetransmissionTimeout, void(bool));
489 MOCK_METHOD0(RevertRetransmissionTimeout, void()); 490 MOCK_METHOD0(RevertRetransmissionTimeout, void());
490 MOCK_CONST_METHOD3(TimeUntilSend, 491 MOCK_CONST_METHOD3(TimeUntilSend,
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 // clears the pointer to it to prevent use-after-free. 617 // clears the pointer to it to prevent use-after-free.
617 void Unregister(PerConnectionPacketWriter* writer); 618 void Unregister(PerConnectionPacketWriter* writer);
618 619
619 PerConnectionPacketWriter* current_writer_; 620 PerConnectionPacketWriter* current_writer_;
620 }; 621 };
621 622
622 } // namespace test 623 } // namespace test
623 } // namespace net 624 } // namespace net
624 625
625 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 626 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « net/quic/quic_sent_packet_manager_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698