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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 session_deps_.get()); | 145 session_deps_.get()); |
146 HttpStreamFactory::set_use_alternate_protocols(false); | 146 HttpStreamFactory::set_use_alternate_protocols(false); |
147 HttpStreamFactory::set_force_spdy_over_ssl(false); | 147 HttpStreamFactory::set_force_spdy_over_ssl(false); |
148 HttpStreamFactory::set_force_spdy_always(false); | 148 HttpStreamFactory::set_force_spdy_always(false); |
149 | 149 |
150 std::vector<std::string> next_protos; | 150 std::vector<std::string> next_protos; |
151 next_protos.push_back("http/1.1"); | 151 next_protos.push_back("http/1.1"); |
152 next_protos.push_back("spdy/2"); | 152 next_protos.push_back("spdy/2"); |
153 next_protos.push_back("spdy/3"); | 153 next_protos.push_back("spdy/3"); |
154 next_protos.push_back("spdy/3.1"); | 154 next_protos.push_back("spdy/3.1"); |
155 next_protos.push_back("spdy/4a1"); | 155 next_protos.push_back("spdy/4a2"); |
156 | 156 |
157 switch (test_type_) { | 157 switch (test_type_) { |
158 case SPDYNPN: | 158 case SPDYNPN: |
159 session_->http_server_properties()->SetAlternateProtocol( | 159 session_->http_server_properties()->SetAlternateProtocol( |
160 HostPortPair("www.google.com", 80), 443, | 160 HostPortPair("www.google.com", 80), 443, |
161 NPN_SPDY_3); | 161 NPN_SPDY_3); |
162 HttpStreamFactory::set_use_alternate_protocols(true); | 162 HttpStreamFactory::set_use_alternate_protocols(true); |
163 HttpStreamFactory::SetNextProtos(next_protos); | 163 HttpStreamFactory::SetNextProtos(next_protos); |
164 break; | 164 break; |
165 case SPDYNOSSL: | 165 case SPDYNOSSL: |
(...skipping 6323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6489 // And now we can allow everything else to run to completion. | 6489 // And now we can allow everything else to run to completion. |
6490 data.SetStop(10); | 6490 data.SetStop(10); |
6491 data.Run(); | 6491 data.Run(); |
6492 EXPECT_EQ(OK, callback2.WaitForResult()); | 6492 EXPECT_EQ(OK, callback2.WaitForResult()); |
6493 EXPECT_EQ(OK, callback3.WaitForResult()); | 6493 EXPECT_EQ(OK, callback3.WaitForResult()); |
6494 | 6494 |
6495 helper.VerifyDataConsumed(); | 6495 helper.VerifyDataConsumed(); |
6496 } | 6496 } |
6497 | 6497 |
6498 } // namespace net | 6498 } // namespace net |
OLD | NEW |