blob: 1a8d374b19f05fd39d4ebb73c8f675a5005e71b7 [file] [log] [blame]
# Copyright 2021 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.
import("//build/components.gni")
import("//build/fidl/fidl.gni")
import("//build/testing/cc_test_executable.gni")
fidl("test.virtualkeyboard") {
testonly = true
sources = [ "input_position_listener.test.fidl" ]
public_deps = [ "//zircon/vdso/zx" ]
}
cc_test_executable("virtual-keyboard-test-bin") {
testonly = true
sources = [ "virtual-keyboard-test.cc" ]
output_name = "virtual-keyboard-test"
deps = [
":test.virtualkeyboard_cpp",
"//sdk/fidl/fuchsia.accessibility.semantics:fuchsia.accessibility.semantics_cpp",
"//sdk/fidl/fuchsia.buildinfo:fuchsia.buildinfo_cpp",
"//sdk/fidl/fuchsia.element:fuchsia.element_cpp",
"//sdk/fidl/fuchsia.fonts:fuchsia.fonts_cpp",
"//sdk/fidl/fuchsia.input.injection:fuchsia.input.injection_cpp",
"//sdk/fidl/fuchsia.input.virtualkeyboard:fuchsia.input.virtualkeyboard_cpp",
"//sdk/fidl/fuchsia.intl:fuchsia.intl_cpp",
"//sdk/fidl/fuchsia.io:fuchsia.io_cpp",
"//sdk/fidl/fuchsia.kernel:fuchsia.kernel_cpp",
"//sdk/fidl/fuchsia.memorypressure:fuchsia.memorypressure_cpp",
"//sdk/fidl/fuchsia.metrics:fuchsia.metrics_cpp",
"//sdk/fidl/fuchsia.posix.socket:fuchsia.posix.socket_cpp",
"//sdk/fidl/fuchsia.process:fuchsia.process_cpp",
"//sdk/fidl/fuchsia.scheduler:fuchsia.scheduler_cpp",
"//sdk/fidl/fuchsia.tracing.provider:fuchsia.tracing.provider_cpp",
"//sdk/fidl/fuchsia.ui.app:fuchsia.ui.app_cpp",
"//sdk/fidl/fuchsia.ui.input:fuchsia.ui.input_cpp",
"//sdk/fidl/fuchsia.vulkan.loader:fuchsia.vulkan.loader_cpp",
"//sdk/fidl/fuchsia.web:fuchsia.web_cpp",
"//sdk/lib/async-loop:async-loop-cpp",
"//sdk/lib/async-loop:async-loop-default",
"//sdk/lib/fdio",
"//sdk/lib/fit",
"//sdk/lib/sys/component/cpp/testing:cpp",
"//sdk/lib/sys/cpp",
"//src/lib/fostr/fidl/fuchsia.ui.gfx",
"//src/lib/fostr/fidl/fuchsia.ui.input",
"//src/lib/fxl",
"//src/lib/fxl/test:gtest_main",
"//src/lib/testing/loop_fixture",
"//src/lib/timekeeper",
"//src/ui/input/testing/fake_input_report_device",
"//src/ui/testing/ui_test_manager",
"//third_party/googletest:gtest",
"//zircon/system/ulib/zx",
# TODO(https://fxbug.dev/355738783): Fix after realm builder support new C++ binding.
"//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_cpp_hlcpp_conversion",
"//sdk/fidl/fuchsia.io:fuchsia.io_cpp_hlcpp_conversion",
"//sdk/lib/fidl/cpp:hlcpp_conversion",
]
}
fuchsia_test_component("virtual-keyboard-test-component") {
restricted_features = [ "allow_non_hermetic_packages" ]
manifest = "meta/virtual-keyboard-test.cml"
deps = [
":virtual-keyboard-test-bin",
"//src/chromium/web_engine/meta/shards/test:launch_context_provider",
]
test_type = "system"
}
fuchsia_test_package("virtual-keyboard-test") {
test_components = [ ":virtual-keyboard-test-component" ]
deps = [
"//src/cobalt/bin/testing/fake_cobalt",
"//src/connectivity/network:netstack-for-tests",
"//src/developer/build_info/testing:fake-build-info-component",
"//src/developer/memory/pressure_signaler:component",
"//src/fonts:font_provider_hermetic_for_test",
"//src/testing/fidl/intl_property_manager:intl_property_manager_component",
"//src/ui/tests/integration_input_tests/virtual-keyboard/web-virtual-keyboard-client:component",
# Include some default config (it doesn't matter which, since we're going to override it).
"//src/ui/testing/test_ui_stack:flatland_scene_manager_config",
"//src/ui/testing/test_ui_stack:test-ui-stack-component",
]
test_specs = {
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.
max_severity = "ERROR"
}
environments = [
{
dimensions = {
# Ensure the device has Vulkan.
device_type = "AEMU"
}
},
]
}
}
group("tests") {
testonly = true
deps = [
":virtual-keyboard-test",
# The deps below are necessary on minimal product configs.
# TODO(https://fxbug.dev/42070261): These should be provided by the Product
# configurations on which these tests run rather than as deps.
# TODO(https://fxbug.dev/42070261): Should these be deps of the individual test
# targets above?
"//src/chromium:web_context_provider_for_test",
"//src/graphics/bin/vulkan_loader",
]
}
# A variant which excludes `web_engine`, so that it can be built on products which
# include `web_engine` in `base`.
group("tests-product-webengine") {
testonly = true
deps = [
":virtual-keyboard-test",
"//src/graphics/bin/vulkan_loader",
]
}