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

Unified Diff: media/renderers/renderer_impl_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/renderers/renderer_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/renderers/renderer_impl_unittest.cc
diff --git a/media/renderers/renderer_impl_unittest.cc b/media/renderers/renderer_impl_unittest.cc
index 75fc0500dd18b820639cc9b05151c03fe5138af7..bc4033cc3eda7bbb79b5e5099b14353bdd4d57d4 100644
--- a/media/renderers/renderer_impl_unittest.cc
+++ b/media/renderers/renderer_impl_unittest.cc
@@ -220,7 +220,7 @@ class RendererImplTest : public ::testing::Test {
base::RunLoop().RunUntilIdle();
}
- void SetPlaybackRate(float playback_rate) {
+ void SetPlaybackRate(double playback_rate) {
EXPECT_CALL(time_source_, SetPlaybackRate(playback_rate));
renderer_impl_->SetPlaybackRate(playback_rate);
base::RunLoop().RunUntilIdle();
@@ -230,7 +230,7 @@ class RendererImplTest : public ::testing::Test {
return renderer_impl_->GetMediaTime().InMilliseconds();
}
- bool IsMediaTimeAdvancing(float playback_rate) {
+ bool IsMediaTimeAdvancing(double playback_rate) {
int64 start_time_ms = GetMediaTimeMs();
const int64 time_to_advance_ms = 100;
@@ -245,7 +245,7 @@ class RendererImplTest : public ::testing::Test {
}
bool IsMediaTimeAdvancing() {
- return IsMediaTimeAdvancing(1.0f);
+ return IsMediaTimeAdvancing(1.0);
}
// Fixture members.
@@ -380,8 +380,8 @@ TEST_F(RendererImplTest, FlushAfterUnderflow) {
TEST_F(RendererImplTest, SetPlaybackRate) {
InitializeWithAudioAndVideo();
- SetPlaybackRate(1.0f);
- SetPlaybackRate(2.0f);
+ SetPlaybackRate(1.0);
+ SetPlaybackRate(2.0);
}
TEST_F(RendererImplTest, SetVolume) {
« no previous file with comments | « media/renderers/renderer_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698