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

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

Issue 27420004: Remove threading from RendererGpuVideoAcceleratorFactories (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dthread
Patch Set: cf596ded Rebase. Created 6 years, 11 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/rtc_video_decoder_factory.cc ('k') | content/renderer/media/rtc_video_encoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/rtc_video_decoder_unittest.cc
diff --git a/content/renderer/media/rtc_video_decoder_unittest.cc b/content/renderer/media/rtc_video_decoder_unittest.cc
index 6f91756c371a4907312f8227ca043f53e436e161..240391dd421c317ff2492592830760cf78b1593b 100644
--- a/content/renderer/media/rtc_video_decoder_unittest.cc
+++ b/content/renderer/media/rtc_video_decoder_unittest.cc
@@ -43,7 +43,6 @@ class RTCVideoDecoderTest : public ::testing::Test,
EXPECT_CALL(*mock_gpu_factories_,
DoCreateVideoDecodeAccelerator(media::VP8PROFILE_MAIN, _))
.WillRepeatedly(Return(mock_vda_));
- EXPECT_CALL(*mock_gpu_factories_, Abort()).WillRepeatedly(Return());
EXPECT_CALL(*mock_gpu_factories_, CreateSharedMemory(_))
.WillRepeatedly(Return(static_cast<base::SharedMemory*>(NULL)));
EXPECT_CALL(*mock_vda_, Destroy());
@@ -53,15 +52,12 @@ class RTCVideoDecoderTest : public ::testing::Test,
virtual void TearDown() OVERRIDE {
VLOG(2) << "TearDown";
- if (vda_thread_.IsRunning()) {
- RunUntilIdle(); // Wait until all callbascks complete.
- vda_task_runner_->DeleteSoon(FROM_HERE, rtc_decoder_.release());
- // Make sure the decoder is released before stopping the thread.
- RunUntilIdle();
- vda_thread_.Stop();
- } else {
- rtc_decoder_.reset();
- }
+ EXPECT_TRUE(vda_thread_.IsRunning());
+ RunUntilIdle(); // Wait until all callbascks complete.
+ vda_task_runner_->DeleteSoon(FROM_HERE, rtc_decoder_.release());
+ // Make sure the decoder is released before stopping the thread.
+ RunUntilIdle();
+ vda_thread_.Stop();
}
virtual int32_t Decoded(webrtc::I420VideoFrame& decoded_image) OVERRIDE {
@@ -166,8 +162,6 @@ TEST_F(RTCVideoDecoderTest, InitDecodeAfterRelease) {
EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, rtc_decoder_->Release());
}
-TEST_F(RTCVideoDecoderTest, VdaThreadStops) { vda_thread_.Stop(); }
-
TEST_F(RTCVideoDecoderTest, IsBufferAfterReset) {
EXPECT_TRUE(rtc_decoder_->IsBufferAfterReset(0, RTCVideoDecoder::ID_INVALID));
EXPECT_TRUE(rtc_decoder_->IsBufferAfterReset(RTCVideoDecoder::ID_LAST,
« no previous file with comments | « content/renderer/media/rtc_video_decoder_factory.cc ('k') | content/renderer/media/rtc_video_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698