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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 void Reset() { | 205 void Reset() { |
206 EXPECT_CALL(*decryptor_, ResetDecoder(Decryptor::kAudio)) | 206 EXPECT_CALL(*decryptor_, ResetDecoder(Decryptor::kAudio)) |
207 .WillRepeatedly(InvokeWithoutArgs( | 207 .WillRepeatedly(InvokeWithoutArgs( |
208 this, &DecryptingAudioDecoderTest::AbortPendingAudioDecodeCB)); | 208 this, &DecryptingAudioDecoderTest::AbortPendingAudioDecodeCB)); |
209 | 209 |
210 decoder_->Reset(NewExpectedClosure()); | 210 decoder_->Reset(NewExpectedClosure()); |
211 message_loop_.RunUntilIdle(); | 211 message_loop_.RunUntilIdle(); |
212 } | 212 } |
213 | 213 |
214 MOCK_METHOD1(RequestDecryptorNotification, | 214 MOCK_METHOD1(RequestDecryptorNotification, |
215 void(const DecryptingAudioDecoder::DecryptorNotificationCB&)); | 215 void(const DecryptingAudioDecoder::DecryptorReadyCB&)); |
216 | 216 |
217 MOCK_METHOD2(FrameReady, void(AudioDecoder::Status, | 217 MOCK_METHOD2(FrameReady, void(AudioDecoder::Status, |
218 const scoped_refptr<Buffer>&)); | 218 const scoped_refptr<Buffer>&)); |
219 | 219 |
220 MessageLoop message_loop_; | 220 MessageLoop message_loop_; |
221 scoped_refptr<DecryptingAudioDecoder> decoder_; | 221 scoped_refptr<DecryptingAudioDecoder> decoder_; |
222 scoped_ptr<StrictMock<MockDecryptor> > decryptor_; | 222 scoped_ptr<StrictMock<MockDecryptor> > decryptor_; |
223 scoped_refptr<StrictMock<MockDemuxerStream> > demuxer_; | 223 scoped_refptr<StrictMock<MockDemuxerStream> > demuxer_; |
224 MockStatisticsCB statistics_cb_; | 224 MockStatisticsCB statistics_cb_; |
225 | 225 |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 EXPECT_CALL(*demuxer_, Read(_)) | 466 EXPECT_CALL(*demuxer_, Read(_)) |
467 .WillOnce(RunCallback<0>(DemuxerStream::kConfigChanged, | 467 .WillOnce(RunCallback<0>(DemuxerStream::kConfigChanged, |
468 scoped_refptr<DecoderBuffer>())); | 468 scoped_refptr<DecoderBuffer>())); |
469 | 469 |
470 // TODO(xhwang): Update this test when kConfigChanged is supported in | 470 // TODO(xhwang): Update this test when kConfigChanged is supported in |
471 // DecryptingAudioDecoder. | 471 // DecryptingAudioDecoder. |
472 ReadAndExpectFrameReadyWith(AudioDecoder::kDecodeError, NULL); | 472 ReadAndExpectFrameReadyWith(AudioDecoder::kDecodeError, NULL); |
473 } | 473 } |
474 | 474 |
475 } // namespace media | 475 } // namespace media |
OLD | NEW |