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

Side by Side Diff: net/quic/congestion_control/pacing_sender_test.cc

Issue 2132623002: Landing Recent QUIC changes until 2016-07-02 02:45 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing comment about RPCs Created 4 years, 5 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/congestion_control/pacing_sender.cc ('k') | net/quic/congestion_control/rtt_stats.h » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "net/quic/congestion_control/pacing_sender.h" 5 #include "net/quic/congestion_control/pacing_sender.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "net/quic/quic_protocol.h" 10 #include "net/quic/quic_protocol.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 QuicConfig config; 347 QuicConfig config;
348 pacing_sender_->SetFromConfig(config, Perspective::IS_SERVER); 348 pacing_sender_->SetFromConfig(config, Perspective::IS_SERVER);
349 349
350 EXPECT_CALL(*mock_sender_, ResumeConnectionState(_, true)); 350 EXPECT_CALL(*mock_sender_, ResumeConnectionState(_, true));
351 CachedNetworkParameters cached_network_params; 351 CachedNetworkParameters cached_network_params;
352 pacing_sender_->ResumeConnectionState(cached_network_params, true); 352 pacing_sender_->ResumeConnectionState(cached_network_params, true);
353 353
354 EXPECT_CALL(*mock_sender_, SetNumEmulatedConnections(2)); 354 EXPECT_CALL(*mock_sender_, SetNumEmulatedConnections(2));
355 pacing_sender_->SetNumEmulatedConnections(2); 355 pacing_sender_->SetNumEmulatedConnections(2);
356 356
357 EXPECT_CALL(*mock_sender_, SetMaxCongestionWindow(kBytes));
358 pacing_sender_->SetMaxCongestionWindow(kBytes);
359
360 SendAlgorithmInterface::CongestionVector packets; 357 SendAlgorithmInterface::CongestionVector packets;
361 EXPECT_CALL(*mock_sender_, OnCongestionEvent(true, kBytes, packets, packets)); 358 EXPECT_CALL(*mock_sender_, OnCongestionEvent(true, kBytes, packets, packets));
362 pacing_sender_->OnCongestionEvent(true, kBytes, packets, packets); 359 pacing_sender_->OnCongestionEvent(true, kBytes, packets, packets);
363 360
364 EXPECT_CALL(*mock_sender_, OnPacketSent(kTime, kBytes, 123u, kBytes, 361 EXPECT_CALL(*mock_sender_, OnPacketSent(kTime, kBytes, 123u, kBytes,
365 HAS_RETRANSMITTABLE_DATA)); 362 HAS_RETRANSMITTABLE_DATA));
366 EXPECT_CALL(*mock_sender_, PacingRate(_)).WillOnce(Return(kBandwidth)); 363 EXPECT_CALL(*mock_sender_, PacingRate(_)).WillOnce(Return(kBandwidth));
367 pacing_sender_->OnPacketSent(kTime, kBytes, 123u, kBytes, 364 pacing_sender_->OnPacketSent(kTime, kBytes, 123u, kBytes,
368 HAS_RETRANSMITTABLE_DATA); 365 HAS_RETRANSMITTABLE_DATA);
369 366
(...skipping 29 matching lines...) Expand all
399 EXPECT_CALL(*mock_sender_, GetSlowStartThreshold()).WillOnce(Return(kBytes)); 396 EXPECT_CALL(*mock_sender_, GetSlowStartThreshold()).WillOnce(Return(kBytes));
400 EXPECT_EQ(kBytes, pacing_sender_->GetSlowStartThreshold()); 397 EXPECT_EQ(kBytes, pacing_sender_->GetSlowStartThreshold());
401 398
402 EXPECT_CALL(*mock_sender_, GetCongestionControlType()) 399 EXPECT_CALL(*mock_sender_, GetCongestionControlType())
403 .WillOnce(Return(kReno)); 400 .WillOnce(Return(kReno));
404 EXPECT_EQ(kReno, pacing_sender_->GetCongestionControlType()); 401 EXPECT_EQ(kReno, pacing_sender_->GetCongestionControlType());
405 } 402 }
406 403
407 } // namespace test 404 } // namespace test
408 } // namespace net 405 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/pacing_sender.cc ('k') | net/quic/congestion_control/rtt_stats.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698