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

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

Issue 1096203006: Collect all ConnectionAttempts from both sockets in TransportConnectJob. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@domrel_serverip1
Patch Set: Return fake ConnectionAttempt in MockTCPClientSocket Created 5 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
« no previous file with comments | « jingle/glue/fake_ssl_client_socket.cc ('k') | jingle/glue/proxy_resolving_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')
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 MOCK_CONST_METHOD0(NetLog, const net::BoundNetLog&()); 61 MOCK_CONST_METHOD0(NetLog, const net::BoundNetLog&());
62 MOCK_METHOD0(SetSubresourceSpeculation, void()); 62 MOCK_METHOD0(SetSubresourceSpeculation, void());
63 MOCK_METHOD0(SetOmniboxSpeculation, void()); 63 MOCK_METHOD0(SetOmniboxSpeculation, void());
64 MOCK_CONST_METHOD0(WasEverUsed, bool()); 64 MOCK_CONST_METHOD0(WasEverUsed, bool());
65 MOCK_CONST_METHOD0(UsingTCPFastOpen, bool()); 65 MOCK_CONST_METHOD0(UsingTCPFastOpen, bool());
66 MOCK_CONST_METHOD0(NumBytesRead, int64()); 66 MOCK_CONST_METHOD0(NumBytesRead, int64());
67 MOCK_CONST_METHOD0(GetConnectTimeMicros, base::TimeDelta()); 67 MOCK_CONST_METHOD0(GetConnectTimeMicros, base::TimeDelta());
68 MOCK_CONST_METHOD0(WasNpnNegotiated, bool()); 68 MOCK_CONST_METHOD0(WasNpnNegotiated, bool());
69 MOCK_CONST_METHOD0(GetNegotiatedProtocol, net::NextProto()); 69 MOCK_CONST_METHOD0(GetNegotiatedProtocol, net::NextProto());
70 MOCK_METHOD1(GetSSLInfo, bool(net::SSLInfo*)); 70 MOCK_METHOD1(GetSSLInfo, bool(net::SSLInfo*));
71 MOCK_CONST_METHOD1(GetConnectionAttempts, void(net::ConnectionAttempts*));
72 MOCK_METHOD0(ClearConnectionAttempts, void());
73 MOCK_METHOD1(AddConnectionAttempts, void(const net::ConnectionAttempts&));
71 }; 74 };
72 75
73 // Break up |data| into a bunch of chunked MockReads/Writes and push 76 // Break up |data| into a bunch of chunked MockReads/Writes and push
74 // them onto |ops|. 77 // them onto |ops|.
75 template <net::MockReadWriteType type> 78 template <net::MockReadWriteType type>
76 void AddChunkedOps(base::StringPiece data, size_t chunk_size, net::IoMode mode, 79 void AddChunkedOps(base::StringPiece data, size_t chunk_size, net::IoMode mode,
77 std::vector<net::MockReadWrite<type> >* ops) { 80 std::vector<net::MockReadWrite<type> >* ops) {
78 DCHECK_GT(chunk_size, 0U); 81 DCHECK_GT(chunk_size, 0U);
79 size_t offset = 0; 82 size_t offset = 0;
80 while (offset < data.size()) { 83 while (offset < data.size()) {
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 } 342 }
340 343
341 TEST_F(FakeSSLClientSocketTest, MalformedServerHello) { 344 TEST_F(FakeSSLClientSocketTest, MalformedServerHello) {
342 RunUnsuccessfulHandshakeTest(ERR_MALFORMED_SERVER_HELLO, 345 RunUnsuccessfulHandshakeTest(ERR_MALFORMED_SERVER_HELLO,
343 VERIFY_SERVER_HELLO_ERROR); 346 VERIFY_SERVER_HELLO_ERROR);
344 } 347 }
345 348
346 } // namespace 349 } // namespace
347 350
348 } // namespace jingle_glue 351 } // namespace jingle_glue
OLDNEW
« no previous file with comments | « jingle/glue/fake_ssl_client_socket.cc ('k') | jingle/glue/proxy_resolving_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698