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

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

Issue 10918172: Remove VideoDecoder::PrepareForShutdownHack() and friends. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: blah Created 8 years, 3 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 | « content/renderer/media/capture_video_decoder.cc ('k') | content/renderer/media/rtc_video_decoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/capture_video_decoder_unittest.cc
diff --git a/content/renderer/media/capture_video_decoder_unittest.cc b/content/renderer/media/capture_video_decoder_unittest.cc
index f5b5f4ea5a627e5dd3bb0b3ddaf8fc6bcbc9e6ec..0f31a5a20b0d11ba437d8af52b3d19429dd9b80d 100644
--- a/content/renderer/media/capture_video_decoder_unittest.cc
+++ b/content/renderer/media/capture_video_decoder_unittest.cc
@@ -217,12 +217,12 @@ TEST_F(CaptureVideoDecoderTest, ReadAndShutdown) {
// teardown the pipeline) even when there's no input frame.
Initialize();
- EXPECT_CALL(*this, FrameReady(media::VideoDecoder::kOk,
- HasSize(0, 0))).Times(2);
+ EXPECT_CALL(*this, FrameReady(media::VideoDecoder::kOk, HasSize(0, 0)));
decoder_->Read(read_cb_);
- decoder_->PrepareForShutdownHack();
+ Stop();
+
+ // Any read after stopping should be immediately satisfied.
+ EXPECT_CALL(*this, FrameReady(media::VideoDecoder::kOk, HasSize(0, 0)));
decoder_->Read(read_cb_);
message_loop_->RunAllPending();
-
- Stop();
}
« no previous file with comments | « content/renderer/media/capture_video_decoder.cc ('k') | content/renderer/media/rtc_video_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698