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

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

Issue 14307021: jingle: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 EXPECT_FALSE(fake_ssl_client_socket.IsConnected()); 254 EXPECT_FALSE(fake_ssl_client_socket.IsConnected());
255 } 255 }
256 256
257 void RunUnsuccessfulHandshakeTest( 257 void RunUnsuccessfulHandshakeTest(
258 int error, HandshakeErrorLocation location) { 258 int error, HandshakeErrorLocation location) {
259 RunUnsuccessfulHandshakeTestHelper(net::SYNCHRONOUS, error, location); 259 RunUnsuccessfulHandshakeTestHelper(net::SYNCHRONOUS, error, location);
260 RunUnsuccessfulHandshakeTestHelper(net::ASYNC, error, location); 260 RunUnsuccessfulHandshakeTestHelper(net::ASYNC, error, location);
261 } 261 }
262 262
263 // MockTCPClientSocket needs a message loop. 263 // MockTCPClientSocket needs a message loop.
264 MessageLoop message_loop_; 264 base::MessageLoop message_loop_;
265 265
266 net::MockClientSocketFactory mock_client_socket_factory_; 266 net::MockClientSocketFactory mock_client_socket_factory_;
267 scoped_ptr<net::StaticSocketDataProvider> static_socket_data_provider_; 267 scoped_ptr<net::StaticSocketDataProvider> static_socket_data_provider_;
268 }; 268 };
269 269
270 TEST_F(FakeSSLClientSocketTest, PassThroughMethods) { 270 TEST_F(FakeSSLClientSocketTest, PassThroughMethods) {
271 MockClientSocket* mock_client_socket = new MockClientSocket(); 271 MockClientSocket* mock_client_socket = new MockClientSocket();
272 const int kReceiveBufferSize = 10; 272 const int kReceiveBufferSize = 10;
273 const int kSendBufferSize = 20; 273 const int kSendBufferSize = 20;
274 net::IPEndPoint ip_endpoint(net::IPAddressNumber(net::kIPv4AddressSize), 80); 274 net::IPEndPoint ip_endpoint(net::IPAddressNumber(net::kIPv4AddressSize), 80);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 } 338 }
339 339
340 TEST_F(FakeSSLClientSocketTest, MalformedServerHello) { 340 TEST_F(FakeSSLClientSocketTest, MalformedServerHello) {
341 RunUnsuccessfulHandshakeTest(ERR_MALFORMED_SERVER_HELLO, 341 RunUnsuccessfulHandshakeTest(ERR_MALFORMED_SERVER_HELLO,
342 VERIFY_SERVER_HELLO_ERROR); 342 VERIFY_SERVER_HELLO_ERROR);
343 } 343 }
344 344
345 } // namespace 345 } // namespace
346 346
347 } // namespace jingle_glue 347 } // namespace jingle_glue
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698