blob: 55b23e1894db7e6ab13da1981376bf37743e02ab [file] [log] [blame]
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# PDFium fuzzers.
# When adding a fuzzer_test target make sure to add it to the group
# 'pdf_fuzzers'
import("//testing/test.gni")
import("//testing/libfuzzer/fuzzer_test.gni")
import("//third_party/pdfium/pdfium.gni")
group("fuzzers") {
}
group("pdf_fuzzers") {
testonly = true
deps = [
":pdf_cjs_util_fuzzer",
":pdf_cmap_fuzzer",
":pdf_codec_a85_fuzzer",
":pdf_codec_fax_fuzzer",
":pdf_codec_icc_fuzzer",
":pdf_codec_jbig2_fuzzer",
":pdf_codec_rle_fuzzer",
":pdf_font_fuzzer",
":pdf_fx_date_helpers_fuzzer",
":pdf_hint_table_fuzzer",
":pdf_jpx_fuzzer",
":pdf_psengine_fuzzer",
":pdf_streamparser_fuzzer",
":pdf_xml_fuzzer",
":pdfium_fuzzer",
]
if (pdf_enable_xfa) {
deps += [
":pdf_bidi_fuzzer",
":pdf_cfx_barcode_fuzzer",
":pdf_codec_jpeg_fuzzer",
":pdf_css_fuzzer",
":pdf_fm2js_fuzzer",
":pdf_formcalc_fuzzer",
":pdfium_xfa_fuzzer",
]
if (pdf_enable_xfa_bmp) {
deps += [ ":pdf_codec_bmp_fuzzer" ]
}
if (pdf_enable_xfa_gif) {
deps += [
":pdf_codec_gif_fuzzer",
":pdf_lzw_fuzzer",
]
}
if (pdf_enable_xfa_png) {
deps += [ ":pdf_codec_png_fuzzer" ]
}
if (pdf_enable_xfa_tiff) {
deps += [ ":pdf_codec_tiff_fuzzer" ]
}
}
}
fuzzer_test("pdfium_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdfium_fuzzer_src",
]
dict = "dicts/pdf.dict"
seed_corpus = "//third_party/pdfium/testing/resources"
}
fuzzer_test("pdf_cjs_util_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdf_cjs_util_fuzzer_src",
]
}
fuzzer_test("pdf_cmap_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdf_cmap_fuzzer_src",
]
}
fuzzer_test("pdf_codec_a85_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdf_codec_a85_fuzzer_src",
]
}
fuzzer_test("pdf_codec_fax_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdf_codec_fax_fuzzer_src",
]
}
fuzzer_test("pdf_codec_rle_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdf_codec_rle_fuzzer_src",
]
}
fuzzer_test("pdf_codec_icc_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdf_codec_icc_fuzzer_src",
]
dict = "dicts/pdf_codec_icc.dict"
}
fuzzer_test("pdf_codec_jbig2_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdf_codec_jbig2_fuzzer_src",
]
}
fuzzer_test("pdf_fx_date_helpers_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdf_fx_date_helpers_fuzzer_src",
]
}
fuzzer_test("pdf_font_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdf_font_fuzzer_src",
]
}
fuzzer_test("pdf_hint_table_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdf_hint_table_fuzzer_src",
]
}
fuzzer_test("pdf_jpx_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdf_jpx_fuzzer_src",
]
seed_corpus = "corpora/pdf_jpx"
}
fuzzer_test("pdf_psengine_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdf_psengine_fuzzer_src",
]
}
fuzzer_test("pdf_streamparser_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdf_streamparser_fuzzer_src",
]
}
fuzzer_test("pdf_xml_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdf_xml_fuzzer_src",
]
dict = "dicts/pdf_xml.dict"
}
if (pdf_enable_xfa) {
if (pdf_enable_xfa_bmp) {
fuzzer_test("pdf_codec_bmp_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdf_codec_bmp_fuzzer_src",
]
seed_corpus = "corpora/pdf_codec_bmp"
}
}
if (pdf_enable_xfa_gif) {
fuzzer_test("pdf_codec_gif_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdf_codec_gif_fuzzer_src",
]
dict = "dicts/pdf_codec_gif.dict"
seed_corpus = "corpora/pdf_codec_gif"
}
}
fuzzer_test("pdf_codec_jpeg_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdf_codec_jpeg_fuzzer_src",
]
dict = "dicts/pdf_codec_jpeg.dict"
seed_corpus = "corpora/pdf_codec_jpeg"
}
if (pdf_enable_xfa_png) {
fuzzer_test("pdf_codec_png_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdf_codec_png_fuzzer_src",
]
dict = "dicts/pdf_codec_png.dict"
seed_corpuses = [
"corpora/pdf_codec_png",
"//components/viz/test/data",
"//third_party/WebKit/LayoutTests/images/png-suite/samples",
"//third_party/WebKit/LayoutTests/images/resources/pngfuzz",
]
}
}
if (pdf_enable_xfa_tiff) {
fuzzer_test("pdf_codec_tiff_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdf_codec_tiff_fuzzer_src",
]
dict = "dicts/pdf_codec_tiff.dict"
seed_corpus = "corpora/pdf_codec_tiff"
}
}
fuzzer_test("pdf_css_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdf_css_fuzzer_src",
]
dict = "dicts/pdf_css.dict"
}
fuzzer_test("pdf_fm2js_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdf_fm2js_fuzzer_src",
]
dict = "dicts/pdf_formcalc.dict"
}
fuzzer_test("pdf_formcalc_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdf_formcalc_fuzzer_src",
]
dict = "dicts/pdf_formcalc.dict"
}
if (pdf_enable_xfa_gif) {
fuzzer_test("pdf_lzw_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdf_lzw_fuzzer_src",
]
}
}
fuzzer_test("pdf_bidi_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdf_bidi_fuzzer_src",
]
}
fuzzer_test("pdf_cfx_barcode_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdf_cfx_barcode_fuzzer_src",
]
}
fuzzer_test("pdfium_xfa_fuzzer") {
sources = []
deps = [
"//third_party/pdfium/testing/fuzzers:pdfium_xfa_fuzzer_src",
]
dict = "dicts/pdf.dict"
seed_corpus = "//third_party/pdfium/testing/resources"
}
}