# Copyright 2020 The Chromium Authors
# Use of this source code is governed by an MIT-style license that can be
# found in the LICENSE file or at https://opensource.org/licenses/MIT.
import("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni")
config("warnings") {
cflags = [ "-Wno-shadow" ]
}
component("liburlpattern") {
defines = [ "IS_LIBURLPATTERN_IMPL" ]
deps = [
"//base:base",
"//third_party/abseil-cpp:absl",
"//third_party/icu:icu",
]
configs += [ ":warnings" ]
# Note, also update the local modifications in README.chromium.
sources = [
"constructor_string_parser.cc",
"constructor_string_parser.h",
"options.h",
"parse.cc",
"parse.h",
"pattern.cc",
"pattern.h",
"tokenize.cc",
"tokenize.h",
"utils.cc",
"utils.h",
]
}
test("liburlpattern_unittests") {
deps = [
":liburlpattern",
"//base/test:run_all_unittests",
"//testing/gtest",
"//third_party/abseil-cpp:absl",
"//third_party/icu:icu",
]
# Note, also update the local modifications in README.chromium.
sources = [
"parse_unittest.cc",
"pattern_unittest.cc",
"tokenize_unittest.cc",
"utils_unittest.cc",
]
testonly = true
}
fuzzer_test("liburlpattern_fuzzer") {
sources = [ "parse_fuzzer.cc" ]
deps = [
":liburlpattern",
"//base",
"//third_party/abseil-cpp:absl",
]
}