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

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

Issue 987123002: Advertise HTTP/2 support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_request_unittest.cc ('k') | net/socket/next_proto.h » ('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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 last_num_streams_(-1) { 418 last_num_streams_(-1) {
419 } 419 }
420 420
421 class HttpStreamFactoryTest : public ::testing::Test, 421 class HttpStreamFactoryTest : public ::testing::Test,
422 public ::testing::WithParamInterface<NextProto> { 422 public ::testing::WithParamInterface<NextProto> {
423 }; 423 };
424 424
425 INSTANTIATE_TEST_CASE_P( 425 INSTANTIATE_TEST_CASE_P(
426 NextProto, 426 NextProto,
427 HttpStreamFactoryTest, 427 HttpStreamFactoryTest,
428 testing::Values(kProtoSPDY31, kProtoSPDY4_14, kProtoSPDY4_15)); 428 testing::Values(kProtoSPDY31, kProtoSPDY4_14, kProtoSPDY4_15, kProtoSPDY4));
429 429
430 TEST_P(HttpStreamFactoryTest, PreconnectDirect) { 430 TEST_P(HttpStreamFactoryTest, PreconnectDirect) {
431 for (size_t i = 0; i < arraysize(kTests); ++i) { 431 for (size_t i = 0; i < arraysize(kTests); ++i) {
432 SpdySessionDependencies session_deps( 432 SpdySessionDependencies session_deps(
433 GetParam(), ProxyService::CreateDirect()); 433 GetParam(), ProxyService::CreateDirect());
434 scoped_refptr<HttpNetworkSession> session( 434 scoped_refptr<HttpNetworkSession> session(
435 SpdySessionDependencies::SpdyCreateSession(&session_deps)); 435 SpdySessionDependencies::SpdyCreateSession(&session_deps));
436 HttpNetworkSessionPeer peer(session); 436 HttpNetworkSessionPeer peer(session);
437 CapturePreconnectsTransportSocketPool* transport_conn_pool = 437 CapturePreconnectsTransportSocketPool* transport_conn_pool =
438 new CapturePreconnectsTransportSocketPool( 438 new CapturePreconnectsTransportSocketPool(
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_request_unittest.cc ('k') | net/socket/next_proto.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698