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

Unified Diff: media/renderers/audio_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/audio_renderer_impl.cc ('k') | media/renderers/renderer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/renderers/audio_renderer_impl_unittest.cc
diff --git a/media/renderers/audio_renderer_impl_unittest.cc b/media/renderers/audio_renderer_impl_unittest.cc
index 98782c937ceea400601e877ab23f42d01e04ef07..1fe5bdd0a8b3a1e238610a0c2720b4000cccfee2 100644
--- a/media/renderers/audio_renderer_impl_unittest.cc
+++ b/media/renderers/audio_renderer_impl_unittest.cc
@@ -212,7 +212,7 @@ class AudioRendererImplTest : public ::testing::Test {
void StartTicking() {
renderer_->StartTicking();
- renderer_->SetPlaybackRate(1.0f);
+ renderer_->SetPlaybackRate(1.0);
}
void StopTicking() { renderer_->StopTicking(); }
@@ -721,18 +721,18 @@ TEST_F(AudioRendererImplTest, SetPlaybackRate) {
// Rendering hasn't started. Sink should always be paused.
EXPECT_EQ(FakeAudioRendererSink::kPaused, sink_->state());
- renderer_->SetPlaybackRate(0.0f);
+ renderer_->SetPlaybackRate(0.0);
EXPECT_EQ(FakeAudioRendererSink::kPaused, sink_->state());
- renderer_->SetPlaybackRate(1.0f);
+ renderer_->SetPlaybackRate(1.0);
EXPECT_EQ(FakeAudioRendererSink::kPaused, sink_->state());
// Rendering has started with non-zero rate. Rate changes will affect sink
// state.
renderer_->StartTicking();
EXPECT_EQ(FakeAudioRendererSink::kPlaying, sink_->state());
- renderer_->SetPlaybackRate(0.0f);
+ renderer_->SetPlaybackRate(0.0);
EXPECT_EQ(FakeAudioRendererSink::kPaused, sink_->state());
- renderer_->SetPlaybackRate(1.0f);
+ renderer_->SetPlaybackRate(1.0);
EXPECT_EQ(FakeAudioRendererSink::kPlaying, sink_->state());
// Rendering has stopped. Sink should be paused.
@@ -741,10 +741,10 @@ TEST_F(AudioRendererImplTest, SetPlaybackRate) {
// Start rendering with zero playback rate. Sink should be paused until
// non-zero rate is set.
- renderer_->SetPlaybackRate(0.0f);
+ renderer_->SetPlaybackRate(0.0);
renderer_->StartTicking();
EXPECT_EQ(FakeAudioRendererSink::kPaused, sink_->state());
- renderer_->SetPlaybackRate(1.0f);
+ renderer_->SetPlaybackRate(1.0);
EXPECT_EQ(FakeAudioRendererSink::kPlaying, sink_->state());
}
« no previous file with comments | « media/renderers/audio_renderer_impl.cc ('k') | media/renderers/renderer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698