# Copyright 2022 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")
android_library("java") {
sources = [
"java/src/org/chromium/chrome/browser/back_press/BackPressHelper.java",
"java/src/org/chromium/chrome/browser/back_press/BackPressManager.java",
"java/src/org/chromium/chrome/browser/back_press/BackPressMetrics.java",
"java/src/org/chromium/chrome/browser/back_press/CloseListenerManager.java",
"java/src/org/chromium/chrome/browser/back_press/MinimizeAppAndCloseTabBackPressHandler.java",
"java/src/org/chromium/chrome/browser/back_press/SecondaryActivityBackPressUma.java",
]
deps = [
"//base:base_java",
"//chrome/browser/flags:java",
"//chrome/browser/tab:java",
"//chrome/browser/tabmodel:java",
"//chrome/browser/ui/android/layouts:java",
"//chrome/browser/ui/android/native_page:java",
"//components/browser_ui/widget/android:java",
"//content/public/android:content_full_java",
"//third_party/androidx:androidx_activity_activity_java",
"//third_party/androidx:androidx_annotation_annotation_java",
"//third_party/androidx:androidx_core_core_java",
"//third_party/androidx:androidx_lifecycle_lifecycle_common_java",
"//ui/android:ui_java",
]
}
robolectric_library("junit") {
sources = [ "java/src/org/chromium/chrome/browser/back_press/BackPressManagerUnitTest.java" ]
deps = [
":java",
"//base:base_java",
"//base:base_java_test_support",
"//base:base_junit_test_support",
"//base/test:test_support_java",
"//chrome/browser/flags:java",
"//components/browser_ui/widget/android:java",
"//third_party/androidx:androidx_activity_activity_java",
"//third_party/androidx:androidx_annotation_annotation_java",
"//third_party/junit:junit",
"//third_party/mockito:mockito_java",
]
}
# On-device unit tests.
android_library("unit_device_javatests") {
testonly = true
sources = [
"java/src/org/chromium/chrome/browser/back_press/BackPressManagerTest.java",
"java/src/org/chromium/chrome/browser/back_press/MinimizeAppAndCloseTabBackPressHandlerUnitTest.java",
]
deps = [
":java",
"//base:base_java",
"//base:base_java_test_support",
"//chrome/browser/flags:java",
"//chrome/browser/tab:java",
"//chrome/browser/tabmodel:java",
"//components/browser_ui/widget/android:java",
"//content/public/test/android:content_java_test_support",
"//third_party/androidx:androidx_activity_activity_java",
"//third_party/androidx:androidx_test_runner_java",
"//third_party/hamcrest:hamcrest_java",
"//third_party/junit",
"//third_party/mockito:mockito_java",
"//ui/android:ui_java_test_support",
]
}