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

Unified Diff: media/cast/congestion_control/congestion_control_unittest.cc

Issue 149093008: Cast:Refactor CongestionControl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | « media/cast/congestion_control/congestion_control.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/congestion_control/congestion_control_unittest.cc
diff --git a/media/cast/congestion_control/congestion_control_unittest.cc b/media/cast/congestion_control/congestion_control_unittest.cc
index 108d2b340b777f69416bd8c704f7ab66f9104157..edd132786162723ac622f93b4017e63045290ddd 100644
--- a/media/cast/congestion_control/congestion_control_unittest.cc
+++ b/media/cast/congestion_control/congestion_control_unittest.cc
@@ -30,7 +30,8 @@ class CongestionControlTest : public ::testing::Test {
}
// Returns the last bitrate of the run.
- uint32 RunWithOneLossEventPerSecond(int fps, int rtt_ms,
+ uint32 RunWithOneLossEventPerSecond(int fps,
+ int rtt_ms,
int runtime_in_seconds) {
const base::TimeDelta rtt = base::TimeDelta::FromMilliseconds(rtt_ms);
const base::TimeDelta ack_rate =
@@ -50,6 +51,8 @@ class CongestionControlTest : public ::testing::Test {
base::SimpleTestTickClock testing_clock_;
CongestionControl congestion_control_;
+
+ DISALLOW_COPY_AND_ASSIGN(CongestionControlTest);
};
TEST_F(CongestionControlTest, Max) {
@@ -98,7 +101,7 @@ TEST_F(CongestionControlTest, Min) {
TEST_F(CongestionControlTest, Timing) {
const base::TimeDelta rtt = base::TimeDelta::FromMilliseconds(kRttMs);
const base::TimeDelta ack_rate =
- base::TimeDelta::FromMilliseconds(kAckRateMs);
+ base::TimeDelta::FromMilliseconds(kAckRateMs);
uint32 new_bitrate = 0;
uint32 expected_bitrate = kStartBitrate;
@@ -111,8 +114,8 @@ TEST_F(CongestionControlTest, Timing) {
// We should back immediately.
EXPECT_TRUE(congestion_control_.OnNack(rtt, &new_bitrate));
- expected_bitrate = static_cast<uint32>(
- expected_bitrate * kDefaultCongestionControlBackOff);
+ expected_bitrate =
+ static_cast<uint32>(expected_bitrate * kDefaultCongestionControlBackOff);
EXPECT_EQ(expected_bitrate, new_bitrate);
// Less than one RTT have passed don't back again.
@@ -121,8 +124,8 @@ TEST_F(CongestionControlTest, Timing) {
testing_clock_.Advance(base::TimeDelta::FromMilliseconds(10));
EXPECT_TRUE(congestion_control_.OnNack(rtt, &new_bitrate));
- expected_bitrate = static_cast<uint32>(
- expected_bitrate * kDefaultCongestionControlBackOff);
+ expected_bitrate =
+ static_cast<uint32>(expected_bitrate * kDefaultCongestionControlBackOff);
EXPECT_EQ(expected_bitrate, new_bitrate);
testing_clock_.Advance(base::TimeDelta::FromMilliseconds(10));
@@ -162,8 +165,7 @@ TEST_F(CongestionControlTest, Convergence24fps) {
}
TEST_F(CongestionControlTest, Convergence24fpsLongRtt) {
- EXPECT_GE(RunWithOneLossEventPerSecond(24, 100, 100),
- GG_UINT32_C(500000));
+ EXPECT_GE(RunWithOneLossEventPerSecond(24, 100, 100), GG_UINT32_C(500000));
}
TEST_F(CongestionControlTest, Convergence60fps) {
@@ -172,8 +174,7 @@ TEST_F(CongestionControlTest, Convergence60fps) {
}
TEST_F(CongestionControlTest, Convergence60fpsLongRtt) {
- EXPECT_GE(RunWithOneLossEventPerSecond(60, 100, 100),
- GG_UINT32_C(500000));
+ EXPECT_GE(RunWithOneLossEventPerSecond(60, 100, 100), GG_UINT32_C(500000));
}
} // namespace cast
« no previous file with comments | « media/cast/congestion_control/congestion_control.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698