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

Unified Diff: net/socket/socket_test_util.h

Issue 6120003: Unit test for testing SSL client auth with both a proxy and an SSL endpoint (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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/http/http_network_transaction_unittest.cc ('k') | net/socket/socket_test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/socket_test_util.h
diff --git a/net/socket/socket_test_util.h b/net/socket/socket_test_util.h
index 1e09708a3d2622521360047dbf5b6027b7956bf0..b2d0bbc48fec405c6970e2ff6cc548086479e580 100644
--- a/net/socket/socket_test_util.h
+++ b/net/socket/socket_test_util.h
@@ -547,6 +547,9 @@ class MockClientSocketFactory : public ClientSocketFactory {
std::vector<MockTCPClientSocket*>& tcp_client_sockets() {
return tcp_client_sockets_;
}
+ std::vector<MockSSLClientSocket*>& ssl_client_sockets() {
+ return ssl_client_sockets_;
+ }
private:
SocketDataProviderArray<SocketDataProvider> mock_data_;
@@ -725,6 +728,14 @@ class MockSSLClientSocket : public MockClientSocket {
// This MockSocket does not implement the manual async IO feature.
virtual void OnReadComplete(const MockRead& data) { NOTIMPLEMENTED(); }
+ const HostPortPair& GetHostAndPort() const {
+ return host_and_port_;
+ }
+
+ const SSLConfig& GetSSLConfig() const {
+ return ssl_config_;
+ }
+
private:
class ConnectCallback;
@@ -733,6 +744,8 @@ class MockSSLClientSocket : public MockClientSocket {
bool is_npn_state_set_;
bool new_npn_value_;
bool was_used_to_convey_data_;
+ HostPortPair host_and_port_;
+ SSLConfig ssl_config_;
};
class TestSocketRequest : public CallbackRunner< Tuple1<int> > {
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/socket/socket_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698