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

Unified Diff: media/blink/buffered_data_source_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/blink/buffered_data_source.cc ('k') | media/blink/buffered_resource_loader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/buffered_data_source_unittest.cc
diff --git a/media/blink/buffered_data_source_unittest.cc b/media/blink/buffered_data_source_unittest.cc
index eed8674dc14bea5a80cd1a3e7adf7bb832590c77..3776fd63f68e6e88d51bdccc6378fe850ea020cb 100644
--- a/media/blink/buffered_data_source_unittest.cc
+++ b/media/blink/buffered_data_source_unittest.cc
@@ -234,9 +234,9 @@ class BufferedDataSourceTest : public testing::Test {
return loader()->defer_strategy_;
}
int data_source_bitrate() { return data_source_->bitrate_; }
- int data_source_playback_rate() { return data_source_->playback_rate_; }
+ double data_source_playback_rate() { return data_source_->playback_rate_; }
int loader_bitrate() { return loader()->bitrate_; }
- int loader_playback_rate() { return loader()->playback_rate_; }
+ double loader_playback_rate() { return loader()->playback_rate_; }
bool is_local_source() { return data_source_->assume_fully_buffered(); }
void set_might_be_reused_from_cache_in_future(bool value) {
loader()->might_be_reused_from_cache_in_future_ = value;
@@ -560,9 +560,9 @@ TEST_F(BufferedDataSourceTest, DefaultValues) {
EXPECT_EQ(BufferedResourceLoader::kCapacityDefer, defer_strategy());
EXPECT_EQ(0, data_source_bitrate());
- EXPECT_EQ(0.0f, data_source_playback_rate());
+ EXPECT_EQ(0.0, data_source_playback_rate());
EXPECT_EQ(0, loader_bitrate());
- EXPECT_EQ(0.0f, loader_playback_rate());
+ EXPECT_EQ(0.0, loader_playback_rate());
EXPECT_TRUE(data_source_->loading());
Stop();
@@ -594,10 +594,10 @@ TEST_F(BufferedDataSourceTest, SetBitrate) {
TEST_F(BufferedDataSourceTest, MediaPlaybackRateChanged) {
InitializeWith206Response();
- data_source_->MediaPlaybackRateChanged(2.0f);
+ data_source_->MediaPlaybackRateChanged(2.0);
message_loop_.RunUntilIdle();
- EXPECT_EQ(2.0f, data_source_playback_rate());
- EXPECT_EQ(2.0f, loader_playback_rate());
+ EXPECT_EQ(2.0, data_source_playback_rate());
+ EXPECT_EQ(2.0, loader_playback_rate());
// Read so far ahead to cause the loader to get recreated.
BufferedResourceLoader* old_loader = loader();
« no previous file with comments | « media/blink/buffered_data_source.cc ('k') | media/blink/buffered_resource_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698