Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1014)

Unified Diff: webrtc/video/receive_statistics_proxy_unittest.cc

Issue 3009793002: Implement googContentType GetStats metric reported on receive side. (Closed)
Patch Set: Fix broken tests on ASAN Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/video/receive_statistics_proxy.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/receive_statistics_proxy_unittest.cc
diff --git a/webrtc/video/receive_statistics_proxy_unittest.cc b/webrtc/video/receive_statistics_proxy_unittest.cc
index 0b8b3a6be153b8ac4eec5d231268c1640a13ef60..068b221f94d858aff1a9d59885f4848c99bd1c0b 100644
--- a/webrtc/video/receive_statistics_proxy_unittest.cc
+++ b/webrtc/video/receive_statistics_proxy_unittest.cc
@@ -98,6 +98,21 @@ TEST_F(ReceiveStatisticsProxyTest, OnDecodedFrameIncreasesQpSum) {
statistics_proxy_->GetStats().qp_sum);
}
+TEST_F(ReceiveStatisticsProxyTest, ReportsContentType) {
+ const std::string kRealtimeString("realtime");
+ const std::string kScreenshareString("screen");
+ EXPECT_EQ(kRealtimeString, videocontenttypehelpers::ToString(
+ statistics_proxy_->GetStats().content_type));
+ statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(3u),
+ VideoContentType::SCREENSHARE);
+ EXPECT_EQ(kScreenshareString, videocontenttypehelpers::ToString(
+ statistics_proxy_->GetStats().content_type));
+ statistics_proxy_->OnDecodedFrame(rtc::Optional<uint8_t>(3u),
+ VideoContentType::UNSPECIFIED);
+ EXPECT_EQ(kRealtimeString, videocontenttypehelpers::ToString(
+ statistics_proxy_->GetStats().content_type));
+}
+
TEST_F(ReceiveStatisticsProxyTest, ReportsMaxInterframeDelay) {
const int64_t kInterframeDelayMs1 = 100;
const int64_t kInterframeDelayMs2 = 200;
« no previous file with comments | « webrtc/video/receive_statistics_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698