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 <memory> | 7 #include <memory> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 protected: | 80 protected: |
81 void Destroy() { | 81 void Destroy() { |
82 renderer_impl_.reset(); | 82 renderer_impl_.reset(); |
83 base::RunLoop().RunUntilIdle(); | 83 base::RunLoop().RunUntilIdle(); |
84 } | 84 } |
85 | 85 |
86 std::unique_ptr<StrictMock<MockDemuxerStream>> CreateStream( | 86 std::unique_ptr<StrictMock<MockDemuxerStream>> CreateStream( |
87 DemuxerStream::Type type) { | 87 DemuxerStream::Type type) { |
88 std::unique_ptr<StrictMock<MockDemuxerStream>> stream( | 88 std::unique_ptr<StrictMock<MockDemuxerStream>> stream( |
89 new StrictMock<MockDemuxerStream>(type)); | 89 new StrictMock<MockDemuxerStream>(type)); |
| 90 EXPECT_CALL(*stream, SetStreamRestartedCB(_)).Times(testing::AnyNumber()); |
90 return stream; | 91 return stream; |
91 } | 92 } |
92 | 93 |
93 // Sets up expectations to allow the audio renderer to initialize. | 94 // Sets up expectations to allow the audio renderer to initialize. |
94 void SetAudioRendererInitializeExpectations(PipelineStatus status) { | 95 void SetAudioRendererInitializeExpectations(PipelineStatus status) { |
95 EXPECT_CALL(*audio_renderer_, Initialize(audio_stream_.get(), _, _, _)) | 96 EXPECT_CALL(*audio_renderer_, Initialize(audio_stream_.get(), _, _, _)) |
96 .WillOnce( | 97 .WillOnce( |
97 DoAll(SaveArg<2>(&audio_renderer_client_), RunCallback<3>(status))); | 98 DoAll(SaveArg<2>(&audio_renderer_client_), RunCallback<3>(status))); |
98 } | 99 } |
99 | 100 |
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 .WillOnce( | 694 .WillOnce( |
694 SetBufferingState(&audio_renderer_client_, BUFFERING_HAVE_ENOUGH)); | 695 SetBufferingState(&audio_renderer_client_, BUFFERING_HAVE_ENOUGH)); |
695 EXPECT_CALL(*video_renderer_, StartPlayingFrom(kStartTime)); | 696 EXPECT_CALL(*video_renderer_, StartPlayingFrom(kStartTime)); |
696 renderer_impl_->StartPlayingFrom(kStartTime); | 697 renderer_impl_->StartPlayingFrom(kStartTime); |
697 | 698 |
698 // Nothing else should primed on the message loop. | 699 // Nothing else should primed on the message loop. |
699 base::RunLoop().RunUntilIdle(); | 700 base::RunLoop().RunUntilIdle(); |
700 } | 701 } |
701 | 702 |
702 } // namespace media | 703 } // namespace media |
OLD | NEW |