| 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 ea3a9d4476760493469bc55b842e01b8fcfc6e79..c1a5b277cc1120808721f66e4b7174d9362a5efb 100644
|
| --- a/net/url_request/url_request_unittest.cc
|
| +++ b/net/url_request/url_request_unittest.cc
|
| @@ -152,6 +152,10 @@ namespace net {
|
|
|
| namespace {
|
|
|
| +namespace test0 {
|
| +#include "net/http/transport_security_state_static_unittest0.h"
|
| +}
|
| +
|
| const base::string16 kChrome(ASCIIToUTF16("chrome"));
|
| const base::string16 kSecret(ASCIIToUTF16("secret"));
|
| const base::string16 kUser(ASCIIToUTF16("user"));
|
| @@ -6743,6 +6747,9 @@ class MockCTPolicyEnforcer : public CTPolicyEnforcer {
|
|
|
| // Tests that Expect CT headers are processed correctly.
|
| TEST_F(URLRequestTestHTTP, ExpectCTHeader) {
|
| +#if !BUILDFLAG(INCLUDE_TRANSPORT_SECURITY_STATE_PRELOAD_LIST)
|
| + SetTransportSecurityStateSourceForTesting(&test0::kHSTSSource);
|
| +#endif
|
| EmbeddedTestServer https_test_server(net::EmbeddedTestServer::TYPE_HTTPS);
|
| https_test_server.SetSSLConfig(
|
| net::EmbeddedTestServer::CERT_COMMON_NAME_IS_DOMAIN);
|
| @@ -9107,6 +9114,9 @@ TEST_F(HTTPSRequestTest, HTTPSExpiredTest) {
|
| // the |certificate_errors_are_fatal| flag correctly. This flag will cause
|
| // the interstitial to be fatal.
|
| TEST_F(HTTPSRequestTest, HTTPSPreloadedHSTSTest) {
|
| +#if !BUILDFLAG(INCLUDE_TRANSPORT_SECURITY_STATE_PRELOAD_LIST)
|
| + SetTransportSecurityStateSourceForTesting(&test0::kHSTSSource);
|
| +#endif
|
| EmbeddedTestServer test_server(net::EmbeddedTestServer::TYPE_HTTPS);
|
| test_server.SetSSLConfig(net::EmbeddedTestServer::CERT_MISMATCHED_NAME);
|
| test_server.ServeFilesFromSourceDirectory("net/data/ssl");
|
| @@ -9146,6 +9156,9 @@ TEST_F(HTTPSRequestTest, HTTPSPreloadedHSTSTest) {
|
| // This tests that cached HTTPS page loads do not cause any updates to the
|
| // TransportSecurityState.
|
| TEST_F(HTTPSRequestTest, HTTPSErrorsNoClobberTSSTest) {
|
| +#if !BUILDFLAG(INCLUDE_TRANSPORT_SECURITY_STATE_PRELOAD_LIST)
|
| + SetTransportSecurityStateSourceForTesting(&test0::kHSTSSource);
|
| +#endif
|
| // The actual problem -- CERT_MISMATCHED_NAME in this case -- doesn't
|
| // matter. It just has to be any error.
|
| EmbeddedTestServer test_server(net::EmbeddedTestServer::TYPE_HTTPS);
|
| @@ -10057,6 +10070,9 @@ TEST_F(HTTPSOCSPTest, MAYBE_RevokedStapled) {
|
| }
|
|
|
| TEST_F(HTTPSOCSPTest, ExpectStapleReportSentOnMissing) {
|
| +#if !BUILDFLAG(INCLUDE_TRANSPORT_SECURITY_STATE_PRELOAD_LIST)
|
| + SetTransportSecurityStateSourceForTesting(&test0::kHSTSSource);
|
| +#endif
|
| EmbeddedTestServer https_test_server(net::EmbeddedTestServer::TYPE_HTTPS);
|
| https_test_server.SetSSLConfig(
|
| net::EmbeddedTestServer::CERT_COMMON_NAME_IS_DOMAIN);
|
|
|