diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-22 16:43:26 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-22 16:43:26 +0000 |
commit | 3ad9d5b0b3991c2e6f5f92cac6da4eb869a2fe42 (patch) | |
tree | 545463ee7704d77be33813c27413fd6ee8c0bd01 /webkit/media | |
parent | 26bebdfd623a70947617e57fc1f4018b46fac6b1 (diff) | |
download | chromium_src-3ad9d5b0b3991c2e6f5f92cac6da4eb869a2fe42.zip chromium_src-3ad9d5b0b3991c2e6f5f92cac6da4eb869a2fe42.tar.gz chromium_src-3ad9d5b0b3991c2e6f5f92cac6da4eb869a2fe42.tar.bz2 |
Clean up VideoRendererBase timing code (relanding).
Tiny step towards simplifying VideoRendererBase code and respective subclasses.
The biggest change was to replace if statements adjusting the value of |remaining_time| with explicit statements to sleep then retry the loop from the start. The nice part about doing this is that we guarantee we exercise all conditions in the scenario where a spurious signal to |frame_available_| causes the thread to wake up.
BUG=28208
Review URL: http://codereview.chromium.org/8794001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115546 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/media')
-rw-r--r-- | webkit/media/video_renderer_impl_unittest.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/webkit/media/video_renderer_impl_unittest.cc b/webkit/media/video_renderer_impl_unittest.cc index ba9573f..b252025 100644 --- a/webkit/media/video_renderer_impl_unittest.cc +++ b/webkit/media/video_renderer_impl_unittest.cc @@ -56,6 +56,8 @@ class VideoRendererImplTest : public testing::Test { // Forward all time requests to lock-protected getter. ON_CALL(host_, GetTime()) .WillByDefault(Invoke(this, &VideoRendererImplTest::GetTime)); + ON_CALL(host_, GetDuration()) + .WillByDefault(Return(base::TimeDelta::FromSeconds(10))); decoder_ = new media::MockVideoDecoder(); EXPECT_CALL(*decoder_, natural_size()) |