Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: net/spdy/spdy_network_transaction_unittest.cc

Issue 9516009: SPDY - disable spdy/2.1 (flow control) by default (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 session_ = SpdySessionDependencies::SpdyCreateSession( 115 session_ = SpdySessionDependencies::SpdyCreateSession(
116 session_deps_.get()); 116 session_deps_.get());
117 HttpStreamFactory::set_use_alternate_protocols(false); 117 HttpStreamFactory::set_use_alternate_protocols(false);
118 HttpStreamFactory::set_force_spdy_over_ssl(false); 118 HttpStreamFactory::set_force_spdy_over_ssl(false);
119 HttpStreamFactory::set_force_spdy_always(false); 119 HttpStreamFactory::set_force_spdy_always(false);
120 120
121 std::vector<std::string> next_protos; 121 std::vector<std::string> next_protos;
122 next_protos.push_back("http/1.1"); 122 next_protos.push_back("http/1.1");
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 HttpStreamFactory::set_supported_spdy_version(NPN_SPDY_21);
125 126
126 switch (test_type_) { 127 switch (test_type_) {
127 case SPDYNPN: 128 case SPDYNPN:
128 session_->http_server_properties()->SetAlternateProtocol( 129 session_->http_server_properties()->SetAlternateProtocol(
129 HostPortPair("www.google.com", 80), 443, 130 HostPortPair("www.google.com", 80), 443,
130 NPN_SPDY_21); 131 NPN_SPDY_21);
131 HttpStreamFactory::set_use_alternate_protocols(true); 132 HttpStreamFactory::set_use_alternate_protocols(true);
132 HttpStreamFactory::set_next_protos(next_protos); 133 HttpStreamFactory::set_next_protos(next_protos);
133 break; 134 break;
134 case SPDYNOSSL: 135 case SPDYNOSSL:
(...skipping 5697 matching lines...) Expand 10 before | Expand all | Expand 10 after
5832 << " Write index: " 5833 << " Write index: "
5833 << data->write_index(); 5834 << data->write_index();
5834 5835
5835 // Verify the SYN_REPLY. 5836 // Verify the SYN_REPLY.
5836 HttpResponseInfo response = *trans->GetResponseInfo(); 5837 HttpResponseInfo response = *trans->GetResponseInfo();
5837 EXPECT_TRUE(response.headers != NULL); 5838 EXPECT_TRUE(response.headers != NULL);
5838 EXPECT_EQ("HTTP/1.1 200 OK", response.headers->GetStatusLine()); 5839 EXPECT_EQ("HTTP/1.1 200 OK", response.headers->GetStatusLine());
5839 } 5840 }
5840 5841
5841 } // namespace net 5842 } // namespace net
OLDNEW
« net/http/http_stream_factory.cc ('K') | « net/http/http_stream_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698