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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "content/common/child_process.h" 6 #include "content/common/child_process.h"
7 #include "content/renderer/media/capture_video_decoder.h" 7 #include "content/renderer/media/capture_video_decoder.h"
8 #include "content/renderer/media/video_capture_impl.h" 8 #include "content/renderer/media/video_capture_impl.h"
9 #include "content/renderer/media/video_capture_impl_manager.h" 9 #include "content/renderer/media/video_capture_impl_manager.h"
10 #include "media/base/limits.h" 10 #include "media/base/limits.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 message_loop_->RunAllPending(); 210 message_loop_->RunAllPending();
211 211
212 Stop(); 212 Stop();
213 } 213 }
214 214
215 TEST_F(CaptureVideoDecoderTest, ReadAndShutdown) { 215 TEST_F(CaptureVideoDecoderTest, ReadAndShutdown) {
216 // Test all the Read requests can be fullfilled (which is needed in order to 216 // Test all the Read requests can be fullfilled (which is needed in order to
217 // teardown the pipeline) even when there's no input frame. 217 // teardown the pipeline) even when there's no input frame.
218 Initialize(); 218 Initialize();
219 219
220 EXPECT_CALL(*this, FrameReady(media::VideoDecoder::kOk, 220 EXPECT_CALL(*this, FrameReady(media::VideoDecoder::kOk, HasSize(0, 0)));
221 HasSize(0, 0))).Times(2);
222 decoder_->Read(read_cb_); 221 decoder_->Read(read_cb_);
223 decoder_->PrepareForShutdownHack(); 222 Stop();
223
224 // Any read after stopping should be immediately satisfied.
225 EXPECT_CALL(*this, FrameReady(media::VideoDecoder::kOk, HasSize(0, 0)));
224 decoder_->Read(read_cb_); 226 decoder_->Read(read_cb_);
225 message_loop_->RunAllPending(); 227 message_loop_->RunAllPending();
226
227 Stop();
228 } 228 }
OLDNEW
« 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