| 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 593c93b8e1aa859150ceacc39408a20e5c1a64e2..f43eeb566432a7fdf422c5fce3f9fedfda817db4 100644
|
| --- a/webrtc/video/send_statistics_proxy_unittest.cc
|
| +++ b/webrtc/video/send_statistics_proxy_unittest.cc
|
| @@ -295,13 +295,16 @@ TEST_F(SendStatisticsProxyTest, SwitchContentTypeUpdatesHistograms) {
|
| for (int i = 0; i < kMinRequiredSamples; ++i)
|
| statistics_proxy_->OnIncomingFrame(kWidth, kHeight);
|
|
|
| - // No switch, stats not should be updated.
|
| - statistics_proxy_->SetContentType(
|
| - VideoEncoderConfig::ContentType::kRealtimeVideo);
|
| + // No switch, stats should not be updated.
|
| + VideoEncoderConfig config;
|
| + config.content_type = VideoEncoderConfig::ContentType::kRealtimeVideo;
|
| + std::vector<VideoStream> video_streams;
|
| + statistics_proxy_->OnEncoderReconfigured(config, video_streams);
|
| EXPECT_EQ(0, metrics::NumSamples("WebRTC.Video.InputWidthInPixels"));
|
|
|
| // Switch to screenshare, real-time stats should be updated.
|
| - statistics_proxy_->SetContentType(VideoEncoderConfig::ContentType::kScreen);
|
| + config.content_type = VideoEncoderConfig::ContentType::kScreen;
|
| + statistics_proxy_->OnEncoderReconfigured(config, video_streams);
|
| EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.InputWidthInPixels"));
|
| }
|
|
|
| @@ -538,7 +541,10 @@ TEST_F(SendStatisticsProxyTest, ResetsRtcpCountersOnContentChange) {
|
| proxy->RtcpPacketTypesCounterUpdated(kSecondSsrc, counters);
|
|
|
| // Changing content type causes histograms to be reported.
|
| - statistics_proxy_->SetContentType(VideoEncoderConfig::ContentType::kScreen);
|
| + VideoEncoderConfig config;
|
| + config.content_type = VideoEncoderConfig::ContentType::kScreen;
|
| + std::vector<VideoStream> video_streams;
|
| + statistics_proxy_->OnEncoderReconfigured(config, video_streams);
|
|
|
| EXPECT_EQ(1,
|
| metrics::NumSamples("WebRTC.Video.NackPacketsReceivedPerMinute"));
|
| @@ -633,7 +639,10 @@ TEST_F(SendStatisticsProxyTest, ResetsRtpCountersOnContentChange) {
|
| proxy->DataCountersUpdated(rtx_counters, kSecondRtxSsrc);
|
|
|
| // Changing content type causes histograms to be reported.
|
| - statistics_proxy_->SetContentType(VideoEncoderConfig::ContentType::kScreen);
|
| + VideoEncoderConfig config;
|
| + config.content_type = VideoEncoderConfig::ContentType::kScreen;
|
| + std::vector<VideoStream> video_streams;
|
| + statistics_proxy_->OnEncoderReconfigured(config, video_streams);
|
|
|
| EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.BitrateSentInKbps"));
|
| EXPECT_EQ(1,
|
|
|