chromium/content/public/test/android/BUILD.gn

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

generate_jni("test_support_content_jni_headers") {
  testonly = true
  sources = [ "javatests/src/org/chromium/content_public/browser/test/NestedSystemMessageHandler.java" ]
}

android_library("android_test_message_pump_support_java") {
  testonly = true
  deps = [
    "//base:base_java_test_support",
    "//third_party/jni_zero:jni_zero_java",
  ]
  sources = [ "javatests/src/org/chromium/content_public/browser/test/NestedSystemMessageHandler.java" ]
}

android_library("content_java_test_support") {
  testonly = true

  deps = [
    ":android_test_message_pump_support_java",
    "//base:base_java",
    "//base:base_java_test_support",
    "//base:base_java_test_support_uncommon",
    "//base:process_launcher_java",
    "//cc:cc_java",
    "//content/public/android:content_java",
    "//mojo/public/java:bindings_java",
    "//net/android:net_java",
    "//net/android:net_java_test_support",
    "//services/service_manager/public/java:service_manager_java",
    "//third_party/androidx:androidx_annotation_annotation_java",
    "//third_party/androidx:androidx_test_monitor_java",
    "//third_party/blink/public:blink_headers_java",
    "//third_party/blink/public/mojom:android_mojo_bindings_java",
    "//third_party/hamcrest:hamcrest_java",
    "//third_party/jni_zero:jni_zero_java",
    "//third_party/junit:junit",
    "//ui/android:ui_java",
    "//ui/android:ui_java_test_support",
    "//ui/base/ime/mojom:mojom_java",
    "//url:gurl_java",
  ]
  srcjar_deps = [ ":content_test_jni" ]
  sources = [
    "javatests/src/org/chromium/content_public/browser/test/ContentJUnit4ClassRunner.java",
    "javatests/src/org/chromium/content_public/browser/test/ContentJUnit4RunnerDelegate.java",
    "javatests/src/org/chromium/content_public/browser/test/NativeLibraryTestUtils.java",
    "javatests/src/org/chromium/content_public/browser/test/RenderFrameHostTestExt.java",
    "javatests/src/org/chromium/content_public/browser/test/mock/MockNavigationController.java",
    "javatests/src/org/chromium/content_public/browser/test/mock/MockRenderFrameHost.java",
    "javatests/src/org/chromium/content_public/browser/test/mock/MockWebContents.java",
    "javatests/src/org/chromium/content_public/browser/test/util/BackgroundSyncNetworkUtils.java",
    "javatests/src/org/chromium/content_public/browser/test/util/ClickUtils.java",
    "javatests/src/org/chromium/content_public/browser/test/util/Coordinates.java",
    "javatests/src/org/chromium/content_public/browser/test/util/DOMUtils.java",
    "javatests/src/org/chromium/content_public/browser/test/util/DomAutomationController.java",
    "javatests/src/org/chromium/content_public/browser/test/util/FencedFrameUtils.java",
    "javatests/src/org/chromium/content_public/browser/test/util/HistoryUtils.java",
    "javatests/src/org/chromium/content_public/browser/test/util/JavaScriptUtils.java",
    "javatests/src/org/chromium/content_public/browser/test/util/KeyUtils.java",
    "javatests/src/org/chromium/content_public/browser/test/util/RenderProcessHostUtils.java",
    "javatests/src/org/chromium/content_public/browser/test/util/TestCallbackHelperContainer.java",
    "javatests/src/org/chromium/content_public/browser/test/util/TestInputMethodManagerWrapper.java",
    "javatests/src/org/chromium/content_public/browser/test/util/TestSelectionDropdownMenuDelegate.java",
    "javatests/src/org/chromium/content_public/browser/test/util/TestSelectionPopupController.java",
    "javatests/src/org/chromium/content_public/browser/test/util/TestTouchUtils.java",
    "javatests/src/org/chromium/content_public/browser/test/util/TestWebContentsObserver.java",
    "javatests/src/org/chromium/content_public/browser/test/util/TouchCommon.java",
    "javatests/src/org/chromium/content_public/browser/test/util/UiThreadSchedulerTestUtils.java",
    "javatests/src/org/chromium/content_public/browser/test/util/UiUtils.java",
    "javatests/src/org/chromium/content_public/browser/test/util/WebContentsUtils.java",
  ]
}

android_library("content_transit_java") {
  testonly = true

  deps = [
    "//base:base_java",
    "//base:base_java_test_support",
    "//base:base_java_test_support_uncommon",
    "//base/test:public_transit_java",
    "//content/public/android:content_java",
    "//content/public/test/android:content_java_test_support",
    "//third_party/androidx:androidx_annotation_annotation_java",
    "//third_party/hamcrest:hamcrest_java",
  ]
  sources = [
    "javatests/src/org/chromium/content_public/browser/test/transit/HtmlConditions.java",
    "javatests/src/org/chromium/content_public/browser/test/transit/HtmlElement.java",
    "javatests/src/org/chromium/content_public/browser/test/transit/HtmlElementSpec.java",
  ]
}

generate_jni("content_test_jni") {
  testonly = true
  sources = [
    "javatests/src/org/chromium/content_public/browser/test/RenderFrameHostTestExt.java",
    "javatests/src/org/chromium/content_public/browser/test/util/DOMUtils.java",
    "javatests/src/org/chromium/content_public/browser/test/util/FencedFrameUtils.java",
    "javatests/src/org/chromium/content_public/browser/test/util/RenderProcessHostUtils.java",
    "javatests/src/org/chromium/content_public/browser/test/util/UiThreadSchedulerTestUtils.java",
    "javatests/src/org/chromium/content_public/browser/test/util/WebContentsUtils.java",
  ]
}

static_library("content_native_test_support") {
  testonly = true

  # See comment at the top of //content/BUILD.gn for why this is disabled in
  # component builds.
  if (is_component_build) {
    check_includes = false
  }

  sources = [
    "dom_utils.cc",
    "fenced_frame_utils.cc",
    "render_frame_host_test_ext.cc",
    "render_frame_host_test_ext.h",
    "render_process_host_utils.cc",
    "ui_thread_scheduler_test_utils.cc",
    "web_contents_utils.cc",
  ]
  deps = [
    ":content_test_jni",
    "//base",
    "//content/browser:for_content_tests",
    "//content/public/browser",
    "//content/test:test_support",
    "//device/gamepad",
    "//media/midi",
    "//ui/android",
  ]
}