chromium/chrome/test/android/BUILD.gn

# Copyright 2014 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("//chrome/android/chrome_public_apk_tmpl.gni")
import("//third_party/jni_zero/jni_zero.gni")

android_library("pagecontroller_utils_java") {
  testonly = true
  sources = [
    "javatests/src/org/chromium/chrome/test/pagecontroller/utils/BySelectorIndexUi2Locator.java",
    "javatests/src/org/chromium/chrome/test/pagecontroller/utils/BySelectorUi2Locator.java",
    "javatests/src/org/chromium/chrome/test/pagecontroller/utils/ChildIndexUi2Locator.java",
    "javatests/src/org/chromium/chrome/test/pagecontroller/utils/IUi2Locator.java",
    "javatests/src/org/chromium/chrome/test/pagecontroller/utils/IndexUi2Locator.java",
    "javatests/src/org/chromium/chrome/test/pagecontroller/utils/NonInstrumentedCrashDetector.java",
    "javatests/src/org/chromium/chrome/test/pagecontroller/utils/PathUi2Locator.java",
    "javatests/src/org/chromium/chrome/test/pagecontroller/utils/Ui2Locators.java",
    "javatests/src/org/chromium/chrome/test/pagecontroller/utils/UiAutomatorUtils.java",
    "javatests/src/org/chromium/chrome/test/pagecontroller/utils/UiLocationException.java",
    "javatests/src/org/chromium/chrome/test/pagecontroller/utils/UiLocatorHelper.java",
    "javatests/src/org/chromium/chrome/test/pagecontroller/utils/Utils.java",
  ]
  deps = [
    "//base:base_java_test_support",
    "//third_party/androidx:androidx_annotation_annotation_java",
    "//third_party/androidx:androidx_test_core_java",
    "//third_party/androidx:androidx_test_monitor_java",
    "//third_party/androidx:androidx_test_uiautomator_uiautomator_java",
    "//third_party/hamcrest:hamcrest_java",
    "//third_party/hamcrest:hamcrest_library_java",
    "//third_party/junit",
  ]
}

android_library("chrome_java_test_pagecontroller") {
  testonly = true
  resources_package = "org.chromium.chrome"
  sources = [
    "javatests/src/org/chromium/chrome/test/pagecontroller/rules/ChromeUiApplicationTestRule.java",
    "javatests/src/org/chromium/chrome/test/pagecontroller/rules/ChromeUiAutomatorTestRule.java",
  ]
  deps = [
    "//base:base_java",
    "//chrome/android:chrome_app_java_resources",
    "//chrome/android:chrome_java",
    "//third_party/androidx:androidx_test_core_java",
    "//third_party/androidx:androidx_test_monitor_java",
    "//third_party/junit",
  ]
  public_deps = [ ":pagecontroller_utils_java" ]
}

generate_jni_registration("baseline_profile_test_apk_dummy_jni_registration") {
  testonly = true
  java_targets = [ ":baseline_profile_test_apk" ]

  # By not providing any native targets, this becomes a dummy-only registration,
  # just used to satisfy R8.
  add_stubs_for_missing_jni = true
}

android_test_apk("baseline_profile_test_apk") {
  apk_name = "ChromeStartupBenchmark"
  android_manifest =
      "javatests/src/org/chromium/chrome/browser/perf/AndroidManifest.xml"
  never_incremental = true
  sources = [
    "javatests/src/org/chromium/chrome/browser/perf/BaselineProfileTest.java",
  ]
  data = [ "javatests/src/org/chromium/chrome/browser/perf/test.html" ]

  if (!is_java_debug) {
    proguard_enabled = true
    proguard_configs = [ "//chrome/android/proguard/apk_for_test.flags" ]
  }

  deps = [
    ":pagecontroller_utils_java",
    "//base:base_java_test_support",
    "//net/android:net_java_test_support",
    "//third_party/androidx:androidx_benchmark_benchmark_junit4_java",
    "//third_party/androidx:androidx_benchmark_benchmark_macro_java",
    "//third_party/androidx:androidx_benchmark_benchmark_macro_junit4_java",
    "//third_party/androidx:androidx_test_core_java",
    "//third_party/androidx:androidx_test_ext_junit_java",
    "//third_party/androidx:androidx_test_monitor_java",
    "//third_party/androidx:androidx_test_runner_java",
    "//third_party/junit",
    "//third_party/kotlin_stdlib:kotlin_stdlib_java",
  ]
  srcjar_deps = [ ":baseline_profile_test_apk_dummy_jni_registration" ]
}

instrumentation_test_runner("chrome_public_apk_baseline_profile_generator") {
  android_test_apk = ":baseline_profile_test_apk"
  apk_under_test = "//chrome/android:chrome_public_apk"
  additional_apks = [ "//net/android:net_test_support_apk" ]
  never_incremental = true
  extra_args = [
    "--use-apk-under-test-flags-file",
    "--disable-fre",
    "--strict-mode=off",
  ]
}

chrome_public_test_apk_tmpl("chrome_java_test_wpr_tests") {
  apk_name = "ChromeWPRTests"
  sources = [ "//chrome/android/feed/core/javatests/src/org/chromium/chrome/browser/feed/network_fetch/FeedNewTabPageCardInstrumentationTest.java" ]
  data = [
    "//chrome/android/feed/core/javatests/src/org/chromium/chrome/browser/feed/wpr_tests",
    "//third_party/webpagereplay/bin",

    # tsproxy binary.
    "//third_party/catapult/third_party/tsproxy/",

    # For the wpr_cert.pem and wpr_key.pem.
    "//third_party/catapult/web_page_replay_go/",
  ]

  # Skia Gold dependency
  data_deps = [ "//ui/base:goldctl" ]
  deps = [
    ":chrome_java_integration_test_support",
    "//base:base_java_test_support",
    "//chrome/android:chrome_java",
    "//chrome/browser/flags:java",
    "//chrome/browser/tab:java",
    "//chrome/browser/ui/android/native_page:java",
    "//components/embedder_support/android:util_java",
    "//third_party/android_deps:com_android_support_drawerlayout_java",
    "//third_party/android_deps:espresso_java",
    "//third_party/android_deps:guava_android_java",
    "//third_party/hamcrest:hamcrest_java",
    "//third_party/junit",
    "//ui/android:ui_java_test_support",
  ]
}

chrome_public_test_apk_tmpl("chrome_java_test_feed_test") {
  apk_name = "ChromeFeedTests"
  sources = [
    "//chrome/android/feed/core/javatests/src/org/chromium/chrome/browser/feed/v2/FeedSurfaceCoordinatorIntegrationTest.java",
    "//chrome/android/java/src/org/chromium/chrome/browser/app/feed/feedmanagement/FeedManagementTest.java",
  ]

  # Skia Gold dependency
  data_deps = [ "//ui/base:goldctl" ]
  deps = [
    ":chrome_java_integration_test_support",
    "//base:base_java",
    "//base:base_java_test_support",
    "//chrome/android:chrome_java",
    "//chrome/browser/flags:java",
    "//chrome/browser/tab:java",
    "//chrome/browser/ui/android/native_page:java",
    "//components/embedder_support/android:util_java",
    "//components/signin/public/android:java",
    "//content/public/test/android:content_java_test_support",
    "//net/android:net_java",
    "//third_party/android_deps:com_android_support_drawerlayout_java",
    "//third_party/android_deps:espresso_java",
    "//third_party/android_deps:guava_android_java",
    "//third_party/hamcrest:hamcrest_java",
    "//third_party/junit",
    "//ui/android:ui_java_test_support",
  ]
}

robolectric_binary("chrome_java_test_pagecontroller_junit_tests") {
  testonly = true
  sources = [
    "javatests/src/org/chromium/chrome/test/pagecontroller/utils/BySelectorIndexUi2LocatorTest.java",
    "javatests/src/org/chromium/chrome/test/pagecontroller/utils/BySelectorUi2LocatorTest.java",
    "javatests/src/org/chromium/chrome/test/pagecontroller/utils/ChildIndexUi2LocatorTest.java",
    "javatests/src/org/chromium/chrome/test/pagecontroller/utils/IndexUi2LocatorTest.java",
    "javatests/src/org/chromium/chrome/test/pagecontroller/utils/PathUi2LocatorTest.java",
    "javatests/src/org/chromium/chrome/test/pagecontroller/utils/TestUtils.java",
    "javatests/src/org/chromium/chrome/test/pagecontroller/utils/Ui2LocatorsTest.java",
  ]
  deps = [
    ":chrome_java_test_pagecontroller",
    "//base:base_java_test_support",
    "//base:base_junit_test_support",
    "//third_party/androidx:androidx_test_uiautomator_uiautomator_java",
  ]
}

# Rules, utilities and fakes for unit tests.
java_group("chrome_java_unit_test_support") {
  testonly = true
  public_deps = [ ":chrome_java_test_support_common" ]
}

android_library("chrome_java_transit") {
  testonly = true
  resources_package = "org.chromium.chrome.test"

  sources = [
    "javatests/src/org/chromium/chrome/test/transit/AppMenuFacility.java",
    "javatests/src/org/chromium/chrome/test/transit/BlankCTATabInitialStatePublicTransitRule.java",
    "javatests/src/org/chromium/chrome/test/transit/ChromeTabbedActivityPublicTransitEntryPoints.java",
    "javatests/src/org/chromium/chrome/test/transit/Journeys.java",
    "javatests/src/org/chromium/chrome/test/transit/MessageFacility.java",
    "javatests/src/org/chromium/chrome/test/transit/context_menu/ContextMenuFacility.java",
    "javatests/src/org/chromium/chrome/test/transit/context_menu/LinkContextMenuFacility.java",
    "javatests/src/org/chromium/chrome/test/transit/dom_distiller/ReaderModeConditions.java",
    "javatests/src/org/chromium/chrome/test/transit/dom_distiller/ReaderModePreferencesDialog.java",
    "javatests/src/org/chromium/chrome/test/transit/edge_to_edge/EdgeToEdgeConditions.java",
    "javatests/src/org/chromium/chrome/test/transit/edge_to_edge/ViewportFitCoverPageStation.java",
    "javatests/src/org/chromium/chrome/test/transit/hub/HubBaseStation.java",
    "javatests/src/org/chromium/chrome/test/transit/hub/HubStationUtils.java",
    "javatests/src/org/chromium/chrome/test/transit/hub/IncognitoTabSwitcherStation.java",
    "javatests/src/org/chromium/chrome/test/transit/hub/NewTabGroupDialogFacility.java",
    "javatests/src/org/chromium/chrome/test/transit/hub/RegularTabSwitcherStation.java",
    "javatests/src/org/chromium/chrome/test/transit/hub/TabListEditorAppMenu.java",
    "javatests/src/org/chromium/chrome/test/transit/hub/TabSwitcherAppMenuFacility.java",
    "javatests/src/org/chromium/chrome/test/transit/hub/TabSwitcherGroupCardFacility.java",
    "javatests/src/org/chromium/chrome/test/transit/hub/TabSwitcherListEditorFacility.java",
    "javatests/src/org/chromium/chrome/test/transit/hub/TabSwitcherStation.java",
    "javatests/src/org/chromium/chrome/test/transit/ntp/IncognitoNewTabPageAppMenuFacility.java",
    "javatests/src/org/chromium/chrome/test/transit/ntp/IncognitoNewTabPageStation.java",
    "javatests/src/org/chromium/chrome/test/transit/ntp/MvtsFacility.java",
    "javatests/src/org/chromium/chrome/test/transit/ntp/NtpLoadedCondition.java",
    "javatests/src/org/chromium/chrome/test/transit/ntp/RegularNewTabPageAppMenuFacility.java",
    "javatests/src/org/chromium/chrome/test/transit/ntp/RegularNewTabPageStation.java",
    "javatests/src/org/chromium/chrome/test/transit/page/IncognitoWebPageAppMenuFacility.java",
    "javatests/src/org/chromium/chrome/test/transit/page/PageAppMenuFacility.java",
    "javatests/src/org/chromium/chrome/test/transit/page/PageInteractableOrHiddenCondition.java",
    "javatests/src/org/chromium/chrome/test/transit/page/PageLoadedCondition.java",
    "javatests/src/org/chromium/chrome/test/transit/page/PageStation.java",
    "javatests/src/org/chromium/chrome/test/transit/page/PopupBlockedMessageFacility.java",
    "javatests/src/org/chromium/chrome/test/transit/page/RegularWebPageAppMenuFacility.java",
    "javatests/src/org/chromium/chrome/test/transit/page/TabSwitcherActionMenuFacility.java",
    "javatests/src/org/chromium/chrome/test/transit/page/WebPageStation.java",
    "javatests/src/org/chromium/chrome/test/transit/settings/PreferenceFacility.java",
    "javatests/src/org/chromium/chrome/test/transit/settings/SettingsActivityPublicTransitEntryPoints.java",
    "javatests/src/org/chromium/chrome/test/transit/settings/SettingsStation.java",
    "javatests/src/org/chromium/chrome/test/transit/tabmodel/TabCountChangedCondition.java",
    "javatests/src/org/chromium/chrome/test/transit/tabmodel/TabGroupExistsCondition.java",
    "javatests/src/org/chromium/chrome/test/transit/tabmodel/TabGroupUiFacility.java",
    "javatests/src/org/chromium/chrome/test/transit/tabmodel/TabGroupUtil.java",
    "javatests/src/org/chromium/chrome/test/transit/tabmodel/TabModelSelectorCondition.java",
    "javatests/src/org/chromium/chrome/test/transit/tabmodel/TabThumbnailCondition.java",
    "javatests/src/org/chromium/chrome/test/transit/tabmodel/TabThumbnailsCapturedCarryOn.java",
    "javatests/src/org/chromium/chrome/test/transit/testhtmls/NavigatePageStations.java",
    "javatests/src/org/chromium/chrome/test/transit/testhtmls/PopupOnClickPageStation.java",
    "javatests/src/org/chromium/chrome/test/transit/testhtmls/PopupOnLoadPageStation.java",
    "javatests/src/org/chromium/chrome/test/transit/testhtmls/TopBottomLinksPageStation.java",
  ]

  deps = [
    ":chrome_java_integration_test_support",
    "//base:base_java",
    "//base:base_java_test_support",
    "//base:base_java_test_support_uncommon",
    "//base/test:public_transit_java",
    "//build/android:build_java",
    "//chrome/android:chrome_app_java_resources",
    "//chrome/android:chrome_java",
    "//chrome/android/features/tab_ui:java_resources",
    "//chrome/android/features/tab_ui:test_support_javalib",
    "//chrome/browser/browser_controls/android:java",
    "//chrome/browser/flags:java",
    "//chrome/browser/hub:factory_java",
    "//chrome/browser/hub:java",
    "//chrome/browser/hub/internal:java",
    "//chrome/browser/settings:test_support_java",
    "//chrome/browser/tab:java",
    "//chrome/browser/tab_group:java",
    "//chrome/browser/tab_ui/android:java",
    "//chrome/browser/tabmodel:java",
    "//chrome/browser/ui/android/appmenu:java",
    "//chrome/browser/ui/android/edge_to_edge:java",
    "//chrome/browser/ui/android/layouts:java",
    "//chrome/browser/ui/android/native_page:java",
    "//chrome/browser/ui/messages/android:java",
    "//components/embedder_support/android:util_java",
    "//components/messages/android:java",
    "//components/messages/android/internal:java",
    "//components/messages/android/test:test_support_java",
    "//components/tab_groups:tab_groups_java",
    "//content/public/android:content_java",
    "//content/public/test/android:content_java_test_support",
    "//content/public/test/android:content_transit_java",
    "//net/android:net_java_test_support",
    "//third_party/android_deps:espresso_java",
    "//third_party/androidx:androidx_annotation_annotation_java",
    "//third_party/androidx:androidx_core_core_java",
    "//third_party/androidx:androidx_fragment_fragment_java",
    "//third_party/androidx:androidx_preference_preference_java",
    "//third_party/androidx:androidx_recyclerview_recyclerview_java",
    "//third_party/androidx:androidx_test_monitor_java",
    "//third_party/hamcrest:hamcrest_java",
    "//third_party/junit",
    "//ui/android:ui_java",
    "//ui/android:ui_java_test_support",
    "//url:url_java",
  ]
}

# Rules, utilities and fakes for integration tests. Unit test targets shouldn't
# depend on this.
android_library("chrome_java_integration_test_support") {
  testonly = true
  resources_package = "org.chromium.chrome"

  public_deps = [ ":chrome_java_test_support_common" ]

  sources = [
    "javatests/src/org/chromium/chrome/browser/history/TestBrowsingHistoryObserver.java",
    "javatests/src/org/chromium/chrome/browser/toolbar/top/ButtonHighlightMatcher.java",
    "javatests/src/org/chromium/chrome/test/ChromeActivityTestRule.java",
    "javatests/src/org/chromium/chrome/test/ChromeBrowserTestRule.java",
    "javatests/src/org/chromium/chrome/test/ChromeTabbedActivityTestRule.java",
    "javatests/src/org/chromium/chrome/test/ReducedModeNativeTestRule.java",
    "javatests/src/org/chromium/chrome/test/TestContentProvider.java",
    "javatests/src/org/chromium/chrome/test/batch/BlankCTATabInitialStateRule.java",
    "javatests/src/org/chromium/chrome/test/gcore/MockChromeGoogleApiClient.java",
    "javatests/src/org/chromium/chrome/test/invalidation/IntentSavingContext.java",
    "javatests/src/org/chromium/chrome/test/util/BookmarkTestRule.java",
    "javatests/src/org/chromium/chrome/test/util/BookmarkTestUtil.java",
    "javatests/src/org/chromium/chrome/test/util/ChromeApplicationTestUtils.java",
    "javatests/src/org/chromium/chrome/test/util/ChromeTabUtils.java",
    "javatests/src/org/chromium/chrome/test/util/FullscreenTestUtils.java",
    "javatests/src/org/chromium/chrome/test/util/InfoBarTestAnimationListener.java",
    "javatests/src/org/chromium/chrome/test/util/InfoBarUtil.java",
    "javatests/src/org/chromium/chrome/test/util/MenuUtils.java",
    "javatests/src/org/chromium/chrome/test/util/NewTabPageTestUtils.java",
    "javatests/src/org/chromium/chrome/test/util/OmniboxTestUtils.java",
    "javatests/src/org/chromium/chrome/test/util/RecentTabsPageTestUtils.java",
    "javatests/src/org/chromium/chrome/test/util/TabRestoreServiceUtils.java",
    "javatests/src/org/chromium/chrome/test/util/TabStripUtils.java",
    "javatests/src/org/chromium/chrome/test/util/ToolbarTestUtils.java",
    "javatests/src/org/chromium/chrome/test/util/TranslateUtil.java",
    "javatests/src/org/chromium/chrome/test/util/WaitForFocusHelper.java",
    "javatests/src/org/chromium/chrome/test/util/browser/TabLoadObserver.java",
    "javatests/src/org/chromium/chrome/test/util/browser/TabTitleObserver.java",
    "javatests/src/org/chromium/chrome/test/util/browser/ThemeTestUtils.java",
    "javatests/src/org/chromium/chrome/test/util/browser/WPRArchiveDirectory.java",
    "javatests/src/org/chromium/chrome/test/util/browser/compositor/layouts/DisableChromeAnimations.java",
    "javatests/src/org/chromium/chrome/test/util/browser/contextmenu/ContextMenuUtils.java",
    "javatests/src/org/chromium/chrome/test/util/browser/signin/SigninTestRule.java",
    "javatests/src/org/chromium/chrome/test/util/browser/signin/SigninTestUtil.java",
    "javatests/src/org/chromium/chrome/test/util/browser/sync/SyncTestUtil.java",
    "javatests/src/org/chromium/chrome/test/util/browser/webapps/WebappTestPage.java",
  ]

  deps = [
    ":chrome_java_test_support_common",
    "$google_play_services_package:google_play_services_base_java",
    "$google_play_services_package:google_play_services_basement_java",
    "//base:base_java",
    "//base:base_java_test_support",
    "//base/test:public_transit_java",
    "//base/version_info/android:version_constants_java",
    "//build/android:build_java",
    "//chrome/android:base_module_java",
    "//chrome/android:browser_java_test_support",
    "//chrome/android:chrome_app_java_resources",
    "//chrome/android:chrome_java",
    "//chrome/browser/android/browserservices/intents:java",
    "//chrome/browser/first_run/android:java",
    "//chrome/browser/flags:java",
    "//chrome/browser/language/android:java",
    "//chrome/browser/omaha/android:java",
    "//chrome/browser/password_manager/android:backend_interface_java",
    "//chrome/browser/password_manager/android:settings_interface_java",
    "//chrome/browser/password_manager/android:test_support_java",
    "//chrome/browser/preferences:java",
    "//chrome/browser/prefetch/android:java",
    "//chrome/browser/profiles/android:java",
    "//chrome/browser/settings:test_support_java",
    "//chrome/browser/signin/services/android:java",
    "//chrome/browser/sync/android:java",
    "//chrome/browser/tab:java",
    "//chrome/browser/tab_group:java",
    "//chrome/browser/tabmodel:java",
    "//chrome/browser/thumbnail/generator:java",
    "//chrome/browser/ui/android/appmenu:java",
    "//chrome/browser/ui/android/appmenu/test:test_support_java",
    "//chrome/browser/ui/android/favicon:java",
    "//chrome/browser/ui/android/layouts:java",
    "//chrome/browser/ui/android/native_page:java",
    "//chrome/browser/ui/android/omnibox:java",
    "//chrome/browser/ui/android/theme:java",
    "//chrome/browser/ui/android/toolbar:java",
    "//chrome/browser/ui/messages/android:java",
    "//chrome/browser/util:java",
    "//components/bookmarks/common/android:bookmarks_java",
    "//components/browser_ui/notifications/android:test_support_java",
    "//components/browser_ui/styles/android:java",
    "//components/browser_ui/widget/android:java",
    "//components/browser_ui/widget/android:test_support_java",
    "//components/embedder_support/android:content_view_java",
    "//components/embedder_support/android:util_java",
    "//components/embedder_support/android:web_contents_delegate_java",
    "//components/favicon/android:java",
    "//components/infobars/android:java",
    "//components/infobars/core:infobar_enums_java",
    "//components/location/android:location_java",
    "//components/messages/android:java",
    "//components/omnibox/browser:browser_java",
    "//components/policy/android:policy_java",
    "//components/policy/android:policy_java_test_support",
    "//components/signin/public/android:java",
    "//components/signin/public/android:signin_java_test_support",
    "//components/sync/android:sync_java",
    "//components/translate/content/android:java",
    "//components/webapps/browser/android:java",
    "//content/public/android:content_java",
    "//content/public/test/android:content_java_test_support",
    "//net/android:net_java",
    "//net/android:net_java_test_support",
    "//services/device/public/mojom:mojom_java",
    "//third_party/android_deps:chromium_play_services_availability_java",
    "//third_party/android_deps:com_google_code_findbugs_jsr305_java",
    "//third_party/android_deps:espresso_java",
    "//third_party/android_deps:material_design_java",
    "//third_party/androidx:androidx_activity_activity_java",
    "//third_party/androidx:androidx_annotation_annotation_java",
    "//third_party/androidx:androidx_appcompat_appcompat_java",
    "//third_party/androidx:androidx_appcompat_appcompat_resources_java",
    "//third_party/androidx:androidx_core_core_java",
    "//third_party/androidx:androidx_fragment_fragment_java",
    "//third_party/androidx:androidx_recyclerview_recyclerview_java",
    "//third_party/androidx:androidx_test_core_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/blink/public:blink_headers_java",
    "//third_party/hamcrest:hamcrest_java",
    "//third_party/junit",
    "//ui/android:ui_java",
    "//ui/android:ui_java_test_support",
    "//url:gurl_java",
    "//url:gurl_junit_test_support",
  ]
}

# Rules, utilities and fakes common to unit and integration tests.
android_library("chrome_java_test_support_common") {
  resources_package = "org.chromium.chrome"
  testonly = true
  sources = [
    "javatests/src/org/chromium/chrome/browser/history/HistoryTestUtils.java",
    "javatests/src/org/chromium/chrome/browser/history/StubbedHistoryProvider.java",
    "javatests/src/org/chromium/chrome/browser/homepage/HomepageTestRule.java",
    "javatests/src/org/chromium/chrome/browser/tab/MockTab.java",
    "javatests/src/org/chromium/chrome/browser/tab/MockTabAttributes.java",
    "javatests/src/org/chromium/chrome/browser/tab/TabTestUtils.java",
    "javatests/src/org/chromium/chrome/test/AutomotiveContextWrapperTestRule.java",
    "javatests/src/org/chromium/chrome/test/ChromeJUnit4ClassRunner.java",
    "javatests/src/org/chromium/chrome/test/ChromeJUnit4RunnerDelegate.java",
    "javatests/src/org/chromium/chrome/test/partnercustomizations/TestPartnerBrowserCustomizationsDelayedProvider.java",
    "javatests/src/org/chromium/chrome/test/partnercustomizations/TestPartnerBrowserCustomizationsProvider.java",
    "javatests/src/org/chromium/chrome/test/util/ActivityTestUtils.java",
    "javatests/src/org/chromium/chrome/test/util/ByteBufferTestUtils.java",
    "javatests/src/org/chromium/chrome/test/util/ChromeRenderTestRule.java",
    "javatests/src/org/chromium/chrome/test/util/SadTabRule.java",
    "javatests/src/org/chromium/chrome/test/util/ToolbarUnitTestUtils.java",
    "javatests/src/org/chromium/chrome/test/util/browser/LocationSettingsTestUtil.java",
    "javatests/src/org/chromium/chrome/test/util/browser/offlinepages/FakeOfflinePageBridge.java",
    "javatests/src/org/chromium/chrome/test/util/browser/signin/AccountManagerTestRule.java",
    "javatests/src/org/chromium/chrome/test/util/browser/suggestions/SuggestionsDependenciesRule.java",
    "javatests/src/org/chromium/chrome/test/util/browser/suggestions/mostvisited/FakeMostVisitedSites.java",
    "javatests/src/org/chromium/chrome/test/util/browser/tabmodel/MockTabCreator.java",
    "javatests/src/org/chromium/chrome/test/util/browser/tabmodel/MockTabCreatorManager.java",
    "javatests/src/org/chromium/chrome/test/util/browser/tabmodel/MockTabModel.java",
    "javatests/src/org/chromium/chrome/test/util/browser/tabmodel/MockTabModelSelector.java",
    "javatests/src/org/chromium/chrome/test/util/browser/webapps/WebApkIntentDataProviderBuilder.java",
    "javatests/src/org/chromium/chrome/test/util/browser/webapps/WebappTestHelper.java",
  ]

  deps = [
    "//base:base_java",
    "//base:base_java_test_support",
    "//base/version_info/android:version_constants_java",
    "//build/android:build_java",
    "//chrome/android:chrome_app_java_resources",
    "//chrome/android:chrome_java",
    "//chrome/browser/android/browserservices/intents:java",
    "//chrome/browser/flags:java",
    "//chrome/browser/omaha/android:java",
    "//chrome/browser/preferences:java",
    "//chrome/browser/profiles/android:java",
    "//chrome/browser/signin/services/android:java",
    "//chrome/browser/tab:java",
    "//chrome/browser/tab_group:java",
    "//chrome/browser/tabmodel:java",
    "//chrome/browser/thumbnail/generator:java",
    "//chrome/browser/ui/android/native_page:java",
    "//chrome/browser/ui/android/toolbar:java",
    "//chrome/browser/util:java",
    "//components/browser_ui/styles/android:java",
    "//components/browser_ui/widget/android:java",
    "//components/browser_ui/widget/android:test_support_java",
    "//components/embedder_support/android:content_view_java",
    "//components/embedder_support/android:util_java",
    "//components/favicon/android:java",
    "//components/location/android:location_java",
    "//components/policy/android:policy_java_test_support",
    "//components/signin/public/android:java",
    "//components/signin/public/android:signin_java_test_support",
    "//components/signin/public/android:signin_test_resources",
    "//components/webapps/browser/android:java",
    "//content/public/android:content_java",
    "//content/public/test/android:content_java_test_support",
    "//services/device/public/mojom:mojom_java",
    "//third_party/android_deps:chromium_play_services_availability_java",
    "//third_party/android_deps:espresso_java",
    "//third_party/android_deps:guava_android_java",
    "//third_party/android_deps:org_mockito_mockito_core_java",
    "//third_party/androidx:androidx_annotation_annotation_java",
    "//third_party/androidx:androidx_appcompat_appcompat_java",
    "//third_party/androidx:androidx_appcompat_appcompat_resources_java",
    "//third_party/androidx:androidx_browser_browser_java",
    "//third_party/androidx:androidx_core_core_java",
    "//third_party/androidx:androidx_fragment_fragment_java",
    "//third_party/androidx:androidx_recyclerview_recyclerview_java",
    "//third_party/androidx:androidx_test_core_java",
    "//third_party/androidx:androidx_test_monitor_java",
    "//third_party/blink/public/mojom:mojom_platform_java",
    "//third_party/hamcrest:hamcrest_java",
    "//third_party/jni_zero:jni_zero_java",
    "//third_party/junit",
    "//ui/android:ui_java",
    "//ui/android:ui_java_test_support",
    "//url:gurl_java",
    "//url:gurl_junit_test_support",
  ]
}

# Compiles the abstract LiveSigninTestUtil class. Implementations are compiled
# separately.
android_library("live_signin_test_util_java") {
  testonly = true
  sources = [
    "javatests/src/org/chromium/chrome/test/util/browser/signin/LiveSigninTestUtil.java",

    # The impl is listed here but then excluded via jar_excluded_patterns, so
    # downstream targets can provide their own implementation.
    "javatests/src/org/chromium/chrome/test/util/browser/signin/LiveSigninTestUtilImpl.java",
  ]

  jar_excluded_patterns = [ "*/LiveSigninTestUtilImpl.class" ]
  deps = [
    ":chrome_java_integration_test_support",
    "//base:base_java",
    "//base:base_java_test_support",
    "//chrome/browser/profiles/android:java",
    "//chrome/browser/signin/services/android:java",
    "//components/signin/public/android:java",
    "//components/sync/android:sync_java",
    "//content/public/test/android:content_java_test_support",
    "//third_party/hamcrest:hamcrest_java",
  ]
}

# Compiles the implementation of LiveSigninTestUtil for public targets.
android_library("live_signin_test_util_public_impl_java") {
  testonly = true
  sources = [ "javatests/src/org/chromium/chrome/test/util/browser/signin/LiveSigninTestUtilImpl.java" ]
  deps = [ ":live_signin_test_util_java" ]
}