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

Side by Side Diff: media/base/feedback_signal_accumulator_unittest.cc

Issue 2149793003: Move media/capture/content/feedback_signal_accumulator{.h,_unittest.cc} to media/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « media/base/feedback_signal_accumulator.h ('k') | media/capture/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « media/base/feedback_signal_accumulator.h ('k') | media/capture/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698