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

Side by Side Diff: jingle/notifier/base/fake_ssl_client_socket_unittest.cc

Issue 4039003: Add experimental option for TCP FastOpen.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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
« no previous file with comments | « jingle/notifier/base/fake_ssl_client_socket.cc ('k') | net/http/http_proxy_client_socket.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/notifier/base/fake_ssl_client_socket.h" 5 #include "jingle/notifier/base/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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 MOCK_METHOD1(SetSendBufferSize, bool(int32)); 53 MOCK_METHOD1(SetSendBufferSize, bool(int32));
54 MOCK_METHOD1(Connect, int(net::CompletionCallback*)); 54 MOCK_METHOD1(Connect, int(net::CompletionCallback*));
55 MOCK_METHOD0(Disconnect, void()); 55 MOCK_METHOD0(Disconnect, void());
56 MOCK_CONST_METHOD0(IsConnected, bool()); 56 MOCK_CONST_METHOD0(IsConnected, bool());
57 MOCK_CONST_METHOD0(IsConnectedAndIdle, bool()); 57 MOCK_CONST_METHOD0(IsConnectedAndIdle, bool());
58 MOCK_CONST_METHOD1(GetPeerAddress, int(net::AddressList*)); 58 MOCK_CONST_METHOD1(GetPeerAddress, int(net::AddressList*));
59 MOCK_CONST_METHOD0(NetLog, const net::BoundNetLog&()); 59 MOCK_CONST_METHOD0(NetLog, const net::BoundNetLog&());
60 MOCK_METHOD0(SetSubresourceSpeculation, void()); 60 MOCK_METHOD0(SetSubresourceSpeculation, void());
61 MOCK_METHOD0(SetOmniboxSpeculation, void()); 61 MOCK_METHOD0(SetOmniboxSpeculation, void());
62 MOCK_CONST_METHOD0(WasEverUsed, bool()); 62 MOCK_CONST_METHOD0(WasEverUsed, bool());
63 MOCK_CONST_METHOD0(UsingTCPFastOpen, bool());
63 }; 64 };
64 65
65 // Break up |data| into a bunch of chunked MockReads/Writes and push 66 // Break up |data| into a bunch of chunked MockReads/Writes and push
66 // them onto |ops|. 67 // them onto |ops|.
67 void AddChunkedOps(base::StringPiece data, size_t chunk_size, bool async, 68 void AddChunkedOps(base::StringPiece data, size_t chunk_size, bool async,
68 std::vector<net::MockRead>* ops) { 69 std::vector<net::MockRead>* ops) {
69 DCHECK_GT(chunk_size, 0U); 70 DCHECK_GT(chunk_size, 0U);
70 size_t offset = 0; 71 size_t offset = 0;
71 while (offset < data.size()) { 72 while (offset < data.size()) {
72 size_t bounded_chunk_size = std::min(data.size() - offset, chunk_size); 73 size_t bounded_chunk_size = std::min(data.size() - offset, chunk_size);
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 } 331 }
331 332
332 TEST_F(FakeSSLClientSocketTest, MalformedServerHello) { 333 TEST_F(FakeSSLClientSocketTest, MalformedServerHello) {
333 RunUnsuccessfulHandshakeTest(ERR_MALFORMED_SERVER_HELLO, 334 RunUnsuccessfulHandshakeTest(ERR_MALFORMED_SERVER_HELLO,
334 VERIFY_SERVER_HELLO_ERROR); 335 VERIFY_SERVER_HELLO_ERROR);
335 } 336 }
336 337
337 } // namespace 338 } // namespace
338 339
339 } // namespace notifier 340 } // namespace notifier
OLDNEW
« no previous file with comments | « jingle/notifier/base/fake_ssl_client_socket.cc ('k') | net/http/http_proxy_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698