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

Side by Side Diff: chrome/browser/extensions/api/socket/tls_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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/api/socket/tls_socket.h" 5 #include "extensions/browser/api/socket/tls_socket.h"
6 6
7 #include <deque> 7 #include <deque>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 MOCK_METHOD1(Connect, int(const CompletionCallback&)); 46 MOCK_METHOD1(Connect, int(const CompletionCallback&));
47 MOCK_CONST_METHOD0(IsConnectedAndIdle, bool()); 47 MOCK_CONST_METHOD0(IsConnectedAndIdle, bool());
48 MOCK_CONST_METHOD1(GetPeerAddress, int(net::IPEndPoint*)); 48 MOCK_CONST_METHOD1(GetPeerAddress, int(net::IPEndPoint*));
49 MOCK_CONST_METHOD1(GetLocalAddress, int(net::IPEndPoint*)); 49 MOCK_CONST_METHOD1(GetLocalAddress, int(net::IPEndPoint*));
50 MOCK_CONST_METHOD0(NetLog, const net::BoundNetLog&()); 50 MOCK_CONST_METHOD0(NetLog, const net::BoundNetLog&());
51 MOCK_METHOD0(SetSubresourceSpeculation, void()); 51 MOCK_METHOD0(SetSubresourceSpeculation, void());
52 MOCK_METHOD0(SetOmniboxSpeculation, void()); 52 MOCK_METHOD0(SetOmniboxSpeculation, void());
53 MOCK_CONST_METHOD0(WasEverUsed, bool()); 53 MOCK_CONST_METHOD0(WasEverUsed, bool());
54 MOCK_CONST_METHOD0(UsingTCPFastOpen, bool()); 54 MOCK_CONST_METHOD0(UsingTCPFastOpen, bool());
55 MOCK_METHOD1(GetSSLInfo, bool(net::SSLInfo*)); 55 MOCK_METHOD1(GetSSLInfo, bool(net::SSLInfo*));
56 MOCK_CONST_METHOD1(GetConnectionAttempts, void(net::ConnectionAttempts*));
57 MOCK_METHOD0(ClearConnectionAttempts, void());
58 MOCK_METHOD1(AddConnectionAttempts, void(const net::ConnectionAttempts&));
56 MOCK_METHOD5(ExportKeyingMaterial, 59 MOCK_METHOD5(ExportKeyingMaterial,
57 int(const StringPiece&, 60 int(const StringPiece&,
58 bool, 61 bool,
59 const StringPiece&, 62 const StringPiece&,
60 unsigned char*, 63 unsigned char*,
61 unsigned int)); 64 unsigned int));
62 MOCK_METHOD1(GetTLSUniqueChannelBinding, int(std::string*)); 65 MOCK_METHOD1(GetTLSUniqueChannelBinding, int(std::string*));
63 MOCK_METHOD1(GetSSLCertRequestInfo, void(net::SSLCertRequestInfo*)); 66 MOCK_METHOD1(GetSSLCertRequestInfo, void(net::SSLCertRequestInfo*));
64 MOCK_CONST_METHOD1(GetNextProto, 67 MOCK_CONST_METHOD1(GetNextProto,
65 net::SSLClientSocket::NextProtoStatus(std::string*)); 68 net::SSLClientSocket::NextProtoStatus(std::string*));
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 total_bytes_written += amount_written_invocation; 307 total_bytes_written += amount_written_invocation;
305 cb.first.Run(amount_written_invocation); 308 cb.first.Run(amount_written_invocation);
306 } 309 }
307 310
308 ASSERT_EQ(total_bytes_requested, total_bytes_written) 311 ASSERT_EQ(total_bytes_requested, total_bytes_written)
309 << "There should be exactly as many bytes written as originally " 312 << "There should be exactly as many bytes written as originally "
310 << "requested to Write()."; 313 << "requested to Write().";
311 } 314 }
312 315
313 } // namespace extensions 316 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/devtools/device/usb/android_usb_socket.cc ('k') | content/browser/renderer_host/p2p/socket_host_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698