blob: 47032ab3f585818b38aad4d2aa8a5aea18bfe8b1 [file] [log] [blame]
# Copyright 2022 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# By and large copied from //src/ui/tests/integration_input_tests/factory-reset-handler.
import("//build/components.gni")
import("//src/fonts/build/fonts.gni")
group("text-input") {
testonly = true
deps = [
":tests",
"text-input-chromium",
"text-input-flutter",
]
}
group("tests") {
testonly = true
deps = [
":text-input-test",
"text-input-chromium",
"text-input-flutter",
"//src/ui/testing/test_ui_stack:test-ui-stack-flavors",
# The deps below are necessary on minimal product configs.
# TODO(fxbug.dev/119212): These should be provided by the Product
# configurations on which these tests run rather than as deps.
"//src/chromium:uses_web_engine",
"//src/flutter",
]
}
font_collection("single-font-collection") {
testonly = true
product_config_path =
"//src/ui/testing/data/single-font-collection.fontcfg.json5"
local_asset_names = [ "Roboto-Regular.ttf" ]
font_service_pkg = "text-input-test"
}
executable("text-input-test-bin") {
testonly = true
sources = [ "text-input-test.cc" ]
output_name = "text-input-test"
deps = [
"//sdk/fidl/fuchsia.accessibility.semantics:fuchsia.accessibility.semantics_hlcpp",
"//sdk/fidl/fuchsia.buildinfo:fuchsia.buildinfo_hlcpp",
"//sdk/fidl/fuchsia.cobalt:fuchsia.cobalt_hlcpp",
"//sdk/fidl/fuchsia.component:fuchsia.component_hlcpp",
"//sdk/fidl/fuchsia.feedback:fuchsia.feedback_hlcpp",
"//sdk/fidl/fuchsia.fonts:fuchsia.fonts_hlcpp",
"//sdk/fidl/fuchsia.kernel:fuchsia.kernel_hlcpp",
"//sdk/fidl/fuchsia.logger:fuchsia.logger_hlcpp",
"//sdk/fidl/fuchsia.memorypressure:fuchsia.memorypressure_hlcpp",
"//sdk/fidl/fuchsia.metrics:fuchsia.metrics_hlcpp",
"//sdk/fidl/fuchsia.net.interfaces:fuchsia.net.interfaces_hlcpp",
"//sdk/fidl/fuchsia.netstack:fuchsia.netstack_hlcpp",
"//sdk/fidl/fuchsia.posix.socket:fuchsia.posix.socket_hlcpp",
"//sdk/fidl/fuchsia.scheduler:fuchsia.scheduler_hlcpp",
"//sdk/fidl/fuchsia.session.scene:fuchsia.session.scene_hlcpp",
"//sdk/fidl/fuchsia.sys:fuchsia.sys_hlcpp",
"//sdk/fidl/fuchsia.tracing.provider:fuchsia.tracing.provider_hlcpp",
"//sdk/fidl/fuchsia.ui.app:fuchsia.ui.app_hlcpp",
"//sdk/fidl/fuchsia.ui.composition:fuchsia.ui.composition_hlcpp",
"//sdk/fidl/fuchsia.ui.focus:fuchsia.ui.focus_hlcpp",
"//sdk/fidl/fuchsia.ui.input:fuchsia.ui.input_hlcpp",
"//sdk/fidl/fuchsia.ui.scenic:fuchsia.ui.scenic_hlcpp",
"//sdk/fidl/fuchsia.ui.test.input:fuchsia.ui.test.input_hlcpp",
"//sdk/fidl/fuchsia.ui.test.scene:fuchsia.ui.test.scene_hlcpp",
"//sdk/fidl/fuchsia.vulkan.loader:fuchsia.vulkan.loader_hlcpp",
"//sdk/fidl/fuchsia.web:fuchsia.web_hlcpp",
"//sdk/lib/fdio",
"//sdk/lib/fit",
"//sdk/lib/sys/component/cpp/testing:cpp",
"//sdk/lib/sys/cpp",
"//sdk/lib/sys/cpp/testing:integration_fixture",
"//sdk/lib/ui/scenic/cpp",
"//src/lib/fostr/fidl/fuchsia.ui.input",
"//src/lib/fxl",
"//src/lib/fxl/test:gtest_main",
"//src/lib/json_parser:json_parser",
"//src/lib/testing/loop_fixture",
"//src/ui/input/testing/fake_input_report_device",
"//src/ui/testing/ui_test_manager:ui_test_manager",
"//third_party/googletest:gtest",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/zx",
]
}
fuchsia_component("text-input-test-component") {
testonly = true
component_name = "text_input_test"
manifest = "meta/text-input-test.cml"
deps = [ ":text-input-test-bin" ]
}
fuchsia_test_package("text-input-test") {
test_components = [ ":text-input-test-component" ]
deps = [
":single-font-collection",
"text-input-chromium:text-input-chromium-component",
"text-input-flutter:realm",
# TODO(fxbug.dev/119212): These should be provided by the Product
# configurations on which these tests run rather than as deps.
# TODO(fxbug.dev/119212): Should these be deps of the individual test
# targets above?
"//src/chromium:uses_web_engine",
"//src/cobalt/bin/testing/mock_cobalt",
"//src/connectivity/network/netstack:component",
"//src/developer/build_info/testing:fake-build-info-component",
"//src/developer/memory/monitor:component",
"//src/fonts:font_provider_cm",
"//src/testing/fidl/intl_property_manager:intl_property_manager_component",
"//src/ui/bin/text:text_manager_comp",
]
test_specs = {
parallel = 1
log_settings = {
# Do not fail the test if a message with level ERROR is logged. Several
# components will log ERROR if they miss a non-essential FIDL API in the
# sandbox, which would make the test fail if it weren't for this. For
# example, the flutter runner is noisy like this. Ideally, we should have
# a setup that does not have such errors at all, but adding ever more
# components to satisfy all FIDL dependencies expands the test graph
# beyond what is practical for testing. In the future we may strike a
# balance such that this becomes a non-issue, and that this could be
# removed.
max_severity = "ERROR"
}
environments = [
{
dimensions = {
# Ensure the device has Vulkan.
device_type = "AEMU"
}
},
]
}
}