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

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

Issue 1397983007: relnote: remove insecure QUIC support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rch_insecure_quic
Patch Set: Compile fix Created 5 years, 2 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.cc ('k') | net/quic/quic_server_id.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 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 class MockDebugDelegate : public QuicSentPacketManager::DebugDelegate { 42 class MockDebugDelegate : public QuicSentPacketManager::DebugDelegate {
43 public: 43 public:
44 MOCK_METHOD2(OnSpuriousPacketRetransmission, 44 MOCK_METHOD2(OnSpuriousPacketRetransmission,
45 void(TransmissionType transmission_type, 45 void(TransmissionType transmission_type,
46 QuicByteCount byte_size)); 46 QuicByteCount byte_size));
47 }; 47 };
48 48
49 class QuicSentPacketManagerTest : public ::testing::TestWithParam<bool> { 49 class QuicSentPacketManagerTest : public ::testing::TestWithParam<bool> {
50 protected: 50 protected:
51 QuicSentPacketManagerTest() 51 QuicSentPacketManagerTest()
52 : manager_(Perspective::IS_SERVER, &clock_, &stats_, kCubic, kNack, true), 52 : manager_(Perspective::IS_SERVER, &clock_, &stats_, kCubic, kNack),
53 send_algorithm_(new StrictMock<MockSendAlgorithm>), 53 send_algorithm_(new StrictMock<MockSendAlgorithm>),
54 network_change_visitor_(new StrictMock<MockNetworkChangeVisitor>) { 54 network_change_visitor_(new StrictMock<MockNetworkChangeVisitor>) {
55 QuicSentPacketManagerPeer::SetSendAlgorithm(&manager_, send_algorithm_); 55 QuicSentPacketManagerPeer::SetSendAlgorithm(&manager_, send_algorithm_);
56 // Disable tail loss probes for most tests. 56 // Disable tail loss probes for most tests.
57 QuicSentPacketManagerPeer::SetMaxTailLossProbes(&manager_, 0); 57 QuicSentPacketManagerPeer::SetMaxTailLossProbes(&manager_, 0);
58 // Advance the time 1s so the send times are never QuicTime::Zero. 58 // Advance the time 1s so the send times are never QuicTime::Zero.
59 clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(1000)); 59 clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(1000));
60 manager_.set_network_change_visitor(network_change_visitor_.get()); 60 manager_.set_network_change_visitor(network_change_visitor_.get());
61 61
62 EXPECT_CALL(*send_algorithm_, HasReliableBandwidthEstimate()) 62 EXPECT_CALL(*send_algorithm_, HasReliableBandwidthEstimate())
(...skipping 1617 matching lines...) Expand 10 before | Expand all | Expand 10 after
1680 1680
1681 EXPECT_CALL(*send_algorithm_, ResumeConnectionState(_, false)); 1681 EXPECT_CALL(*send_algorithm_, ResumeConnectionState(_, false));
1682 manager_.ResumeConnectionState(cached_network_params, false); 1682 manager_.ResumeConnectionState(cached_network_params, false);
1683 EXPECT_EQ(kRttMs * kNumMicrosPerMilli, 1683 EXPECT_EQ(kRttMs * kNumMicrosPerMilli,
1684 static_cast<uint64>(manager_.GetRttStats()->initial_rtt_us())); 1684 static_cast<uint64>(manager_.GetRttStats()->initial_rtt_us()));
1685 } 1685 }
1686 1686
1687 } // namespace 1687 } // namespace
1688 } // namespace test 1688 } // namespace test
1689 } // namespace net 1689 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_sent_packet_manager.cc ('k') | net/quic/quic_server_id.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698