| Index: net/websockets/websocket_throttle_unittest.cc
|
| diff --git a/net/websockets/websocket_throttle_unittest.cc b/net/websockets/websocket_throttle_unittest.cc
|
| index 40440441b4c7d635962549fb6cb3d3edb3eb9ddf..77b816e29ffe9378500bca6d75a28be3c3736631 100644
|
| --- a/net/websockets/websocket_throttle_unittest.cc
|
| +++ b/net/websockets/websocket_throttle_unittest.cc
|
| @@ -81,7 +81,7 @@ class WebSocketThrottleTest : public PlatformTest {
|
| };
|
|
|
| TEST_F(WebSocketThrottleTest, Throttle) {
|
| - scoped_refptr<URLRequestContext> context(new TestURLRequestContext);
|
| + TestURLRequestContext context;
|
| DummySocketStreamDelegate delegate;
|
| // TODO(toyoshim): We need to consider both spdy-enabled and spdy-disabled
|
| // configuration.
|
| @@ -94,7 +94,7 @@ TEST_F(WebSocketThrottleTest, Throttle) {
|
| scoped_refptr<WebSocketJob> w1(new WebSocketJob(&delegate));
|
| scoped_refptr<SocketStream> s1(
|
| new SocketStream(GURL("ws://host1/"), w1.get()));
|
| - s1->set_context(context.get());
|
| + s1->set_context(&context);
|
| w1->InitSocketStream(s1.get());
|
| WebSocketThrottleTest::MockSocketStreamConnect(s1, addr);
|
| DeleteAddrInfo(addr);
|
| @@ -115,7 +115,7 @@ TEST_F(WebSocketThrottleTest, Throttle) {
|
| scoped_refptr<WebSocketJob> w2(new WebSocketJob(&delegate));
|
| scoped_refptr<SocketStream> s2(
|
| new SocketStream(GURL("ws://host2/"), w2.get()));
|
| - s2->set_context(context.get());
|
| + s2->set_context(&context);
|
| w2->InitSocketStream(s2.get());
|
| WebSocketThrottleTest::MockSocketStreamConnect(s2, addr);
|
| DeleteAddrInfo(addr);
|
| @@ -136,7 +136,7 @@ TEST_F(WebSocketThrottleTest, Throttle) {
|
| scoped_refptr<WebSocketJob> w3(new WebSocketJob(&delegate));
|
| scoped_refptr<SocketStream> s3(
|
| new SocketStream(GURL("ws://host3/"), w3.get()));
|
| - s3->set_context(context.get());
|
| + s3->set_context(&context);
|
| w3->InitSocketStream(s3.get());
|
| WebSocketThrottleTest::MockSocketStreamConnect(s3, addr);
|
| DeleteAddrInfo(addr);
|
| @@ -157,7 +157,7 @@ TEST_F(WebSocketThrottleTest, Throttle) {
|
| scoped_refptr<WebSocketJob> w4(new WebSocketJob(&delegate));
|
| scoped_refptr<SocketStream> s4(
|
| new SocketStream(GURL("ws://host4/"), w4.get()));
|
| - s4->set_context(context.get());
|
| + s4->set_context(&context);
|
| w4->InitSocketStream(s4.get());
|
| WebSocketThrottleTest::MockSocketStreamConnect(s4, addr);
|
| DeleteAddrInfo(addr);
|
| @@ -177,7 +177,7 @@ TEST_F(WebSocketThrottleTest, Throttle) {
|
| scoped_refptr<WebSocketJob> w5(new WebSocketJob(&delegate));
|
| scoped_refptr<SocketStream> s5(
|
| new SocketStream(GURL("ws://host5/"), w5.get()));
|
| - s5->set_context(context.get());
|
| + s5->set_context(&context);
|
| w5->InitSocketStream(s5.get());
|
| WebSocketThrottleTest::MockSocketStreamConnect(s5, addr);
|
| DeleteAddrInfo(addr);
|
| @@ -197,7 +197,7 @@ TEST_F(WebSocketThrottleTest, Throttle) {
|
| scoped_refptr<WebSocketJob> w6(new WebSocketJob(&delegate));
|
| scoped_refptr<SocketStream> s6(
|
| new SocketStream(GURL("ws://host6/"), w6.get()));
|
| - s6->set_context(context.get());
|
| + s6->set_context(&context);
|
| w6->InitSocketStream(s6.get());
|
| WebSocketThrottleTest::MockSocketStreamConnect(s6, addr);
|
| DeleteAddrInfo(addr);
|
| @@ -300,7 +300,7 @@ TEST_F(WebSocketThrottleTest, Throttle) {
|
| }
|
|
|
| TEST_F(WebSocketThrottleTest, NoThrottleForDuplicateAddress) {
|
| - scoped_refptr<URLRequestContext> context(new TestURLRequestContext);
|
| + TestURLRequestContext context;
|
| DummySocketStreamDelegate delegate;
|
| WebSocketJob::set_websocket_over_spdy_enabled(true);
|
|
|
| @@ -310,7 +310,7 @@ TEST_F(WebSocketThrottleTest, NoThrottleForDuplicateAddress) {
|
| scoped_refptr<WebSocketJob> w1(new WebSocketJob(&delegate));
|
| scoped_refptr<SocketStream> s1(
|
| new SocketStream(GURL("ws://localhost/"), w1.get()));
|
| - s1->set_context(context.get());
|
| + s1->set_context(&context);
|
| w1->InitSocketStream(s1.get());
|
| WebSocketThrottleTest::MockSocketStreamConnect(s1, addr);
|
| DeleteAddrInfo(addr);
|
|
|