From 73c4532bd7f5b84bc822a4acca5c5b8affef4129 Mon Sep 17 00:00:00 2001 From: "willchan@chromium.org" Date: Fri, 1 Oct 2010 23:57:54 +0000 Subject: Stop refcounting HostResolver. BUG=46049 TEST=none Review URL: http://codereview.chromium.org/3601002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61256 0039d316-1c4b-4281-b951-d872f2087c98 --- net/socket_stream/socket_stream_unittest.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'net/socket_stream/socket_stream_unittest.cc') diff --git a/net/socket_stream/socket_stream_unittest.cc b/net/socket_stream/socket_stream_unittest.cc index d8e2093..497020d 100644 --- a/net/socket_stream/socket_stream_unittest.cc +++ b/net/socket_stream/socket_stream_unittest.cc @@ -238,11 +238,13 @@ TEST_F(SocketStreamTest, CloseFlushPendingWrite) { delegate->SetOnReceivedData(NewCallback( test, &SocketStreamTest::DoCloseFlushPendingWriteTest)); + MockHostResolver host_resolver; + scoped_refptr socket_stream = new SocketStream(GURL("ws://example.com/demo"), delegate.get()); socket_stream->set_context(new TestURLRequestContext()); - socket_stream->SetHostResolver(new MockHostResolver()); + socket_stream->SetHostResolver(&host_resolver); MockWrite data_writes[] = { MockWrite(SocketStreamTest::kWebSocketHandshakeRequest), @@ -333,7 +335,8 @@ TEST_F(SocketStreamTest, BasicAuthProxy) { new SocketStream(GURL("ws://example.com/demo"), delegate.get()); socket_stream->set_context(new TestURLRequestContext("myproxy:70")); - socket_stream->SetHostResolver(new MockHostResolver()); + MockHostResolver host_resolver; + socket_stream->SetHostResolver(&host_resolver); socket_stream->SetClientSocketFactory(&mock_socket_factory); socket_stream->Connect(); -- cgit v1.1