summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-17 02:21:27 +0000
committerscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-17 02:21:27 +0000
commiteefc53c168ef884191e1f17fcdda204b414f893c (patch)
tree13580d945133ebf19330b173e94c7f0934c0a12b /media
parenta66145c31c12a3fc96a78c9f6c36f8fb2b798204 (diff)
downloadchromium_src-eefc53c168ef884191e1f17fcdda204b414f893c.zip
chromium_src-eefc53c168ef884191e1f17fcdda204b414f893c.tar.gz
chromium_src-eefc53c168ef884191e1f17fcdda204b414f893c.tar.bz2
Delete the StatisticsCallback passed to media filter mocks.
Patch by sjl@chromium.org: http://codereview.chromium.org/6519024/ BUG=73132 TEST=media_unittests under heapcheck and valgrind to make sure the new leak has gone. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75222 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r--media/base/pipeline_impl_unittest.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/media/base/pipeline_impl_unittest.cc b/media/base/pipeline_impl_unittest.cc
index 45caef8..5aa9b16 100644
--- a/media/base/pipeline_impl_unittest.cc
+++ b/media/base/pipeline_impl_unittest.cc
@@ -17,6 +17,7 @@
#include "testing/gtest/include/gtest/gtest.h"
using ::testing::_;
+using ::testing::DeleteArg;
using ::testing::InSequence;
using ::testing::Invoke;
using ::testing::Mock;
@@ -150,7 +151,7 @@ class PipelineImplTest : public ::testing::Test {
void InitializeVideoDecoder(MockDemuxerStream* stream) {
EXPECT_CALL(*mocks_->video_decoder(),
Initialize(stream, NotNull(), NotNull()))
- .WillOnce(Invoke(&RunFilterCallback3));
+ .WillOnce(DoAll(Invoke(&RunFilterCallback3), DeleteArg<2>()));
EXPECT_CALL(*mocks_->video_decoder(), SetPlaybackRate(0.0f));
EXPECT_CALL(*mocks_->video_decoder(), Seek(base::TimeDelta(), NotNull()))
.WillOnce(Invoke(&RunFilterCallback));
@@ -162,7 +163,7 @@ class PipelineImplTest : public ::testing::Test {
void InitializeAudioDecoder(MockDemuxerStream* stream) {
EXPECT_CALL(*mocks_->audio_decoder(),
Initialize(stream, NotNull(), NotNull()))
- .WillOnce(Invoke(&RunFilterCallback3));
+ .WillOnce(DoAll(Invoke(&RunFilterCallback3), DeleteArg<2>()));
EXPECT_CALL(*mocks_->audio_decoder(), SetPlaybackRate(0.0f));
EXPECT_CALL(*mocks_->audio_decoder(), Seek(base::TimeDelta(), NotNull()))
.WillOnce(Invoke(&RunFilterCallback));
@@ -174,7 +175,7 @@ class PipelineImplTest : public ::testing::Test {
void InitializeVideoRenderer() {
EXPECT_CALL(*mocks_->video_renderer(),
Initialize(mocks_->video_decoder(), NotNull(), NotNull()))
- .WillOnce(Invoke(&RunFilterCallback3));
+ .WillOnce(DoAll(Invoke(&RunFilterCallback3), DeleteArg<2>()));
EXPECT_CALL(*mocks_->video_renderer(), SetPlaybackRate(0.0f));
EXPECT_CALL(*mocks_->video_renderer(), Seek(base::TimeDelta(), NotNull()))
.WillOnce(Invoke(&RunFilterCallback));