| Index: media/base/pipeline_unittest.cc
|
| diff --git a/media/base/pipeline_unittest.cc b/media/base/pipeline_unittest.cc
|
| index 9602e4a9024d78a7dd5f1bc57e1797e23c69cb55..e6d8c96c92b7c373aa697bf8fb067bfd05ac4f60 100644
|
| --- a/media/base/pipeline_unittest.cc
|
| +++ b/media/base/pipeline_unittest.cc
|
| @@ -125,8 +125,8 @@ class PipelineTest : public ::testing::Test {
|
| base::Unretained(&callbacks_)));
|
| message_loop_.RunUntilIdle();
|
|
|
| - pipeline_ = NULL;
|
| filter_collection_.reset();
|
| + pipeline_.reset();
|
| }
|
|
|
| protected:
|
| @@ -289,7 +289,7 @@ class PipelineTest : public ::testing::Test {
|
| StrictMock<CallbackHelper> callbacks_;
|
| base::SimpleTestClock test_clock_;
|
| base::MessageLoop message_loop_;
|
| - scoped_refptr<Pipeline> pipeline_;
|
| + scoped_ptr<Pipeline> pipeline_;
|
|
|
| scoped_ptr<FilterCollection> filter_collection_;
|
| scoped_ptr<MockDemuxer> demuxer_;
|
| @@ -711,7 +711,7 @@ TEST_F(PipelineTest, NoMessageDuringTearDownFromError) {
|
|
|
| // Trigger additional requests on the pipeline during tear down from error.
|
| base::Callback<void(PipelineStatus)> cb = base::Bind(
|
| - &TestNoCallsAfterError, pipeline_, &message_loop_);
|
| + &TestNoCallsAfterError, pipeline_.get(), &message_loop_);
|
| ON_CALL(callbacks_, OnError(_))
|
| .WillByDefault(Invoke(&cb, &base::Callback<void(PipelineStatus)>::Run));
|
|
|
| @@ -965,7 +965,7 @@ class PipelineTeardownTest : public PipelineTest {
|
| if (state == kInitDemuxer) {
|
| if (stop_or_error == kStop) {
|
| EXPECT_CALL(*demuxer_, Initialize(_, _))
|
| - .WillOnce(DoAll(Stop(pipeline_, stop_cb),
|
| + .WillOnce(DoAll(Stop(pipeline_.get(), stop_cb),
|
| RunCallback<1>(PIPELINE_OK)));
|
| EXPECT_CALL(callbacks_, OnStop());
|
| } else {
|
| @@ -988,7 +988,7 @@ class PipelineTeardownTest : public PipelineTest {
|
| if (state == kInitAudioRenderer) {
|
| if (stop_or_error == kStop) {
|
| EXPECT_CALL(*audio_renderer_, Initialize(_, _, _, _, _, _, _, _))
|
| - .WillOnce(DoAll(Stop(pipeline_, stop_cb),
|
| + .WillOnce(DoAll(Stop(pipeline_.get(), stop_cb),
|
| RunCallback<1>(PIPELINE_OK)));
|
| EXPECT_CALL(callbacks_, OnStop());
|
| } else {
|
| @@ -1008,7 +1008,7 @@ class PipelineTeardownTest : public PipelineTest {
|
| if (state == kInitVideoRenderer) {
|
| if (stop_or_error == kStop) {
|
| EXPECT_CALL(*video_renderer_, Initialize(_, _, _, _, _, _, _, _, _))
|
| - .WillOnce(DoAll(Stop(pipeline_, stop_cb),
|
| + .WillOnce(DoAll(Stop(pipeline_.get(), stop_cb),
|
| RunCallback<1>(PIPELINE_OK)));
|
| EXPECT_CALL(callbacks_, OnStop());
|
| } else {
|
| @@ -1077,11 +1077,11 @@ class PipelineTeardownTest : public PipelineTest {
|
| if (state == kPausing) {
|
| if (stop_or_error == kStop) {
|
| EXPECT_CALL(*audio_renderer_, Pause(_))
|
| - .WillOnce(DoAll(Stop(pipeline_, stop_cb), RunClosure<0>()));
|
| + .WillOnce(DoAll(Stop(pipeline_.get(), stop_cb), RunClosure<0>()));
|
| } else {
|
| status = PIPELINE_ERROR_READ;
|
| - EXPECT_CALL(*audio_renderer_, Pause(_))
|
| - .WillOnce(DoAll(SetError(pipeline_, status), RunClosure<0>()));
|
| + EXPECT_CALL(*audio_renderer_, Pause(_)).WillOnce(
|
| + DoAll(SetError(pipeline_.get(), status), RunClosure<0>()));
|
| }
|
|
|
| return status;
|
| @@ -1093,11 +1093,11 @@ class PipelineTeardownTest : public PipelineTest {
|
| if (state == kFlushing) {
|
| if (stop_or_error == kStop) {
|
| EXPECT_CALL(*audio_renderer_, Flush(_))
|
| - .WillOnce(DoAll(Stop(pipeline_, stop_cb), RunClosure<0>()));
|
| + .WillOnce(DoAll(Stop(pipeline_.get(), stop_cb), RunClosure<0>()));
|
| } else {
|
| status = PIPELINE_ERROR_READ;
|
| - EXPECT_CALL(*audio_renderer_, Flush(_))
|
| - .WillOnce(DoAll(SetError(pipeline_, status), RunClosure<0>()));
|
| + EXPECT_CALL(*audio_renderer_, Flush(_)).WillOnce(
|
| + DoAll(SetError(pipeline_.get(), status), RunClosure<0>()));
|
| }
|
|
|
| return status;
|
| @@ -1109,7 +1109,7 @@ class PipelineTeardownTest : public PipelineTest {
|
| if (state == kSeeking) {
|
| if (stop_or_error == kStop) {
|
| EXPECT_CALL(*demuxer_, Seek(_, _))
|
| - .WillOnce(DoAll(Stop(pipeline_, stop_cb),
|
| + .WillOnce(DoAll(Stop(pipeline_.get(), stop_cb),
|
| RunCallback<1>(PIPELINE_OK)));
|
| } else {
|
| status = PIPELINE_ERROR_READ;
|
| @@ -1126,7 +1126,7 @@ class PipelineTeardownTest : public PipelineTest {
|
| if (state == kPrerolling) {
|
| if (stop_or_error == kStop) {
|
| EXPECT_CALL(*audio_renderer_, Preroll(_, _))
|
| - .WillOnce(DoAll(Stop(pipeline_, stop_cb),
|
| + .WillOnce(DoAll(Stop(pipeline_.get(), stop_cb),
|
| RunCallback<1>(PIPELINE_OK)));
|
| } else {
|
| status = PIPELINE_ERROR_READ;
|
| @@ -1151,11 +1151,11 @@ class PipelineTeardownTest : public PipelineTest {
|
| if (state == kStarting) {
|
| if (stop_or_error == kStop) {
|
| EXPECT_CALL(*audio_renderer_, Play(_))
|
| - .WillOnce(DoAll(Stop(pipeline_, stop_cb), RunClosure<0>()));
|
| + .WillOnce(DoAll(Stop(pipeline_.get(), stop_cb), RunClosure<0>()));
|
| } else {
|
| status = PIPELINE_ERROR_READ;
|
| - EXPECT_CALL(*audio_renderer_, Play(_))
|
| - .WillOnce(DoAll(SetError(pipeline_, status), RunClosure<0>()));
|
| + EXPECT_CALL(*audio_renderer_, Play(_)).WillOnce(
|
| + DoAll(SetError(pipeline_.get(), status), RunClosure<0>()));
|
| }
|
| return status;
|
| }
|
|
|