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

Unified Diff: remoting/protocol/chromium_socket_factory_unittest.cc

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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 | « remoting/protocol/chromium_socket_factory.cc ('k') | remoting/protocol/client_control_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/chromium_socket_factory_unittest.cc
diff --git a/remoting/protocol/chromium_socket_factory_unittest.cc b/remoting/protocol/chromium_socket_factory_unittest.cc
index 8c59f826a34c1f56a79339c317eb72014c8aceeb..7f16eb7c0217ff28e6c5dd2f6934fd0b56b0c39f 100644
--- a/remoting/protocol/chromium_socket_factory_unittest.cc
+++ b/remoting/protocol/chromium_socket_factory_unittest.cc
@@ -7,7 +7,8 @@
#include <stddef.h>
#include <stdint.h>
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -64,17 +65,17 @@ class ChromiumSocketFactoryTest : public testing::Test,
base::MessageLoopForIO message_loop_;
base::RunLoop run_loop_;
- scoped_ptr<rtc::PacketSocketFactory> socket_factory_;
- scoped_ptr<rtc::AsyncPacketSocket> socket_;
+ std::unique_ptr<rtc::PacketSocketFactory> socket_factory_;
+ std::unique_ptr<rtc::AsyncPacketSocket> socket_;
std::string last_packet_;
rtc::SocketAddress last_address_;
};
TEST_F(ChromiumSocketFactoryTest, SendAndReceive) {
- scoped_ptr<rtc::AsyncPacketSocket> sending_socket(
- socket_factory_->CreateUdpSocket(
- rtc::SocketAddress("127.0.0.1", 0), 0, 0));
+ std::unique_ptr<rtc::AsyncPacketSocket> sending_socket(
+ socket_factory_->CreateUdpSocket(rtc::SocketAddress("127.0.0.1", 0), 0,
+ 0));
ASSERT_TRUE(sending_socket.get() != nullptr);
EXPECT_EQ(sending_socket->GetState(),
rtc::AsyncPacketSocket::STATE_BOUND);
@@ -99,9 +100,9 @@ TEST_F(ChromiumSocketFactoryTest, PortRange) {
}
TEST_F(ChromiumSocketFactoryTest, TransientError) {
- scoped_ptr<rtc::AsyncPacketSocket> sending_socket(
- socket_factory_->CreateUdpSocket(
- rtc::SocketAddress("127.0.0.1", 0), 0, 0));
+ std::unique_ptr<rtc::AsyncPacketSocket> sending_socket(
+ socket_factory_->CreateUdpSocket(rtc::SocketAddress("127.0.0.1", 0), 0,
+ 0));
std::string test_packet("TEST");
// Try sending a packet to an IPv6 address from a socket that's bound to an
« no previous file with comments | « remoting/protocol/chromium_socket_factory.cc ('k') | remoting/protocol/client_control_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698