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

Unified Diff: media/base/pipeline_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/pipeline.cc ('k') | media/base/renderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/pipeline_unittest.cc
diff --git a/media/base/pipeline_unittest.cc b/media/base/pipeline_unittest.cc
index 093b51e02d2c6f877bc6ca1cbeffe63fa3a9e052..eac6474b0c58c70c24330a50dd47c3bcb42eb91a 100644
--- a/media/base/pipeline_unittest.cc
+++ b/media/base/pipeline_unittest.cc
@@ -212,7 +212,7 @@ class PipelineTest : public ::testing::Test {
if (start_status == PIPELINE_OK) {
EXPECT_CALL(callbacks_, OnMetadata(_)).WillOnce(SaveArg<0>(&metadata_));
- EXPECT_CALL(*renderer_, SetPlaybackRate(0.0f));
+ EXPECT_CALL(*renderer_, SetPlaybackRate(0.0));
EXPECT_CALL(*renderer_, SetVolume(1.0f));
EXPECT_CALL(*renderer_, StartPlayingFrom(start_time_))
.WillOnce(SetBufferingState(&buffering_state_cb_,
@@ -340,9 +340,9 @@ TEST_F(PipelineTest, NotStarted) {
// Setting should still work.
EXPECT_EQ(0.0f, pipeline_->GetPlaybackRate());
- pipeline_->SetPlaybackRate(-1.0f);
+ pipeline_->SetPlaybackRate(-1.0);
EXPECT_EQ(0.0f, pipeline_->GetPlaybackRate());
- pipeline_->SetPlaybackRate(1.0f);
+ pipeline_->SetPlaybackRate(1.0);
EXPECT_EQ(1.0f, pipeline_->GetPlaybackRate());
// Setting should still work.
@@ -643,7 +643,7 @@ TEST_F(PipelineTest, ErrorDuringSeek) {
SetRendererExpectations();
StartPipelineAndExpect(PIPELINE_OK);
- float playback_rate = 1.0f;
+ double playback_rate = 1.0;
EXPECT_CALL(*renderer_, SetPlaybackRate(playback_rate));
pipeline_->SetPlaybackRate(playback_rate);
message_loop_.RunUntilIdle();
@@ -678,7 +678,7 @@ static void TestNoCallsAfterError(
EXPECT_TRUE(message_loop->IsIdleForTesting());
// Make calls on pipeline after error has occurred.
- pipeline->SetPlaybackRate(0.5f);
+ pipeline->SetPlaybackRate(0.5);
pipeline->SetVolume(0.5f);
// No additional tasks should be queued as a result of these calls.
@@ -880,7 +880,7 @@ class PipelineTeardownTest : public PipelineTest {
EXPECT_CALL(callbacks_, OnMetadata(_));
// If we get here it's a successful initialization.
- EXPECT_CALL(*renderer_, SetPlaybackRate(0.0f));
+ EXPECT_CALL(*renderer_, SetPlaybackRate(0.0));
EXPECT_CALL(*renderer_, SetVolume(1.0f));
EXPECT_CALL(*renderer_, StartPlayingFrom(base::TimeDelta()))
.WillOnce(SetBufferingState(&buffering_state_cb_,
« no previous file with comments | « media/base/pipeline.cc ('k') | media/base/renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698