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

Unified Diff: net/socket/ssl_server_socket_unittest.cc

Issue 16501002: Give more request types a TransportSecurityState. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Enforce CalledOnValidThread in all non-static methods. Created 7 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 | « net/socket/ssl_client_socket_unittest.cc ('k') | net/socket_stream/socket_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_server_socket_unittest.cc
diff --git a/net/socket/ssl_server_socket_unittest.cc b/net/socket/ssl_server_socket_unittest.cc
index da388b904343ec62a6a542fb7af92be4193e6a9e..959d6b3fc0da30d2389ebd020c4e927960af9a56 100644
--- a/net/socket/ssl_server_socket_unittest.cc
+++ b/net/socket/ssl_server_socket_unittest.cc
@@ -37,6 +37,7 @@
#include "net/cert/cert_status_flags.h"
#include "net/cert/mock_cert_verifier.h"
#include "net/cert/x509_certificate.h"
+#include "net/http/transport_security_state.h"
#include "net/socket/client_socket_factory.h"
#include "net/socket/socket_test_util.h"
#include "net/socket/ssl_client_socket.h"
@@ -296,7 +297,8 @@ class SSLServerSocketTest : public PlatformTest {
public:
SSLServerSocketTest()
: socket_factory_(net::ClientSocketFactory::GetDefaultFactory()),
- cert_verifier_(new MockCertVerifier()) {
+ cert_verifier_(new MockCertVerifier()),
+ transport_security_state_(new TransportSecurityState) {
cert_verifier_->set_default_result(net::CERT_STATUS_AUTHORITY_INVALID);
}
@@ -341,6 +343,7 @@ class SSLServerSocketTest : public PlatformTest {
net::HostPortPair host_and_pair("unittest", 0);
net::SSLClientSocketContext context;
context.cert_verifier = cert_verifier_.get();
+ context.transport_security_state = transport_security_state_.get();
client_socket_.reset(
socket_factory_->CreateSSLClientSocket(
fake_client_socket, host_and_pair, ssl_config, context));
@@ -354,6 +357,7 @@ class SSLServerSocketTest : public PlatformTest {
scoped_ptr<net::SSLServerSocket> server_socket_;
net::ClientSocketFactory* socket_factory_;
scoped_ptr<net::MockCertVerifier> cert_verifier_;
+ scoped_ptr<net::TransportSecurityState> transport_security_state_;
};
// SSLServerSocket is only implemented using NSS.
« no previous file with comments | « net/socket/ssl_client_socket_unittest.cc ('k') | net/socket_stream/socket_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698