diff options
Diffstat (limited to 'net/socket/tcp_pinger_unittest.cc')
-rw-r--r-- | net/socket/tcp_pinger_unittest.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/socket/tcp_pinger_unittest.cc b/net/socket/tcp_pinger_unittest.cc index 1d94ddd..c807007 100644 --- a/net/socket/tcp_pinger_unittest.cc +++ b/net/socket/tcp_pinger_unittest.cc @@ -65,10 +65,10 @@ void TCPPingerTest::SetUp() { TEST_F(TCPPingerTest, Ping) { net::AddressList addr; - net::HostResolver resolver; + scoped_refptr<net::HostResolver> resolver(new net::HostResolver); net::HostResolver::RequestInfo info("localhost", listen_port_); - int rv = resolver.Resolve(info, &addr, NULL, NULL); + int rv = resolver->Resolve(info, &addr, NULL, NULL); EXPECT_EQ(rv, net::OK); net::TCPPinger pinger(addr); @@ -78,13 +78,13 @@ TEST_F(TCPPingerTest, Ping) { TEST_F(TCPPingerTest, PingFail) { net::AddressList addr; - net::HostResolver resolver; + scoped_refptr<net::HostResolver> resolver(new net::HostResolver); // "Kill" "server" listen_sock_ = NULL; net::HostResolver::RequestInfo info("localhost", listen_port_); - int rv = resolver.Resolve(info, &addr, NULL, NULL); + int rv = resolver->Resolve(info, &addr, NULL, NULL); EXPECT_EQ(rv, net::OK); net::TCPPinger pinger(addr); |