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

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

Issue 1037633002: Add a QUIC connection option(BWMX) to resume to the max bandwidth (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Populate_RTT_info_89043159
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_server_session.cc ('k') | net/tools/quic/quic_server_session.cc » ('j') | 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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 MOCK_METHOD3(SendGoAway, 331 MOCK_METHOD3(SendGoAway,
332 void(QuicErrorCode error, 332 void(QuicErrorCode error,
333 QuicStreamId last_good_stream_id, 333 QuicStreamId last_good_stream_id,
334 const std::string& reason)); 334 const std::string& reason));
335 MOCK_METHOD1(SendBlocked, void(QuicStreamId id)); 335 MOCK_METHOD1(SendBlocked, void(QuicStreamId id));
336 MOCK_METHOD2(SendWindowUpdate, void(QuicStreamId id, 336 MOCK_METHOD2(SendWindowUpdate, void(QuicStreamId id,
337 QuicStreamOffset byte_offset)); 337 QuicStreamOffset byte_offset));
338 MOCK_METHOD0(OnCanWrite, void()); 338 MOCK_METHOD0(OnCanWrite, void());
339 339
340 MOCK_METHOD1(OnSendConnectionState, void(const CachedNetworkParameters&)); 340 MOCK_METHOD1(OnSendConnectionState, void(const CachedNetworkParameters&));
341 MOCK_METHOD1(ResumeConnectionState, bool(const CachedNetworkParameters&)); 341 MOCK_METHOD2(ResumeConnectionState,
342 bool(const CachedNetworkParameters&, bool));
342 343
343 void ReallyProcessUdpPacket(const IPEndPoint& self_address, 344 void ReallyProcessUdpPacket(const IPEndPoint& self_address,
344 const IPEndPoint& peer_address, 345 const IPEndPoint& peer_address,
345 const QuicEncryptedPacket& packet) { 346 const QuicEncryptedPacket& packet) {
346 QuicConnection::ProcessUdpPacket(self_address, peer_address, packet); 347 QuicConnection::ProcessUdpPacket(self_address, peer_address, packet);
347 } 348 }
348 349
349 bool OnProtocolVersionMismatch(QuicVersion version) override { 350 bool OnProtocolVersionMismatch(QuicVersion version) override {
350 return false; 351 return false;
351 } 352 }
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 MOCK_CONST_METHOD0(PacingRate, QuicBandwidth(void)); 496 MOCK_CONST_METHOD0(PacingRate, QuicBandwidth(void));
496 MOCK_CONST_METHOD0(BandwidthEstimate, QuicBandwidth(void)); 497 MOCK_CONST_METHOD0(BandwidthEstimate, QuicBandwidth(void));
497 MOCK_CONST_METHOD0(HasReliableBandwidthEstimate, bool()); 498 MOCK_CONST_METHOD0(HasReliableBandwidthEstimate, bool());
498 MOCK_METHOD1(OnRttUpdated, void(QuicPacketSequenceNumber)); 499 MOCK_METHOD1(OnRttUpdated, void(QuicPacketSequenceNumber));
499 MOCK_CONST_METHOD0(RetransmissionDelay, QuicTime::Delta(void)); 500 MOCK_CONST_METHOD0(RetransmissionDelay, QuicTime::Delta(void));
500 MOCK_CONST_METHOD0(GetCongestionWindow, QuicByteCount()); 501 MOCK_CONST_METHOD0(GetCongestionWindow, QuicByteCount());
501 MOCK_CONST_METHOD0(InSlowStart, bool()); 502 MOCK_CONST_METHOD0(InSlowStart, bool());
502 MOCK_CONST_METHOD0(InRecovery, bool()); 503 MOCK_CONST_METHOD0(InRecovery, bool());
503 MOCK_CONST_METHOD0(GetSlowStartThreshold, QuicByteCount()); 504 MOCK_CONST_METHOD0(GetSlowStartThreshold, QuicByteCount());
504 MOCK_CONST_METHOD0(GetCongestionControlType, CongestionControlType()); 505 MOCK_CONST_METHOD0(GetCongestionControlType, CongestionControlType());
505 MOCK_METHOD1(ResumeConnectionState, bool(const CachedNetworkParameters&)); 506 MOCK_METHOD2(ResumeConnectionState,
507 bool(const CachedNetworkParameters&, bool));
506 508
507 private: 509 private:
508 DISALLOW_COPY_AND_ASSIGN(MockSendAlgorithm); 510 DISALLOW_COPY_AND_ASSIGN(MockSendAlgorithm);
509 }; 511 };
510 512
511 class MockLossAlgorithm : public LossDetectionInterface { 513 class MockLossAlgorithm : public LossDetectionInterface {
512 public: 514 public:
513 MockLossAlgorithm(); 515 MockLossAlgorithm();
514 ~MockLossAlgorithm() override; 516 ~MockLossAlgorithm() override;
515 517
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 // clears the pointer to it to prevent use-after-free. 619 // clears the pointer to it to prevent use-after-free.
618 void Unregister(PerConnectionPacketWriter* writer); 620 void Unregister(PerConnectionPacketWriter* writer);
619 621
620 PerConnectionPacketWriter* current_writer_; 622 PerConnectionPacketWriter* current_writer_;
621 }; 623 };
622 624
623 } // namespace test 625 } // namespace test
624 } // namespace net 626 } // namespace net
625 627
626 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 628 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « net/quic/quic_server_session.cc ('k') | net/tools/quic/quic_server_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698