OLD | NEW |
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 <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 void Reset() { | 204 void Reset() { |
205 EXPECT_CALL(*decryptor_, CancelDecrypt(Decryptor::kAudio)) | 205 EXPECT_CALL(*decryptor_, CancelDecrypt(Decryptor::kAudio)) |
206 .WillRepeatedly(InvokeWithoutArgs( | 206 .WillRepeatedly(InvokeWithoutArgs( |
207 this, &DecryptingDemuxerStreamTest::AbortPendingDecryptCB)); | 207 this, &DecryptingDemuxerStreamTest::AbortPendingDecryptCB)); |
208 | 208 |
209 demuxer_stream_->Reset(NewExpectedClosure()); | 209 demuxer_stream_->Reset(NewExpectedClosure()); |
210 message_loop_.RunUntilIdle(); | 210 message_loop_.RunUntilIdle(); |
211 } | 211 } |
212 | 212 |
213 MOCK_METHOD1(RequestDecryptorNotification, | 213 MOCK_METHOD1(RequestDecryptorNotification, |
214 void(const DecryptingDemuxerStream::DecryptorNotificationCB&)); | 214 void(const DecryptingDemuxerStream::DecryptorReadyCB&)); |
215 | 215 |
216 MOCK_METHOD2(BufferReady, void(DemuxerStream::Status, | 216 MOCK_METHOD2(BufferReady, void(DemuxerStream::Status, |
217 const scoped_refptr<DecoderBuffer>&)); | 217 const scoped_refptr<DecoderBuffer>&)); |
218 | 218 |
219 MessageLoop message_loop_; | 219 MessageLoop message_loop_; |
220 scoped_refptr<DecryptingDemuxerStream> demuxer_stream_; | 220 scoped_refptr<DecryptingDemuxerStream> demuxer_stream_; |
221 scoped_ptr<StrictMock<MockDecryptor> > decryptor_; | 221 scoped_ptr<StrictMock<MockDecryptor> > decryptor_; |
222 scoped_refptr<StrictMock<MockDemuxerStream> > input_audio_stream_; | 222 scoped_refptr<StrictMock<MockDemuxerStream> > input_audio_stream_; |
223 scoped_refptr<StrictMock<MockDemuxerStream> > input_video_stream_; | 223 scoped_refptr<StrictMock<MockDemuxerStream> > input_video_stream_; |
224 | 224 |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 | 448 |
449 EXPECT_CALL(*input_audio_stream_, Read(_)) | 449 EXPECT_CALL(*input_audio_stream_, Read(_)) |
450 .WillOnce(RunCallback<0>(DemuxerStream::kConfigChanged, | 450 .WillOnce(RunCallback<0>(DemuxerStream::kConfigChanged, |
451 scoped_refptr<DecoderBuffer>())); | 451 scoped_refptr<DecoderBuffer>())); |
452 | 452 |
453 // TODO(xhwang): Update this when kConfigChanged is supported. | 453 // TODO(xhwang): Update this when kConfigChanged is supported. |
454 ReadAndExpectBufferReadyWith(DemuxerStream::kAborted, NULL); | 454 ReadAndExpectBufferReadyWith(DemuxerStream::kAborted, NULL); |
455 } | 455 } |
456 | 456 |
457 } // namespace media | 457 } // namespace media |
OLD | NEW |