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

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

Issue 2070753002: media: Add unittest for MojoRenderer{Impl|Service} (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix visibility :( Created 4 years, 6 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
« no previous file with comments | « media/mojo/services/mojo_renderer_service.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 video_renderer_(new StrictMock<MockVideoRenderer>()), 61 video_renderer_(new StrictMock<MockVideoRenderer>()),
62 audio_renderer_(new StrictMock<MockAudioRenderer>()), 62 audio_renderer_(new StrictMock<MockAudioRenderer>()),
63 renderer_impl_( 63 renderer_impl_(
64 new RendererImpl(message_loop_.task_runner(), 64 new RendererImpl(message_loop_.task_runner(),
65 std::unique_ptr<AudioRenderer>(audio_renderer_), 65 std::unique_ptr<AudioRenderer>(audio_renderer_),
66 std::unique_ptr<VideoRenderer>(video_renderer_))), 66 std::unique_ptr<VideoRenderer>(video_renderer_))),
67 cdm_context_(new StrictMock<MockCdmContext>()), 67 cdm_context_(new StrictMock<MockCdmContext>()),
68 video_renderer_client_(nullptr), 68 video_renderer_client_(nullptr),
69 audio_renderer_client_(nullptr), 69 audio_renderer_client_(nullptr),
70 initialization_status_(PIPELINE_OK) { 70 initialization_status_(PIPELINE_OK) {
71 // SetDemuxerExpectations() adds overriding expectations for expected 71 // CreateAudioStream() and CreateVideoStream() overrides expectations for
72 // non-NULL streams. 72 // expected non-NULL streams.
73 DemuxerStream* null_pointer = NULL; 73 DemuxerStream* null_pointer = NULL;
74 EXPECT_CALL(*demuxer_, GetStream(_)) 74 EXPECT_CALL(*demuxer_, GetStream(_))
75 .WillRepeatedly(Return(null_pointer)); 75 .WillRepeatedly(Return(null_pointer));
76 } 76 }
77 77
78 virtual ~RendererImplTest() { Destroy(); } 78 virtual ~RendererImplTest() { Destroy(); }
79 79
80 protected: 80 protected:
81 void Destroy() { 81 void Destroy() {
82 renderer_impl_.reset(); 82 renderer_impl_.reset();
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 .WillOnce( 693 .WillOnce(
694 SetBufferingState(&audio_renderer_client_, BUFFERING_HAVE_ENOUGH)); 694 SetBufferingState(&audio_renderer_client_, BUFFERING_HAVE_ENOUGH));
695 EXPECT_CALL(*video_renderer_, StartPlayingFrom(kStartTime)); 695 EXPECT_CALL(*video_renderer_, StartPlayingFrom(kStartTime));
696 renderer_impl_->StartPlayingFrom(kStartTime); 696 renderer_impl_->StartPlayingFrom(kStartTime);
697 697
698 // Nothing else should primed on the message loop. 698 // Nothing else should primed on the message loop.
699 base::RunLoop().RunUntilIdle(); 699 base::RunLoop().RunUntilIdle();
700 } 700 }
701 701
702 } // namespace media 702 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/services/mojo_renderer_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698