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

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

Issue 9837027: Disable OCSP tests on Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix HasValue -> HasKey Created 8 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/test/remote_test_server.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 1357 matching lines...) Expand 10 before | Expand all | Expand 10 after
1368 if (err_allowed) { 1368 if (err_allowed) {
1369 EXPECT_NE(0, d.bytes_received()); 1369 EXPECT_NE(0, d.bytes_received());
1370 CheckSSLInfo(r.ssl_info()); 1370 CheckSSLInfo(r.ssl_info());
1371 } else { 1371 } else {
1372 EXPECT_EQ(0, d.bytes_received()); 1372 EXPECT_EQ(0, d.bytes_received());
1373 } 1373 }
1374 } 1374 }
1375 } 1375 }
1376 } 1376 }
1377 1377
1378 // http://crbug.com/119642 - The Android test server does not support
1379 // generating OCSP responses on the fly.
1380 #if !defined(OS_ANDROID)
1381
1378 class TestSSLConfigService : public SSLConfigService { 1382 class TestSSLConfigService : public SSLConfigService {
1379 public: 1383 public:
1380 TestSSLConfigService(bool ev_enabled, bool online_rev_checking) 1384 TestSSLConfigService(bool ev_enabled, bool online_rev_checking)
1381 : ev_enabled_(ev_enabled), 1385 : ev_enabled_(ev_enabled),
1382 online_rev_checking_(online_rev_checking) { 1386 online_rev_checking_(online_rev_checking) {
1383 } 1387 }
1384 1388
1385 virtual void GetSSLConfig(SSLConfig* config) { 1389 virtual void GetSSLConfig(SSLConfig* config) {
1386 *config = SSLConfig(); 1390 *config = SSLConfig();
1387 config->rev_checking_enabled = online_rev_checking_; 1391 config->rev_checking_enabled = online_rev_checking_;
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1677 CertStatus cert_status; 1681 CertStatus cert_status;
1678 DoConnection(https_options, &cert_status); 1682 DoConnection(https_options, &cert_status);
1679 1683
1680 // If we're not trying EV verification then, even if the CRLSet has expired, 1684 // If we're not trying EV verification then, even if the CRLSet has expired,
1681 // we don't fall back to online revocation checks. 1685 // we don't fall back to online revocation checks.
1682 EXPECT_EQ(0u, cert_status & CERT_STATUS_ALL_ERRORS); 1686 EXPECT_EQ(0u, cert_status & CERT_STATUS_ALL_ERRORS);
1683 EXPECT_FALSE(cert_status & CERT_STATUS_IS_EV); 1687 EXPECT_FALSE(cert_status & CERT_STATUS_IS_EV);
1684 EXPECT_FALSE(cert_status & CERT_STATUS_REV_CHECKING_ENABLED); 1688 EXPECT_FALSE(cert_status & CERT_STATUS_REV_CHECKING_ENABLED);
1685 } 1689 }
1686 1690
1691 #endif // !defined(OS_ANDROID)
1692
1687 // This tests that a load of www.google.com with a certificate error sets 1693 // This tests that a load of www.google.com with a certificate error sets
1688 // the |certificate_errors_are_fatal| flag correctly. This flag will cause 1694 // the |certificate_errors_are_fatal| flag correctly. This flag will cause
1689 // the interstitial to be fatal. 1695 // the interstitial to be fatal.
1690 TEST_F(HTTPSRequestTest, HTTPSPreloadedHSTSTest) { 1696 TEST_F(HTTPSRequestTest, HTTPSPreloadedHSTSTest) {
1691 TestServer::HTTPSOptions https_options( 1697 TestServer::HTTPSOptions https_options(
1692 TestServer::HTTPSOptions::CERT_MISMATCHED_NAME); 1698 TestServer::HTTPSOptions::CERT_MISMATCHED_NAME);
1693 TestServer test_server(https_options, 1699 TestServer test_server(https_options,
1694 FilePath(FILE_PATH_LITERAL("net/data/ssl"))); 1700 FilePath(FILE_PATH_LITERAL("net/data/ssl")));
1695 ASSERT_TRUE(test_server.Start()); 1701 ASSERT_TRUE(test_server.Start());
1696 1702
(...skipping 2818 matching lines...) Expand 10 before | Expand all | Expand 10 after
4515 req.SetExtraRequestHeaders(headers); 4521 req.SetExtraRequestHeaders(headers);
4516 req.Start(); 4522 req.Start();
4517 MessageLoop::current()->Run(); 4523 MessageLoop::current()->Run();
4518 // If the net tests are being run with ChromeFrame then we need to allow for 4524 // If the net tests are being run with ChromeFrame then we need to allow for
4519 // the 'chromeframe' suffix which is added to the user agent before the 4525 // the 'chromeframe' suffix which is added to the user agent before the
4520 // closing parentheses. 4526 // closing parentheses.
4521 EXPECT_TRUE(StartsWithASCII(d.data_received(), "Lynx (textmode", true)); 4527 EXPECT_TRUE(StartsWithASCII(d.data_received(), "Lynx (textmode", true));
4522 } 4528 }
4523 4529
4524 } // namespace net 4530 } // namespace net
OLDNEW
« no previous file with comments | « net/test/remote_test_server.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698