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

Unified Diff: webrtc/video/receive_statistics_proxy_unittest.cc

Issue 2607933002: RTCMediaStreamTrackStats.framesDropped collected by RTCStatsCollector. (Closed)
Patch Set: Rebase with master after webrtc/api renamed to webrtc/pc Created 3 years, 11 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') | webrtc/video_receive_stream.h » ('j') | 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 a485edae022b6db34d96ed370472fd0965c73c94..d431bc4afbcacb72e68f765e6564546ede02980a 100644
--- a/webrtc/video/receive_statistics_proxy_unittest.cc
+++ b/webrtc/video/receive_statistics_proxy_unittest.cc
@@ -12,6 +12,8 @@
#include <memory>
+#include "webrtc/api/video/video_frame.h"
+#include "webrtc/api/video/video_rotation.h"
#include "webrtc/modules/video_coding/include/video_codec_interface.h"
#include "webrtc/system_wrappers/include/metrics.h"
#include "webrtc/system_wrappers/include/metrics_default.h"
@@ -57,6 +59,16 @@ TEST_F(ReceiveStatisticsProxyTest, OnDecodedFrameIncreasesFramesDecoded) {
}
}
+TEST_F(ReceiveStatisticsProxyTest, OnRenderedFrameIncreasesFramesRendered) {
+ EXPECT_EQ(0u, statistics_proxy_->GetStats().frames_rendered);
+ webrtc::VideoFrame frame(
+ webrtc::I420Buffer::Create(1, 1), 0, 0, webrtc::kVideoRotation_0);
+ for (uint32_t i = 1; i <= 3; ++i) {
+ statistics_proxy_->OnRenderedFrame(frame);
+ EXPECT_EQ(i, statistics_proxy_->GetStats().frames_rendered);
+ }
+}
+
TEST_F(ReceiveStatisticsProxyTest, GetStatsReportsSsrc) {
EXPECT_EQ(kRemoteSsrc, statistics_proxy_->GetStats().ssrc);
}
« no previous file with comments | « webrtc/video/receive_statistics_proxy.cc ('k') | webrtc/video_receive_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698