summaryrefslogtreecommitdiffstats
path: root/media/audio/linux
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-16 23:21:16 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-16 23:21:16 +0000
commite143e8cee2bdc3e87bd3b95140016489f209d7e6 (patch)
tree17cb3bf36a3010670b8530bc953fb5eaa3705826 /media/audio/linux
parentec348507c86c875b051f561bdb5cde1162534d97 (diff)
downloadchromium_src-e143e8cee2bdc3e87bd3b95140016489f209d7e6.zip
chromium_src-e143e8cee2bdc3e87bd3b95140016489f209d7e6.tar.gz
chromium_src-e143e8cee2bdc3e87bd3b95140016489f209d7e6.tar.bz2
Fixed memory leaks in media_unittests that cause heapcheck errors.
BUG=none TEST=none TBR=ajwong@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47388 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/linux')
-rw-r--r--media/audio/linux/alsa_output_unittest.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/media/audio/linux/alsa_output_unittest.cc b/media/audio/linux/alsa_output_unittest.cc
index 1575168..44a395b 100644
--- a/media/audio/linux/alsa_output_unittest.cc
+++ b/media/audio/linux/alsa_output_unittest.cc
@@ -754,6 +754,15 @@ TEST_F(AlsaPcmOutputStreamTest, ScheduleNextWrite) {
.WillOnce(Return(10));
test_stream_->ScheduleNextWrite(false);
+ // TODO(sergeyu): Figure out how to check that the task has been added to the
+ // message loop.
+
+ // Cleanup the message queue. Currently ~MessageQueue() doesn't free pending
+ // tasks unless running on valgrind. The code below is needed to keep
+ // heapcheck happy.
+ test_stream_->stop_stream_ = true;
+ message_loop_.RunAllPending();
+
test_stream_->shared_data_.TransitionTo(AlsaPcmOutputStream::kIsClosed);
}