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

Unified Diff: net/websockets/websocket_stream_test.cc

Issue 657013003: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/websockets/websocket_stream.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_stream_test.cc
diff --git a/net/websockets/websocket_stream_test.cc b/net/websockets/websocket_stream_test.cc
index 0b7ae4e39881158b7dc5c2dac12a967bbadbf76b..2fd9891637209d9bfbe6d21fabd5817ee7d56b00 100644
--- a/net/websockets/websocket_stream_test.cc
+++ b/net/websockets/websocket_stream_test.cc
@@ -1121,9 +1121,11 @@ TEST_F(WebSocketStreamCreateTest, HandshakeTimeout) {
socket_data->set_connect_data(MockConnect(SYNCHRONOUS, ERR_IO_PENDING));
scoped_ptr<MockWeakTimer> timer(new MockWeakTimer(false, false));
base::WeakPtr<MockWeakTimer> weak_timer = timer->AsWeakPtr();
- CreateAndConnectRawExpectations("ws://localhost/", NoSubProtocols(),
- "http://localhost", socket_data.Pass(),
- timer.PassAs<base::Timer>());
+ CreateAndConnectRawExpectations("ws://localhost/",
+ NoSubProtocols(),
+ "http://localhost",
+ socket_data.Pass(),
+ timer.Pass());
EXPECT_FALSE(has_failed());
ASSERT_TRUE(weak_timer.get());
EXPECT_TRUE(weak_timer->IsRunning());
@@ -1142,9 +1144,13 @@ TEST_F(WebSocketStreamCreateTest, HandshakeTimerOnSuccess) {
scoped_ptr<MockWeakTimer> timer(new MockWeakTimer(false, false));
base::WeakPtr<MockWeakTimer> weak_timer = timer->AsWeakPtr();
- CreateAndConnectStandard(
- "ws://localhost/", "/", NoSubProtocols(), "http://localhost", "", "",
- timer.PassAs<base::Timer>());
+ CreateAndConnectStandard("ws://localhost/",
+ "/",
+ NoSubProtocols(),
+ "http://localhost",
+ "",
+ "",
+ timer.Pass());
ASSERT_TRUE(weak_timer);
EXPECT_TRUE(weak_timer->IsRunning());
@@ -1162,9 +1168,11 @@ TEST_F(WebSocketStreamCreateTest, HandshakeTimerOnFailure) {
MockConnect(SYNCHRONOUS, ERR_CONNECTION_REFUSED));
scoped_ptr<MockWeakTimer> timer(new MockWeakTimer(false, false));
base::WeakPtr<MockWeakTimer> weak_timer = timer->AsWeakPtr();
- CreateAndConnectRawExpectations("ws://localhost/", NoSubProtocols(),
- "http://localhost", socket_data.Pass(),
- timer.PassAs<base::Timer>());
+ CreateAndConnectRawExpectations("ws://localhost/",
+ NoSubProtocols(),
+ "http://localhost",
+ socket_data.Pass(),
+ timer.Pass());
ASSERT_TRUE(weak_timer.get());
EXPECT_TRUE(weak_timer->IsRunning());
« no previous file with comments | « net/websockets/websocket_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698