| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 "media/capture/content/feedback_signal_accumulator.h" | 5 #include "media/base/feedback_signal_accumulator.h" |
| 6 | 6 |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 | 8 |
| 9 namespace media { | 9 namespace media { |
| 10 | 10 |
| 11 class FeedbackSignalAccumulatorTest : public ::testing::Test { | 11 class FeedbackSignalAccumulatorTest : public ::testing::Test { |
| 12 public: | 12 public: |
| 13 FeedbackSignalAccumulatorTest() | 13 FeedbackSignalAccumulatorTest() |
| 14 : half_life_(base::TimeDelta::FromSeconds(1)), | 14 : half_life_(base::TimeDelta::FromSeconds(1)), |
| 15 acc_(half_life_), | 15 acc_(half_life_), |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 base::TimeTicks earlier = t_ - 1 * half_life_; | 193 base::TimeTicks earlier = t_ - 1 * half_life_; |
| 194 for (int i = 0; i < 5; ++i) { | 194 for (int i = 0; i < 5; ++i) { |
| 195 ASSERT_FALSE(acc_.Update(999.0, earlier)); | 195 ASSERT_FALSE(acc_.Update(999.0, earlier)); |
| 196 ASSERT_EQ(1.875, acc_.current()); | 196 ASSERT_EQ(1.875, acc_.current()); |
| 197 ASSERT_EQ(t_, acc_.update_time()); | 197 ASSERT_EQ(t_, acc_.update_time()); |
| 198 earlier -= half_life_ / 2; | 198 earlier -= half_life_ / 2; |
| 199 } | 199 } |
| 200 } | 200 } |
| 201 | 201 |
| 202 } // namespace media | 202 } // namespace media |
| OLD | NEW |