| # 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") |
| |
| group("text-input") { |
| testonly = true |
| deps = [ |
| ":tests", |
| "text-input-chromium", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":text-input-test", |
| "text-input-chromium", |
| "//src/ui/testing/test_ui_stack:test-ui-stack-flavors", |
| |
| # 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. |
| "//src/chromium:web_context_provider_for_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.posix.socket:fuchsia.posix.socket_hlcpp", |
| "//sdk/fidl/fuchsia.process:fuchsia.process_hlcpp", |
| "//sdk/fidl/fuchsia.scheduler:fuchsia.scheduler_hlcpp", |
| "//sdk/fidl/fuchsia.session.scene:fuchsia.session.scene_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/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_test_component("text-input-test-component") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| component_name = "text_input_test" |
| manifest = "meta/text-input-test.cml" |
| deps = [ ":text-input-test-bin" ] |
| |
| # See README.md for instructions to connect to Chromium remote tools. |
| test_type = "chromium" |
| } |
| |
| fuchsia_test_package("text-input-test") { |
| test_components = [ ":text-input-test-component" ] |
| subpackages = |
| [ "//src/ui/testing/test_ui_stack:flatland-scene-manager-test-ui-stack" ] |
| deps = [ |
| "text-input-chromium:text-input-chromium-component", |
| |
| # 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/cobalt/bin/testing/mock_cobalt", |
| "//src/connectivity/network:netstack-for-tests", |
| "//src/developer/build_info/testing:fake-build-info-component", |
| "//src/developer/memory/monitor:component", |
| "//src/fonts:font_provider_hermetic_for_test", |
| "//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. 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" |
| } |
| }, |
| ] |
| } |
| } |