| OLD | NEW |
| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 unsigned int)); | 68 unsigned int)); |
| 69 MOCK_METHOD1(GetSSLCertRequestInfo, void(net::SSLCertRequestInfo*)); | 69 MOCK_METHOD1(GetSSLCertRequestInfo, void(net::SSLCertRequestInfo*)); |
| 70 MOCK_CONST_METHOD1(GetNextProto, | 70 MOCK_CONST_METHOD1(GetNextProto, |
| 71 net::SSLClientSocket::NextProtoStatus(std::string*)); | 71 net::SSLClientSocket::NextProtoStatus(std::string*)); |
| 72 MOCK_CONST_METHOD0(GetUnverifiedServerCertificateChain, | 72 MOCK_CONST_METHOD0(GetUnverifiedServerCertificateChain, |
| 73 scoped_refptr<net::X509Certificate>()); | 73 scoped_refptr<net::X509Certificate>()); |
| 74 MOCK_CONST_METHOD0(GetChannelIDService, net::ChannelIDService*()); | 74 MOCK_CONST_METHOD0(GetChannelIDService, net::ChannelIDService*()); |
| 75 MOCK_METHOD2(GetSignedEKMForTokenBinding, | 75 MOCK_METHOD2(GetSignedEKMForTokenBinding, |
| 76 net::Error(crypto::ECPrivateKey*, std::vector<uint8_t>*)); | 76 net::Error(crypto::ECPrivateKey*, std::vector<uint8_t>*)); |
| 77 MOCK_CONST_METHOD0(GetChannelIDKey, crypto::ECPrivateKey*()); | 77 MOCK_CONST_METHOD0(GetChannelIDKey, crypto::ECPrivateKey*()); |
| 78 MOCK_CONST_METHOD0(GetSSLFailureState, net::SSLFailureState()); | |
| 79 bool IsConnected() const override { return true; } | 78 bool IsConnected() const override { return true; } |
| 80 | 79 |
| 81 private: | 80 private: |
| 82 DISALLOW_COPY_AND_ASSIGN(MockSSLClientSocket); | 81 DISALLOW_COPY_AND_ASSIGN(MockSSLClientSocket); |
| 83 }; | 82 }; |
| 84 | 83 |
| 85 class MockTCPSocket : public net::TCPClientSocket { | 84 class MockTCPSocket : public net::TCPClientSocket { |
| 86 public: | 85 public: |
| 87 explicit MockTCPSocket(const net::AddressList& address_list) | 86 explicit MockTCPSocket(const net::AddressList& address_list) |
| 88 : net::TCPClientSocket(address_list, NULL, NULL, net::NetLog::Source()) {} | 87 : net::TCPClientSocket(address_list, NULL, NULL, net::NetLog::Source()) {} |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 total_bytes_written += amount_written_invocation; | 313 total_bytes_written += amount_written_invocation; |
| 315 cb.first.Run(amount_written_invocation); | 314 cb.first.Run(amount_written_invocation); |
| 316 } | 315 } |
| 317 | 316 |
| 318 ASSERT_EQ(total_bytes_requested, total_bytes_written) | 317 ASSERT_EQ(total_bytes_requested, total_bytes_written) |
| 319 << "There should be exactly as many bytes written as originally " | 318 << "There should be exactly as many bytes written as originally " |
| 320 << "requested to Write()."; | 319 << "requested to Write()."; |
| 321 } | 320 } |
| 322 | 321 |
| 323 } // namespace extensions | 322 } // namespace extensions |
| OLD | NEW |