| 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 09b9c28f7b3cfffee920adac5478b9b9f56c731b..984210f9ff0fc83f2405c6230c60daab9102fca1 100644
|
| --- a/net/url_request/url_request_unittest.cc
|
| +++ b/net/url_request/url_request_unittest.cc
|
| @@ -155,6 +155,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"));
|
| @@ -6747,6 +6751,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);
|
| @@ -9215,6 +9222,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");
|
| @@ -9254,6 +9264,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);
|
| @@ -10157,6 +10170,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);
|
|
|