chromium/components/subresource_filter/core/browser/BUILD.gn

# Copyright 2016 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

static_library("browser") {
  sources = [
    "async_document_subresource_filter.cc",
    "async_document_subresource_filter.h",
    "copying_file_stream.cc",
    "copying_file_stream.h",
    "ruleset_version.cc",
    "ruleset_version.h",
    "subresource_filter_constants.cc",
    "subresource_filter_constants.h",
    "subresource_filter_features.cc",
    "subresource_filter_features.h",
    "verified_ruleset_dealer.cc",
    "verified_ruleset_dealer.h",
  ]
  configs += [ "//build/config/compiler:wexit_time_destructors" ]
  public_deps = [
    "//base",
    "//components/prefs",
    "//components/subresource_filter/core/common",
    "//components/subresource_filter/core/mojom",
    "//third_party/protobuf:protobuf_lite",
    "//url",
  ]
}

static_library("test_support") {
  testonly = true
  sources = [
    "async_document_subresource_filter_test_utils.cc",
    "async_document_subresource_filter_test_utils.h",
    "subresource_filter_features_test_support.cc",
    "subresource_filter_features_test_support.h",
  ]
  public_deps = [
    ":browser",
    "//base",
    "//components/subresource_filter/core/mojom",
  ]
  deps = [ "//testing/gtest" ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "async_document_subresource_filter_unittest.cc",
    "ruleset_version_unittest.cc",
    "subresource_filter_features_unittest.cc",
    "verified_ruleset_dealer_unittest.cc",
  ]
  deps = [
    ":browser",
    ":test_support",
    "//base",
    "//base/test:test_support",
    "//components/prefs:test_support",
    "//components/subresource_filter/core/common:common",
    "//components/subresource_filter/core/common:test_support",
    "//components/url_pattern_index/proto:url_pattern_index",
    "//testing/gmock",
    "//testing/gtest",
  ]
}