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

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: Re: 18. Created 5 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
« no previous file with comments | « net/http/http_stream_factory_impl_job.cc ('k') | net/quic/quic_network_transaction_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after
1317 scoped_refptr<HttpNetworkSession> 1317 scoped_refptr<HttpNetworkSession>
1318 session(SpdySessionDependencies::SpdyCreateSessionDeterministic( 1318 session(SpdySessionDependencies::SpdyCreateSessionDeterministic(
1319 &session_deps)); 1319 &session_deps));
1320 1320
1321 // Now request a stream. 1321 // Now request a stream.
1322 HttpRequestInfo request_info; 1322 HttpRequestInfo request_info;
1323 request_info.method = "GET"; 1323 request_info.method = "GET";
1324 request_info.url = GURL("ws://www.google.com:8888"); 1324 request_info.url = GURL("ws://www.google.com:8888");
1325 request_info.load_flags = 0; 1325 request_info.load_flags = 0;
1326 1326
1327 session->http_server_properties()->SetAlternateProtocol( 1327 session->http_server_properties()->AddAlternateProtocol(
1328 HostPortPair("www.google.com", 8888), 9999, NPN_SPDY_3, 1.0); 1328 HostPortPair("www.google.com", 8888), 9999, NPN_SPDY_3, 1.0);
1329 1329
1330 SSLConfig ssl_config; 1330 SSLConfig ssl_config;
1331 StreamRequestWaiter waiter; 1331 StreamRequestWaiter waiter;
1332 WebSocketStreamCreateHelper create_helper; 1332 WebSocketStreamCreateHelper create_helper;
1333 scoped_ptr<HttpStreamRequest> request( 1333 scoped_ptr<HttpStreamRequest> request(
1334 session->http_stream_factory_for_websocket() 1334 session->http_stream_factory_for_websocket()
1335 ->RequestWebSocketHandshakeStream(request_info, 1335 ->RequestWebSocketHandshakeStream(request_info,
1336 DEFAULT_PRIORITY, 1336 DEFAULT_PRIORITY,
1337 ssl_config, 1337 ssl_config,
(...skipping 22 matching lines...) Expand all
1360 EXPECT_TRUE(waiter.used_proxy_info().is_direct()); 1360 EXPECT_TRUE(waiter.used_proxy_info().is_direct());
1361 1361
1362 // Make sure there is no orphaned job. it is already canceled. 1362 // Make sure there is no orphaned job. it is already canceled.
1363 ASSERT_EQ(0u, static_cast<HttpStreamFactoryImpl*>( 1363 ASSERT_EQ(0u, static_cast<HttpStreamFactoryImpl*>(
1364 session->http_stream_factory_for_websocket())->num_orphaned_jobs()); 1364 session->http_stream_factory_for_websocket())->num_orphaned_jobs());
1365 } 1365 }
1366 1366
1367 } // namespace 1367 } // namespace
1368 1368
1369 } // namespace net 1369 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl_job.cc ('k') | net/quic/quic_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698