OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/http/http_network_transaction.h" | 5 #include "net/http/http_network_transaction.h" |
6 | 6 |
7 #include <math.h> // ceil | 7 #include <math.h> // ceil |
8 #include <stdarg.h> | 8 #include <stdarg.h> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 7823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7834 }; | 7834 }; |
7835 | 7835 |
7836 scoped_refptr<HttpNetworkSession> SetupSessionForGroupNameTests( | 7836 scoped_refptr<HttpNetworkSession> SetupSessionForGroupNameTests( |
7837 NextProto next_proto, | 7837 NextProto next_proto, |
7838 SpdySessionDependencies* session_deps_) { | 7838 SpdySessionDependencies* session_deps_) { |
7839 scoped_refptr<HttpNetworkSession> session(CreateSession(session_deps_)); | 7839 scoped_refptr<HttpNetworkSession> session(CreateSession(session_deps_)); |
7840 | 7840 |
7841 base::WeakPtr<HttpServerProperties> http_server_properties = | 7841 base::WeakPtr<HttpServerProperties> http_server_properties = |
7842 session->http_server_properties(); | 7842 session->http_server_properties(); |
7843 AlternativeService alternative_service( | 7843 AlternativeService alternative_service( |
7844 AlternateProtocolFromNextProto(next_proto), "alternative.host", 443); | 7844 AlternateProtocolFromNextProto(next_proto), "", 443); |
7845 http_server_properties->SetAlternativeService( | 7845 http_server_properties->SetAlternativeService( |
7846 HostPortPair("host.with.alternate", 80), alternative_service, 1.0); | 7846 HostPortPair("host.with.alternate", 80), alternative_service, 1.0); |
7847 | 7847 |
7848 return session; | 7848 return session; |
7849 } | 7849 } |
7850 | 7850 |
7851 int GroupNameTransactionHelper( | 7851 int GroupNameTransactionHelper( |
7852 const std::string& url, | 7852 const std::string& url, |
7853 const scoped_refptr<HttpNetworkSession>& session) { | 7853 const scoped_refptr<HttpNetworkSession>& session) { |
7854 HttpRequestInfo request; | 7854 HttpRequestInfo request; |
(...skipping 5997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13852 ASSERT_TRUE(response); | 13852 ASSERT_TRUE(response); |
13853 ASSERT_TRUE(response->headers.get()); | 13853 ASSERT_TRUE(response->headers.get()); |
13854 | 13854 |
13855 EXPECT_EQ(101, response->headers->response_code()); | 13855 EXPECT_EQ(101, response->headers->response_code()); |
13856 | 13856 |
13857 trans.reset(); | 13857 trans.reset(); |
13858 session->CloseAllConnections(); | 13858 session->CloseAllConnections(); |
13859 } | 13859 } |
13860 | 13860 |
13861 } // namespace net | 13861 } // namespace net |
OLD | NEW |