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/http/http_network_transaction.h" | 5 #include "net/http/http_network_transaction.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 next_protos.push_back("http/1.1"); | 122 next_protos.push_back("http/1.1"); |
123 next_protos.push_back("spdy/2"); | 123 next_protos.push_back("spdy/2"); |
124 next_protos.push_back("spdy/2.1"); | 124 next_protos.push_back("spdy/2.1"); |
125 | 125 |
126 switch (test_type_) { | 126 switch (test_type_) { |
127 case SPDYNPN: | 127 case SPDYNPN: |
128 session_->http_server_properties()->SetAlternateProtocol( | 128 session_->http_server_properties()->SetAlternateProtocol( |
129 HostPortPair("www.google.com", 80), 443, | 129 HostPortPair("www.google.com", 80), 443, |
130 NPN_SPDY_21); | 130 NPN_SPDY_21); |
131 HttpStreamFactory::set_use_alternate_protocols(true); | 131 HttpStreamFactory::set_use_alternate_protocols(true); |
132 HttpStreamFactory::set_next_protos(next_protos); | 132 HttpStreamFactory::SetNextProtos(next_protos); |
133 break; | 133 break; |
134 case SPDYNOSSL: | 134 case SPDYNOSSL: |
135 HttpStreamFactory::set_force_spdy_over_ssl(false); | 135 HttpStreamFactory::set_force_spdy_over_ssl(false); |
136 HttpStreamFactory::set_force_spdy_always(true); | 136 HttpStreamFactory::set_force_spdy_always(true); |
137 break; | 137 break; |
138 case SPDYSSL: | 138 case SPDYSSL: |
139 HttpStreamFactory::set_force_spdy_over_ssl(true); | 139 HttpStreamFactory::set_force_spdy_over_ssl(true); |
140 HttpStreamFactory::set_force_spdy_always(true); | 140 HttpStreamFactory::set_force_spdy_always(true); |
141 break; | 141 break; |
142 default: | 142 default: |
(...skipping 5689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5832 << " Write index: " | 5832 << " Write index: " |
5833 << data->write_index(); | 5833 << data->write_index(); |
5834 | 5834 |
5835 // Verify the SYN_REPLY. | 5835 // Verify the SYN_REPLY. |
5836 HttpResponseInfo response = *trans->GetResponseInfo(); | 5836 HttpResponseInfo response = *trans->GetResponseInfo(); |
5837 EXPECT_TRUE(response.headers != NULL); | 5837 EXPECT_TRUE(response.headers != NULL); |
5838 EXPECT_EQ("HTTP/1.1 200 OK", response.headers->GetStatusLine()); | 5838 EXPECT_EQ("HTTP/1.1 200 OK", response.headers->GetStatusLine()); |
5839 } | 5839 } |
5840 | 5840 |
5841 } // namespace net | 5841 } // namespace net |
OLD | NEW |