OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 105 |
106 HttpNetworkSession* CreateSession(SessionDependencies* session_deps) { | 106 HttpNetworkSession* CreateSession(SessionDependencies* session_deps) { |
107 net::HttpNetworkSession::Params params; | 107 net::HttpNetworkSession::Params params; |
108 params.client_socket_factory = &session_deps->socket_factory; | 108 params.client_socket_factory = &session_deps->socket_factory; |
109 params.host_resolver = session_deps->host_resolver.get(); | 109 params.host_resolver = session_deps->host_resolver.get(); |
110 params.cert_verifier = session_deps->cert_verifier.get(); | 110 params.cert_verifier = session_deps->cert_verifier.get(); |
111 params.proxy_service = session_deps->proxy_service.get(); | 111 params.proxy_service = session_deps->proxy_service.get(); |
112 params.ssl_config_service = session_deps->ssl_config_service; | 112 params.ssl_config_service = session_deps->ssl_config_service; |
113 params.http_auth_handler_factory = | 113 params.http_auth_handler_factory = |
114 session_deps->http_auth_handler_factory.get(); | 114 session_deps->http_auth_handler_factory.get(); |
| 115 params.http_server_properties = NULL; |
115 params.net_log = session_deps->net_log; | 116 params.net_log = session_deps->net_log; |
116 return new HttpNetworkSession(params); | 117 return new HttpNetworkSession(params); |
117 } | 118 } |
118 | 119 |
119 class HttpNetworkTransactionTest : public PlatformTest { | 120 class HttpNetworkTransactionTest : public PlatformTest { |
120 protected: | 121 protected: |
121 struct SimpleGetHelperResult { | 122 struct SimpleGetHelperResult { |
122 int rv; | 123 int rv; |
123 std::string status_line; | 124 std::string status_line; |
124 std::string response_data; | 125 std::string response_data; |
(...skipping 9084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9209 EXPECT_TRUE(response->was_fetched_via_spdy); | 9210 EXPECT_TRUE(response->was_fetched_via_spdy); |
9210 EXPECT_TRUE(response->was_npn_negotiated); | 9211 EXPECT_TRUE(response->was_npn_negotiated); |
9211 ASSERT_EQ(OK, ReadTransaction(&trans2, &response_data)); | 9212 ASSERT_EQ(OK, ReadTransaction(&trans2, &response_data)); |
9212 EXPECT_EQ("hello!", response_data); | 9213 EXPECT_EQ("hello!", response_data); |
9213 | 9214 |
9214 HttpStreamFactory::set_next_protos(""); | 9215 HttpStreamFactory::set_next_protos(""); |
9215 HttpStreamFactory::set_use_alternate_protocols(false); | 9216 HttpStreamFactory::set_use_alternate_protocols(false); |
9216 } | 9217 } |
9217 | 9218 |
9218 } // namespace net | 9219 } // namespace net |
OLD | NEW |