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

Side by Side Diff: webrtc/modules/bitrate_controller/bitrate_controller_unittest.cc

Issue 1620003003: Enable cpplint for webrtc/modules/bitrate_controller and fix all uncovered cpplint errors. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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
11 #include "testing/gtest/include/gtest/gtest.h"
12
13 #include <algorithm> 11 #include <algorithm>
14 #include <vector> 12 #include <vector>
15 13
14 #include "testing/gtest/include/gtest/gtest.h"
15
16 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" 16 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h"
17 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" 17 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
18 18
19 using webrtc::RtcpBandwidthObserver; 19 using webrtc::RtcpBandwidthObserver;
20 using webrtc::BitrateObserver; 20 using webrtc::BitrateObserver;
21 using webrtc::BitrateController; 21 using webrtc::BitrateController;
22 22
23 uint8_t WeightedLoss(int num_packets1, uint8_t fraction_loss1, 23 uint8_t WeightedLoss(int num_packets1, uint8_t fraction_loss1,
24 int num_packets2, uint8_t fraction_loss2) { 24 int num_packets2, uint8_t fraction_loss2) {
25 int weighted_sum = num_packets1 * fraction_loss1 + 25 int weighted_sum = num_packets1 * fraction_loss1 +
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 EXPECT_EQ(120000, bitrate_observer_.last_bitrate_); 392 EXPECT_EQ(120000, bitrate_observer_.last_bitrate_);
393 controller_->SetReservedBitrate(50000); 393 controller_->SetReservedBitrate(50000);
394 bandwidth_observer_->OnReceivedEstimatedBitrate(120000); 394 bandwidth_observer_->OnReceivedEstimatedBitrate(120000);
395 // Limited by min bitrate. 395 // Limited by min bitrate.
396 EXPECT_EQ(100000, bitrate_observer_.last_bitrate_); 396 EXPECT_EQ(100000, bitrate_observer_.last_bitrate_);
397 397
398 controller_->SetReservedBitrate(10000); 398 controller_->SetReservedBitrate(10000);
399 bandwidth_observer_->OnReceivedEstimatedBitrate(1); 399 bandwidth_observer_->OnReceivedEstimatedBitrate(1);
400 EXPECT_EQ(100000, bitrate_observer_.last_bitrate_); 400 EXPECT_EQ(100000, bitrate_observer_.last_bitrate_);
401 } 401 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698