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

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

Issue 7255002: Revert 90373 - Warmth of a connection (cwnd) is estimated by the amount of data written to the so... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 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
Property Changes:
Added: svn:mergeinfo
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_METHOD1(GetLocalAddress, int(net::IPEndPoint*)); 59 MOCK_CONST_METHOD1(GetLocalAddress, int(net::IPEndPoint*));
60 MOCK_CONST_METHOD0(NetLog, const net::BoundNetLog&()); 60 MOCK_CONST_METHOD0(NetLog, const net::BoundNetLog&());
61 MOCK_METHOD0(SetSubresourceSpeculation, void()); 61 MOCK_METHOD0(SetSubresourceSpeculation, void());
62 MOCK_METHOD0(SetOmniboxSpeculation, void()); 62 MOCK_METHOD0(SetOmniboxSpeculation, void());
63 MOCK_CONST_METHOD0(WasEverUsed, bool()); 63 MOCK_CONST_METHOD0(WasEverUsed, bool());
64 MOCK_CONST_METHOD0(UsingTCPFastOpen, bool()); 64 MOCK_CONST_METHOD0(UsingTCPFastOpen, bool());
65 MOCK_CONST_METHOD0(NumBytesRead, int64());
66 MOCK_CONST_METHOD0(GetConnectTimeMicros, base::TimeDelta());
67 }; 65 };
68 66
69 // Break up |data| into a bunch of chunked MockReads/Writes and push 67 // Break up |data| into a bunch of chunked MockReads/Writes and push
70 // them onto |ops|. 68 // them onto |ops|.
71 void AddChunkedOps(base::StringPiece data, size_t chunk_size, bool async, 69 void AddChunkedOps(base::StringPiece data, size_t chunk_size, bool async,
72 std::vector<net::MockRead>* ops) { 70 std::vector<net::MockRead>* ops) {
73 DCHECK_GT(chunk_size, 0U); 71 DCHECK_GT(chunk_size, 0U);
74 size_t offset = 0; 72 size_t offset = 0;
75 while (offset < data.size()) { 73 while (offset < data.size()) {
76 size_t bounded_chunk_size = std::min(data.size() - offset, chunk_size); 74 size_t bounded_chunk_size = std::min(data.size() - offset, chunk_size);
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 } 332 }
335 333
336 TEST_F(FakeSSLClientSocketTest, MalformedServerHello) { 334 TEST_F(FakeSSLClientSocketTest, MalformedServerHello) {
337 RunUnsuccessfulHandshakeTest(ERR_MALFORMED_SERVER_HELLO, 335 RunUnsuccessfulHandshakeTest(ERR_MALFORMED_SERVER_HELLO,
338 VERIFY_SERVER_HELLO_ERROR); 336 VERIFY_SERVER_HELLO_ERROR);
339 } 337 }
340 338
341 } // namespace 339 } // namespace
342 340
343 } // namespace notifier 341 } // namespace notifier
OLDNEW
« no previous file with comments | « jingle/notifier/base/fake_ssl_client_socket.cc ('k') | jingle/notifier/base/proxy_resolving_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698