| # Copyright 2019 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/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| |
| group("unit") { |
| testonly = true |
| public_deps = [ ":semantics_tests" ] |
| } |
| |
| group("integration") { |
| testonly = true |
| public_deps = [ |
| ":semantics-integration-tests", |
| "//src/ui/a11y/bin/demo:a11y-demo", |
| ] |
| } |
| |
| executable("semantics_tests") { |
| output_name = "semantics_tests" |
| testonly = true |
| sources = [ |
| "a11y_semantics_event_manager_test.cc", |
| "semantic_tree_parser.cc", |
| "semantic_tree_parser.h", |
| "semantic_tree_parser_test.cc", |
| "semantic_tree_service_unittest.cc", |
| "tree_unittest.cc", |
| ] |
| public_deps = [ "//sdk/fidl/fuchsia.accessibility.semantics" ] |
| deps = [ |
| "//garnet/public/lib/gtest", |
| "//garnet/public/lib/json", |
| "//sdk/fidl/fuchsia.accessibility", |
| "//sdk/fidl/fuchsia.sys", |
| "//sdk/lib/fidl/cpp", |
| "//sdk/lib/inspect/testing/cpp", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/sys/cpp/testing:unit", |
| "//sdk/lib/syslog/cpp", |
| "//sdk/lib/vfs/cpp", |
| "//src/lib/files", |
| "//src/lib/fsl", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/ui/a11y/bin/a11y_manager/tests/util", |
| "//src/ui/a11y/lib/screen_reader/util", |
| "//src/ui/a11y/lib/semantics", |
| "//src/ui/a11y/lib/semantics/tests/mocks", |
| "//third_party/googletest:gmock", |
| |
| # TODO(fxbug.dev/57392): Move it back to //third_party once unification completes. |
| "//zircon/third_party/rapidjson", |
| ] |
| |
| # This is a dependency of the semantic tree to perform certain matrix transform operations. |
| include_dirs = [ "//third_party/glm" ] |
| } |
| |
| test_package("semantics-integration-tests") { |
| deps = [ |
| ":flutter_semantics_tests", |
| ":web_semantics_tests", |
| ] |
| |
| tests = [ |
| { |
| name = "flutter_semantics_tests" |
| environments = [ nuc_env ] |
| }, |
| { |
| name = "web_semantics_tests" |
| environments = [ nuc_env ] |
| }, |
| ] |
| |
| data_deps = [ |
| "//garnet/packages/prod:scenic", |
| "//src/chromium", |
| "//src/ui/a11y/bin/demo:a11y-demo", |
| ] |
| |
| resources = [ |
| { |
| path = rebase_path("testdata/big_list.html") |
| dest = "big_list.html" |
| }, |
| { |
| path = rebase_path("testdata/dynamic_button.html") |
| dest = "dynamic_button.html" |
| }, |
| { |
| path = rebase_path("testdata/static.html") |
| dest = "static.html" |
| }, |
| ] |
| } |
| |
| executable("flutter_semantics_tests") { |
| testonly = true |
| |
| sources = [ "flutter_semantics_tests.cc" ] |
| |
| deps = [ |
| ":semantics_integration_test_fixture", |
| "//sdk/lib/syslog/cpp", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/ui/base_view", |
| "//src/ui/testing/views", |
| "//third_party/googletest:gtest", |
| ] |
| } |
| |
| executable("web_semantics_tests") { |
| testonly = true |
| sources = [ "web_semantics_tests.cc" ] |
| deps = [ |
| ":semantics_integration_test_fixture", |
| "//sdk/lib/syslog/cpp", |
| "//src/chromium/web_runner_tests:mock_server", |
| "//src/lib/fxl", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/ui/base_view", |
| "//src/ui/a11y/lib/view", |
| "//src/ui/testing/views", |
| "//third_party/googletest:gtest", |
| ] |
| } |
| |
| source_set("semantics_integration_test_fixture") { |
| testonly = true |
| sources = [ |
| "semantics_integration_test_fixture.cc", |
| "semantics_integration_test_fixture.h", |
| ] |
| public_deps = [ |
| "//sdk/fidl/fuchsia.ui.views", |
| "//sdk/lib/fidl/cpp", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/sys/cpp/testing:integration", |
| "//src/ui/a11y/lib/annotation/tests/mocks", |
| "//src/ui/a11y/lib/semantics", |
| "//src/ui/a11y/lib/semantics/util", |
| "//src/ui/a11y/lib/view", |
| "//src/ui/a11y/lib/view/tests/mocks", |
| ] |
| deps = [ |
| "//sdk/fidl/fuchsia.ui.input.accessibility", |
| "//sdk/fidl/fuchsia.ui.policy", |
| "//sdk/fidl/fuchsia.ui.scenic", |
| "//sdk/lib/fdio", |
| "//sdk/lib/syslog/cpp", |
| "//sdk/lib/ui/scenic/cpp", |
| "//zircon/public/lib/zx", |
| ] |
| } |