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

Side by Side Diff: webrtc/video/receive_statistics_proxy_unittest.cc

Issue 2423823003: Implement framesDecoded stat in video receive ssrc stats. (Closed)
Patch Set: Change type of frames_decoded int -> uint32_t. Created 4 years, 2 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2016 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #include "webrtc/video/receive_statistics_proxy.h"
12
13 #include "webrtc/test/gtest.h"
14
15 namespace webrtc {
16
17 class ReceiveStatisticsProxyTest : public ::testing::Test {
18 public:
19 ReceiveStatisticsProxyTest() : fake_clock_(1234), config_(GetTestConfig()) {}
20 virtual ~ReceiveStatisticsProxyTest() {}
21
22 protected:
23 virtual void SetUp() {
24 statistics_proxy_.reset(new ReceiveStatisticsProxy(&config_, &fake_clock_));
25 }
26
27 VideoReceiveStream::Config GetTestConfig() {
28 VideoReceiveStream::Config config(nullptr);
29 return config;
30 }
31
32 SimulatedClock fake_clock_;
33 std::unique_ptr<ReceiveStatisticsProxy> statistics_proxy_;
34 VideoReceiveStream::Config config_;
35 };
hta-webrtc 2016/10/21 09:03:49 Can you add a TODO to increase test coverage of Re
sakal 2016/10/21 10:47:21 Done.
36
37 TEST_F(ReceiveStatisticsProxyTest, OnDecodedFrameIncreasesFramesDecoded) {
38 EXPECT_EQ(0u, statistics_proxy_->GetStats().frames_decoded);
39 for (uint32_t i = 1; i <= 3; ++i) {
40 statistics_proxy_->OnDecodedFrame();
41 EXPECT_EQ(i, statistics_proxy_->GetStats().frames_decoded);
42 }
43 }
44
45 } // namespace webrtc
OLDNEW
« 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