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

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: d731420c Comment update, 'git cl format', rebase Created 7 years, 2 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
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 ba27a576765c981c2769f549e4f69282ed72831a..92e79139792f3613c2580bf9daaf83e4ca7cf26f 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_loop_proxy_->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_loop_proxy_->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 {
@@ -165,8 +161,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,

Powered by Google App Engine
This is Rietveld 408576698