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

Unified Diff: content/renderer/media/capture_video_decoder_unittest.cc

Issue 8528045: corresponding change in CaptureVideoDecoder and RTCVideoDecoder due to pull model used in medi... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: add more tests Created 9 years, 1 month 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: content/renderer/media/capture_video_decoder_unittest.cc
===================================================================
--- content/renderer/media/capture_video_decoder_unittest.cc (revision 109978)
+++ content/renderer/media/capture_video_decoder_unittest.cc (working copy)
@@ -152,6 +152,16 @@
message_loop_->RunAllPending();
}
+ void Flush() {
+ // Issue a read.
+ EXPECT_CALL(*this, FrameReady(_));
+ decoder_->Read(read_cb_);
+
+ decoder_->Pause(media::NewExpectedClosure());
+ decoder_->Flush(media::NewExpectedClosure());
+ message_loop_->RunAllPending();
+ }
+
void Stop() {
EXPECT_CALL(*vc_impl_, StopCapture(capture_client()))
.Times(1)
@@ -198,6 +208,7 @@
Initialize();
Start();
Play();
+ Flush();
Stop();
}

Powered by Google App Engine
This is Rietveld 408576698