| OLD | NEW |
| 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 // Regression tests for FFmpeg. Security test files can be found in the | 5 // Regression tests for FFmpeg. Security test files can be found in the |
| 6 // internal media test data directory: | 6 // internal media test data directory: |
| 7 // | 7 // |
| 8 // svn://svn.chromium.org/chrome-internal/trunk/data/media/security/ | 8 // svn://svn.chromium.org/chrome-internal/trunk/data/media/security/ |
| 9 // | 9 // |
| 10 // Simply add the custom_dep below to your gclient and sync: | 10 // Simply add the custom_dep below to your gclient and sync: |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 79 |
| 80 #define FFMPEG_TEST_CASE(name, fn, init_status, end_status, video_md5, \ | 80 #define FFMPEG_TEST_CASE(name, fn, init_status, end_status, video_md5, \ |
| 81 audio_md5) \ | 81 audio_md5) \ |
| 82 INSTANTIATE_TEST_CASE_P(name, FFmpegRegressionTest, \ | 82 INSTANTIATE_TEST_CASE_P(name, FFmpegRegressionTest, \ |
| 83 testing::Values(RegressionTestData(fn, \ | 83 testing::Values(RegressionTestData(fn, \ |
| 84 init_status, \ | 84 init_status, \ |
| 85 end_status, \ | 85 end_status, \ |
| 86 video_md5, \ | 86 video_md5, \ |
| 87 audio_md5))); | 87 audio_md5))); |
| 88 | 88 |
| 89 #define FLAKY_FFMPEG_TEST_CASE(name, fn) \ | 89 #define DISABLED_FFMPEG_TEST_CASE(name, fn) \ |
| 90 INSTANTIATE_TEST_CASE_P(FLAKY_##name, FlakyFFmpegRegressionTest, \ | 90 INSTANTIATE_TEST_CASE_P(DISABLED_##name, FlakyFFmpegRegressionTest, \ |
| 91 testing::Values(FlakyRegressionTestData(fn))); | 91 testing::Values(FlakyRegressionTestData(fn))); |
| 92 | 92 |
| 93 // Test cases from issues. | 93 // Test cases from issues. |
| 94 FFMPEG_TEST_CASE(Cr47325, "security/47325.mp4", PIPELINE_OK, PIPELINE_OK, | 94 FFMPEG_TEST_CASE(Cr47325, "security/47325.mp4", PIPELINE_OK, PIPELINE_OK, |
| 95 "2a7a938c6b5979621cec998f02d9bbb6", | 95 "2a7a938c6b5979621cec998f02d9bbb6", |
| 96 "efbc63a850c9f8f51942f6a6029eb00f"); | 96 "efbc63a850c9f8f51942f6a6029eb00f"); |
| 97 FFMPEG_TEST_CASE(Cr47761, "content/crbug47761.ogg", PIPELINE_OK, PIPELINE_OK, | 97 FFMPEG_TEST_CASE(Cr47761, "content/crbug47761.ogg", PIPELINE_OK, PIPELINE_OK, |
| 98 kNullHash, | 98 kNullHash, |
| 99 "f45b9d7556f39dd811700ec72cb71483"); | 99 "f45b9d7556f39dd811700ec72cb71483"); |
| 100 FFMPEG_TEST_CASE(Cr50045, "content/crbug50045.mp4", PIPELINE_OK, PIPELINE_OK, | 100 FFMPEG_TEST_CASE(Cr50045, "content/crbug50045.mp4", PIPELINE_OK, PIPELINE_OK, |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 // Allocate gigabytes of memory, likely can't be run on 32bit machines. | 297 // Allocate gigabytes of memory, likely can't be run on 32bit machines. |
| 298 FFMPEG_TEST_CASE(BIG_MEM_1, "security/bigmem1.mov", | 298 FFMPEG_TEST_CASE(BIG_MEM_1, "security/bigmem1.mov", |
| 299 DEMUXER_ERROR_COULD_NOT_OPEN, DEMUXER_ERROR_COULD_NOT_OPEN, | 299 DEMUXER_ERROR_COULD_NOT_OPEN, DEMUXER_ERROR_COULD_NOT_OPEN, |
| 300 kNullHash, kNullHash); | 300 kNullHash, kNullHash); |
| 301 FFMPEG_TEST_CASE(BIG_MEM_2, "security/looping1.mov", | 301 FFMPEG_TEST_CASE(BIG_MEM_2, "security/looping1.mov", |
| 302 DEMUXER_ERROR_COULD_NOT_OPEN, DEMUXER_ERROR_COULD_NOT_OPEN, | 302 DEMUXER_ERROR_COULD_NOT_OPEN, DEMUXER_ERROR_COULD_NOT_OPEN, |
| 303 kNullHash, kNullHash); | 303 kNullHash, kNullHash); |
| 304 FFMPEG_TEST_CASE(BIG_MEM_5, "security/looping5.mov", | 304 FFMPEG_TEST_CASE(BIG_MEM_5, "security/looping5.mov", |
| 305 DEMUXER_ERROR_COULD_NOT_OPEN, DEMUXER_ERROR_COULD_NOT_OPEN, | 305 DEMUXER_ERROR_COULD_NOT_OPEN, DEMUXER_ERROR_COULD_NOT_OPEN, |
| 306 kNullHash, kNullHash); | 306 kNullHash, kNullHash); |
| 307 FLAKY_FFMPEG_TEST_CASE(BIG_MEM_3, "security/looping3.mov"); | 307 DISABLED_FFMPEG_TEST_CASE(BIG_MEM_3, "security/looping3.mov"); |
| 308 FLAKY_FFMPEG_TEST_CASE(BIG_MEM_4, "security/looping4.mov"); | 308 DISABLED_FFMPEG_TEST_CASE(BIG_MEM_4, "security/looping4.mov"); |
| 309 | 309 |
| 310 // Flaky under threading or for other reasons. Per rbultje, most of these will | 310 // Flaky under threading or for other reasons. Per rbultje, most of these will |
| 311 // never be reliable since FFmpeg does not guarantee consistency in error cases. | 311 // never be reliable since FFmpeg does not guarantee consistency in error cases. |
| 312 // We only really care that these don't cause crashes or errors under tooling. | 312 // We only really care that these don't cause crashes or errors under tooling. |
| 313 FLAKY_FFMPEG_TEST_CASE(Cr99652, "security/99652.webm"); | 313 DISABLED_FFMPEG_TEST_CASE(Cr99652, "security/99652.webm"); |
| 314 FLAKY_FFMPEG_TEST_CASE(Cr100464, "security/100464.webm"); | 314 DISABLED_FFMPEG_TEST_CASE(Cr100464, "security/100464.webm"); |
| 315 FLAKY_FFMPEG_TEST_CASE(Cr111342, "security/111342.ogm"); | 315 DISABLED_FFMPEG_TEST_CASE(Cr111342, "security/111342.ogm"); |
| 316 FLAKY_FFMPEG_TEST_CASE(OGV_0, "security/big_dims.ogv"); | 316 DISABLED_FFMPEG_TEST_CASE(OGV_0, "security/big_dims.ogv"); |
| 317 FLAKY_FFMPEG_TEST_CASE(OGV_3, "security/smclock_1_0.ogv"); | 317 DISABLED_FFMPEG_TEST_CASE(OGV_3, "security/smclock_1_0.ogv"); |
| 318 FLAKY_FFMPEG_TEST_CASE(OGV_4, "security/smclock.ogv.1.0.ogv"); | 318 DISABLED_FFMPEG_TEST_CASE(OGV_4, "security/smclock.ogv.1.0.ogv"); |
| 319 FLAKY_FFMPEG_TEST_CASE(OGV_6, "security/smclocktheora_1_10000.ogv"); | 319 DISABLED_FFMPEG_TEST_CASE(OGV_6, "security/smclocktheora_1_10000.ogv"); |
| 320 FLAKY_FFMPEG_TEST_CASE(OGV_13, "security/smclocktheora_1_790.ogv"); | 320 DISABLED_FFMPEG_TEST_CASE(OGV_13, "security/smclocktheora_1_790.ogv"); |
| 321 FLAKY_FFMPEG_TEST_CASE(MP4_3, "security/clockh264aac_300413969.mp4"); | 321 DISABLED_FFMPEG_TEST_CASE(MP4_3, "security/clockh264aac_300413969.mp4"); |
| 322 FLAKY_FFMPEG_TEST_CASE(MP4_4, "security/clockh264aac_301350139.mp4"); | 322 DISABLED_FFMPEG_TEST_CASE(MP4_4, "security/clockh264aac_301350139.mp4"); |
| 323 FLAKY_FFMPEG_TEST_CASE(MP4_12, "security/assert1.mov"); | 323 DISABLED_FFMPEG_TEST_CASE(MP4_12, "security/assert1.mov"); |
| 324 // Not really flaky, but can't pass the seek test. | 324 // Not really flaky, but can't pass the seek test. |
| 325 FLAKY_FFMPEG_TEST_CASE(MP4_10, "security/null1.m4a"); | 325 DISABLED_FFMPEG_TEST_CASE(MP4_10, "security/null1.m4a"); |
| 326 | 326 |
| 327 // Videos with massive gaps between frame timestamps that result in long hangs | 327 // Videos with massive gaps between frame timestamps that result in long hangs |
| 328 // with our pipeline. Should be uncommented when we support clockless playback. | 328 // with our pipeline. Should be uncommented when we support clockless playback. |
| 329 // FFMPEG_TEST_CASE(WEBM_0, "security/memcpy.webm", PIPELINE_OK, PIPELINE_OK, | 329 // FFMPEG_TEST_CASE(WEBM_0, "security/memcpy.webm", PIPELINE_OK, PIPELINE_OK, |
| 330 // kNullHash, kNullHash); | 330 // kNullHash, kNullHash); |
| 331 // FFMPEG_TEST_CASE(MP4_17, "security/assert2.mov", PIPELINE_OK, PIPELINE_OK, | 331 // FFMPEG_TEST_CASE(MP4_17, "security/assert2.mov", PIPELINE_OK, PIPELINE_OK, |
| 332 // kNullHash, kNullHash); | 332 // kNullHash, kNullHash); |
| 333 // FFMPEG_TEST_CASE(OGV_23, "security/assert2.ogv", PIPELINE_OK, PIPELINE_OK, | 333 // FFMPEG_TEST_CASE(OGV_23, "security/assert2.ogv", PIPELINE_OK, PIPELINE_OK, |
| 334 // kNullHash, kNullHash); | 334 // kNullHash, kNullHash); |
| 335 | 335 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 358 } | 358 } |
| 359 | 359 |
| 360 TEST_P(FlakyFFmpegRegressionTest, BasicPlayback) { | 360 TEST_P(FlakyFFmpegRegressionTest, BasicPlayback) { |
| 361 if (Start(GetTestDataFilePath(GetParam().filename))) { | 361 if (Start(GetTestDataFilePath(GetParam().filename))) { |
| 362 Play(); | 362 Play(); |
| 363 WaitUntilEndedOrError(); | 363 WaitUntilEndedOrError(); |
| 364 } | 364 } |
| 365 } | 365 } |
| 366 | 366 |
| 367 } // namespace media | 367 } // namespace media |
| OLD | NEW |