OLD | NEW |
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 "net/spdy/spdy_http_stream.h" | 5 #include "net/spdy/spdy_http_stream.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
809 socket_factory->AddSSLSocketDataProvider(&ssl); | 809 socket_factory->AddSSLSocketDataProvider(&ssl); |
810 http_session_ = SpdySessionDependencies::SpdyCreateSessionDeterministic( | 810 http_session_ = SpdySessionDependencies::SpdyCreateSessionDeterministic( |
811 &session_deps_); | 811 &session_deps_); |
812 session_ = http_session_->spdy_session_pool()->Get(pair, BoundNetLog()); | 812 session_ = http_session_->spdy_session_pool()->Get(pair, BoundNetLog()); |
813 transport_params_ = new TransportSocketParams(host_port_pair, | 813 transport_params_ = new TransportSocketParams(host_port_pair, |
814 MEDIUM, false, false, | 814 MEDIUM, false, false, |
815 OnHostResolutionCallback()); | 815 OnHostResolutionCallback()); |
816 TestCompletionCallback callback; | 816 TestCompletionCallback callback; |
817 scoped_ptr<ClientSocketHandle> connection(new ClientSocketHandle); | 817 scoped_ptr<ClientSocketHandle> connection(new ClientSocketHandle); |
818 SSLConfig ssl_config; | 818 SSLConfig ssl_config; |
819 scoped_refptr<SOCKSSocketParams> socks_params; | 819 scoped_refptr<SSLSocketParams> ssl_params = |
820 scoped_refptr<HttpProxySocketParams> http_proxy_params; | 820 SSLSocketParams::CreateForDirectConnection( |
821 scoped_refptr<SSLSocketParams> ssl_params( | 821 transport_params_, |
822 new SSLSocketParams(transport_params_, | 822 host_port_pair, |
823 socks_params, | 823 ssl_config, |
824 http_proxy_params, | 824 0, |
825 ProxyServer::SCHEME_DIRECT, | 825 false, |
826 host_port_pair, | 826 false); |
827 ssl_config, | |
828 0, | |
829 false, | |
830 false)); | |
831 EXPECT_EQ(ERR_IO_PENDING, | 827 EXPECT_EQ(ERR_IO_PENDING, |
832 connection->Init(host_port_pair.ToString(), | 828 connection->Init(host_port_pair.ToString(), |
833 ssl_params, | 829 ssl_params, |
834 MEDIUM, | 830 MEDIUM, |
835 callback.callback(), | 831 callback.callback(), |
836 http_session_->GetSSLSocketPool( | 832 http_session_->GetSSLSocketPool( |
837 HttpNetworkSession::NORMAL_SOCKET_POOL), | 833 HttpNetworkSession::NORMAL_SOCKET_POOL), |
838 BoundNetLog())); | 834 BoundNetLog())); |
839 callback.WaitForResult(); | 835 callback.WaitForResult(); |
840 EXPECT_EQ(OK, | 836 EXPECT_EQ(OK, |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
901 | 897 |
902 sequenced_worker_pool->Shutdown(); | 898 sequenced_worker_pool->Shutdown(); |
903 } | 899 } |
904 | 900 |
905 #endif // !defined(USE_OPENSSL) | 901 #endif // !defined(USE_OPENSSL) |
906 | 902 |
907 // TODO(willchan): Write a longer test for SpdyStream that exercises all | 903 // TODO(willchan): Write a longer test for SpdyStream that exercises all |
908 // methods. | 904 // methods. |
909 | 905 |
910 } // namespace net | 906 } // namespace net |
OLD | NEW |