blob: e5aa77472f814ecda9fc5f651156ab73f4c057f0 [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.
import("//testing/libfuzzer/fuzzer_test.gni")
static_library("common") {
sources = [
"activation_decision.h",
"activation_list.cc",
"activation_list.h",
"activation_scope.cc",
"activation_scope.h",
"common_features.cc",
"common_features.h",
"document_subresource_filter.cc",
"document_subresource_filter.h",
"first_party_origin.cc",
"first_party_origin.h",
"indexed_ruleset.cc",
"indexed_ruleset.h",
"load_policy.h",
"memory_mapped_ruleset.cc",
"memory_mapped_ruleset.h",
"scoped_timers.h",
"time_measurements.h",
"unindexed_ruleset.cc",
"unindexed_ruleset.h",
]
public_deps = [
"//components/subresource_filter/core/common/flat:indexed_ruleset",
"//components/subresource_filter/core/mojom",
"//components/url_pattern_index",
]
deps = [
"//base",
"//net",
"//third_party/flatbuffers",
"//third_party/protobuf:protobuf_lite",
"//url",
]
}
static_library("test_support") {
testonly = true
sources = [
"test_ruleset_creator.cc",
"test_ruleset_creator.h",
"test_ruleset_utils.cc",
"test_ruleset_utils.h",
]
deps = [
":common",
"//base",
"//net",
"//testing/gtest",
"//third_party/protobuf:protobuf_lite",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"document_subresource_filter_unittest.cc",
"first_party_origin_unittest.cc",
"indexed_ruleset_unittest.cc",
"scoped_timers_unittest.cc",
"unindexed_ruleset_unittest.cc",
]
deps = [
":common",
":test_support",
"//base",
"//base/test:test_support",
"//components/url_pattern_index:test_support",
"//testing/gtest",
"//third_party/protobuf:protobuf_lite",
"//url",
]
}
fuzzer_test("indexed_ruleset_fuzzer") {
sources = [
"indexed_ruleset_fuzzer.cc",
]
deps = [
":common",
"//base",
"//base/test:test_support",
"//url",
]
}