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

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

Issue 949633002: Include both certificate chains in invalid cert reporting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a comment to cert logger pb Created 5 years, 10 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_CONST_METHOD0(GetSessionCacheKey, std::string()); 63 MOCK_CONST_METHOD0(GetSessionCacheKey, std::string());
64 MOCK_CONST_METHOD0(InSessionCache, bool()); 64 MOCK_CONST_METHOD0(InSessionCache, bool());
65 MOCK_METHOD1(SetHandshakeCompletionCallback, void(const base::Closure&)); 65 MOCK_METHOD1(SetHandshakeCompletionCallback, void(const base::Closure&));
66 MOCK_METHOD1(GetSSLCertRequestInfo, void(net::SSLCertRequestInfo*)); 66 MOCK_METHOD1(GetSSLCertRequestInfo, void(net::SSLCertRequestInfo*));
67 MOCK_METHOD1(GetNextProto, 67 MOCK_METHOD1(GetNextProto,
68 net::SSLClientSocket::NextProtoStatus(std::string*)); 68 net::SSLClientSocket::NextProtoStatus(std::string*));
69 MOCK_CONST_METHOD0(GetUnverifiedServerCertificateChain,
70 scoped_refptr<net::X509Certificate>());
71 MOCK_CONST_METHOD0(GetChannelIDService, net::ChannelIDService*()); 69 MOCK_CONST_METHOD0(GetChannelIDService, net::ChannelIDService*());
72 virtual bool IsConnected() const override { return true; } 70 virtual bool IsConnected() const override { return true; }
73 71
74 private: 72 private:
75 DISALLOW_COPY_AND_ASSIGN(MockSSLClientSocket); 73 DISALLOW_COPY_AND_ASSIGN(MockSSLClientSocket);
76 }; 74 };
77 75
78 class MockTCPSocket : public net::TCPClientSocket { 76 class MockTCPSocket : public net::TCPClientSocket {
79 public: 77 public:
80 explicit MockTCPSocket(const net::AddressList& address_list) 78 explicit MockTCPSocket(const net::AddressList& address_list)
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 total_bytes_written += amount_written_invocation; 305 total_bytes_written += amount_written_invocation;
308 cb.first.Run(amount_written_invocation); 306 cb.first.Run(amount_written_invocation);
309 } 307 }
310 308
311 ASSERT_EQ(total_bytes_requested, total_bytes_written) 309 ASSERT_EQ(total_bytes_requested, total_bytes_written)
312 << "There should be exactly as many bytes written as originally " 310 << "There should be exactly as many bytes written as originally "
313 << "requested to Write()."; 311 << "requested to Write().";
314 } 312 }
315 313
316 } // namespace extensions 314 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/cert_logger.proto » ('j') | chrome/browser/net/chrome_fraudulent_certificate_reporter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698