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

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

Issue 2479633002: Fix pipeline integration tests for seek / duration changes. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | media/test/pipeline_integration_test_base.h » ('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. Test files can be found in the internal media 5 // Regression tests for FFmpeg. Test files can be found in the internal media
6 // test data directory: 6 // test data directory:
7 // 7 //
8 // https://chrome-internal.googlesource.com/chrome/data/media 8 // https://chrome-internal.googlesource.com/chrome/data/media
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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 FFMPEG_TEST_CASE(Cr532967, 156 FFMPEG_TEST_CASE(Cr532967,
157 "security/532967.webm", 157 "security/532967.webm",
158 PIPELINE_OK, 158 PIPELINE_OK,
159 PIPELINE_OK); 159 PIPELINE_OK);
160 // TODO(tguilbert): update PIPELINE_ERROR_DECODE to 160 // TODO(tguilbert): update PIPELINE_ERROR_DECODE to
161 // AUDIO_RENDERER_ERROR_IMPLICIT_CONFIG_CHANGE once the status is created. 161 // AUDIO_RENDERER_ERROR_IMPLICIT_CONFIG_CHANGE once the status is created.
162 FFMPEG_TEST_CASE(Cr599625, 162 FFMPEG_TEST_CASE(Cr599625,
163 "security/599625.mp4", 163 "security/599625.mp4",
164 PIPELINE_OK, 164 PIPELINE_OK,
165 PIPELINE_ERROR_DECODE); 165 PIPELINE_ERROR_DECODE);
166 // TODO(liberato): before crbug.com/658440 was fixed, this would fail if run
167 // twice under ASAN. If run once, then it doesn't. However, it still catches
168 // issues in crbug.com/662118, so it's included anyway.
169 FFMPEG_TEST_CASE(Cr658440, "security/658440.flac", PIPELINE_OK, PIPELINE_OK);
166 170
167 // General MP4 test cases. 171 // General MP4 test cases.
168 FFMPEG_TEST_CASE(MP4_0, 172 FFMPEG_TEST_CASE(MP4_0,
169 "security/aac.10419.mp4", 173 "security/aac.10419.mp4",
170 DEMUXER_ERROR_COULD_NOT_OPEN, 174 DEMUXER_ERROR_COULD_NOT_OPEN,
171 DEMUXER_ERROR_COULD_NOT_OPEN); 175 DEMUXER_ERROR_COULD_NOT_OPEN);
172 FFMPEG_TEST_CASE(MP4_1, 176 FFMPEG_TEST_CASE(MP4_1,
173 "security/clockh264aac_200021889.mp4", 177 "security/clockh264aac_200021889.mp4",
174 DEMUXER_ERROR_COULD_NOT_OPEN, 178 DEMUXER_ERROR_COULD_NOT_OPEN,
175 DEMUXER_ERROR_COULD_NOT_OPEN); 179 DEMUXER_ERROR_COULD_NOT_OPEN);
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 if (GetParam().init_status == PIPELINE_OK) { 351 if (GetParam().init_status == PIPELINE_OK) {
348 ASSERT_EQ(PIPELINE_OK, Start(GetParam().filename, kClockless)); 352 ASSERT_EQ(PIPELINE_OK, Start(GetParam().filename, kClockless));
349 Play(); 353 Play();
350 ASSERT_EQ(GetParam().end_status, WaitUntilEndedOrError()); 354 ASSERT_EQ(GetParam().end_status, WaitUntilEndedOrError());
351 355
352 // Check for ended if the pipeline is expected to finish okay. 356 // Check for ended if the pipeline is expected to finish okay.
353 if (GetParam().end_status == PIPELINE_OK) { 357 if (GetParam().end_status == PIPELINE_OK) {
354 ASSERT_TRUE(ended_); 358 ASSERT_TRUE(ended_);
355 359
356 // Tack a seek on the end to catch any seeking issues. 360 // Tack a seek on the end to catch any seeking issues.
357 Seek(base::TimeDelta::FromMilliseconds(0)); 361 Seek(GetStartTime());
358 } 362 }
359 } else { 363 } else {
360 // Don't bother checking the exact status as we only care that the 364 // Don't bother checking the exact status as we only care that the
361 // pipeline failed to start. 365 // pipeline failed to start.
362 EXPECT_NE(PIPELINE_OK, Start(GetParam().filename)); 366 EXPECT_NE(PIPELINE_OK, Start(GetParam().filename));
363 } 367 }
364 } 368 }
365 369
366 TEST_P(FlakyFFmpegRegressionTest, BasicPlayback) { 370 TEST_P(FlakyFFmpegRegressionTest, BasicPlayback) {
367 if (Start(GetParam().filename, kClockless) == PIPELINE_OK) { 371 if (Start(GetParam().filename, kClockless) == PIPELINE_OK) {
368 Play(); 372 Play();
369 WaitUntilEndedOrError(); 373 WaitUntilEndedOrError();
370 } 374 }
371 } 375 }
372 376
373 } // namespace media 377 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/test/pipeline_integration_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698