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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 session_deps_.get()); | 143 session_deps_.get()); |
144 HttpStreamFactory::set_use_alternate_protocols(false); | 144 HttpStreamFactory::set_use_alternate_protocols(false); |
145 HttpStreamFactory::set_force_spdy_over_ssl(false); | 145 HttpStreamFactory::set_force_spdy_over_ssl(false); |
146 HttpStreamFactory::set_force_spdy_always(false); | 146 HttpStreamFactory::set_force_spdy_always(false); |
147 | 147 |
148 std::vector<std::string> next_protos; | 148 std::vector<std::string> next_protos; |
149 next_protos.push_back("http/1.1"); | 149 next_protos.push_back("http/1.1"); |
150 next_protos.push_back("spdy/2"); | 150 next_protos.push_back("spdy/2"); |
151 next_protos.push_back("spdy/3"); | 151 next_protos.push_back("spdy/3"); |
152 next_protos.push_back("spdy/3.1"); | 152 next_protos.push_back("spdy/3.1"); |
153 next_protos.push_back("spdy/4a1"); | 153 next_protos.push_back("spdy/4a2"); |
154 | 154 |
155 switch (test_type_) { | 155 switch (test_type_) { |
156 case SPDYNPN: | 156 case SPDYNPN: |
157 session_->http_server_properties()->SetAlternateProtocol( | 157 session_->http_server_properties()->SetAlternateProtocol( |
158 HostPortPair("www.google.com", 80), 443, | 158 HostPortPair("www.google.com", 80), 443, |
159 NPN_SPDY_3); | 159 NPN_SPDY_3); |
160 HttpStreamFactory::set_use_alternate_protocols(true); | 160 HttpStreamFactory::set_use_alternate_protocols(true); |
161 HttpStreamFactory::SetNextProtos(next_protos); | 161 HttpStreamFactory::SetNextProtos(next_protos); |
162 break; | 162 break; |
163 case SPDYNOSSL: | 163 case SPDYNOSSL: |
(...skipping 6313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6477 // And now we can allow everything else to run to completion. | 6477 // And now we can allow everything else to run to completion. |
6478 data.SetStop(10); | 6478 data.SetStop(10); |
6479 data.Run(); | 6479 data.Run(); |
6480 EXPECT_EQ(OK, callback2.WaitForResult()); | 6480 EXPECT_EQ(OK, callback2.WaitForResult()); |
6481 EXPECT_EQ(OK, callback3.WaitForResult()); | 6481 EXPECT_EQ(OK, callback3.WaitForResult()); |
6482 | 6482 |
6483 helper.VerifyDataConsumed(); | 6483 helper.VerifyDataConsumed(); |
6484 } | 6484 } |
6485 | 6485 |
6486 } // namespace net | 6486 } // namespace net |
OLD | NEW |