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

Unified Diff: media/filters/audio_decoder_unittest.cc

Issue 1727953005: Enable AudioDecoder unit tests on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed contitions from base/container_names.* compilation Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/audio_hash.cc ('k') | media/media.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/audio_decoder_unittest.cc
diff --git a/media/filters/audio_decoder_unittest.cc b/media/filters/audio_decoder_unittest.cc
index 9eae8fa851c8fa7eea37dc9380302270de52b2e1..5f3e96df8811b6f67fbc57849cd00a5ea48461ae 100644
--- a/media/filters/audio_decoder_unittest.cc
+++ b/media/filters/audio_decoder_unittest.cc
@@ -277,7 +277,9 @@ class AudioDecoderTest : public testing::TestWithParam<DecoderTestData> {
// Generate a lossy hash of the audio used for comparison across platforms.
AudioHash audio_hash;
audio_hash.Update(output.get(), output->frames());
- EXPECT_EQ(sample_info.hash, audio_hash.ToString());
+ EXPECT_TRUE(audio_hash.IsEquivalent(sample_info.hash, 0.02))
+ << "Audio hashes differ. Expected: " << sample_info.hash
+ << " Actual: " << audio_hash.ToString();
if (!exact_hash.empty()) {
EXPECT_EQ(exact_hash, GetDecodedAudioMD5(i));
@@ -453,6 +455,9 @@ INSTANTIATE_TEST_CASE_P(OpusAudioDecoderBehavioralTest,
OpusAudioDecoderBehavioralTest,
testing::ValuesIn(kOpusBehavioralTest));
+// Disable all FFmpeg decoder tests on Android. http://crbug.com/570762.
+#if !defined(OS_ANDROID)
+
#if defined(USE_PROPRIETARY_CODECS)
const DecodedBufferExpectations kSfxMp3Expectations[] = {
{0, 1065, "2.81,3.99,4.53,4.10,3.08,2.46,"},
@@ -534,4 +539,6 @@ INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderBehavioralTest,
FFmpegAudioDecoderBehavioralTest,
testing::ValuesIn(kFFmpegBehavioralTest));
+#endif // !defined(OS_ANDROID)
+
} // namespace media
« no previous file with comments | « media/base/audio_hash.cc ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698