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

Side by Side Diff: net/url_request/url_request_unittest.cc

Issue 208713004: Move SSLConfig class from ssl_config_service.h to ssl_config.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « net/ssl/ssl_config_service.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shlobj.h> 9 #include <shlobj.h>
10 #endif 10 #endif
(...skipping 6186 matching lines...) Expand 10 before | Expand all | Expand 10 after
6197 } else { 6197 } else {
6198 EXPECT_EQ(0, d.bytes_received()); 6198 EXPECT_EQ(0, d.bytes_received());
6199 } 6199 }
6200 } 6200 }
6201 } 6201 }
6202 } 6202 }
6203 6203
6204 // Tests TLSv1.1 -> TLSv1 fallback. Verifies that we don't fall back more 6204 // Tests TLSv1.1 -> TLSv1 fallback. Verifies that we don't fall back more
6205 // than necessary. 6205 // than necessary.
6206 TEST_F(HTTPSRequestTest, TLSv1Fallback) { 6206 TEST_F(HTTPSRequestTest, TLSv1Fallback) {
6207 uint16 default_version_max = SSLConfigService::default_version_max();
6208 // The OpenSSL library in use may not support TLS 1.1. 6207 // The OpenSSL library in use may not support TLS 1.1.
6209 #if !defined(USE_OPENSSL) 6208 #if !defined(USE_OPENSSL)
6210 EXPECT_GT(default_version_max, SSL_PROTOCOL_VERSION_TLS1); 6209 EXPECT_GT(kDefaultSSLVersionMax, SSL_PROTOCOL_VERSION_TLS1);
6211 #endif 6210 #endif
6212 if (default_version_max <= SSL_PROTOCOL_VERSION_TLS1) 6211 if (kDefaultSSLVersionMax <= SSL_PROTOCOL_VERSION_TLS1)
6213 return; 6212 return;
6214 6213
6215 SpawnedTestServer::SSLOptions ssl_options( 6214 SpawnedTestServer::SSLOptions ssl_options(
6216 SpawnedTestServer::SSLOptions::CERT_OK); 6215 SpawnedTestServer::SSLOptions::CERT_OK);
6217 ssl_options.tls_intolerant = 6216 ssl_options.tls_intolerant =
6218 SpawnedTestServer::SSLOptions::TLS_INTOLERANT_TLS1_1; 6217 SpawnedTestServer::SSLOptions::TLS_INTOLERANT_TLS1_1;
6219 SpawnedTestServer test_server( 6218 SpawnedTestServer test_server(
6220 SpawnedTestServer::TYPE_HTTPS, 6219 SpawnedTestServer::TYPE_HTTPS,
6221 ssl_options, 6220 ssl_options,
6222 base::FilePath(FILE_PATH_LITERAL("net/data/ssl"))); 6221 base::FilePath(FILE_PATH_LITERAL("net/data/ssl")));
(...skipping 1445 matching lines...) Expand 10 before | Expand all | Expand 10 after
7668 7667
7669 EXPECT_FALSE(r.is_pending()); 7668 EXPECT_FALSE(r.is_pending());
7670 EXPECT_EQ(1, d->response_started_count()); 7669 EXPECT_EQ(1, d->response_started_count());
7671 EXPECT_FALSE(d->received_data_before_response()); 7670 EXPECT_FALSE(d->received_data_before_response());
7672 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); 7671 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size));
7673 } 7672 }
7674 } 7673 }
7675 #endif // !defined(DISABLE_FTP_SUPPORT) 7674 #endif // !defined(DISABLE_FTP_SUPPORT)
7676 7675
7677 } // namespace net 7676 } // namespace net
OLDNEW
« no previous file with comments | « net/ssl/ssl_config_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698