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

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

Issue 1916783003: QUIC - enable "delay_tcp_race" parameter by default. This feature showed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Deleted unneeded hanging get calls from unittests Created 4 years, 8 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_network_session.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 <stdint.h> 7 #include <stdint.h>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1621 1621
1622 TestBidirectionalDelegate delegate; 1622 TestBidirectionalDelegate delegate;
1623 stream_impl->Start(&bidi_request_info, BoundNetLog(), false, &delegate, 1623 stream_impl->Start(&bidi_request_info, BoundNetLog(), false, &delegate,
1624 nullptr); 1624 nullptr);
1625 delegate.WaitUntilDone(); 1625 delegate.WaitUntilDone();
1626 1626
1627 scoped_refptr<IOBuffer> buffer = new net::IOBuffer(1); 1627 scoped_refptr<IOBuffer> buffer = new net::IOBuffer(1);
1628 EXPECT_EQ(OK, stream_impl->ReadData(buffer.get(), 1)); 1628 EXPECT_EQ(OK, stream_impl->ReadData(buffer.get(), 1));
1629 EXPECT_EQ(kProtoQUIC1SPDY3, stream_impl->GetProtocol()); 1629 EXPECT_EQ(kProtoQUIC1SPDY3, stream_impl->GetProtocol());
1630 EXPECT_EQ("200", delegate.response_headers().find(":status")->second); 1630 EXPECT_EQ("200", delegate.response_headers().find(":status")->second);
1631 EXPECT_EQ(1, GetSocketPoolGroupCount(session()->GetTransportSocketPool( 1631 EXPECT_EQ(0, GetSocketPoolGroupCount(session()->GetTransportSocketPool(
1632 HttpNetworkSession::NORMAL_SOCKET_POOL))); 1632 HttpNetworkSession::NORMAL_SOCKET_POOL)));
1633 EXPECT_EQ(1, GetSocketPoolGroupCount(session()->GetSSLSocketPool( 1633 EXPECT_EQ(0, GetSocketPoolGroupCount(session()->GetSSLSocketPool(
1634 HttpNetworkSession::NORMAL_SOCKET_POOL))); 1634 HttpNetworkSession::NORMAL_SOCKET_POOL)));
1635 EXPECT_EQ(0, GetSocketPoolGroupCount(session()->GetTransportSocketPool( 1635 EXPECT_EQ(0, GetSocketPoolGroupCount(session()->GetTransportSocketPool(
1636 HttpNetworkSession::WEBSOCKET_SOCKET_POOL))); 1636 HttpNetworkSession::WEBSOCKET_SOCKET_POOL)));
1637 EXPECT_EQ(0, GetSocketPoolGroupCount(session()->GetSSLSocketPool( 1637 EXPECT_EQ(0, GetSocketPoolGroupCount(session()->GetSSLSocketPool(
1638 HttpNetworkSession::WEBSOCKET_SOCKET_POOL))); 1638 HttpNetworkSession::WEBSOCKET_SOCKET_POOL)));
1639 EXPECT_TRUE(waiter.used_proxy_info().is_direct()); 1639 EXPECT_TRUE(waiter.used_proxy_info().is_direct());
1640 } 1640 }
1641 1641
1642 // Tests that when QUIC is not enabled for bidirectional streaming, HTTP/2 is 1642 // Tests that when QUIC is not enabled for bidirectional streaming, HTTP/2 is
1643 // used instead. 1643 // used instead.
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
2002 EXPECT_TRUE(waiter.used_proxy_info().is_direct()); 2002 EXPECT_TRUE(waiter.used_proxy_info().is_direct());
2003 2003
2004 // Make sure there is no orphaned job. it is already canceled. 2004 // Make sure there is no orphaned job. it is already canceled.
2005 ASSERT_EQ(0u, static_cast<HttpStreamFactoryImpl*>( 2005 ASSERT_EQ(0u, static_cast<HttpStreamFactoryImpl*>(
2006 session->http_stream_factory_for_websocket())->num_orphaned_jobs()); 2006 session->http_stream_factory_for_websocket())->num_orphaned_jobs());
2007 } 2007 }
2008 2008
2009 } // namespace 2009 } // namespace
2010 2010
2011 } // namespace net 2011 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_session.cc ('k') | net/quic/quic_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698