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

Side by Side Diff: net/http/http_stream_factory_impl_unittest.cc

Issue 665083009: ABANDONED Handle multiple AlternateProtocols for each HostPortPair. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
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_stream_factory_impl.h" 5 #include "net/http/http_stream_factory_impl.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1251 scoped_refptr<HttpNetworkSession> 1251 scoped_refptr<HttpNetworkSession>
1252 session(SpdySessionDependencies::SpdyCreateSessionDeterministic( 1252 session(SpdySessionDependencies::SpdyCreateSessionDeterministic(
1253 &session_deps)); 1253 &session_deps));
1254 1254
1255 // Now request a stream. 1255 // Now request a stream.
1256 HttpRequestInfo request_info; 1256 HttpRequestInfo request_info;
1257 request_info.method = "GET"; 1257 request_info.method = "GET";
1258 request_info.url = GURL("ws://www.google.com:8888"); 1258 request_info.url = GURL("ws://www.google.com:8888");
1259 request_info.load_flags = 0; 1259 request_info.load_flags = 0;
1260 1260
1261 session->http_server_properties()->SetAlternateProtocol( 1261 session->http_server_properties()->AddAlternateProtocol(
1262 HostPortPair("www.google.com", 8888), 1262 HostPortPair("www.google.com", 8888),
1263 9999, 1263 9999,
1264 NPN_SPDY_3, 1264 NPN_SPDY_3,
1265 1); 1265 1);
1266 1266
1267 SSLConfig ssl_config; 1267 SSLConfig ssl_config;
1268 StreamRequestWaiter waiter; 1268 StreamRequestWaiter waiter;
1269 WebSocketStreamCreateHelper create_helper; 1269 WebSocketStreamCreateHelper create_helper;
1270 scoped_ptr<HttpStreamRequest> request( 1270 scoped_ptr<HttpStreamRequest> request(
1271 session->http_stream_factory_for_websocket() 1271 session->http_stream_factory_for_websocket()
(...skipping 25 matching lines...) Expand all
1297 EXPECT_TRUE(waiter.used_proxy_info().is_direct()); 1297 EXPECT_TRUE(waiter.used_proxy_info().is_direct());
1298 1298
1299 // Make sure there is no orphaned job. it is already canceled. 1299 // Make sure there is no orphaned job. it is already canceled.
1300 ASSERT_EQ(0u, static_cast<HttpStreamFactoryImpl*>( 1300 ASSERT_EQ(0u, static_cast<HttpStreamFactoryImpl*>(
1301 session->http_stream_factory_for_websocket())->num_orphaned_jobs()); 1301 session->http_stream_factory_for_websocket())->num_orphaned_jobs());
1302 } 1302 }
1303 1303
1304 } // namespace 1304 } // namespace
1305 1305
1306 } // namespace net 1306 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698