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

Side by Side Diff: media/filters/decrypting_demuxer_stream_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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698