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

Side by Side Diff: media/renderers/renderer_impl_unittest.cc

Issue 1178423008: Provision to start base::SimpleTestTickClock at initial ticks Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdint.h> 5 #include <stdint.h>
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 MOCK_METHOD1(OnError, void(PipelineStatus)); 52 MOCK_METHOD1(OnError, void(PipelineStatus));
53 MOCK_METHOD1(OnUpdateStatistics, void(const PipelineStatistics&)); 53 MOCK_METHOD1(OnUpdateStatistics, void(const PipelineStatistics&));
54 MOCK_METHOD1(OnBufferingStateChange, void(BufferingState)); 54 MOCK_METHOD1(OnBufferingStateChange, void(BufferingState));
55 MOCK_METHOD0(OnWaitingForDecryptionKey, void()); 55 MOCK_METHOD0(OnWaitingForDecryptionKey, void());
56 56
57 private: 57 private:
58 DISALLOW_COPY_AND_ASSIGN(CallbackHelper); 58 DISALLOW_COPY_AND_ASSIGN(CallbackHelper);
59 }; 59 };
60 60
61 RendererImplTest() 61 RendererImplTest()
62 : demuxer_(new StrictMock<MockDemuxer>()), 62 : test_tick_clock_(base::TimeTicks()),
63 demuxer_(new StrictMock<MockDemuxer>()),
63 video_renderer_(new StrictMock<MockVideoRenderer>()), 64 video_renderer_(new StrictMock<MockVideoRenderer>()),
64 audio_renderer_(new StrictMock<MockAudioRenderer>()), 65 audio_renderer_(new StrictMock<MockAudioRenderer>()),
65 renderer_impl_( 66 renderer_impl_(
66 new RendererImpl(message_loop_.task_runner(), 67 new RendererImpl(message_loop_.task_runner(),
67 scoped_ptr<AudioRenderer>(audio_renderer_), 68 scoped_ptr<AudioRenderer>(audio_renderer_),
68 scoped_ptr<VideoRenderer>(video_renderer_))) { 69 scoped_ptr<VideoRenderer>(video_renderer_))) {
69 // SetDemuxerExpectations() adds overriding expectations for expected 70 // SetDemuxerExpectations() adds overriding expectations for expected
70 // non-NULL streams. 71 // non-NULL streams.
71 DemuxerStream* null_pointer = NULL; 72 DemuxerStream* null_pointer = NULL;
72 EXPECT_CALL(*demuxer_, GetStream(_)) 73 EXPECT_CALL(*demuxer_, GetStream(_))
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 .WillOnce( 600 .WillOnce(
600 SetBufferingState(&audio_buffering_state_cb_, BUFFERING_HAVE_ENOUGH)); 601 SetBufferingState(&audio_buffering_state_cb_, BUFFERING_HAVE_ENOUGH));
601 EXPECT_CALL(*video_renderer_, StartPlayingFrom(kStartTime)); 602 EXPECT_CALL(*video_renderer_, StartPlayingFrom(kStartTime));
602 renderer_impl_->StartPlayingFrom(kStartTime); 603 renderer_impl_->StartPlayingFrom(kStartTime);
603 604
604 // Nothing else should primed on the message loop. 605 // Nothing else should primed on the message loop.
605 base::RunLoop().RunUntilIdle(); 606 base::RunLoop().RunUntilIdle();
606 } 607 }
607 608
608 } // namespace media 609 } // namespace media
OLDNEW
« no previous file with comments | « media/renderers/audio_renderer_impl_unittest.cc ('k') | media/renderers/video_renderer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698