Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(969)

Unified Diff: media/filters/video_renderer_impl_unittest.cc

Issue 395703002: Fold {Audio|Video}Decoder::Stop() into the dtor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor fixes Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/filters/video_renderer_impl_unittest.cc
diff --git a/media/filters/video_renderer_impl_unittest.cc b/media/filters/video_renderer_impl_unittest.cc
index c7eb556bc7170f26b5cd8d540d34dbdaf83caa25..87254116497176555be02545272b8f3b35a515f8 100644
--- a/media/filters/video_renderer_impl_unittest.cc
+++ b/media/filters/video_renderer_impl_unittest.cc
@@ -70,8 +70,8 @@ class VideoRendererImplTest : public ::testing::Test {
EXPECT_CALL(demuxer_stream_, Read(_)).WillRepeatedly(
RunCallback<0>(DemuxerStream::kOk,
scoped_refptr<DecoderBuffer>(new DecoderBuffer(0))));
- EXPECT_CALL(*decoder_, Stop())
- .WillRepeatedly(Invoke(this, &VideoRendererImplTest::StopRequested));
+ EXPECT_CALL(*decoder_, Destroy())
+ .WillRepeatedly(Invoke(this, &VideoRendererImplTest::DecoderDestroyed));
EXPECT_CALL(statistics_cb_object_, OnStatistics(_))
.Times(AnyNumber());
EXPECT_CALL(*this, OnTimeUpdate(_))
@@ -326,8 +326,9 @@ class VideoRendererImplTest : public ::testing::Test {
message_loop_.PostTask(FROM_HERE, callback);
}
- void StopRequested() {
- DCHECK_EQ(&message_loop_, base::MessageLoop::current());
+ void DecoderDestroyed() {
+ // Cannot check the current message loop here because |message_loop_| could
scherkus (not reviewing) 2014/07/15 23:37:26 but isn't message_loop_ a member variable tied to
xhwang 2014/07/16 03:37:22 This is obsolete now. The reason of the original c
+ // have been destroyed.
decode_results_.clear();
if (!decode_cb_.is_null()) {
QueueFrames("abort");

Powered by Google App Engine
This is Rietveld 408576698