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 DEMUXER_ERROR_COULD_NOT_PARSE, kNullVideoHash); | 79 DEMUXER_ERROR_COULD_NOT_PARSE, kNullVideoHash); |
80 FFMPEG_TEST_CASE(Cr112384, "security/112384.webm", | 80 FFMPEG_TEST_CASE(Cr112384, "security/112384.webm", |
81 DEMUXER_ERROR_COULD_NOT_PARSE, DEMUXER_ERROR_COULD_NOT_PARSE, | 81 DEMUXER_ERROR_COULD_NOT_PARSE, DEMUXER_ERROR_COULD_NOT_PARSE, |
82 kNullVideoHash); | 82 kNullVideoHash); |
83 FFMPEG_TEST_CASE(Cr112670, "security/112670.mp4", PIPELINE_ERROR_DECODE, | 83 FFMPEG_TEST_CASE(Cr112670, "security/112670.mp4", PIPELINE_ERROR_DECODE, |
84 PIPELINE_ERROR_DECODE, kNullVideoHash); | 84 PIPELINE_ERROR_DECODE, kNullVideoHash); |
85 FFMPEG_TEST_CASE(Cr112976, "security/112976.ogg", PIPELINE_OK, PIPELINE_OK, | 85 FFMPEG_TEST_CASE(Cr112976, "security/112976.ogg", PIPELINE_OK, PIPELINE_OK, |
86 kNullVideoHash); | 86 kNullVideoHash); |
87 FFMPEG_TEST_CASE(Cr116927, "security/116927.ogv", PIPELINE_ERROR_DECODE, | 87 FFMPEG_TEST_CASE(Cr116927, "security/116927.ogv", PIPELINE_ERROR_DECODE, |
88 PIPELINE_ERROR_DECODE, kNullVideoHash); | 88 PIPELINE_ERROR_DECODE, kNullVideoHash); |
| 89 FFMPEG_TEST_CASE(Cr123481, "security/123481.ogv", PIPELINE_OK, |
| 90 PIPELINE_OK, "e6dd853fcbd746c8bb2ab2b8fc376fc7"); |
89 | 91 |
90 // General MKV test cases. | 92 // General MKV test cases. |
91 FFMPEG_TEST_CASE(MKV_0, "security/nested_tags_lang.mka.627.628", PIPELINE_OK, | 93 FFMPEG_TEST_CASE(MKV_0, "security/nested_tags_lang.mka.627.628", PIPELINE_OK, |
92 PIPELINE_OK, kNullVideoHash); | 94 PIPELINE_OK, kNullVideoHash); |
93 FFMPEG_TEST_CASE(MKV_1, "security/nested_tags_lang.mka.667.628", PIPELINE_OK, | 95 FFMPEG_TEST_CASE(MKV_1, "security/nested_tags_lang.mka.667.628", PIPELINE_OK, |
94 PIPELINE_OK, kNullVideoHash); | 96 PIPELINE_OK, kNullVideoHash); |
95 | 97 |
96 // General MP4 test cases. | 98 // General MP4 test cases. |
97 FFMPEG_TEST_CASE(MP4_0, "security/aac.10419.mp4", PIPELINE_OK, PIPELINE_OK, | 99 FFMPEG_TEST_CASE(MP4_0, "security/aac.10419.mp4", PIPELINE_OK, PIPELINE_OK, |
98 kNullVideoHash); | 100 kNullVideoHash); |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 | 200 |
199 // Hangs. http://crbug.com/117038 | 201 // Hangs. http://crbug.com/117038 |
200 // FFMPEG_TEST_CASE(WEBM_0, "security/memcpy.webm", PIPELINE_OK, PIPELINE_OK); | 202 // FFMPEG_TEST_CASE(WEBM_0, "security/memcpy.webm", PIPELINE_OK, PIPELINE_OK); |
201 | 203 |
202 TEST_P(FFmpegRegressionTest, BasicPlayback) { | 204 TEST_P(FFmpegRegressionTest, BasicPlayback) { |
203 if (GetParam().init_status == PIPELINE_OK) { | 205 if (GetParam().init_status == PIPELINE_OK) { |
204 ASSERT_TRUE(Start(GetTestDataURL(GetParam().filename), | 206 ASSERT_TRUE(Start(GetTestDataURL(GetParam().filename), |
205 GetParam().init_status)); | 207 GetParam().init_status)); |
206 Play(); | 208 Play(); |
207 ASSERT_EQ(WaitUntilEndedOrError(), GetParam().end_status); | 209 ASSERT_EQ(WaitUntilEndedOrError(), GetParam().end_status); |
| 210 ASSERT_EQ(GetVideoHash(), GetParam().md5); |
208 | 211 |
209 // Check for ended if the pipeline is expected to finish okay. | 212 // Check for ended if the pipeline is expected to finish okay. |
210 if (GetParam().end_status == PIPELINE_OK) | 213 if (GetParam().end_status == PIPELINE_OK) { |
211 ASSERT_TRUE(ended_); | 214 ASSERT_TRUE(ended_); |
| 215 |
| 216 // Tack a seek on the end to catch any seeking issues. |
| 217 Seek(base::TimeDelta::FromMilliseconds(0)); |
| 218 } |
212 } else { | 219 } else { |
213 ASSERT_FALSE(Start(GetTestDataURL(GetParam().filename), | 220 ASSERT_FALSE(Start(GetTestDataURL(GetParam().filename), |
214 GetParam().init_status)); | 221 GetParam().init_status)); |
| 222 ASSERT_EQ(GetVideoHash(), GetParam().md5); |
215 } | 223 } |
216 ASSERT_EQ(GetVideoHash(), GetParam().md5); | |
217 } | 224 } |
218 | 225 |
219 } // namespace media | 226 } // namespace media |
OLD | NEW |