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

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

Issue 1178423008: Provision to start base::SimpleTestTickClock at initial ticks Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased 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
« no previous file with comments | « media/base/pipeline_unittest.cc ('k') | media/base/wall_clock_time_source_unittest.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/logging.h" 5 #include "base/logging.h"
6 #include "base/test/simple_test_tick_clock.h" 6 #include "base/test/simple_test_tick_clock.h"
7 #include "media/base/time_delta_interpolator.h" 7 #include "media/base/time_delta_interpolator.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace media { 10 namespace media {
11 11
12 class TimeDeltaInterpolatorTest : public ::testing::Test { 12 class TimeDeltaInterpolatorTest : public ::testing::Test {
13 public: 13 public:
14 TimeDeltaInterpolatorTest() : interpolator_(&test_tick_clock_) {} 14 TimeDeltaInterpolatorTest()
15 : test_tick_clock_(base::TimeTicks()), interpolator_(&test_tick_clock_) {}
15 16
16 protected: 17 protected:
17 void AdvanceSystemTime(base::TimeDelta delta) { 18 void AdvanceSystemTime(base::TimeDelta delta) {
18 test_tick_clock_.Advance(delta); 19 test_tick_clock_.Advance(delta);
19 } 20 }
20 21
21 base::SimpleTestTickClock test_tick_clock_; 22 base::SimpleTestTickClock test_tick_clock_;
22 TimeDeltaInterpolator interpolator_; 23 TimeDeltaInterpolator interpolator_;
23 }; 24 };
24 25
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 EXPECT_EQ(kMaxTime1, interpolator_.GetInterpolatedTime()); 191 EXPECT_EQ(kMaxTime1, interpolator_.GetInterpolatedTime());
191 192
192 AdvanceSystemTime(kTimeInterval); 193 AdvanceSystemTime(kTimeInterval);
193 EXPECT_EQ(kMaxTime1 + kTimeInterval, interpolator_.GetInterpolatedTime()); 194 EXPECT_EQ(kMaxTime1 + kTimeInterval, interpolator_.GetInterpolatedTime());
194 195
195 AdvanceSystemTime(kTimeInterval); 196 AdvanceSystemTime(kTimeInterval);
196 EXPECT_EQ(kMaxTime2, interpolator_.GetInterpolatedTime()); 197 EXPECT_EQ(kMaxTime2, interpolator_.GetInterpolatedTime());
197 } 198 }
198 199
199 } // namespace media 200 } // namespace media
OLDNEW
« no previous file with comments | « media/base/pipeline_unittest.cc ('k') | media/base/wall_clock_time_source_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698