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

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

Issue 1921653002: Enable -Winconsistent-missing-override flag. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 4 years, 7 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/end_to_end_tests.cc ('k') | webrtc/video/video_send_stream_tests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 void OveruseDetected() { ++overuse_; } 46 void OveruseDetected() { ++overuse_; }
47 void NormalUsage() { ++normaluse_; } 47 void NormalUsage() { ++normaluse_; }
48 48
49 int overuse_; 49 int overuse_;
50 int normaluse_; 50 int normaluse_;
51 }; 51 };
52 52
53 class OveruseFrameDetectorTest : public ::testing::Test, 53 class OveruseFrameDetectorTest : public ::testing::Test,
54 public CpuOveruseMetricsObserver { 54 public CpuOveruseMetricsObserver {
55 protected: 55 protected:
56 virtual void SetUp() { 56 void SetUp() override {
57 clock_.reset(new SimulatedClock(1234)); 57 clock_.reset(new SimulatedClock(1234));
58 observer_.reset(new MockCpuOveruseObserver()); 58 observer_.reset(new MockCpuOveruseObserver());
59 options_.min_process_count = 0; 59 options_.min_process_count = 0;
60 ReinitializeOveruseDetector(); 60 ReinitializeOveruseDetector();
61 } 61 }
62 62
63 void ReinitializeOveruseDetector() { 63 void ReinitializeOveruseDetector() {
64 overuse_detector_.reset(new OveruseFrameDetector( 64 overuse_detector_.reset(new OveruseFrameDetector(
65 clock_.get(), options_, observer_.get(), nullptr, this)); 65 clock_.get(), options_, observer_.get(), nullptr, this));
66 } 66 }
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 // Encode heavier part, resulting in >85% usage total. 294 // Encode heavier part, resulting in >85% usage total.
295 clock_->AdvanceTimeMilliseconds(kDelayMs - 1); 295 clock_->AdvanceTimeMilliseconds(kDelayMs - 1);
296 overuse_detector_->FrameSent(timestamp); 296 overuse_detector_->FrameSent(timestamp);
297 clock_->AdvanceTimeMilliseconds(kIntervalMs - kDelayMs); 297 clock_->AdvanceTimeMilliseconds(kIntervalMs - kDelayMs);
298 timestamp += kIntervalMs * 90; 298 timestamp += kIntervalMs * 90;
299 overuse_detector_->Process(); 299 overuse_detector_->Process();
300 } 300 }
301 } 301 }
302 302
303 } // namespace webrtc 303 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/end_to_end_tests.cc ('k') | webrtc/video/video_send_stream_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698