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 ad51f2abe69111a875f9a91d3c8f7214d418f101..b1bf161d8049311e8f4218ea49d5f4cbb33bc586 100644 |
--- a/webrtc/video/send_statistics_proxy_unittest.cc |
+++ b/webrtc/video/send_statistics_proxy_unittest.cc |
@@ -302,6 +302,21 @@ TEST_F(SendStatisticsProxyTest, SwitchContentTypeUpdatesHistograms) { |
EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.InputWidthInPixels")); |
} |
+TEST_F(SendStatisticsProxyTest, LifetimeHistogramIsUpdated) { |
+ const int64_t kTimeSec = 3; |
+ fake_clock_.AdvanceTimeMilliseconds(kTimeSec * 1000); |
+ statistics_proxy_.reset(); |
+ EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.SendStreamLifetimeInSeconds")); |
+ EXPECT_EQ(1, metrics::NumEvents("WebRTC.Video.SendStreamLifetimeInSeconds", |
+ kTimeSec)); |
+} |
+ |
+TEST_F(SendStatisticsProxyTest, CodecTypeHistogramIsUpdated) { |
+ fake_clock_.AdvanceTimeMilliseconds(metrics::kMinRunTimeInSeconds * 1000); |
+ statistics_proxy_.reset(); |
+ EXPECT_EQ(1, metrics::NumSamples("WebRTC.Video.Encoder.CodecType")); |
+} |
+ |
TEST_F(SendStatisticsProxyTest, VerifyQpHistogramStats_Vp8) { |
EncodedImage encoded_image; |
CodecSpecificInfo codec_info; |