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

Side by Side Diff: media/base/pipeline_impl_unittest.cc

Issue 4192012: Convert implicit scoped_refptr constructor calls to explicit ones, part 1 (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: fix presubmit Created 10 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « media/base/data_buffer_unittest.cc ('k') | media/base/seekable_buffer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <string> 5 #include <string>
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/stl_util-inl.h" 8 #include "base/stl_util-inl.h"
9 #include "media/base/pipeline_impl.h" 9 #include "media/base/pipeline_impl.h"
10 #include "media/base/media_format.h" 10 #include "media/base/media_format.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 EXPECT_CALL(*mocks_->demuxer(), GetNumberOfStreams()) 111 EXPECT_CALL(*mocks_->demuxer(), GetNumberOfStreams())
112 .WillRepeatedly(Return(streams->size())); 112 .WillRepeatedly(Return(streams->size()));
113 EXPECT_CALL(*mocks_->demuxer(), SetPlaybackRate(0.0f)); 113 EXPECT_CALL(*mocks_->demuxer(), SetPlaybackRate(0.0f));
114 EXPECT_CALL(*mocks_->demuxer(), Seek(base::TimeDelta(), NotNull())) 114 EXPECT_CALL(*mocks_->demuxer(), Seek(base::TimeDelta(), NotNull()))
115 .WillOnce(Invoke(&RunFilterCallback)); 115 .WillOnce(Invoke(&RunFilterCallback));
116 EXPECT_CALL(*mocks_->demuxer(), Stop(NotNull())) 116 EXPECT_CALL(*mocks_->demuxer(), Stop(NotNull()))
117 .WillOnce(Invoke(&RunStopFilterCallback)); 117 .WillOnce(Invoke(&RunStopFilterCallback));
118 118
119 // Configure the demuxer to return the streams. 119 // Configure the demuxer to return the streams.
120 for (size_t i = 0; i < streams->size(); ++i) { 120 for (size_t i = 0; i < streams->size(); ++i) {
121 scoped_refptr<DemuxerStream> stream = (*streams)[i]; 121 scoped_refptr<DemuxerStream> stream((*streams)[i]);
122 EXPECT_CALL(*mocks_->demuxer(), GetStream(i)) 122 EXPECT_CALL(*mocks_->demuxer(), GetStream(i))
123 .WillRepeatedly(Return(stream)); 123 .WillRepeatedly(Return(stream));
124 } 124 }
125 } 125 }
126 126
127 // Create a stream with an associated media format. 127 // Create a stream with an associated media format.
128 StrictMock<MockDemuxerStream>* CreateStream(const std::string& mime_type) { 128 StrictMock<MockDemuxerStream>* CreateStream(const std::string& mime_type) {
129 StrictMock<MockDemuxerStream>* stream = 129 StrictMock<MockDemuxerStream>* stream =
130 new StrictMock<MockDemuxerStream>(); 130 new StrictMock<MockDemuxerStream>();
131 131
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 680
681 EXPECT_CALL(*mocks_->audio_renderer(), HasEnded()) 681 EXPECT_CALL(*mocks_->audio_renderer(), HasEnded())
682 .WillOnce(Return(true)); 682 .WillOnce(Return(true));
683 EXPECT_CALL(*mocks_->video_renderer(), HasEnded()) 683 EXPECT_CALL(*mocks_->video_renderer(), HasEnded())
684 .WillOnce(Return(true)); 684 .WillOnce(Return(true));
685 EXPECT_CALL(callbacks_, OnEnded()); 685 EXPECT_CALL(callbacks_, OnEnded());
686 host->NotifyEnded(); 686 host->NotifyEnded();
687 } 687 }
688 688
689 } // namespace media 689 } // namespace media
OLDNEW
« no previous file with comments | « media/base/data_buffer_unittest.cc ('k') | media/base/seekable_buffer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698