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

Side by Side Diff: net/quic/quic_sent_packet_manager_test.cc

Issue 400813002: Cleanup and adding GetCongestionControlType. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/quic_sent_packet_manager.h" 5 #include "net/quic/quic_sent_packet_manager.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "net/quic/quic_flags.h" 8 #include "net/quic/quic_flags.h"
9 #include "net/quic/test_tools/quic_config_peer.h" 9 #include "net/quic/test_tools/quic_config_peer.h"
10 #include "net/quic/test_tools/quic_sent_packet_manager_peer.h" 10 #include "net/quic/test_tools/quic_sent_packet_manager_peer.h"
(...skipping 26 matching lines...) Expand all
37 class MockDebugDelegate : public QuicSentPacketManager::DebugDelegate { 37 class MockDebugDelegate : public QuicSentPacketManager::DebugDelegate {
38 public: 38 public:
39 MOCK_METHOD2(OnSpuriousPacketRetransmition, 39 MOCK_METHOD2(OnSpuriousPacketRetransmition,
40 void(TransmissionType transmission_type, 40 void(TransmissionType transmission_type,
41 QuicByteCount byte_size)); 41 QuicByteCount byte_size));
42 }; 42 };
43 43
44 class QuicSentPacketManagerTest : public ::testing::TestWithParam<bool> { 44 class QuicSentPacketManagerTest : public ::testing::TestWithParam<bool> {
45 protected: 45 protected:
46 QuicSentPacketManagerTest() 46 QuicSentPacketManagerTest()
47 : manager_(true, &clock_, &stats_, kFixRate, kNack), 47 : manager_(true, &clock_, &stats_, kFixRateCongestionControl, kNack),
48 send_algorithm_(new StrictMock<MockSendAlgorithm>), 48 send_algorithm_(new StrictMock<MockSendAlgorithm>),
49 network_change_visitor_(new StrictMock<MockNetworkChangeVisitor>) { 49 network_change_visitor_(new StrictMock<MockNetworkChangeVisitor>) {
50 QuicSentPacketManagerPeer::SetSendAlgorithm(&manager_, send_algorithm_); 50 QuicSentPacketManagerPeer::SetSendAlgorithm(&manager_, send_algorithm_);
51 // Disable tail loss probes for most tests. 51 // Disable tail loss probes for most tests.
52 QuicSentPacketManagerPeer::SetMaxTailLossProbes(&manager_, 0); 52 QuicSentPacketManagerPeer::SetMaxTailLossProbes(&manager_, 0);
53 // Advance the time 1s so the send times are never QuicTime::Zero. 53 // Advance the time 1s so the send times are never QuicTime::Zero.
54 clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(1000)); 54 clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(1000));
55 manager_.set_network_change_visitor(network_change_visitor_.get()); 55 manager_.set_network_change_visitor(network_change_visitor_.get());
56 } 56 }
57 57
(...skipping 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after
1405 .WillOnce(Return(100 * kDefaultTCPMSS)); 1405 .WillOnce(Return(100 * kDefaultTCPMSS));
1406 EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)); 1406 EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
1407 manager_.SetFromConfig(config); 1407 manager_.SetFromConfig(config);
1408 1408
1409 EXPECT_TRUE(manager_.using_pacing()); 1409 EXPECT_TRUE(manager_.using_pacing());
1410 } 1410 }
1411 1411
1412 } // namespace 1412 } // namespace
1413 } // namespace test 1413 } // namespace test
1414 } // namespace net 1414 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_sent_packet_manager.cc ('k') | net/quic/test_tools/quic_sent_packet_manager_peer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698