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

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

Issue 2236973002: Landing Recent QUIC changes until 4AM, Aug 7, 2016 UTC-4 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: flip quic_sequencer_buffer_retire_block_in_time to true Created 4 years, 4 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 | « net/quic/core/quic_sent_packet_manager_interface.h ('k') | net/quic/core/quic_server_session_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_sent_packet_manager_test.cc
diff --git a/net/quic/core/quic_sent_packet_manager_test.cc b/net/quic/core/quic_sent_packet_manager_test.cc
index 3e7c4502a68692e4bf1596d708c0d1c03e42caec..f335dab83ec6c463d65d11f4b6748cddb8dbda9c 100644
--- a/net/quic/core/quic_sent_packet_manager_test.cc
+++ b/net/quic/core/quic_sent_packet_manager_test.cc
@@ -5,7 +5,7 @@
#include "net/quic/core/quic_sent_packet_manager.h"
#include <memory>
-
+#include "base/memory/ptr_util.h"
#include "base/stl_util.h"
#include "net/quic/core/quic_flags.h"
#include "net/quic/test_tools/quic_config_peer.h"
@@ -534,8 +534,8 @@ TEST_P(QuicSentPacketManagerTest, RetransmitTwiceThenAckFirst) {
}
TEST_P(QuicSentPacketManagerTest, AckOriginalTransmission) {
- MockLossAlgorithm* loss_algorithm = new MockLossAlgorithm();
- QuicSentPacketManagerPeer::SetLossAlgorithm(&manager_, loss_algorithm);
+ auto loss_algorithm = base::MakeUnique<MockLossAlgorithm>();
+ QuicSentPacketManagerPeer::SetLossAlgorithm(&manager_, loss_algorithm.get());
SendDataPacket(1);
RetransmitAndSendPacket(1, 2);
@@ -1346,8 +1346,8 @@ TEST_P(QuicSentPacketManagerTest, GetTransmissionDelay) {
}
TEST_P(QuicSentPacketManagerTest, GetLossDelay) {
- MockLossAlgorithm* loss_algorithm = new MockLossAlgorithm();
- QuicSentPacketManagerPeer::SetLossAlgorithm(&manager_, loss_algorithm);
+ auto loss_algorithm = base::MakeUnique<MockLossAlgorithm>();
+ QuicSentPacketManagerPeer::SetLossAlgorithm(&manager_, loss_algorithm.get());
EXPECT_CALL(*loss_algorithm, GetLossTimeout())
.WillRepeatedly(Return(QuicTime::Zero()));
@@ -1570,8 +1570,8 @@ TEST_P(QuicSentPacketManagerTest, NegotiateUndoFromOptionsAtServer) {
for (size_t i = 1; i <= kNumSentPackets; ++i) {
SendDataPacket(i);
}
- MockLossAlgorithm* loss_algorithm = new MockLossAlgorithm();
- QuicSentPacketManagerPeer::SetLossAlgorithm(&manager_, loss_algorithm);
+ auto loss_algorithm = base::MakeUnique<MockLossAlgorithm>();
+ QuicSentPacketManagerPeer::SetLossAlgorithm(&manager_, loss_algorithm.get());
EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _));
EXPECT_CALL(*network_change_visitor_, OnCongestionChange());
SendAlgorithmInterface::CongestionVector lost_packets;
« no previous file with comments | « net/quic/core/quic_sent_packet_manager_interface.h ('k') | net/quic/core/quic_server_session_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698