Chromium Code Reviews| Index: webrtc/video/send_statistics_proxy_unittest.cc |
| diff --git a/webrtc/video/send_statistics_proxy_unittest.cc b/webrtc/video/send_statistics_proxy_unittest.cc |
| index cb3bde442647856fab6cea7b41e575148105b45e..0e29533243b1df453bead155fe2ae65474eec3d4 100644 |
| --- a/webrtc/video/send_statistics_proxy_unittest.cc |
| +++ b/webrtc/video/send_statistics_proxy_unittest.cc |
| @@ -311,6 +311,18 @@ TEST_F(SendStatisticsProxyTest, OnSendEncodedImageIncreasesFramesEncoded) { |
| } |
| } |
| +TEST_F(SendStatisticsProxyTest, OnSendEncodedImageIncreasesQpSum) { |
| + EncodedImage encoded_image; |
| + CodecSpecificInfo codec_info; |
| + EXPECT_EQ(0u, statistics_proxy_->GetStats().qp_sum); |
| + encoded_image.qp_ = 3; |
| + statistics_proxy_->OnSendEncodedImage(encoded_image, &codec_info); |
| + EXPECT_EQ(3u, statistics_proxy_->GetStats().qp_sum); |
| + encoded_image.qp_ = 127; |
| + statistics_proxy_->OnSendEncodedImage(encoded_image, &codec_info); |
| + EXPECT_EQ(130u, statistics_proxy_->GetStats().qp_sum); |
|
hta-webrtc
2016/10/21 09:13:12
Can you add an unittest that chekcs that if codec
sakal
2016/10/21 14:17:26
Since QP sum is an unsigned type, it cannot be -1.
|
| +} |
| + |
| TEST_F(SendStatisticsProxyTest, SwitchContentTypeUpdatesHistograms) { |
| const int kWidth = 640; |
| const int kHeight = 480; |