OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "net/socket/ssl_client_socket.h" | 5 #include "net/socket/ssl_client_socket.h" |
6 | 6 |
7 #include "net/base/address_list.h" | 7 #include "net/base/address_list.h" |
8 #include "net/base/host_resolver.h" | 8 #include "net/base/host_resolver.h" |
9 #include "net/base/io_buffer.h" | 9 #include "net/base/io_buffer.h" |
10 #include "net/base/net_log.h" | 10 #include "net/base/net_log.h" |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 } | 174 } |
175 | 175 |
176 // We cannot test sock->IsConnected(), as the NSS implementation disconnects | 176 // We cannot test sock->IsConnected(), as the NSS implementation disconnects |
177 // the socket when it encounters an error, whereas other implementations | 177 // the socket when it encounters an error, whereas other implementations |
178 // leave it connected. | 178 // leave it connected. |
179 EXPECT_TRUE(LogContainsSSLConnectEndEvent(log.entries(), -1)); | 179 EXPECT_TRUE(LogContainsSSLConnectEndEvent(log.entries(), -1)); |
180 } | 180 } |
181 | 181 |
182 // Attempt to connect to a page which requests a client certificate. It should | 182 // Attempt to connect to a page which requests a client certificate. It should |
183 // return an error code on connect. | 183 // return an error code on connect. |
| 184 // Flaky: http://crbug.com/54445 |
184 TEST_F(SSLClientSocketTest, FLAKY_ConnectClientAuthCertRequested) { | 185 TEST_F(SSLClientSocketTest, FLAKY_ConnectClientAuthCertRequested) { |
185 net::TestServer test_server(net::TestServer::TYPE_HTTPS_CLIENT_AUTH, | 186 net::TestServer test_server(net::TestServer::TYPE_HTTPS_CLIENT_AUTH, |
186 FilePath()); | 187 FilePath()); |
187 ASSERT_TRUE(test_server.Start()); | 188 ASSERT_TRUE(test_server.Start()); |
188 | 189 |
189 net::AddressList addr; | 190 net::AddressList addr; |
190 ASSERT_TRUE(test_server.GetAddressList(&addr)); | 191 ASSERT_TRUE(test_server.GetAddressList(&addr)); |
191 | 192 |
192 TestCompletionCallback callback; | 193 TestCompletionCallback callback; |
193 net::CapturingNetLog log(net::CapturingNetLog::kUnbounded); | 194 net::CapturingNetLog log(net::CapturingNetLog::kUnbounded); |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 EXPECT_EQ(net::OK, rv); | 549 EXPECT_EQ(net::OK, rv); |
549 | 550 |
550 scoped_ptr<net::SSLClientSocket> sock( | 551 scoped_ptr<net::SSLClientSocket> sock( |
551 socket_factory_->CreateSSLClientSocket( | 552 socket_factory_->CreateSSLClientSocket( |
552 transport, test_server.host_port_pair().host(), kDefaultSSLConfig, | 553 transport, test_server.host_port_pair().host(), kDefaultSSLConfig, |
553 NULL /* ssl_host_info */)); | 554 NULL /* ssl_host_info */)); |
554 | 555 |
555 rv = sock->Connect(&callback); | 556 rv = sock->Connect(&callback); |
556 EXPECT_EQ(net::ERR_SSL_PROTOCOL_ERROR, rv); | 557 EXPECT_EQ(net::ERR_SSL_PROTOCOL_ERROR, rv); |
557 } | 558 } |
OLD | NEW |