| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 if (!session_.get()) | 112 if (!session_.get()) |
| 113 session_ = SpdySessionDependencies::SpdyCreateSession( | 113 session_ = SpdySessionDependencies::SpdyCreateSession( |
| 114 session_deps_.get()); | 114 session_deps_.get()); |
| 115 HttpStreamFactory::set_use_alternate_protocols(false); | 115 HttpStreamFactory::set_use_alternate_protocols(false); |
| 116 HttpStreamFactory::set_force_spdy_over_ssl(false); | 116 HttpStreamFactory::set_force_spdy_over_ssl(false); |
| 117 HttpStreamFactory::set_force_spdy_always(false); | 117 HttpStreamFactory::set_force_spdy_always(false); |
| 118 | 118 |
| 119 std::vector<std::string> next_protos; | 119 std::vector<std::string> next_protos; |
| 120 next_protos.push_back("http/1.1"); | 120 next_protos.push_back("http/1.1"); |
| 121 next_protos.push_back("spdy/2"); | 121 next_protos.push_back("spdy/2"); |
| 122 next_protos.push_back("spdy/2.1"); | |
| 123 | 122 |
| 124 switch (test_type_) { | 123 switch (test_type_) { |
| 125 case SPDYNPN: | 124 case SPDYNPN: |
| 126 session_->http_server_properties()->SetAlternateProtocol( | 125 session_->http_server_properties()->SetAlternateProtocol( |
| 127 HostPortPair("www.google.com", 80), 443, | 126 HostPortPair("www.google.com", 80), 443, |
| 128 NPN_SPDY_2); | 127 NPN_SPDY_2); |
| 129 HttpStreamFactory::set_use_alternate_protocols(true); | 128 HttpStreamFactory::set_use_alternate_protocols(true); |
| 130 HttpStreamFactory::SetNextProtos(next_protos); | 129 HttpStreamFactory::SetNextProtos(next_protos); |
| 131 break; | 130 break; |
| 132 case SPDYNOSSL: | 131 case SPDYNOSSL: |
| (...skipping 5433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5566 << " Write index: " | 5565 << " Write index: " |
| 5567 << data->write_index(); | 5566 << data->write_index(); |
| 5568 | 5567 |
| 5569 // Verify the SYN_REPLY. | 5568 // Verify the SYN_REPLY. |
| 5570 HttpResponseInfo response = *trans->GetResponseInfo(); | 5569 HttpResponseInfo response = *trans->GetResponseInfo(); |
| 5571 EXPECT_TRUE(response.headers != NULL); | 5570 EXPECT_TRUE(response.headers != NULL); |
| 5572 EXPECT_EQ("HTTP/1.1 200 OK", response.headers->GetStatusLine()); | 5571 EXPECT_EQ("HTTP/1.1 200 OK", response.headers->GetStatusLine()); |
| 5573 } | 5572 } |
| 5574 | 5573 |
| 5575 } // namespace net | 5574 } // namespace net |
| OLD | NEW |