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

Side by Side Diff: jingle/glue/fake_ssl_client_socket_unittest.cc

Issue 665663002: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Format 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 unified diff | Download patch
« no previous file with comments | « device/test/usb_test_gadget_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "jingle/glue/fake_ssl_client_socket.h" 5 #include "jingle/glue/fake_ssl_client_socket.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 net::BoundNetLog net_log; 277 net::BoundNetLog net_log;
278 EXPECT_CALL(*mock_client_socket, SetReceiveBufferSize(kReceiveBufferSize)); 278 EXPECT_CALL(*mock_client_socket, SetReceiveBufferSize(kReceiveBufferSize));
279 EXPECT_CALL(*mock_client_socket, SetSendBufferSize(kSendBufferSize)); 279 EXPECT_CALL(*mock_client_socket, SetSendBufferSize(kSendBufferSize));
280 EXPECT_CALL(*mock_client_socket, GetPeerAddress(&ip_endpoint)). 280 EXPECT_CALL(*mock_client_socket, GetPeerAddress(&ip_endpoint)).
281 WillOnce(Return(kPeerAddress)); 281 WillOnce(Return(kPeerAddress));
282 EXPECT_CALL(*mock_client_socket, NetLog()).WillOnce(ReturnRef(net_log)); 282 EXPECT_CALL(*mock_client_socket, NetLog()).WillOnce(ReturnRef(net_log));
283 EXPECT_CALL(*mock_client_socket, SetSubresourceSpeculation()); 283 EXPECT_CALL(*mock_client_socket, SetSubresourceSpeculation());
284 EXPECT_CALL(*mock_client_socket, SetOmniboxSpeculation()); 284 EXPECT_CALL(*mock_client_socket, SetOmniboxSpeculation());
285 285
286 // Takes ownership of |mock_client_socket|. 286 // Takes ownership of |mock_client_socket|.
287 FakeSSLClientSocket fake_ssl_client_socket( 287 FakeSSLClientSocket fake_ssl_client_socket(mock_client_socket.Pass());
288 mock_client_socket.PassAs<net::StreamSocket>());
289 fake_ssl_client_socket.SetReceiveBufferSize(kReceiveBufferSize); 288 fake_ssl_client_socket.SetReceiveBufferSize(kReceiveBufferSize);
290 fake_ssl_client_socket.SetSendBufferSize(kSendBufferSize); 289 fake_ssl_client_socket.SetSendBufferSize(kSendBufferSize);
291 EXPECT_EQ(kPeerAddress, 290 EXPECT_EQ(kPeerAddress,
292 fake_ssl_client_socket.GetPeerAddress(&ip_endpoint)); 291 fake_ssl_client_socket.GetPeerAddress(&ip_endpoint));
293 EXPECT_EQ(&net_log, &fake_ssl_client_socket.NetLog()); 292 EXPECT_EQ(&net_log, &fake_ssl_client_socket.NetLog());
294 fake_ssl_client_socket.SetSubresourceSpeculation(); 293 fake_ssl_client_socket.SetSubresourceSpeculation();
295 fake_ssl_client_socket.SetOmniboxSpeculation(); 294 fake_ssl_client_socket.SetOmniboxSpeculation();
296 } 295 }
297 296
298 TEST_F(FakeSSLClientSocketTest, SuccessfulHandshakeSync) { 297 TEST_F(FakeSSLClientSocketTest, SuccessfulHandshakeSync) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 } 339 }
341 340
342 TEST_F(FakeSSLClientSocketTest, MalformedServerHello) { 341 TEST_F(FakeSSLClientSocketTest, MalformedServerHello) {
343 RunUnsuccessfulHandshakeTest(ERR_MALFORMED_SERVER_HELLO, 342 RunUnsuccessfulHandshakeTest(ERR_MALFORMED_SERVER_HELLO,
344 VERIFY_SERVER_HELLO_ERROR); 343 VERIFY_SERVER_HELLO_ERROR);
345 } 344 }
346 345
347 } // namespace 346 } // namespace
348 347
349 } // namespace jingle_glue 348 } // namespace jingle_glue
OLDNEW
« no previous file with comments | « device/test/usb_test_gadget_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698