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

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

Issue 643093003: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/base/android/browser_cdm_factory_android.cc ('k') | media/cast/test/utility/udp_proxy.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <vector> 5 #include <vector>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/test/simple_test_tick_clock.h" 10 #include "base/test/simple_test_tick_clock.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 EXPECT_CALL(*this, OnAddTextTrack(_,_)) 177 EXPECT_CALL(*this, OnAddTextTrack(_,_))
178 .WillOnce(Invoke(this, &PipelineTest::DoOnAddTextTrack)); 178 .WillOnce(Invoke(this, &PipelineTest::DoOnAddTextTrack));
179 static_cast<DemuxerHost*>(pipeline_.get())->AddTextStream(text_stream(), 179 static_cast<DemuxerHost*>(pipeline_.get())->AddTextStream(text_stream(),
180 TextTrackConfig(kTextSubtitles, "", "", "")); 180 TextTrackConfig(kTextSubtitles, "", "", ""));
181 message_loop_.RunUntilIdle(); 181 message_loop_.RunUntilIdle();
182 } 182 }
183 183
184 void StartPipeline() { 184 void StartPipeline() {
185 pipeline_->Start( 185 pipeline_->Start(
186 demuxer_.get(), 186 demuxer_.get(),
187 scoped_renderer_.PassAs<Renderer>(), 187 scoped_renderer_.Pass(),
188 base::Bind(&CallbackHelper::OnEnded, base::Unretained(&callbacks_)), 188 base::Bind(&CallbackHelper::OnEnded, base::Unretained(&callbacks_)),
189 base::Bind(&CallbackHelper::OnError, base::Unretained(&callbacks_)), 189 base::Bind(&CallbackHelper::OnError, base::Unretained(&callbacks_)),
190 base::Bind(&CallbackHelper::OnStart, base::Unretained(&callbacks_)), 190 base::Bind(&CallbackHelper::OnStart, base::Unretained(&callbacks_)),
191 base::Bind(&CallbackHelper::OnMetadata, base::Unretained(&callbacks_)), 191 base::Bind(&CallbackHelper::OnMetadata, base::Unretained(&callbacks_)),
192 base::Bind(&CallbackHelper::OnBufferingStateChange, 192 base::Bind(&CallbackHelper::OnBufferingStateChange,
193 base::Unretained(&callbacks_)), 193 base::Unretained(&callbacks_)),
194 base::Bind(&CallbackHelper::OnDurationChange, 194 base::Bind(&CallbackHelper::OnDurationChange,
195 base::Unretained(&callbacks_)), 195 base::Unretained(&callbacks_)),
196 base::Bind(&PipelineTest::OnAddTextTrack, base::Unretained(this))); 196 base::Bind(&PipelineTest::OnAddTextTrack, base::Unretained(this)));
197 } 197 }
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
993 993
994 INSTANTIATE_TEARDOWN_TEST(Error, InitDemuxer); 994 INSTANTIATE_TEARDOWN_TEST(Error, InitDemuxer);
995 INSTANTIATE_TEARDOWN_TEST(Error, InitRenderer); 995 INSTANTIATE_TEARDOWN_TEST(Error, InitRenderer);
996 INSTANTIATE_TEARDOWN_TEST(Error, Flushing); 996 INSTANTIATE_TEARDOWN_TEST(Error, Flushing);
997 INSTANTIATE_TEARDOWN_TEST(Error, Seeking); 997 INSTANTIATE_TEARDOWN_TEST(Error, Seeking);
998 INSTANTIATE_TEARDOWN_TEST(Error, Playing); 998 INSTANTIATE_TEARDOWN_TEST(Error, Playing);
999 999
1000 INSTANTIATE_TEARDOWN_TEST(ErrorAndStop, Playing); 1000 INSTANTIATE_TEARDOWN_TEST(ErrorAndStop, Playing);
1001 1001
1002 } // namespace media 1002 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/browser_cdm_factory_android.cc ('k') | media/cast/test/utility/udp_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698