Commit 108441f9 authored by Miguel Casas's avatar Miguel Casas Committed by Commit Bot

media/gpu: Update VaapiVideoDecodeAcceleratorTest

crrev.com/c/1600950 update the calls to |decoder_| but didn't update
the corresponding unit tests expectations. Since |mock_decoder_| is
a nice mock, nothing broke. This CL updatese |mock_decoder_|s
expectations and makes MockAcceleratedVideoDecoder a StrictMock.

Bug: 984836
Test: media_unitests on any cros target, including CQ bots.
Change-Id: I339b657502ea27702ce8c90b94c0f9d847e97b81
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1706553Reviewed-by: default avatarAndres Calderon Jaramillo <andrescj@chromium.org>
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Auto-Submit: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#678405}
parent e116e63a
...@@ -148,7 +148,7 @@ class VaapiVideoDecodeAcceleratorTest : public TestWithParam<TestParams>, ...@@ -148,7 +148,7 @@ class VaapiVideoDecodeAcceleratorTest : public TestWithParam<TestParams>,
const scoped_refptr<gl::GLImage>& image, const scoped_refptr<gl::GLImage>& image,
bool can_bind_to_sampler) { return true; })), bool can_bind_to_sampler) { return true; })),
decoder_thread_("VaapiVideoDecodeAcceleratorTestThread"), decoder_thread_("VaapiVideoDecodeAcceleratorTestThread"),
mock_decoder_(new MockAcceleratedVideoDecoder), mock_decoder_(new ::testing::StrictMock<MockAcceleratedVideoDecoder>),
mock_vaapi_picture_factory_(new MockVaapiPictureFactory()), mock_vaapi_picture_factory_(new MockVaapiPictureFactory()),
mock_vaapi_wrapper_(new MockVaapiWrapper()), mock_vaapi_wrapper_(new MockVaapiWrapper()),
mock_vpp_vaapi_wrapper_(new MockVaapiWrapper()), mock_vpp_vaapi_wrapper_(new MockVaapiWrapper()),
...@@ -232,6 +232,8 @@ class VaapiVideoDecodeAcceleratorTest : public TestWithParam<TestParams>, ...@@ -232,6 +232,8 @@ class VaapiVideoDecodeAcceleratorTest : public TestWithParam<TestParams>,
const size_t kNumReferenceFrames = num_pictures / 2; const size_t kNumReferenceFrames = num_pictures / 2;
EXPECT_CALL(*mock_decoder_, GetNumReferenceFrames()) EXPECT_CALL(*mock_decoder_, GetNumReferenceFrames())
.WillOnce(Return(kNumReferenceFrames)); .WillOnce(Return(kNumReferenceFrames));
EXPECT_CALL(*mock_decoder_, GetVisibleRect())
.WillOnce(Return(gfx::Rect(picture_size)));
if (vda_.buffer_allocation_mode_ != if (vda_.buffer_allocation_mode_ !=
VaapiVideoDecodeAccelerator::BufferAllocationMode::kNone) { VaapiVideoDecodeAccelerator::BufferAllocationMode::kNone) {
EXPECT_CALL(*mock_vaapi_wrapper_, DestroyContextAndSurfaces(_)); EXPECT_CALL(*mock_vaapi_wrapper_, DestroyContextAndSurfaces(_));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment