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

Unified Diff: media/base/time_delta_interpolator_unittest.cc

Issue 1094783002: Switch to double for time calculations using playback rate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Making changes at chromecast side to fix trybots Created 5 years, 8 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/base/time_delta_interpolator.cc ('k') | media/base/time_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/time_delta_interpolator_unittest.cc
diff --git a/media/base/time_delta_interpolator_unittest.cc b/media/base/time_delta_interpolator_unittest.cc
index 04242f122cdcbd8f8634e06db8fdcaed2735a241..04ee8f747cbaed68a1ce7839cb1891fb04bb7e56 100644
--- a/media/base/time_delta_interpolator_unittest.cc
+++ b/media/base/time_delta_interpolator_unittest.cc
@@ -40,7 +40,7 @@ TEST_F(TimeDeltaInterpolatorTest, StartInterpolating_DoubleSpeed) {
const base::TimeDelta kZero;
const base::TimeDelta kTimeToAdvance = base::TimeDelta::FromSeconds(5);
- interpolator_.SetPlaybackRate(2.0f);
+ interpolator_.SetPlaybackRate(2.0);
EXPECT_EQ(kZero, interpolator_.StartInterpolating());
AdvanceSystemTime(kTimeToAdvance);
EXPECT_EQ(2 * kTimeToAdvance, interpolator_.GetInterpolatedTime());
@@ -50,7 +50,7 @@ TEST_F(TimeDeltaInterpolatorTest, StartInterpolating_HalfSpeed) {
const base::TimeDelta kZero;
const base::TimeDelta kTimeToAdvance = base::TimeDelta::FromSeconds(4);
- interpolator_.SetPlaybackRate(0.5f);
+ interpolator_.SetPlaybackRate(0.5);
EXPECT_EQ(kZero, interpolator_.StartInterpolating());
AdvanceSystemTime(kTimeToAdvance);
EXPECT_EQ(kTimeToAdvance / 2, interpolator_.GetInterpolatedTime());
@@ -68,9 +68,9 @@ TEST_F(TimeDeltaInterpolatorTest, StartInterpolating_ZeroSpeed) {
EXPECT_EQ(kZero, interpolator_.StartInterpolating());
AdvanceSystemTime(kPlayDuration1);
- interpolator_.SetPlaybackRate(0.0f);
+ interpolator_.SetPlaybackRate(0.0);
AdvanceSystemTime(kPlayDuration2);
- interpolator_.SetPlaybackRate(1.0f);
+ interpolator_.SetPlaybackRate(1.0);
AdvanceSystemTime(kPlayDuration3);
EXPECT_EQ(kExpected, interpolator_.GetInterpolatedTime());
@@ -86,14 +86,14 @@ TEST_F(TimeDeltaInterpolatorTest, StartInterpolating_MultiSpeed) {
const base::TimeDelta kExpected =
kPlayDuration1 / 2 + kPlayDuration2 + 2 * kPlayDuration3;
- interpolator_.SetPlaybackRate(0.5f);
+ interpolator_.SetPlaybackRate(0.5);
EXPECT_EQ(kZero, interpolator_.StartInterpolating());
AdvanceSystemTime(kPlayDuration1);
- interpolator_.SetPlaybackRate(1.0f);
+ interpolator_.SetPlaybackRate(1.0);
AdvanceSystemTime(kPlayDuration2);
- interpolator_.SetPlaybackRate(2.0f);
+ interpolator_.SetPlaybackRate(2.0);
AdvanceSystemTime(kPlayDuration3);
EXPECT_EQ(kExpected, interpolator_.GetInterpolatedTime());
}
« no previous file with comments | « media/base/time_delta_interpolator.cc ('k') | media/base/time_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698