| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 session_deps_.get()); | 133 session_deps_.get()); |
| 134 HttpStreamFactory::set_use_alternate_protocols(false); | 134 HttpStreamFactory::set_use_alternate_protocols(false); |
| 135 HttpStreamFactory::set_force_spdy_over_ssl(false); | 135 HttpStreamFactory::set_force_spdy_over_ssl(false); |
| 136 HttpStreamFactory::set_force_spdy_always(false); | 136 HttpStreamFactory::set_force_spdy_always(false); |
| 137 | 137 |
| 138 std::vector<std::string> next_protos; | 138 std::vector<std::string> next_protos; |
| 139 next_protos.push_back("http/1.1"); | 139 next_protos.push_back("http/1.1"); |
| 140 next_protos.push_back("spdy/2"); | 140 next_protos.push_back("spdy/2"); |
| 141 next_protos.push_back("spdy/3"); | 141 next_protos.push_back("spdy/3"); |
| 142 next_protos.push_back("spdy/3.1"); | 142 next_protos.push_back("spdy/3.1"); |
| 143 next_protos.push_back("spdy/4a1"); |
| 143 | 144 |
| 144 switch (test_type_) { | 145 switch (test_type_) { |
| 145 case SPDYNPN: | 146 case SPDYNPN: |
| 146 session_->http_server_properties()->SetAlternateProtocol( | 147 session_->http_server_properties()->SetAlternateProtocol( |
| 147 HostPortPair("www.google.com", 80), 443, | 148 HostPortPair("www.google.com", 80), 443, |
| 148 NPN_SPDY_3); | 149 NPN_SPDY_3); |
| 149 HttpStreamFactory::set_use_alternate_protocols(true); | 150 HttpStreamFactory::set_use_alternate_protocols(true); |
| 150 HttpStreamFactory::SetNextProtos(next_protos); | 151 HttpStreamFactory::SetNextProtos(next_protos); |
| 151 break; | 152 break; |
| 152 case SPDYNOSSL: | 153 case SPDYNOSSL: |
| (...skipping 6311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6464 // And now we can allow everything else to run to completion. | 6465 // And now we can allow everything else to run to completion. |
| 6465 data.SetStop(10); | 6466 data.SetStop(10); |
| 6466 data.Run(); | 6467 data.Run(); |
| 6467 EXPECT_EQ(OK, callback2.WaitForResult()); | 6468 EXPECT_EQ(OK, callback2.WaitForResult()); |
| 6468 EXPECT_EQ(OK, callback3.WaitForResult()); | 6469 EXPECT_EQ(OK, callback3.WaitForResult()); |
| 6469 | 6470 |
| 6470 helper.VerifyDataConsumed(); | 6471 helper.VerifyDataConsumed(); |
| 6471 } | 6472 } |
| 6472 | 6473 |
| 6473 } // namespace net | 6474 } // namespace net |
| OLD | NEW |