summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_network_transaction_unittest.cc
diff options
context:
space:
mode:
authordhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-04 21:00:36 +0000
committerdhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-04 21:00:36 +0000
commitc976120a73d5b7e991bc37c705b9a1ee59bf4e4a (patch)
tree91c75ab7287fc4dbad2317743f7eb7f9580736c3 /net/spdy/spdy_network_transaction_unittest.cc
parentc706996bf7fa2c52cfda479d324102fee69ab3bf (diff)
downloadchromium_src-c976120a73d5b7e991bc37c705b9a1ee59bf4e4a.zip
chromium_src-c976120a73d5b7e991bc37c705b9a1ee59bf4e4a.tar.gz
chromium_src-c976120a73d5b7e991bc37c705b9a1ee59bf4e4a.tar.bz2
Revert 54906 - Refactor HttpNetworkTransaction to eliminate the SPDY
specific states of the state machine. This required adding two new states: STATE_INIT_STREAM STATE_INTI_STREAM_COMPLETE The http_stream_ and spdy_http_stream_ member fields have been removed, and replaced by a single stream_ member field which is initialized with either an HttpBasicStream, or SpdyHttpStream depending on the underlying connection. In the process, the NetLog no longer receives TYPE_SPDY events, only TYPE_HTTP, so spdy_network_transaction_unittest.cc needed to be modified accordingly. This seems to causing Valgrind leaks: http://build.chromium.org/buildbot/memory/builders/Chromium%20Mac%20(valgrind)/builds/6887/steps/memory%20test:%20net/logs/stdio E.g.: Leak_DefinitelyLost 78,766 (888 direct, 77,878 indirect) bytes in 2 blocks are definitely lost in loss record 6,975 of 7,027 operator new(unsigned long) (mp/vg-bins/scripts/valgrind-memcheck/coregrind/m_replacemalloc/vg_replace_malloc.c:276) net::SpdySessionPool::GetSpdySessionFromSocket(std::pair<net::HostPortPair, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > const&, net::HttpNetworkSession*, net::ClientSocketHandle*, net::BoundNetLog const&, int, scoped_refptr<net::SpdySession>*, bool) net::HttpNetworkTransaction::DoInitStream() net::HttpNetworkTransaction::DoLoop(int) net::HttpNetworkTransaction::OnIOComplete(int) net::ClientSocketHandle::OnIOComplete(int) net::internal::ClientSocketPoolBaseHelper::InvokeUserCallback(net::ClientSocketHandle*) RunnableMethod<net::internal::ClientSocketPoolBaseHelper, void (net::internal::ClientSocketPoolBaseHelper::*)(net::ClientSocketHandle*), Tuple1<net::ClientSocketHandle*> >::Run() MessageLoop::RunTask(Task*) MessageLoop::DeferOrRunPendingTask(MessageLoop::PendingTask const&) MessageLoop::DoWork() base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) MessageLoop::RunInternal() MessageLoop::Run() TestCompletionCallback::WaitForResult() net::SpdyNetworkTransactionTest_SocketWriteReturnsZero_Test::TestBody() testing::Test::Run() testing::internal::TestInfoImpl::Run() testing::TestCase::Run() testing::internal::UnitTestImpl::RunAllTests() TestSuite::Run() main Suppression (error hash=#-444E9002#): { <insert_a_suppression_name_here> Memcheck:Leak fun:_Znw* fun:_ZN3net15SpdySessionPool24GetSpdySessionFromSocketERKSt4pairINS_12HostPortPairESsEPNS_18HttpNetworkSessionEPNS_18ClientSocketHandleERKNS_11BoundNetLogEiP13scoped_refptrINS_11SpdySessionEEb fun:_ZN3net22HttpNetworkTransaction12DoInitStreamEv fun:_ZN3net22HttpNetworkTransaction6DoLoopEi fun:_ZN3net22HttpNetworkTransaction12OnIOCompleteEi fun:_ZN3net18ClientSocketHandle12OnIOCompleteEi fun:_ZN3net8internal26ClientSocketPoolBaseHelper18InvokeUserCallbackEPNS_18ClientSocketHandleE fun:_ZN14RunnableMethodIN3net8internal26ClientSocketPoolBaseHelperEMS2_FvPNS0_18ClientSocketHandleEE6Tuple1IS4_EE3RunEv fun:_ZN11MessageLoop7RunTaskEP4Task fun:_ZN11MessageLoop21DeferOrRunPendingTaskERKNS_11PendingTaskE fun:_ZN11MessageLoop6DoWorkEv fun:_ZN4base19MessagePumpLibevent3RunEPNS_11MessagePump8DelegateE fun:_ZN11MessageLoop11RunInternalEv } BUG=50267 TEST=none Review URL: http://codereview.chromium.org/3064033 TBR=rch@chromium.org Review URL: http://codereview.chromium.org/3038048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54963 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_network_transaction_unittest.cc')
-rw-r--r--net/spdy/spdy_network_transaction_unittest.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc
index 11d20cb..24ad8ad 100644
--- a/net/spdy/spdy_network_transaction_unittest.cc
+++ b/net/spdy/spdy_network_transaction_unittest.cc
@@ -1977,22 +1977,22 @@ TEST_P(SpdyNetworkTransactionTest, NetLog) {
EXPECT_LT(0u, log.entries().size());
int pos = 0;
pos = net::ExpectLogContainsSomewhere(log.entries(), 0,
- net::NetLog::TYPE_HTTP_TRANSACTION_SEND_REQUEST,
+ net::NetLog::TYPE_SPDY_TRANSACTION_SEND_REQUEST,
net::NetLog::PHASE_BEGIN);
pos = net::ExpectLogContainsSomewhere(log.entries(), pos + 1,
- net::NetLog::TYPE_HTTP_TRANSACTION_SEND_REQUEST,
+ net::NetLog::TYPE_SPDY_TRANSACTION_SEND_REQUEST,
net::NetLog::PHASE_END);
pos = net::ExpectLogContainsSomewhere(log.entries(), pos + 1,
- net::NetLog::TYPE_HTTP_TRANSACTION_READ_HEADERS,
+ net::NetLog::TYPE_SPDY_TRANSACTION_READ_HEADERS,
net::NetLog::PHASE_BEGIN);
pos = net::ExpectLogContainsSomewhere(log.entries(), pos + 1,
- net::NetLog::TYPE_HTTP_TRANSACTION_READ_HEADERS,
+ net::NetLog::TYPE_SPDY_TRANSACTION_READ_HEADERS,
net::NetLog::PHASE_END);
pos = net::ExpectLogContainsSomewhere(log.entries(), pos + 1,
- net::NetLog::TYPE_HTTP_TRANSACTION_READ_BODY,
+ net::NetLog::TYPE_SPDY_TRANSACTION_READ_BODY,
net::NetLog::PHASE_BEGIN);
pos = net::ExpectLogContainsSomewhere(log.entries(), pos + 1,
- net::NetLog::TYPE_HTTP_TRANSACTION_READ_BODY,
+ net::NetLog::TYPE_SPDY_TRANSACTION_READ_BODY,
net::NetLog::PHASE_END);
}
@@ -3157,7 +3157,6 @@ TEST_P(SpdyNetworkTransactionTest, VerifyRetryOnConnectionReset) {
EXPECT_EQ(OK, rv);
const HttpResponseInfo* response = trans->GetResponseInfo();
- ASSERT_TRUE(response != NULL);
EXPECT_TRUE(response->headers != NULL);
EXPECT_TRUE(response->was_fetched_via_spdy);
std::string response_data;