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

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

Issue 1411063004: Remove insecure QUIC support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: enough! Created 5 years, 1 month 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 // These tests only work with pacing enabled. 55 // These tests only work with pacing enabled.
56 saved_FLAGS_quic_disable_pacing_ = FLAGS_quic_disable_pacing; 56 saved_FLAGS_quic_disable_pacing_ = FLAGS_quic_disable_pacing;
57 FLAGS_quic_disable_pacing = false; 57 FLAGS_quic_disable_pacing = false;
58 58
59 QuicSentPacketManagerPeer::SetSendAlgorithm(&manager_, send_algorithm_); 59 QuicSentPacketManagerPeer::SetSendAlgorithm(&manager_, send_algorithm_);
60 // Disable tail loss probes for most tests. 60 // Disable tail loss probes for most tests.
61 QuicSentPacketManagerPeer::SetMaxTailLossProbes(&manager_, 0); 61 QuicSentPacketManagerPeer::SetMaxTailLossProbes(&manager_, 0);
62 // Advance the time 1s so the send times are never QuicTime::Zero. 62 // Advance the time 1s so the send times are never QuicTime::Zero.
(...skipping 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after
1662 1662
1663 EXPECT_CALL(*send_algorithm_, ResumeConnectionState(_, false)); 1663 EXPECT_CALL(*send_algorithm_, ResumeConnectionState(_, false));
1664 manager_.ResumeConnectionState(cached_network_params, false); 1664 manager_.ResumeConnectionState(cached_network_params, false);
1665 EXPECT_EQ(kRttMs * kNumMicrosPerMilli, 1665 EXPECT_EQ(kRttMs * kNumMicrosPerMilli,
1666 static_cast<uint64>(manager_.GetRttStats()->initial_rtt_us())); 1666 static_cast<uint64>(manager_.GetRttStats()->initial_rtt_us()));
1667 } 1667 }
1668 1668
1669 } // namespace 1669 } // namespace
1670 } // namespace test 1670 } // namespace test
1671 } // namespace net 1671 } // 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