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

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

Issue 935243002: Decryptors can report kNoKey to WebMediaPlayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <deque> 5 #include <deque>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/format_macros.h" 8 #include "base/format_macros.h"
9 #include "base/md5.h" 9 #include "base/md5.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 InitializeDecoder(config); 160 InitializeDecoder(config);
161 } 161 }
162 162
163 void InitializeDecoder(const AudioDecoderConfig& config) { 163 void InitializeDecoder(const AudioDecoderConfig& config) {
164 InitializeDecoderWithStatus(config, PIPELINE_OK); 164 InitializeDecoderWithStatus(config, PIPELINE_OK);
165 } 165 }
166 166
167 void InitializeDecoderWithStatus(const AudioDecoderConfig& config, 167 void InitializeDecoderWithStatus(const AudioDecoderConfig& config,
168 PipelineStatus status) { 168 PipelineStatus status) {
169 decoder_->Initialize( 169 decoder_->Initialize(
170 config, 170 config, NewExpectedStatusCB(status),
171 NewExpectedStatusCB(status), 171 base::Bind(&AudioDecoderTest::OnDecoderOutput, base::Unretained(this)),
172 base::Bind(&AudioDecoderTest::OnDecoderOutput, base::Unretained(this))); 172 base::Closure());
173 base::RunLoop().RunUntilIdle(); 173 base::RunLoop().RunUntilIdle();
174 } 174 }
175 175
176 void Decode() { 176 void Decode() {
177 AVPacket packet; 177 AVPacket packet;
178 ASSERT_TRUE(reader_->ReadPacketForTesting(&packet)); 178 ASSERT_TRUE(reader_->ReadPacketForTesting(&packet));
179 179
180 // Split out packet metadata before making a copy. 180 // Split out packet metadata before making a copy.
181 av_packet_split_side_data(&packet); 181 av_packet_split_side_data(&packet);
182 182
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 }; 524 };
525 525
526 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderTest, 526 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderTest,
527 AudioDecoderTest, 527 AudioDecoderTest,
528 testing::ValuesIn(kFFmpegTests)); 528 testing::ValuesIn(kFFmpegTests));
529 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderBehavioralTest, 529 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderBehavioralTest,
530 FFmpegAudioDecoderBehavioralTest, 530 FFmpegAudioDecoderBehavioralTest,
531 testing::ValuesIn(kFFmpegBehavioralTest)); 531 testing::ValuesIn(kFFmpegBehavioralTest));
532 532
533 } // namespace media 533 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698