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

Side by Side Diff: chrome/browser/extensions/api/socket/tls_socket_unittest.cc

Issue 1097773003: Clean up NPN/ALPN-related SSLClientSocket bits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: const Created 5 years, 8 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_METHOD5(ExportKeyingMaterial, 56 MOCK_METHOD5(ExportKeyingMaterial,
57 int(const StringPiece&, 57 int(const StringPiece&,
58 bool, 58 bool,
59 const StringPiece&, 59 const StringPiece&,
60 unsigned char*, 60 unsigned char*,
61 unsigned int)); 61 unsigned int));
62 MOCK_METHOD1(GetTLSUniqueChannelBinding, int(std::string*)); 62 MOCK_METHOD1(GetTLSUniqueChannelBinding, int(std::string*));
63 MOCK_METHOD1(GetSSLCertRequestInfo, void(net::SSLCertRequestInfo*)); 63 MOCK_METHOD1(GetSSLCertRequestInfo, void(net::SSLCertRequestInfo*));
64 MOCK_METHOD1(GetNextProto, 64 MOCK_CONST METHOD1(GetNextProto,
65 net::SSLClientSocket::NextProtoStatus(std::string*)); 65 net::SSLClientSocket::NextProtoStatus(std::string*));
66 MOCK_CONST_METHOD0(GetUnverifiedServerCertificateChain, 66 MOCK_CONST_METHOD0(GetUnverifiedServerCertificateChain,
67 scoped_refptr<net::X509Certificate>()); 67 scoped_refptr<net::X509Certificate>());
68 MOCK_CONST_METHOD0(GetChannelIDService, net::ChannelIDService*()); 68 MOCK_CONST_METHOD0(GetChannelIDService, net::ChannelIDService*());
69 virtual bool IsConnected() const override { return true; } 69 virtual bool IsConnected() const override { return true; }
70 70
71 private: 71 private:
72 DISALLOW_COPY_AND_ASSIGN(MockSSLClientSocket); 72 DISALLOW_COPY_AND_ASSIGN(MockSSLClientSocket);
73 }; 73 };
74 74
75 class MockTCPSocket : public net::TCPClientSocket { 75 class MockTCPSocket : public net::TCPClientSocket {
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 total_bytes_written += amount_written_invocation; 304 total_bytes_written += amount_written_invocation;
305 cb.first.Run(amount_written_invocation); 305 cb.first.Run(amount_written_invocation);
306 } 306 }
307 307
308 ASSERT_EQ(total_bytes_requested, total_bytes_written) 308 ASSERT_EQ(total_bytes_requested, total_bytes_written)
309 << "There should be exactly as many bytes written as originally " 309 << "There should be exactly as many bytes written as originally "
310 << "requested to Write()."; 310 << "requested to Write().";
311 } 311 }
312 312
313 } // namespace extensions 313 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | net/http/http_network_transaction_unittest.cc » ('j') | net/socket/ssl_client_socket_pool.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698