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

Unified Diff: media/filters/video_renderer_algorithm_unittest.cc

Issue 1136513004: Switch GetWallClockTime to using vectors for input and output. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comments. Created 5 years, 7 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/filters/video_renderer_algorithm.cc ('k') | media/renderers/audio_renderer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/video_renderer_algorithm_unittest.cc
diff --git a/media/filters/video_renderer_algorithm_unittest.cc b/media/filters/video_renderer_algorithm_unittest.cc
index 20ce6ef826d93bf91c0a7e6ec01443aa93179e27..11e9ab3051ee284d8c2d5e60ee5345bdb428ae11 100644
--- a/media/filters/video_renderer_algorithm_unittest.cc
+++ b/media/filters/video_renderer_algorithm_unittest.cc
@@ -64,13 +64,12 @@ class VideoRendererAlgorithmTest : public testing::Test {
public:
VideoRendererAlgorithmTest()
: tick_clock_(new base::SimpleTestTickClock()),
- algorithm_(base::Bind(&WallClockTimeSource::GetWallClockTime,
+ algorithm_(base::Bind(&WallClockTimeSource::GetWallClockTimes,
base::Unretained(&time_source_))) {
// Always start the TickClock at a non-zero value since null values have
// special connotations.
tick_clock_->Advance(base::TimeDelta::FromMicroseconds(10000));
- time_source_.SetTickClockForTesting(
- scoped_ptr<base::TickClock>(tick_clock_));
+ time_source_.set_tick_clock_for_testing(tick_clock_.get());
}
~VideoRendererAlgorithmTest() override {}
@@ -301,8 +300,8 @@ class VideoRendererAlgorithmTest : public testing::Test {
protected:
VideoFramePool frame_pool_;
+ scoped_ptr<base::SimpleTestTickClock> tick_clock_;
WallClockTimeSource time_source_;
- base::SimpleTestTickClock* tick_clock_; // Owned by |time_source_|.
VideoRendererAlgorithm algorithm_;
private:
@@ -606,7 +605,7 @@ TEST_F(VideoRendererAlgorithmTest, TimeIsStopped) {
EXPECT_EQ(tg.interval(1), frame->timestamp());
EXPECT_EQ(0u, frames_dropped);
EXPECT_EQ(2u, frames_queued());
- EXPECT_EQ(2u, algorithm_.EffectiveFramesQueued());
+ EXPECT_EQ(1u, algorithm_.EffectiveFramesQueued());
}
// Verify frames inserted out of order end up in the right spot and are rendered
« no previous file with comments | « media/filters/video_renderer_algorithm.cc ('k') | media/renderers/audio_renderer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698