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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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::set_next_protos(next_protos); |
| 133 HttpStreamFactory::set_highest_supported_alternate_protocol( |
| 134 NPN_SPDY_21); |
133 break; | 135 break; |
134 case SPDYNOSSL: | 136 case SPDYNOSSL: |
135 HttpStreamFactory::set_force_spdy_over_ssl(false); | 137 HttpStreamFactory::set_force_spdy_over_ssl(false); |
136 HttpStreamFactory::set_force_spdy_always(true); | 138 HttpStreamFactory::set_force_spdy_always(true); |
137 break; | 139 break; |
138 case SPDYSSL: | 140 case SPDYSSL: |
139 HttpStreamFactory::set_force_spdy_over_ssl(true); | 141 HttpStreamFactory::set_force_spdy_over_ssl(true); |
140 HttpStreamFactory::set_force_spdy_always(true); | 142 HttpStreamFactory::set_force_spdy_always(true); |
141 break; | 143 break; |
142 default: | 144 default: |
(...skipping 5689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5832 << " Write index: " | 5834 << " Write index: " |
5833 << data->write_index(); | 5835 << data->write_index(); |
5834 | 5836 |
5835 // Verify the SYN_REPLY. | 5837 // Verify the SYN_REPLY. |
5836 HttpResponseInfo response = *trans->GetResponseInfo(); | 5838 HttpResponseInfo response = *trans->GetResponseInfo(); |
5837 EXPECT_TRUE(response.headers != NULL); | 5839 EXPECT_TRUE(response.headers != NULL); |
5838 EXPECT_EQ("HTTP/1.1 200 OK", response.headers->GetStatusLine()); | 5840 EXPECT_EQ("HTTP/1.1 200 OK", response.headers->GetStatusLine()); |
5839 } | 5841 } |
5840 | 5842 |
5841 } // namespace net | 5843 } // namespace net |
OLD | NEW |