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

Unified Diff: media/filters/audio_renderer_impl_unittest.cc

Issue 11492003: Encrypted Media: Support Audio Decrypt-Only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/audio_renderer_impl.cc ('k') | media/filters/pipeline_integration_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/audio_renderer_impl_unittest.cc
diff --git a/media/filters/audio_renderer_impl_unittest.cc b/media/filters/audio_renderer_impl_unittest.cc
index 23f207830e2ab500c8dd3654b05a92aec6295b89..a17c6b015b47c44016ff264d78dcc2386aeb2927 100644
--- a/media/filters/audio_renderer_impl_unittest.cc
+++ b/media/filters/audio_renderer_impl_unittest.cc
@@ -20,6 +20,7 @@ using ::testing::_;
using ::testing::AnyNumber;
using ::testing::Invoke;
using ::testing::Return;
+using ::testing::ReturnRef;
using ::testing::NiceMock;
using ::testing::StrictMock;
@@ -34,11 +35,16 @@ class AudioRendererImplTest : public ::testing::Test {
public:
// Give the decoder some non-garbage media properties.
AudioRendererImplTest()
- : renderer_(new AudioRendererImpl(new NiceMock<MockAudioRendererSink>())),
+ : renderer_(new AudioRendererImpl(new NiceMock<MockAudioRendererSink>(),
+ SetDecryptorReadyCB())),
demuxer_stream_(new MockDemuxerStream()),
- decoder_(new MockAudioDecoder()) {
+ decoder_(new MockAudioDecoder()),
+ audio_config_(kCodecVorbis, 16, CHANNEL_LAYOUT_STEREO,
+ 44100, NULL, 0, false) {
EXPECT_CALL(*demuxer_stream_, type())
.WillRepeatedly(Return(DemuxerStream::AUDIO));
+ EXPECT_CALL(*demuxer_stream_, audio_decoder_config())
+ .WillRepeatedly(ReturnRef(audio_config_));
// Queue all reads from the decoder by default.
ON_CALL(*decoder_, Read(_))
@@ -236,6 +242,7 @@ class AudioRendererImplTest : public ::testing::Test {
AudioRendererImpl::AudioDecoderList decoders_;
AudioDecoder::ReadCB read_cb_;
scoped_ptr<AudioTimestampHelper> next_timestamp_;
+ AudioDecoderConfig audio_config_;
MessageLoop message_loop_;
private:
@@ -267,8 +274,8 @@ TEST_F(AudioRendererImplTest, Initialize_Successful) {
TEST_F(AudioRendererImplTest, Initialize_DecoderInitFailure) {
EXPECT_CALL(*decoder_, Initialize(_, _, _))
- .WillOnce(RunCallback<1>(PIPELINE_ERROR_DECODE));
- InitializeWithStatus(PIPELINE_ERROR_DECODE);
+ .WillOnce(RunCallback<1>(DECODER_ERROR_NOT_SUPPORTED));
+ InitializeWithStatus(DECODER_ERROR_NOT_SUPPORTED);
// We should have no reads.
EXPECT_TRUE(read_cb_.is_null());
« no previous file with comments | « media/filters/audio_renderer_impl.cc ('k') | media/filters/pipeline_integration_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698