chromium/chrome/browser/subresource_filter/BUILD.gn

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

# TODO(csharrison): Move subresource_filter_browsertests here.

if (is_android) {
  import("//build/config/android/rules.gni")
  import("//third_party/jni_zero/jni_zero.gni")

  generate_jni("jni_headers") {
    sources = [ "../../android/javatests/src/org/chromium/chrome/browser/subresource_filter/TestRulesetPublisher.java" ]
  }

  android_library("subresource_filter_java_test_support") {
    testonly = true

    srcjar_deps = [ ":jni_headers" ]
    sources = [ "../../android/javatests/src/org/chromium/chrome/browser/subresource_filter/TestRulesetPublisher.java" ]
    deps = [ "//third_party/jni_zero:jni_zero_java" ]
  }

  android_library("subresource_filter_javatests") {
    testonly = true
    resources_package = "org.chromium.chrome.browser.subresource_filter"
    sources = [ "../../android/javatests/src/org/chromium/chrome/browser/subresource_filter/SubresourceFilterTest.java" ]
    deps = [
      ":subresource_filter_java_test_support",
      "//base:base_java_test_support",
      "//chrome/android:chrome_java",
      "//chrome/android:chrome_test_java",
      "//chrome/browser/flags:java",
      "//chrome/browser/tab:java",
      "//chrome/browser/tabmodel:java",
      "//chrome/browser/ui/messages/android:java",
      "//chrome/test/android:chrome_java_integration_test_support",
      "//components/browser_ui/modaldialog/android:java",
      "//components/browser_ui/modaldialog/android:java_resources",
      "//components/infobars/android:java",
      "//components/messages/android:java",
      "//components/messages/android/internal:java",
      "//components/messages/android/test:test_support_java",
      "//components/safe_browsing/android:safe_browsing_java",
      "//components/subresource_filter/android:java",
      "//content/public/test/android:content_java_test_support",
      "//net/android:net_java_test_support",
      "//third_party/android_deps:espresso_java",
      "//third_party/androidx:androidx_test_runner_java",
      "//third_party/junit",
      "//ui/android:ui_java_test_support",
      "//ui/android:ui_no_recycler_view_java",
      "//url:gurl_java",
    ]
  }

  source_set("android_test_support") {
    testonly = true
    sources = [ "android_test_ruleset_publisher.cc" ]
    deps = [
      ":jni_headers",
      "//base",
      "//chrome/browser",
      "//chrome/browser:browser_process",
      "//components/subresource_filter/content/browser",
      "//components/subresource_filter/content/shared/browser",
      "//components/subresource_filter/core/common:test_support",
    ]
  }
}