Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(358)

Side by Side Diff: media/filters/decrypting_audio_decoder_unittest.cc

Issue 11492003: Encrypted Media: Support Audio Decrypt-Only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments mostly resolved (I believe); need to add/update tests if this looks good Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698