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

Side by Side Diff: media/test/pipeline_integration_fuzzertest.cc

Issue 1757603002: media: Add media pipeline fuzzer test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 4 years, 9 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
« no previous file with comments | « media/test/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/at_exit.h"
6 #include "base/command_line.h"
7 #include "base/logging.h"
8 #include "media/base/pipeline_status.h"
9 #include "media/test/pipeline_integration_test_base.h"
10
11 // Entry point for LibFuzzer.
12 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
13 // Media pipeline starts new threads, which needs AtExitManager.
14 base::AtExitManager at_exit;
15
16 // Media pipeline checks command line arguments internally.
17 base::CommandLine::Init(0, nullptr);
18
19 media::PipelineIntegrationTestBase test;
20
21 media::PipelineStatus pipeline_status =
22 test.Start(data, size, media::PipelineIntegrationTestBase::kClockless);
23 if (pipeline_status != media::PIPELINE_OK)
24 return 0;
25
26 test.Play();
27 pipeline_status = test.WaitUntilEndedOrError();
28 if (pipeline_status != media::PIPELINE_OK)
29 return 0;
30
31 test.Seek(base::TimeDelta());
32
33 return 0;
34 }
OLDNEW
« no previous file with comments | « media/test/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698