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

Unified Diff: net/quic/core/quic_connection_test.cc

Issue 2881623002: Do not wrap a PCC sender with a PacingSender. (Closed)
Patch Set: Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/quic/core/quic_sent_packet_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_connection_test.cc
diff --git a/net/quic/core/quic_connection_test.cc b/net/quic/core/quic_connection_test.cc
index 3075a0a5b7cba2a267d973f9040efd0fee426ee1..1ac628591a3268083347e2b323d9b522966f666a 100644
--- a/net/quic/core/quic_connection_test.cc
+++ b/net/quic/core/quic_connection_test.cc
@@ -583,6 +583,7 @@ class TestConnection : public QuicConnection {
QuicTagVector connection_options;
connection_options.push_back(kMTUH);
config.SetConnectionOptionsToSend(connection_options);
+ EXPECT_CALL(*send_algorithm, GetCongestionControlType());
EXPECT_CALL(*send_algorithm, SetFromConfig(_, _));
SetFromConfig(config);
@@ -2695,6 +2696,7 @@ TEST_P(QuicConnectionTest, RetransmitPacketsWithInitialEncryption) {
TEST_P(QuicConnectionTest, BufferNonDecryptablePackets) {
// SetFromConfig is always called after construction from InitializeSession.
+ EXPECT_CALL(*send_algorithm_, GetCongestionControlType());
EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
QuicConfig config;
connection_.SetFromConfig(config);
@@ -2724,6 +2726,7 @@ TEST_P(QuicConnectionTest, BufferNonDecryptablePackets) {
TEST_P(QuicConnectionTest, Buffer100NonDecryptablePackets) {
// SetFromConfig is always called after construction from InitializeSession.
+ EXPECT_CALL(*send_algorithm_, GetCongestionControlType());
EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
QuicConfig config;
config.set_max_undecryptable_packets(100);
@@ -2862,6 +2865,7 @@ TEST_P(QuicConnectionTest, InitialTimeout) {
EXPECT_FALSE(connection_.GetTimeoutAlarm()->IsSet());
// SetFromConfig sets the initial timeouts before negotiation.
+ EXPECT_CALL(*send_algorithm_, GetCongestionControlType());
EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
QuicConfig config;
connection_.SetFromConfig(config);
@@ -3298,6 +3302,7 @@ TEST_P(QuicConnectionTest, NoMtuDiscoveryAfterConnectionClosed) {
TEST_P(QuicConnectionTest, TimeoutAfterSend) {
EXPECT_TRUE(connection_.connected());
+ EXPECT_CALL(*send_algorithm_, GetCongestionControlType());
EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
QuicConfig config;
connection_.SetFromConfig(config);
@@ -3344,6 +3349,7 @@ TEST_P(QuicConnectionTest, TimeoutAfterSend) {
TEST_P(QuicConnectionTest, TimeoutAfterRetransmission) {
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
EXPECT_TRUE(connection_.connected());
+ EXPECT_CALL(*send_algorithm_, GetCongestionControlType());
EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
QuicConfig config;
connection_.SetFromConfig(config);
@@ -3418,6 +3424,7 @@ TEST_P(QuicConnectionTest, NewTimeoutAfterSendSilentClose) {
// Same test as above, but complete a handshake which enables silent close,
// causing no connection close packet to be sent.
EXPECT_TRUE(connection_.connected());
+ EXPECT_CALL(*send_algorithm_, GetCongestionControlType());
EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
QuicConfig config;
@@ -3480,6 +3487,7 @@ TEST_P(QuicConnectionTest, NewTimeoutAfterSendSilentClose) {
TEST_P(QuicConnectionTest, TimeoutAfterReceive) {
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
EXPECT_TRUE(connection_.connected());
+ EXPECT_CALL(*send_algorithm_, GetCongestionControlType());
EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
QuicConfig config;
connection_.SetFromConfig(config);
@@ -3528,6 +3536,7 @@ TEST_P(QuicConnectionTest, TimeoutAfterReceive) {
TEST_P(QuicConnectionTest, TimeoutAfterReceiveNotSendWhenUnacked) {
EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
EXPECT_TRUE(connection_.connected());
+ EXPECT_CALL(*send_algorithm_, GetCongestionControlType());
EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
QuicConfig config;
connection_.SetFromConfig(config);
@@ -3587,6 +3596,7 @@ TEST_P(QuicConnectionTest, TimeoutAfterReceiveNotSendWhenUnacked) {
TEST_P(QuicConnectionTest, TimeoutAfter5ClientRTOs) {
connection_.SetMaxTailLossProbes(2);
EXPECT_TRUE(connection_.connected());
+ EXPECT_CALL(*send_algorithm_, GetCongestionControlType());
EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
QuicConfig config;
QuicTagVector connection_options;
@@ -3621,6 +3631,7 @@ TEST_P(QuicConnectionTest, TimeoutAfter3ClientRTOs) {
FLAGS_quic_reloadable_flag_quic_enable_3rtos = true;
connection_.SetMaxTailLossProbes(2);
EXPECT_TRUE(connection_.connected());
+ EXPECT_CALL(*send_algorithm_, GetCongestionControlType());
EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
QuicConfig config;
QuicTagVector connection_options;
@@ -3724,6 +3735,7 @@ TEST_P(QuicConnectionTest, LoopThroughSendingPackets) {
TEST_P(QuicConnectionTest, LoopThroughSendingPacketsWithTruncation) {
// Set up a larger payload than will fit in one packet.
const string payload(connection_.max_packet_length(), 'a');
+ EXPECT_CALL(*send_algorithm_, GetCongestionControlType()).Times(AnyNumber());
EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)).Times(AnyNumber());
// Now send some packets with no truncation.
« no previous file with comments | « no previous file | net/quic/core/quic_sent_packet_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698