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

Unified Diff: media/filters/video_renderer_base_unittest.cc

Issue 12818004: Introduce VideoFrameStream, the video frame provider in media pipeline. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Prettier name for test. Created 7 years, 9 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
« no previous file with comments | « media/filters/video_renderer_base.cc ('k') | media/media.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/video_renderer_base_unittest.cc
diff --git a/media/filters/video_renderer_base_unittest.cc b/media/filters/video_renderer_base_unittest.cc
index 31a2b7b77a6f37fee5523026ed2637e486c12c04..c498c50940e779ea260680f68b85c804407f65df 100644
--- a/media/filters/video_renderer_base_unittest.cc
+++ b/media/filters/video_renderer_base_unittest.cc
@@ -59,7 +59,7 @@ class VideoRendererBaseTest : public ::testing::Test {
// We expect these to be called but we don't care how/when.
EXPECT_CALL(*decoder_, Stop(_))
- .WillRepeatedly(RunClosure<0>());
+ .WillRepeatedly(Invoke(this, &VideoRendererBaseTest::StopRequested));
EXPECT_CALL(statistics_cb_object_, OnStatistics(_))
.Times(AnyNumber());
EXPECT_CALL(*this, OnTimeUpdate(_))
@@ -340,6 +340,17 @@ class VideoRendererBaseTest : public ::testing::Test {
message_loop_.PostTask(FROM_HERE, callback);
}
+ void StopRequested(const base::Closure& callback) {
+ DCHECK_EQ(&message_loop_, MessageLoop::current());
+ decode_results_.clear();
+ if (!read_cb_.is_null()) {
+ QueueAbortedRead();
+ SatisfyPendingRead();
+ }
+
+ message_loop_.PostTask(FROM_HERE, callback);
+ }
+
MessageLoop message_loop_;
VideoDecoderConfig video_config_;
@@ -591,9 +602,6 @@ TEST_F(VideoRendererBaseTest, StopDuringOutstandingRead) {
WaitableMessageLoopEvent event;
renderer_->Stop(event.GetClosure());
- QueueEndOfStream();
- SatisfyPendingRead();
-
event.RunAndWait();
}
« no previous file with comments | « media/filters/video_renderer_base.cc ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698