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

Unified Diff: net/socket/ssl_client_socket_unittest.cc

Issue 3812007: Support restriction the TLS cipher selection in test_server.py (Closed)
Patch Set: Rebase to trunk Created 10 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/net/url_fetcher_unittest.cc ('k') | net/test/test_server.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket_unittest.cc
diff --git a/net/socket/ssl_client_socket_unittest.cc b/net/socket/ssl_client_socket_unittest.cc
index bfcbe81c13f0cd86b299c5e5b24fb9c30ab0918d..6d29c5b7de246bb5918b6c7df772e2370f76de6b 100644
--- a/net/socket/ssl_client_socket_unittest.cc
+++ b/net/socket/ssl_client_socket_unittest.cc
@@ -93,8 +93,9 @@ TEST_F(SSLClientSocketTest, Connect) {
}
TEST_F(SSLClientSocketTest, ConnectExpired) {
- net::TestServer test_server(net::TestServer::TYPE_HTTPS_EXPIRED_CERTIFICATE,
- FilePath());
+ net::TestServer::HTTPSOptions https_options(
+ net::TestServer::HTTPSOptions::CERT_EXPIRED);
+ net::TestServer test_server(https_options, FilePath());
ASSERT_TRUE(test_server.Start());
net::AddressList addr;
@@ -136,8 +137,9 @@ TEST_F(SSLClientSocketTest, ConnectExpired) {
}
TEST_F(SSLClientSocketTest, ConnectMismatched) {
- net::TestServer test_server(net::TestServer::TYPE_HTTPS_MISMATCHED_HOSTNAME,
- FilePath());
+ net::TestServer::HTTPSOptions https_options(
+ net::TestServer::HTTPSOptions::CERT_MISMATCHED_NAME);
+ net::TestServer test_server(https_options, FilePath());
ASSERT_TRUE(test_server.Start());
net::AddressList addr;
@@ -182,8 +184,9 @@ TEST_F(SSLClientSocketTest, ConnectMismatched) {
// Attempt to connect to a page which requests a client certificate. It should
// return an error code on connect.
TEST_F(SSLClientSocketTest, FLAKY_ConnectClientAuthCertRequested) {
- net::TestServer test_server(net::TestServer::TYPE_HTTPS_CLIENT_AUTH,
- FilePath());
+ net::TestServer::HTTPSOptions https_options;
+ https_options.request_client_certificate = true;
+ net::TestServer test_server(https_options, FilePath());
ASSERT_TRUE(test_server.Start());
net::AddressList addr;
@@ -229,8 +232,9 @@ TEST_F(SSLClientSocketTest, FLAKY_ConnectClientAuthCertRequested) {
//
// TODO(davidben): Also test providing an actual certificate.
TEST_F(SSLClientSocketTest, ConnectClientAuthSendNullCert) {
- net::TestServer test_server(net::TestServer::TYPE_HTTPS_CLIENT_AUTH,
- FilePath());
+ net::TestServer::HTTPSOptions https_options;
+ https_options.request_client_certificate = true;
+ net::TestServer test_server(https_options, FilePath());
ASSERT_TRUE(test_server.Start());
net::AddressList addr;
« no previous file with comments | « chrome/common/net/url_fetcher_unittest.cc ('k') | net/test/test_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698