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 de9717ad59631a72dc7835bd4be57fc7e41ae678..acf8f1afaf5c04bbf55a9ca210ff0fc2e888e66f 100644 |
--- a/content/renderer/media/rtc_video_decoder_unittest.cc |
+++ b/content/renderer/media/rtc_video_decoder_unittest.cc |
@@ -293,6 +293,7 @@ TEST_P(RTCVideoDecoderTest, GetVDAErrorCounterForTesting) { |
input_image._encodedWidth = kMinResolutionWidth; |
input_image._encodedHeight = kMaxResolutionHeight; |
input_image._frameType = webrtc::kVideoFrameDelta; |
+ input_image._length = kMinResolutionWidth * kMaxResolutionHeight; |
EXPECT_EQ(WEBRTC_VIDEO_CODEC_ERROR, |
rtc_decoder_->Decode(input_image, false, nullptr, nullptr, 0)); |
RunUntilIdle(); |
@@ -308,16 +309,11 @@ TEST_P(RTCVideoDecoderTest, GetVDAErrorCounterForTesting) { |
rtc_decoder_->Decode(input_image, false, nullptr, nullptr, 0)); |
EXPECT_EQ(1, rtc_decoder_->GetVDAErrorCounterForTesting()); |
- // Decoder expects a keyframe after reset, so drops any other frames. |
+ // Decoder expects a keyframe after reset, so drops any other frames. However, |
+ // we should still increment the error counter. |
EXPECT_EQ(WEBRTC_VIDEO_CODEC_ERROR, |
rtc_decoder_->Decode(input_image, false, nullptr, nullptr, 0)); |
- EXPECT_EQ(1, rtc_decoder_->GetVDAErrorCounterForTesting()); |
- |
- // Decoder resets error counter after a successfull decode. |
- input_image._frameType = webrtc::kVideoFrameKey; |
- EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, |
- rtc_decoder_->Decode(input_image, false, nullptr, nullptr, 10)); |
- EXPECT_EQ(0, rtc_decoder_->GetVDAErrorCounterForTesting()); |
+ EXPECT_EQ(2, rtc_decoder_->GetVDAErrorCounterForTesting()); |
} |
INSTANTIATE_TEST_CASE_P(CodecProfiles, |