1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86
   87
   88
   89
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103
  104
  105
  106
  107
  108

android_webview / tools / captured_sites_tests / BUILD.gn [blame]

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

import("//build/config/android/rules.gni")
import("//testing/test.gni")

testonly = true

group("captured_sites_test_app") {
  deps = [
    ":captured_sites_junit_tests",
    ":webview_captured_sites_app_apk",
    ":webview_captured_sites_test_apk",
  ]
}

android_apk("webview_captured_sites_app_apk") {
  apk_name = "WebViewCapturedSitesApp"
  android_manifest = "java/AndroidManifest.xml"
  deps = [
    ":webview_captured_sites_app_apk_resources",
    ":webview_captured_sites_app_java",
  ]
}

robolectric_binary("captured_sites_junit_tests") {
  android_manifest = "java/AndroidManifest.xml"
  sources = [
    "javatests/src/org/chromium/webview_ui_test/test/robolectric/AutofillProfileTest.java",
    "javatests/src/org/chromium/webview_ui_test/test/robolectric/CapturedSitesInstructionsTest.java",
    "javatests/src/org/chromium/webview_ui_test/test/util/Action.java",
    "javatests/src/org/chromium/webview_ui_test/test/util/AutofillProfile.java",
    "javatests/src/org/chromium/webview_ui_test/test/util/CapturedSitesInstructions.java",
    "javatests/src/org/chromium/webview_ui_test/test/util/CapturedSitesSyncWrapper.java",
    "javatests/src/org/chromium/webview_ui_test/test/util/CapturedSitesTestRule.java",
    "javatests/src/org/chromium/webview_ui_test/test/util/JavaScriptExecutionViewAction.java",
    "javatests/src/org/chromium/webview_ui_test/test/util/PerformActions.java",
  ]
  deps = [
    ":webview_captured_sites_app_java",
    "//base:base_java",
    "//base:base_java_test_support",
    "//base:base_junit_test_support",
    "//third_party/android_deps:espresso_java",
    "//third_party/android_deps:playcore_java",
    "//third_party/androidx:androidx_annotation_annotation_java",
    "//third_party/androidx:androidx_test_monitor_java",
    "//third_party/androidx:androidx_test_runner_java",
    "//third_party/androidx:androidx_test_uiautomator_uiautomator_java",
    "//third_party/hamcrest:hamcrest_java",
    "//third_party/junit",
    "//ui/android:ui_java_test_support",
  ]
}
android_library("webview_captured_sites_app_java") {
  sources = [
    "../automated_ui_tests/java/src/org/chromium/webview_ui_test/WebViewUiTestActivity.java",
    "../automated_ui_tests/javatests/src/org/chromium/webview_ui_test/test/util/UseLayout.java",
  ]
  deps = [
    ":webview_captured_sites_app_apk_resources",
    "//base:base_java",
  ]
}

android_resources("webview_captured_sites_app_apk_resources") {
  deps = [ "//android_webview/tools/automated_ui_tests:webview_ui_test_app_apk_resources" ]
  sources = [ "java/res/layout/autofill_dataset_picker_text_only.xml" ]
}

instrumentation_test_apk("webview_captured_sites_test_apk") {
  apk_name = "WebViewCapturedSitesTestAppTest"
  apk_under_test = ":webview_captured_sites_app_apk"
  android_manifest = "javatests/AndroidManifest.xml"
  sources = [
    "javatests/src/org/chromium/webview_ui_test/test/CapturedSitesTest.java",
    "javatests/src/org/chromium/webview_ui_test/test/TestAutofillService.java",
    "javatests/src/org/chromium/webview_ui_test/test/util/Action.java",
    "javatests/src/org/chromium/webview_ui_test/test/util/AutofillProfile.java",
    "javatests/src/org/chromium/webview_ui_test/test/util/CapturedSitesInstructions.java",
    "javatests/src/org/chromium/webview_ui_test/test/util/CapturedSitesSyncWrapper.java",
    "javatests/src/org/chromium/webview_ui_test/test/util/CapturedSitesTestRule.java",
    "javatests/src/org/chromium/webview_ui_test/test/util/JavaScriptExecutionViewAction.java",
    "javatests/src/org/chromium/webview_ui_test/test/util/PerformActions.java",
  ]
  deps = [
    ":webview_captured_sites_app_apk_resources",
    ":webview_captured_sites_app_java",
    "//base:base_java",
    "//base:base_java_test_support",
    "//third_party/android_deps:espresso_java",
    "//third_party/android_deps:playcore_java",
    "//third_party/androidx:androidx_annotation_annotation_java",
    "//third_party/androidx:androidx_test_monitor_java",
    "//third_party/androidx:androidx_test_runner_java",
    "//third_party/androidx:androidx_test_uiautomator_uiautomator_java",
    "//third_party/hamcrest:hamcrest_java",
    "//third_party/junit",
    "//ui/android:ui_java_test_support",
  ]
  data = [ "test/data/" ]

  # Tell GN to ignore 'incremental_install' even if the user has it in their GN
  # args because it's incompatible with 'use_webview_provider'.
  never_incremental = true
  use_webview_provider = system_webview_apk_target
}