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

Side by Side Diff: media/ffmpeg/ffmpeg_regression_tests.cc

Issue 10196006: Roll DEPS for FFmpeg merge. Shuffle testing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « DEPS ('k') | media/ffmpeg/ffmpeg_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // 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:
11 // 11 //
12 // "src/media/test/data/security": 12 // "src/media/test/data/security":
13 // "svn://chrome-svn/chrome-internal/trunk/data/media/security" 13 // "svn://chrome-svn/chrome-internal/trunk/data/media/security"
14 // 14 //
15 // Many of the files here do not cause issues outside of tooling, so you'll need 15 // Many of the files here do not cause issues outside of tooling, so you'll need
16 // to run this test under ASAN, TSAN, and Valgrind to ensure that all issues are 16 // to run this test under ASAN, TSAN, and Valgrind to ensure that all issues are
17 // caught. 17 // caught.
18 // 18 //
19 // Test cases labeled FLAKY may not always pass, but they should never crash or 19 // Test cases labeled FLAKY may not always pass, but they should never crash or
20 // cause any kind of warnings or errors under tooling. 20 // cause any kind of warnings or errors under tooling.
21 // 21 //
22 // Frame hashes must be generated with --video-threads=1 for correctness. 22 // Frame hashes must be generated with --video-threads=1 for correctness.
23 // 23 //
24 // Known issues: 24 // Known issues:
25 // Cr47325 will generate an UninitValue error under Valgrind inside of the 25 // Cr47325 will generate an UninitValue error under Valgrind inside of the
26 // MD5 hashing code. The error occurs due to some problematic error 26 // MD5 hashing code. The error occurs due to some problematic error
27 // resilence code for H264 inside of FFmpeg. See http://crbug.com/119020 27 // resilence code for H264 inside of FFmpeg. See http://crbug.com/119020
28 // 28 //
29 // FLAKY_OGV_0 may run out of memory under ASAN on IA32 Linux/Mac.
30 //
31 // Some OGG files leak ~30 bytes of memory, upstream tracking bug:
32 // https://ffmpeg.org/trac/ffmpeg/ticket/1244
33 //
29 34
30 #include "media/filters/pipeline_integration_test_base.h" 35 #include "media/filters/pipeline_integration_test_base.h"
31 36
32 #include "base/bind.h" 37 #include "base/bind.h"
33 #include "media/base/test_data_util.h" 38 #include "media/base/test_data_util.h"
34 #include "media/filters/chunk_demuxer_client.h" 39 #include "media/filters/chunk_demuxer_client.h"
35 40
36 namespace media { 41 namespace media {
37 42
38 struct RegressionTestData { 43 struct RegressionTestData {
(...skipping 19 matching lines...) Expand all
58 #define FFMPEG_TEST_CASE(name, fn, init_status, end_status, md5) \ 63 #define FFMPEG_TEST_CASE(name, fn, init_status, end_status, md5) \
59 INSTANTIATE_TEST_CASE_P(name, FFmpegRegressionTest, \ 64 INSTANTIATE_TEST_CASE_P(name, FFmpegRegressionTest, \
60 testing::Values(RegressionTestData(fn, \ 65 testing::Values(RegressionTestData(fn, \
61 init_status, \ 66 init_status, \
62 end_status, \ 67 end_status, \
63 md5))); 68 md5)));
64 69
65 // Test cases from issues. 70 // Test cases from issues.
66 FFMPEG_TEST_CASE(Cr47325, "security/47325.mp4", PIPELINE_OK, PIPELINE_OK, 71 FFMPEG_TEST_CASE(Cr47325, "security/47325.mp4", PIPELINE_OK, PIPELINE_OK,
67 "2a7a938c6b5979621cec998f02d9bbb6"); 72 "2a7a938c6b5979621cec998f02d9bbb6");
73 FFMPEG_TEST_CASE(Cr47761, "content/crbug47761.ogg", PIPELINE_OK, PIPELINE_OK,
74 kNullVideoHash);
75 FFMPEG_TEST_CASE(Cr50045, "content/crbug50045.mp4", PIPELINE_OK, PIPELINE_OK,
76 "c345e9ef9ebfc6bfbcbe3f0ddc3125ba");
77 FFMPEG_TEST_CASE(Cr62127, "content/crbug62127.webm", PIPELINE_OK, PIPELINE_OK,
78 "a064b2776fc5aef3e9cba47967a75db9");
68 FFMPEG_TEST_CASE(Cr93620, "security/93620.ogg", PIPELINE_OK, PIPELINE_OK, 79 FFMPEG_TEST_CASE(Cr93620, "security/93620.ogg", PIPELINE_OK, PIPELINE_OK,
69 kNullVideoHash); 80 kNullVideoHash);
70 FFMPEG_TEST_CASE(Cr100492, "security/100492.webm", DECODER_ERROR_NOT_SUPPORTED, 81 FFMPEG_TEST_CASE(Cr100492, "security/100492.webm", DECODER_ERROR_NOT_SUPPORTED,
71 DECODER_ERROR_NOT_SUPPORTED, kNullVideoHash); 82 DECODER_ERROR_NOT_SUPPORTED, kNullVideoHash);
72 FFMPEG_TEST_CASE(Cr100543, "security/100543.webm", PIPELINE_OK, PIPELINE_OK, 83 FFMPEG_TEST_CASE(Cr100543, "security/100543.webm", PIPELINE_OK, PIPELINE_OK,
73 "c16691cc9178db3adbf7e562cadcd6e6"); 84 "c16691cc9178db3adbf7e562cadcd6e6");
74 FFMPEG_TEST_CASE(Cr101458, "security/101458.webm", DECODER_ERROR_NOT_SUPPORTED, 85 FFMPEG_TEST_CASE(Cr101458, "security/101458.webm", DECODER_ERROR_NOT_SUPPORTED,
75 DECODER_ERROR_NOT_SUPPORTED, kNullVideoHash); 86 DECODER_ERROR_NOT_SUPPORTED, kNullVideoHash);
76 FFMPEG_TEST_CASE(Cr108416, "security/108416.webm", PIPELINE_OK, PIPELINE_OK, 87 FFMPEG_TEST_CASE(Cr108416, "security/108416.webm", PIPELINE_OK, PIPELINE_OK,
77 "5cb3a934795cd552753dec7687928291"); 88 "5cb3a934795cd552753dec7687928291");
78 FFMPEG_TEST_CASE(Cr110849, "security/110849.mkv", DEMUXER_ERROR_COULD_NOT_PARSE, 89 FFMPEG_TEST_CASE(Cr110849, "security/110849.mkv", DECODER_ERROR_NOT_SUPPORTED,
79 DEMUXER_ERROR_COULD_NOT_PARSE, kNullVideoHash); 90 DECODER_ERROR_NOT_SUPPORTED, kNullVideoHash);
80 FFMPEG_TEST_CASE(Cr112384, "security/112384.webm", 91 FFMPEG_TEST_CASE(Cr112384, "security/112384.webm",
81 DEMUXER_ERROR_COULD_NOT_PARSE, DEMUXER_ERROR_COULD_NOT_PARSE, 92 DEMUXER_ERROR_COULD_NOT_PARSE, DEMUXER_ERROR_COULD_NOT_PARSE,
82 kNullVideoHash); 93 kNullVideoHash);
83 FFMPEG_TEST_CASE(Cr112670, "security/112670.mp4", PIPELINE_ERROR_DECODE, 94 FFMPEG_TEST_CASE(Cr112670, "security/112670.mp4", PIPELINE_ERROR_DECODE,
84 PIPELINE_ERROR_DECODE, kNullVideoHash); 95 PIPELINE_ERROR_DECODE, kNullVideoHash);
85 FFMPEG_TEST_CASE(Cr112976, "security/112976.ogg", PIPELINE_OK, PIPELINE_OK, 96 FFMPEG_TEST_CASE(Cr112976, "security/112976.ogg", PIPELINE_OK, PIPELINE_OK,
86 kNullVideoHash); 97 kNullVideoHash);
87 FFMPEG_TEST_CASE(Cr116927, "security/116927.ogv", PIPELINE_ERROR_DECODE, 98 FFMPEG_TEST_CASE(Cr116927, "security/116927.ogv", PIPELINE_ERROR_DECODE,
88 PIPELINE_ERROR_DECODE, kNullVideoHash); 99 PIPELINE_ERROR_DECODE, kNullVideoHash);
89 FFMPEG_TEST_CASE(Cr123481, "security/123481.ogv", PIPELINE_OK, 100 FFMPEG_TEST_CASE(Cr123481, "security/123481.ogv", PIPELINE_OK,
(...skipping 11 matching lines...) Expand all
101 FFMPEG_TEST_CASE(MP4_1, "security/clockh264aac_200021889.mp4", 112 FFMPEG_TEST_CASE(MP4_1, "security/clockh264aac_200021889.mp4",
102 DEMUXER_ERROR_COULD_NOT_OPEN, DEMUXER_ERROR_COULD_NOT_OPEN, 113 DEMUXER_ERROR_COULD_NOT_OPEN, DEMUXER_ERROR_COULD_NOT_OPEN,
103 kNullVideoHash); 114 kNullVideoHash);
104 FFMPEG_TEST_CASE(MP4_2, "security/clockh264aac_200701257.mp4", PIPELINE_OK, 115 FFMPEG_TEST_CASE(MP4_2, "security/clockh264aac_200701257.mp4", PIPELINE_OK,
105 PIPELINE_OK, kNullVideoHash); 116 PIPELINE_OK, kNullVideoHash);
106 FFMPEG_TEST_CASE(MP4_5, "security/clockh264aac_3022500.mp4", 117 FFMPEG_TEST_CASE(MP4_5, "security/clockh264aac_3022500.mp4",
107 DEMUXER_ERROR_NO_SUPPORTED_STREAMS, 118 DEMUXER_ERROR_NO_SUPPORTED_STREAMS,
108 DEMUXER_ERROR_NO_SUPPORTED_STREAMS, kNullVideoHash); 119 DEMUXER_ERROR_NO_SUPPORTED_STREAMS, kNullVideoHash);
109 FFMPEG_TEST_CASE(MP4_6, "security/clockh264aac_344289.mp4", PIPELINE_OK, 120 FFMPEG_TEST_CASE(MP4_6, "security/clockh264aac_344289.mp4", PIPELINE_OK,
110 PIPELINE_OK, kNullVideoHash); 121 PIPELINE_OK, kNullVideoHash);
111 FFMPEG_TEST_CASE(MP4_7, "security/clockh264mp3_187697.mp4", PIPELINE_OK, 122 FFMPEG_TEST_CASE(MP4_7, "security/clockh264mp3_187697.mp4",
112 PIPELINE_OK, kNullVideoHash); 123 DECODER_ERROR_NOT_SUPPORTED, DECODER_ERROR_NOT_SUPPORTED,
113 FFMPEG_TEST_CASE(MP4_8, "security/h264.705767.mp4", PIPELINE_ERROR_DECODE, 124 kNullVideoHash);
114 PIPELINE_ERROR_DECODE, kNullVideoHash); 125 FFMPEG_TEST_CASE(MP4_8, "security/h264.705767.mp4",
126 DEMUXER_ERROR_COULD_NOT_PARSE, DEMUXER_ERROR_COULD_NOT_PARSE,
127 kNullVideoHash);
115 FFMPEG_TEST_CASE(MP4_9, "security/smclockmp4aac_1_0.mp4", 128 FFMPEG_TEST_CASE(MP4_9, "security/smclockmp4aac_1_0.mp4",
116 DEMUXER_ERROR_COULD_NOT_OPEN, DEMUXER_ERROR_COULD_NOT_OPEN, 129 DEMUXER_ERROR_COULD_NOT_OPEN, DEMUXER_ERROR_COULD_NOT_OPEN,
117 kNullVideoHash); 130 kNullVideoHash);
118 131
119 // General OGV test cases. 132 // General OGV test cases.
120 FFMPEG_TEST_CASE(OGV_1, "security/out.163.ogv", DECODER_ERROR_NOT_SUPPORTED, 133 FFMPEG_TEST_CASE(OGV_1, "security/out.163.ogv", DECODER_ERROR_NOT_SUPPORTED,
121 DECODER_ERROR_NOT_SUPPORTED, kNullVideoHash); 134 DECODER_ERROR_NOT_SUPPORTED, kNullVideoHash);
122 FFMPEG_TEST_CASE(OGV_2, "security/out.391.ogv", DECODER_ERROR_NOT_SUPPORTED, 135 FFMPEG_TEST_CASE(OGV_2, "security/out.391.ogv", DECODER_ERROR_NOT_SUPPORTED,
123 DECODER_ERROR_NOT_SUPPORTED, kNullVideoHash); 136 DECODER_ERROR_NOT_SUPPORTED, kNullVideoHash);
124 FFMPEG_TEST_CASE(OGV_5, "security/smclocktheora_1_0.ogv", 137 FFMPEG_TEST_CASE(OGV_5, "security/smclocktheora_1_0.ogv",
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 Seek(base::TimeDelta::FromMilliseconds(0)); 230 Seek(base::TimeDelta::FromMilliseconds(0));
218 } 231 }
219 } else { 232 } else {
220 ASSERT_FALSE(Start(GetTestDataURL(GetParam().filename), 233 ASSERT_FALSE(Start(GetTestDataURL(GetParam().filename),
221 GetParam().init_status)); 234 GetParam().init_status));
222 ASSERT_EQ(GetVideoHash(), GetParam().md5); 235 ASSERT_EQ(GetVideoHash(), GetParam().md5);
223 } 236 }
224 } 237 }
225 238
226 } // namespace media 239 } // namespace media
OLDNEW
« no previous file with comments | « DEPS ('k') | media/ffmpeg/ffmpeg_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698