diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-31 04:51:46 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-31 04:51:46 +0000 |
commit | 219ba8cbe322f5f0c656f95eba1d6a2bce56c201 (patch) | |
tree | 312a97815e8886a5a9731adb132ddfcf20dce9ba /net | |
parent | 5f16949fe331a1b8dd756729b21fcd6fe4598fb2 (diff) | |
download | chromium_src-219ba8cbe322f5f0c656f95eba1d6a2bce56c201.zip chromium_src-219ba8cbe322f5f0c656f95eba1d6a2bce56c201.tar.gz chromium_src-219ba8cbe322f5f0c656f95eba1d6a2bce56c201.tar.bz2 |
Net: Fix leak in SpdyNetworkTransactionTest from r54398.
BUG=none
TEST=Valgind net goes green.
TBR=lzheng
Review URL: http://codereview.chromium.org/3078016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54430 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/spdy/spdy_network_transaction_unittest.cc | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc index f29d69f..1aefc39 100644 --- a/net/spdy/spdy_network_transaction_unittest.cc +++ b/net/spdy/spdy_network_transaction_unittest.cc @@ -852,8 +852,9 @@ TEST_P(SpdyNetworkTransactionTest, Post) { // Http POST Content-Length is using UploadDataStream::size(). // It is the same as request.upload_data->GetContentLength(). - ASSERT_EQ(request.upload_data->GetContentLength(), - UploadDataStream::Create(request.upload_data, NULL)->size()); + scoped_ptr<UploadDataStream> stream(UploadDataStream::Create( + request.upload_data, NULL)); + ASSERT_EQ(request.upload_data->GetContentLength(), stream->size()); scoped_ptr<spdy::SpdyFrame> req(ConstructSpdyPost(request.upload_data->GetContentLength(), NULL, 0)); @@ -933,8 +934,9 @@ TEST_P(SpdyNetworkTransactionTest, EmptyPost) { // Http POST Content-Length is using UploadDataStream::size(). // It is the same as request.upload_data->GetContentLength(). - ASSERT_EQ(request.upload_data->GetContentLength(), - UploadDataStream::Create(request.upload_data, NULL)->size()); + scoped_ptr<UploadDataStream> stream(UploadDataStream::Create( + request.upload_data, NULL)); + ASSERT_EQ(request.upload_data->GetContentLength(), stream->size()); scoped_ptr<spdy::SpdyFrame> req(ConstructSpdyPost(request.upload_data->GetContentLength(), NULL, 0)); @@ -978,8 +980,9 @@ TEST_P(SpdyNetworkTransactionTest, PostWithEarlySynReply) { // Http POST Content-Length is using UploadDataStream::size(). // It is the same as request.upload_data->GetContentLength(). - ASSERT_EQ(request.upload_data->GetContentLength(), - UploadDataStream::Create(request.upload_data, NULL)->size()); + scoped_ptr<UploadDataStream> stream(UploadDataStream::Create( + request.upload_data, NULL)); + ASSERT_EQ(request.upload_data->GetContentLength(), stream->size()); scoped_ptr<spdy::SpdyFrame> req(ConstructSpdyPost(request.upload_data->GetContentLength(), NULL, 0)); @@ -1089,8 +1092,9 @@ TEST_P(SpdyNetworkTransactionTest, WindowUpdate) { // Http POST Content-Length is using UploadDataStream::size(). // It is the same as request.upload_data->GetContentLength(). - ASSERT_EQ(request.upload_data->GetContentLength(), - UploadDataStream::Create(request.upload_data, NULL)->size()); + scoped_ptr<UploadDataStream> stream(UploadDataStream::Create( + request.upload_data, NULL)); + ASSERT_EQ(request.upload_data->GetContentLength(), stream->size()); scoped_ptr<spdy::SpdyFrame> req(ConstructSpdyPost(request.upload_data->GetContentLength(), NULL, 0)); @@ -1161,8 +1165,9 @@ TEST_P(SpdyNetworkTransactionTest, WindowUpdateOverflow) { // Http POST Content-Length is using UploadDataStream::size(). // It is the same as request.upload_data->GetContentLength(). - ASSERT_EQ(request.upload_data->GetContentLength(), - UploadDataStream::Create(request.upload_data, NULL)->size()); + scoped_ptr<UploadDataStream> stream(UploadDataStream::Create( + request.upload_data, NULL)); + ASSERT_EQ(request.upload_data->GetContentLength(), stream->size()); scoped_ptr<spdy::SpdyFrame> req(ConstructSpdyPost(request.upload_data->GetContentLength(), NULL, 0)); |