| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include "base/test/simple_test_tick_clock.h" | 7 #include "base/test/simple_test_tick_clock.h" |
| 8 #include "media/cast/cast_defines.h" | 8 #include "media/cast/cast_defines.h" |
| 9 #include "media/cast/congestion_control/congestion_control.h" | 9 #include "media/cast/sender/congestion_control.h" |
| 10 #include "media/cast/test/fake_single_thread_task_runner.h" | 10 #include "media/cast/test/fake_single_thread_task_runner.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 12 |
| 13 namespace media { | 13 namespace media { |
| 14 namespace cast { | 14 namespace cast { |
| 15 | 15 |
| 16 static const uint32 kMaxBitrateConfigured = 5000000; | 16 static const uint32 kMaxBitrateConfigured = 5000000; |
| 17 static const uint32 kMinBitrateConfigured = 500000; | 17 static const uint32 kMinBitrateConfigured = 500000; |
| 18 static const int64 kStartMillisecond = INT64_C(12345678900000); | 18 static const int64 kStartMillisecond = INT64_C(12345678900000); |
| 19 static const double kTargetEmptyBufferFraction = 0.9; | 19 static const double kTargetEmptyBufferFraction = 0.9; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 testing_clock_.NowTicks() + base::TimeDelta::FromMilliseconds(300), | 111 testing_clock_.NowTicks() + base::TimeDelta::FromMilliseconds(300), |
| 112 base::TimeDelta::FromMilliseconds(300)); | 112 base::TimeDelta::FromMilliseconds(300)); |
| 113 EXPECT_NEAR(safe_bitrate / kTargetEmptyBufferFraction * 1 / 3, | 113 EXPECT_NEAR(safe_bitrate / kTargetEmptyBufferFraction * 1 / 3, |
| 114 bitrate, | 114 bitrate, |
| 115 safe_bitrate * 0.05); | 115 safe_bitrate * 0.05); |
| 116 } | 116 } |
| 117 | 117 |
| 118 | 118 |
| 119 } // namespace cast | 119 } // namespace cast |
| 120 } // namespace media | 120 } // namespace media |
| OLD | NEW |