| OLD | NEW |
| 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 // This test suite uses SSLClientSocket to test the implementation of | 5 // This test suite uses SSLClientSocket to test the implementation of |
| 6 // SSLServerSocket. In order to establish connections between the sockets | 6 // SSLServerSocket. In order to establish connections between the sockets |
| 7 // we need two additional classes: | 7 // we need two additional classes: |
| 8 // 1. FakeSocket | 8 // 1. FakeSocket |
| 9 // Connects SSL socket to FakeDataChannel. This class is just a stub. | 9 // Connects SSL socket to FakeDataChannel. This class is just a stub. |
| 10 // | 10 // |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 bool WasEverUsed() const override { return true; } | 232 bool WasEverUsed() const override { return true; } |
| 233 | 233 |
| 234 bool UsingTCPFastOpen() const override { return false; } | 234 bool UsingTCPFastOpen() const override { return false; } |
| 235 | 235 |
| 236 bool WasNpnNegotiated() const override { return false; } | 236 bool WasNpnNegotiated() const override { return false; } |
| 237 | 237 |
| 238 NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; } | 238 NextProto GetNegotiatedProtocol() const override { return kProtoUnknown; } |
| 239 | 239 |
| 240 bool GetSSLInfo(SSLInfo* ssl_info) override { return false; } | 240 bool GetSSLInfo(SSLInfo* ssl_info) override { return false; } |
| 241 | 241 |
| 242 void GetConnectionAttempts(ConnectionAttempts* out) const override { |
| 243 out->clear(); |
| 244 } |
| 245 |
| 246 void ClearConnectionAttempts() override {} |
| 247 |
| 248 void AddConnectionAttempts(const ConnectionAttempts& attempts) override {} |
| 249 |
| 242 private: | 250 private: |
| 243 BoundNetLog net_log_; | 251 BoundNetLog net_log_; |
| 244 FakeDataChannel* incoming_; | 252 FakeDataChannel* incoming_; |
| 245 FakeDataChannel* outgoing_; | 253 FakeDataChannel* outgoing_; |
| 246 | 254 |
| 247 DISALLOW_COPY_AND_ASSIGN(FakeSocket); | 255 DISALLOW_COPY_AND_ASSIGN(FakeSocket); |
| 248 }; | 256 }; |
| 249 | 257 |
| 250 } // namespace | 258 } // namespace |
| 251 | 259 |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 int server_ret = server_socket_->Handshake(handshake_callback.callback()); | 629 int server_ret = server_socket_->Handshake(handshake_callback.callback()); |
| 622 | 630 |
| 623 client_ret = connect_callback.GetResult(client_ret); | 631 client_ret = connect_callback.GetResult(client_ret); |
| 624 server_ret = handshake_callback.GetResult(server_ret); | 632 server_ret = handshake_callback.GetResult(server_ret); |
| 625 | 633 |
| 626 ASSERT_EQ(ERR_SSL_VERSION_OR_CIPHER_MISMATCH, client_ret); | 634 ASSERT_EQ(ERR_SSL_VERSION_OR_CIPHER_MISMATCH, client_ret); |
| 627 ASSERT_EQ(ERR_SSL_VERSION_OR_CIPHER_MISMATCH, server_ret); | 635 ASSERT_EQ(ERR_SSL_VERSION_OR_CIPHER_MISMATCH, server_ret); |
| 628 } | 636 } |
| 629 | 637 |
| 630 } // namespace net | 638 } // namespace net |
| OLD | NEW |