| OLD | NEW |
| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 base::RunLoop().RunUntilIdle(); | 78 base::RunLoop().RunUntilIdle(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 protected: | 81 protected: |
| 82 typedef std::vector<MockDemuxerStream*> MockDemuxerStreamVector; | 82 typedef std::vector<MockDemuxerStream*> MockDemuxerStreamVector; |
| 83 | 83 |
| 84 scoped_ptr<StrictMock<MockDemuxerStream> > CreateStream( | 84 scoped_ptr<StrictMock<MockDemuxerStream> > CreateStream( |
| 85 DemuxerStream::Type type) { | 85 DemuxerStream::Type type) { |
| 86 scoped_ptr<StrictMock<MockDemuxerStream> > stream( | 86 scoped_ptr<StrictMock<MockDemuxerStream> > stream( |
| 87 new StrictMock<MockDemuxerStream>(type)); | 87 new StrictMock<MockDemuxerStream>(type)); |
| 88 return stream.Pass(); | 88 return stream; |
| 89 } | 89 } |
| 90 | 90 |
| 91 // Sets up expectations to allow the audio renderer to initialize. | 91 // Sets up expectations to allow the audio renderer to initialize. |
| 92 void SetAudioRendererInitializeExpectations(PipelineStatus status) { | 92 void SetAudioRendererInitializeExpectations(PipelineStatus status) { |
| 93 EXPECT_CALL(*audio_renderer_, | 93 EXPECT_CALL(*audio_renderer_, |
| 94 Initialize(audio_stream_.get(), _, _, _, _, _, _, _)) | 94 Initialize(audio_stream_.get(), _, _, _, _, _, _, _)) |
| 95 .WillOnce(DoAll(SaveArg<4>(&audio_buffering_state_cb_), | 95 .WillOnce(DoAll(SaveArg<4>(&audio_buffering_state_cb_), |
| 96 SaveArg<5>(&audio_ended_cb_), | 96 SaveArg<5>(&audio_ended_cb_), |
| 97 SaveArg<6>(&audio_error_cb_), RunCallback<1>(status))); | 97 SaveArg<6>(&audio_error_cb_), RunCallback<1>(status))); |
| 98 } | 98 } |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 .WillOnce( | 599 .WillOnce( |
| 600 SetBufferingState(&audio_buffering_state_cb_, BUFFERING_HAVE_ENOUGH)); | 600 SetBufferingState(&audio_buffering_state_cb_, BUFFERING_HAVE_ENOUGH)); |
| 601 EXPECT_CALL(*video_renderer_, StartPlayingFrom(kStartTime)); | 601 EXPECT_CALL(*video_renderer_, StartPlayingFrom(kStartTime)); |
| 602 renderer_impl_->StartPlayingFrom(kStartTime); | 602 renderer_impl_->StartPlayingFrom(kStartTime); |
| 603 | 603 |
| 604 // Nothing else should primed on the message loop. | 604 // Nothing else should primed on the message loop. |
| 605 base::RunLoop().RunUntilIdle(); | 605 base::RunLoop().RunUntilIdle(); |
| 606 } | 606 } |
| 607 | 607 |
| 608 } // namespace media | 608 } // namespace media |
| OLD | NEW |