diff options
author | ahendrickson@google.com <ahendrickson@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-26 22:05:54 +0000 |
---|---|---|
committer | ahendrickson@google.com <ahendrickson@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-26 22:05:54 +0000 |
commit | 0935be38b377b3ea8d4816444333d6f2ce91b22c (patch) | |
tree | f3034e4a7e4100ef9f128804d252ef3011cdbc14 /net | |
parent | a9d59460c07913177e8bf149276a433403783c88 (diff) | |
download | chromium_src-0935be38b377b3ea8d4816444333d6f2ce91b22c.zip chromium_src-0935be38b377b3ea8d4816444333d6f2ce91b22c.tar.gz chromium_src-0935be38b377b3ea8d4816444333d6f2ce91b22c.tar.bz2 |
Remove memory leak from the SpdyNetworkTransactionTest:ServerPush
unit test, and its suppression.
Another issue's (1321002) CL accidentally checked in a preliminary fix; this cleans it up.
BUG=39378
TEST=Valgrind
Review URL: http://codereview.chromium.org/1378009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42833 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/spdy/spdy_network_transaction_unittest.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc index 12eaadc..7520b38 100644 --- a/net/spdy/spdy_network_transaction_unittest.cc +++ b/net/spdy/spdy_network_transaction_unittest.cc @@ -1635,10 +1635,8 @@ TEST_F(SpdyNetworkTransactionTest, ServerPush) { MockRead(true, reinterpret_cast<const char*>(kPushBodyFrame4), // 6 arraysize(kPushBodyFrame4) - 1, 9), MockRead(true, ERR_IO_PENDING, MockRead::STOPLOOP | 10), // 7 - MockRead(true, reinterpret_cast<const char*>(kPushBodyFrame4), // 8 - arraysize(kPushBodyFrame4) - 1, 11), - MockRead(true, reinterpret_cast<const char*>(kPushBodyFrame4), // 9 - arraysize(kPushBodyFrame4) - 1, 12) + // So we can do a final CompleteRead(), which cleans up memory. + MockRead(true, NULL, 0, 11) // 8 }; // We disable SSL for this test. @@ -1713,6 +1711,7 @@ TEST_F(SpdyNetworkTransactionTest, ServerPush) { // Complete the next read now and teardown. data->CompleteRead(); + // Verify that we consumed all test data. EXPECT_TRUE(data->at_read_eof()); EXPECT_TRUE(data->at_write_eof()); |