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

Unified Diff: net/url_request/url_request_unittest.cc

Issue 2037883002: Remove XP-specific logic in url_request_unittest.cc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_unittest.cc
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index 80b8fcd56d684b422b2538f4e521a696099277a6..0fce7f0ca3762f56fd719892e0daa2039daad276 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -85,7 +85,6 @@
#include "net/socket/ssl_client_socket.h"
#include "net/ssl/channel_id_service.h"
#include "net/ssl/default_channel_id_store.h"
-#include "net/ssl/ssl_cipher_suite_names.h"
#include "net/ssl/ssl_connection_status_flags.h"
#include "net/ssl/ssl_server_config.h"
#include "net/ssl/token_binding.h"
@@ -123,7 +122,6 @@
#if defined(OS_WIN)
#include "base/win/scoped_com_initializer.h"
#include "base/win/scoped_comptr.h"
-#include "base/win/windows_version.h"
#endif
using base::ASCIIToUTF16;
@@ -8806,55 +8804,6 @@ TEST_F(HTTPSRequestTest, SSLSessionCacheShardTest) {
}
}
-#if defined(OS_WIN)
-
-namespace {
-
-bool IsECDSACipherSuite(uint16_t cipher_suite) {
- const char* key_exchange;
- const char* cipher;
- const char* mac;
- bool is_aead;
- SSLCipherSuiteToStrings(&key_exchange, &cipher, &mac, &is_aead, cipher_suite);
- return std::string(key_exchange).find("ECDSA") != std::string::npos;
-}
-
-} // namespace
-
-// Test that ECDSA is disabled on Windows XP, where ECDSA certificates cannot be
-// verified.
-TEST_F(HTTPSRequestTest, DisableECDSAOnXP) {
- if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
- LOG(INFO) << "Skipping test on this version.";
- return;
- }
-
- EmbeddedTestServer test_server(net::EmbeddedTestServer::TYPE_HTTPS);
- test_server.ServeFilesFromSourceDirectory("net/data/ssl");
- ASSERT_TRUE(test_server.Start());
-
- TestDelegate d;
- std::unique_ptr<URLRequest> r(default_context_.CreateRequest(
- test_server.GetURL("/client-cipher-list"), DEFAULT_PRIORITY, &d));
- r->Start();
- EXPECT_TRUE(r->is_pending());
-
- base::RunLoop().Run();
-
- EXPECT_EQ(1, d.response_started_count());
- std::vector<std::string> lines = base::SplitString(
- d.data_received(), "\n", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
-
- for (size_t i = 0; i < lines.size(); i++) {
- int cipher_suite;
- ASSERT_TRUE(base::StringToInt(lines[i], &cipher_suite));
- EXPECT_FALSE(IsECDSACipherSuite(cipher_suite))
- << "ClientHello advertised " << cipher_suite;
- }
-}
-
-#endif // OS_WIN
-
class FallbackTestURLRequestContext : public TestURLRequestContext {
public:
explicit FallbackTestURLRequestContext(bool delay_initialization)
@@ -9312,12 +9261,7 @@ static bool SystemUsesChromiumEVMetadata() {
}
static bool SystemSupportsOCSP() {
-#if defined(USE_OPENSSL_CERTS)
- // http://crbug.com/117478 - OpenSSL does not support OCSP.
- return false;
-#elif defined(OS_WIN)
- return base::win::GetVersion() >= base::win::VERSION_VISTA;
-#elif defined(OS_ANDROID)
+#if defined(OS_ANDROID)
// TODO(jnd): http://crbug.com/117478 - EV verification is not yet supported.
return false;
#else
@@ -9326,10 +9270,8 @@ static bool SystemSupportsOCSP() {
}
static bool SystemSupportsOCSPStapling() {
-#if defined(USE_NSS_CERTS)
+#if defined(USE_NSS_CERTS) || defined(OS_WIN)
return true;
-#elif defined(OS_WIN)
- return base::win::GetVersion() >= base::win::VERSION_VISTA;
#else
return false;
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698