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

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

Issue 2423823003: Implement framesDecoded stat in video receive ssrc stats. (Closed)
Patch Set: Add #include <memory> to receive_statistics_proxy_unittest.cc. Created 4 years, 1 month 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 <memory>
14
15 #include "webrtc/test/gtest.h"
16
17 namespace webrtc {
18
19 // TODO(sakal): ReceiveStatisticsProxy is lacking unittesting.
20 class ReceiveStatisticsProxyTest : public ::testing::Test {
21 public:
22 ReceiveStatisticsProxyTest() : fake_clock_(1234), config_(GetTestConfig()) {}
23 virtual ~ReceiveStatisticsProxyTest() {}
24
25 protected:
26 virtual void SetUp() {
27 statistics_proxy_.reset(new ReceiveStatisticsProxy(&config_, &fake_clock_));
28 }
29
30 VideoReceiveStream::Config GetTestConfig() {
31 VideoReceiveStream::Config config(nullptr);
32 return config;
33 }
34
35 SimulatedClock fake_clock_;
36 std::unique_ptr<ReceiveStatisticsProxy> statistics_proxy_;
37 VideoReceiveStream::Config config_;
38 };
39
40 TEST_F(ReceiveStatisticsProxyTest, OnDecodedFrameIncreasesFramesDecoded) {
41 EXPECT_EQ(0u, statistics_proxy_->GetStats().frames_decoded);
42 for (uint32_t i = 1; i <= 3; ++i) {
43 statistics_proxy_->OnDecodedFrame();
44 EXPECT_EQ(i, statistics_proxy_->GetStats().frames_decoded);
45 }
46 }
47
48 } // 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