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

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

Issue 377063002: Revert of Add a probability to Alternate-Protocol support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
« 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 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1266 1266
1267 // Now request a stream. 1267 // Now request a stream.
1268 HttpRequestInfo request_info; 1268 HttpRequestInfo request_info;
1269 request_info.method = "GET"; 1269 request_info.method = "GET";
1270 request_info.url = GURL("ws://www.google.com:8888"); 1270 request_info.url = GURL("ws://www.google.com:8888");
1271 request_info.load_flags = 0; 1271 request_info.load_flags = 0;
1272 1272
1273 session->http_server_properties()->SetAlternateProtocol( 1273 session->http_server_properties()->SetAlternateProtocol(
1274 HostPortPair("www.google.com", 8888), 1274 HostPortPair("www.google.com", 8888),
1275 9999, 1275 9999,
1276 NPN_SPDY_3, 1276 NPN_SPDY_3);
1277 1);
1278 1277
1279 SSLConfig ssl_config; 1278 SSLConfig ssl_config;
1280 StreamRequestWaiter waiter; 1279 StreamRequestWaiter waiter;
1281 WebSocketStreamCreateHelper create_helper; 1280 WebSocketStreamCreateHelper create_helper;
1282 scoped_ptr<HttpStreamRequest> request( 1281 scoped_ptr<HttpStreamRequest> request(
1283 session->http_stream_factory_for_websocket() 1282 session->http_stream_factory_for_websocket()
1284 ->RequestWebSocketHandshakeStream(request_info, 1283 ->RequestWebSocketHandshakeStream(request_info,
1285 DEFAULT_PRIORITY, 1284 DEFAULT_PRIORITY,
1286 ssl_config, 1285 ssl_config,
1287 ssl_config, 1286 ssl_config,
(...skipping 21 matching lines...) Expand all
1309 EXPECT_TRUE(waiter.used_proxy_info().is_direct()); 1308 EXPECT_TRUE(waiter.used_proxy_info().is_direct());
1310 1309
1311 // Make sure there is no orphaned job. it is already canceled. 1310 // Make sure there is no orphaned job. it is already canceled.
1312 ASSERT_EQ(0u, static_cast<HttpStreamFactoryImpl*>( 1311 ASSERT_EQ(0u, static_cast<HttpStreamFactoryImpl*>(
1313 session->http_stream_factory_for_websocket())->num_orphaned_jobs()); 1312 session->http_stream_factory_for_websocket())->num_orphaned_jobs());
1314 } 1313 }
1315 1314
1316 } // namespace 1315 } // namespace
1317 1316
1318 } // namespace net 1317 } // 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