| # 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. |
| |
| import("//build/bazel/export_fuchsia_package_to_bazel.gni") |
| import("//build/components.gni") |
| |
| executable("bin") { |
| testonly = true |
| output_name = "test-ui-stack" |
| |
| sources = [ "main.cc" ] |
| |
| deps = [ |
| ":test_ui_stack_config_lib", |
| "//sdk/fidl/fuchsia.accessibility.semantics:fuchsia.accessibility.semantics_cpp", |
| "//sdk/fidl/fuchsia.element:fuchsia.element_cpp", |
| "//sdk/fidl/fuchsia.input.interaction:fuchsia.input.interaction_cpp", |
| "//sdk/fidl/fuchsia.input.virtualkeyboard:fuchsia.input.virtualkeyboard_cpp", |
| "//sdk/fidl/fuchsia.ui.composition:fuchsia.ui.composition_cpp", |
| "//sdk/fidl/fuchsia.ui.display.singleton:fuchsia.ui.display.singleton_cpp", |
| "//sdk/fidl/fuchsia.ui.focus:fuchsia.ui.focus_cpp", |
| "//sdk/fidl/fuchsia.ui.input:fuchsia.ui.input_cpp", |
| "//sdk/fidl/fuchsia.ui.input3:fuchsia.ui.input3_cpp", |
| "//sdk/fidl/fuchsia.ui.pointerinjector:fuchsia.ui.pointerinjector_cpp", |
| "//sdk/fidl/fuchsia.ui.policy:fuchsia.ui.policy_cpp", |
| "//sdk/fidl/fuchsia.ui.test.input:fuchsia.ui.test.input_cpp", |
| "//sdk/fidl/fuchsia.ui.test.scene:fuchsia.ui.test.scene_cpp", |
| "//sdk/lib/async-loop:async-loop-cpp", |
| "//sdk/lib/async-loop:async-loop-default", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/syslog/cpp", |
| "//src/ui/a11y/testing/fidl:test.accessibility_cpp", |
| "//src/ui/testing/ui_test_realm", |
| ] |
| } |
| |
| fuchsia_component("test-ui-stack-component") { |
| testonly = true |
| component_name = "test-ui-stack" |
| |
| # TODO(b/345827642): Remove once Chromium is migrated |
| # to dictionaries and we no longer need this workaround. |
| check_includes = false |
| manifest = "meta/test-ui-stack.cml" |
| deps = [ ":bin" ] |
| } |
| |
| # Required for structured config. |
| fuchsia_component_manifest("test_ui_stack_manifest") { |
| testonly = true |
| component_name = "test-ui-stack" |
| manifest = "meta/test-ui-stack.cml" |
| } |
| |
| fuchsia_structured_config_cpp_elf_lib("test_ui_stack_config_lib") { |
| testonly = true |
| cm_label = ":test_ui_stack_manifest" |
| } |
| |
| fuchsia_structured_config_values("flatland_scene_manager_config") { |
| testonly = true |
| cm_label = ":test_ui_stack_manifest" |
| values = { |
| display_rotation = 0 |
| display_width_px = 0 # Use default config |
| display_height_px = 0 # Use default config |
| display_refresh_rate_millihertz = 0 # Use default config |
| display_max_layer_count = 0 # Use default config |
| device_pixel_ratio = "1.0" |
| suspend_enabled = false |
| } |
| } |
| |
| # This package is identical to :flatland-scene-manager-test-ui-stack below. |
| # |
| # I chose to preserve a separate generic "test-ui-stack" package to |
| # encourage clients to use this package moniker when they intend to |
| # override the configuration. |
| fuchsia_package("test-ui-stack") { |
| testonly = true |
| deps = [ |
| ":flatland_scene_manager_config", |
| ":test-ui-stack-component", |
| ] |
| } |
| |
| export_fuchsia_package_to_bazel("test-ui-stack.bazel_input") { |
| testonly = true |
| package = ":test-ui-stack" |
| } |
| |
| fuchsia_package("flatland-scene-manager-test-ui-stack") { |
| testonly = true |
| deps = [ |
| ":flatland_scene_manager_config", |
| ":test-ui-stack-component", |
| ] |
| } |
| |
| export_fuchsia_package_to_bazel( |
| "flatland-scene-manager-test-ui-stack.bazel_input") { |
| testonly = true |
| package = ":flatland-scene-manager-test-ui-stack" |
| } |
| |
| # *** End pre-packaged UI stack permutations *** |
| |
| group("test-ui-stack-flavors") { |
| testonly = true |
| deps = [ |
| ":flatland-scene-manager-test-ui-stack", |
| ":test-ui-stack", |
| ] |
| } |