123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419 |
- # Copyright 2014 The Chromium 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/config/features.gni")
- import("//build/config/linux/pkg_config.gni")
- import("//build/config/ui.gni")
- import("//mojo/public/tools/bindings/mojom.gni")
- import("//testing/libfuzzer/fuzzer_test.gni")
- import("//testing/test.gni")
- import("//tools/json_schema_compiler/json_schema_api.gni")
- import("//ui/base/ui_features.gni")
- if (is_android) {
- import("//build/config/android/rules.gni")
- }
- if (is_win) {
- import("//build/toolchain/win/midl.gni")
- }
- mojom("ax_constants_mojo") {
- generate_java = true
- sources = [ "ax_constants.mojom" ]
- }
- mojom_component("ax_enums_mojo") {
- generate_java = true
- sources = [ "ax_enums.mojom" ]
- macro_prefix = "UI_ACCESSIBILITY_AX_MOJOM"
- output_prefix = "ui_accessibility_ax_mojom"
- }
- # A tiny subset of accessibility code that's allowed to be
- # included by Blink. The rule of thumb (for now) is that it's
- # anything platform-neutral (no platform/ directory) that
- # relates to a single accessibility node (no trees, etc.).
- component("ax_base") {
- defines = [ "AX_BASE_IMPLEMENTATION" ]
- sources = [
- "accessibility_features.cc",
- "accessibility_features.h",
- "accessibility_switches.cc",
- "accessibility_switches.h",
- "ax_action_data.cc",
- "ax_action_data.h",
- "ax_action_handler.cc",
- "ax_action_handler.h",
- "ax_action_handler_base.cc",
- "ax_action_handler_base.h",
- "ax_action_handler_registry.cc",
- "ax_action_handler_registry.h",
- "ax_base_export.h",
- "ax_enum_util.cc",
- "ax_enum_util.h",
- "ax_event.cc",
- "ax_event.h",
- "ax_event_intent.cc",
- "ax_event_intent.h",
- "ax_mode.cc",
- "ax_mode.h",
- "ax_node_data.cc",
- "ax_node_data.h",
- "ax_node_id_forward.h",
- "ax_relative_bounds.cc",
- "ax_relative_bounds.h",
- "ax_role_properties.cc",
- "ax_role_properties.h",
- "ax_text_attributes.cc",
- "ax_text_attributes.h",
- "ax_tree_data.cc",
- "ax_tree_data.h",
- "ax_tree_id.cc",
- "ax_tree_id.h",
- "ax_tree_update.cc",
- "ax_tree_update.h",
- "ax_tree_update_forward.h",
- ]
- if (!is_chromeos_ash) {
- sources += [
- "ax_enum_localization_util.cc",
- "ax_enum_localization_util.h",
- ]
- }
- public_deps = [
- ":ax_constants_mojo",
- ":ax_enums_mojo",
- "//base",
- "//ui/gfx",
- "//ui/gfx/geometry",
- ]
- if (!is_chromeos_ash) {
- public_deps += [
- "//base:i18n",
- "//ui/base",
- "//ui/strings",
- ]
- }
- deps = [ "//build:chromeos_buildflags" ]
- if (is_chromeos_ash) {
- deps += [ "//ash/constants" ]
- }
- }
- #if (is_win) {
- # midl("ichromeaccessible") {
- # sources = [
- # "platform/ichromeaccessible.idl",
- # ]
- # }
- #}
- component("accessibility") {
- defines = [ "AX_IMPLEMENTATION" ]
- sources = [
- "ax_action_target.h",
- "ax_active_popup.cc",
- "ax_active_popup.h",
- "ax_clipping_behavior.h",
- "ax_computed_node_data.cc",
- "ax_computed_node_data.h",
- "ax_coordinate_system.h",
- "ax_event_generator.cc",
- "ax_event_generator.h",
- "ax_export.h",
- "ax_hypertext.cc",
- "ax_hypertext.h",
- "ax_language_detection.cc",
- "ax_language_detection.h",
- "ax_live_region_tracker.cc",
- "ax_live_region_tracker.h",
- "ax_mode_observer.h",
- "ax_node.cc",
- "ax_node.h",
- "ax_node_position.cc",
- "ax_node_position.h",
- "ax_offscreen_result.h",
- "ax_position.h",
- "ax_range.h",
- "ax_serializable_tree.cc",
- "ax_serializable_tree.h",
- "ax_table_info.cc",
- "ax_table_info.h",
- "ax_text_utils.cc",
- "ax_text_utils.h",
- "ax_tree.cc",
- "ax_tree.h",
- "ax_tree_combiner.cc",
- "ax_tree_combiner.h",
- "ax_tree_manager.cc",
- "ax_tree_manager.h",
- "ax_tree_manager_base.cc",
- "ax_tree_manager_base.h",
- "ax_tree_manager_map.cc",
- "ax_tree_manager_map.h",
- "ax_tree_observer.cc",
- "ax_tree_observer.h",
- "ax_tree_serializer.cc",
- "ax_tree_serializer.h",
- "ax_tree_source.h",
- "ax_tree_source_annotator.h",
- "ax_tree_source_checker.h",
- "ax_tree_source_observer.h",
- "null_ax_action_target.cc",
- "null_ax_action_target.h",
- "test_ax_tree_manager.cc",
- "test_ax_tree_manager.h",
- ]
- deps = [
- "//base",
- "//components/crash/core/common:crash_key",
- "//third_party/cld_3/src/src:cld_3",
- ]
- public_deps = [
- ":ax_base",
- "//skia",
- "//ui/accessibility/platform",
- ]
- # Allows the files from //ui/accessibility/platform includes headers
- # from this directory.
- allow_circular_includes_from = [ "//ui/accessibility/platform" ]
- if (!is_ios) {
- sources += [
- "ax_param_traits.cc",
- "ax_param_traits.h",
- "ax_param_traits_macros.h",
- ]
- public_deps += [
- "//ipc",
- "//ui/gfx/ipc/skia",
- ]
- }
- if (is_fuchsia) {
- public_deps +=
- [ "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.accessibility.semantics" ]
- }
- if (use_aura) {
- sources += [
- "aura/aura_window_properties.cc",
- "aura/aura_window_properties.h",
- ]
- public_deps += [ "//ui/aura" ]
- }
- }
- source_set("ax_assistant") {
- sources = [
- "ax_assistant_structure.cc",
- "ax_assistant_structure.h",
- ]
- deps = [ ":accessibility" ]
- public_deps = [ ":ax_enums_mojo" ]
- }
- static_library("test_support") {
- testonly = true
- sources = [
- "platform/test_ax_tree_update.cc",
- "platform/test_ax_tree_update.h",
- "test_ax_node_helper.cc",
- "test_ax_node_helper.h",
- "test_ax_tree_update_json_reader.cc",
- "test_ax_tree_update_json_reader.h",
- "tree_generator.cc",
- "tree_generator.h",
- ]
- if (has_native_accessibility) {
- sources += [
- "platform/test_ax_node_wrapper.cc",
- "platform/test_ax_node_wrapper.h",
- ]
- }
- public_deps = [ ":accessibility" ]
- }
- test("accessibility_unittests") {
- testonly = true
- sources = [
- "ax_computed_node_data_unittest.cc",
- "ax_enum_util_unittest.cc",
- "ax_event_generator_unittest.cc",
- "ax_generated_tree_unittest.cc",
- "ax_language_detection_unittest.cc",
- "ax_node_data_unittest.cc",
- "ax_node_position_unittest.cc",
- "ax_node_unittest.cc",
- "ax_range_unittest.cc",
- "ax_role_properties_unittest.cc",
- "ax_table_info_unittest.cc",
- "ax_text_utils_unittest.cc",
- "ax_tree_combiner_unittest.cc",
- "ax_tree_id_unittest.cc",
- "ax_tree_manager_base_unittest.cc",
- "ax_tree_serializer_unittest.cc",
- "ax_tree_source_checker_unittest.cc",
- "ax_tree_unittest.cc",
- "mojom/ax_action_data_mojom_traits_unittest.cc",
- "mojom/ax_event_intent_mojom_traits_unittest.cc",
- "mojom/ax_event_mojom_traits_unittest.cc",
- "mojom/ax_node_data_mojom_traits_unittest.cc",
- "mojom/ax_relative_bounds_mojom_traits_unittest.cc",
- "mojom/ax_tree_data_mojom_traits_unittest.cc",
- "mojom/ax_tree_id_mojom_traits_unittest.cc",
- "mojom/ax_tree_update_mojom_traits_unittest.cc",
- "null_ax_action_target_unittest.cc",
- "platform/ax_platform_node_unittest.cc",
- "platform/ax_platform_node_unittest.h",
- "platform/ax_unique_id_unittest.cc",
- "platform/inspect/ax_inspect_scenario_unittest.cc",
- "platform/inspect/ax_inspect_test_helper_unittest.cc",
- "platform/inspect/ax_inspect_utils_unittest.cc",
- "platform/inspect/ax_property_node_unittest.cc",
- "platform/inspect/ax_script_instruction_unittest.cc",
- "run_all_unittests.cc",
- ]
- deps = [
- ":accessibility",
- ":test_support",
- "//base/test:test_support",
- "//ipc",
- "//mojo/core/embedder",
- "//mojo/core/test:test_support",
- "//mojo/public/cpp/test_support:test_utils",
- "//skia",
- "//testing/gmock",
- "//testing/gtest",
- "//ui/accessibility/mojom",
- "//ui/gfx:test_support",
- ]
- if (is_fuchsia) {
- sources += [
- "platform/fuchsia/accessibility_bridge_fuchsia_unittest.cc",
- "platform/fuchsia/semantic_provider_unittest.cc",
- ]
- deps += [
- "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.accessibility.semantics",
- "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.math",
- "//third_party/fuchsia-sdk/sdk/pkg/inspect",
- "//third_party/fuchsia-sdk/sdk/pkg/scenic_cpp",
- "//third_party/fuchsia-sdk/sdk/pkg/sys_cpp",
- ]
- }
- if (has_native_accessibility) {
- # This test depends heavily on NativeViewAccessible, which is only
- # implemented on these platforms.
- sources += [ "platform/ax_platform_node_base_unittest.cc" ]
- if (is_win) {
- sources += [
- "platform/ax_fragment_root_win_unittest.cc",
- "platform/ax_platform_node_textchildprovider_win_unittest.cc",
- "platform/ax_platform_node_textprovider_win_unittest.cc",
- "platform/ax_platform_node_textrangeprovider_win_unittest.cc",
- "platform/ax_platform_node_win_unittest.cc",
- "platform/ax_platform_node_win_unittest.h",
- ]
- deps += [
- "//third_party/iaccessible2",
- "//ui/accessibility/platform:ichromeaccessible",
- ]
- libs = [
- "oleacc.lib",
- "uiautomationcore.lib",
- ]
- }
- if (use_atk) {
- sources += [
- "platform/atk_util_auralinux_unittest.cc",
- "platform/ax_platform_node_auralinux_unittest.cc",
- ]
- configs += [ "//build/config/linux/atk" ]
- }
- }
- }
- fuzzer_test("ax_tree_fuzzer") {
- sources = [ "ax_tree_fuzzer.cc" ]
- deps = [ ":accessibility" ]
- }
- fuzzer_test("ax_table_fuzzer") {
- sources = [ "ax_table_fuzzer.cc" ]
- deps = [ ":accessibility" ]
- seed_corpus = "fuzz_corpus"
- }
- fuzzer_test("ax_node_position_fuzzer") {
- sources = [
- "ax_node_position_fuzzer.cc",
- "ax_tree_fuzzer_util.cc",
- "ax_tree_fuzzer_util.h",
- ]
- deps = [ ":accessibility" ]
- }
- if (is_win) {
- fuzzer_test("ax_platform_node_textrangeprovider_win_fuzzer") {
- sources = [
- "ax_tree_fuzzer_util.cc",
- "ax_tree_fuzzer_util.h",
- "platform/ax_platform_node_textrangeprovider_win_fuzzer.cc",
- ]
- deps = [
- ":accessibility",
- ":test_support",
- "//base/test:test_support",
- ]
- }
- }
- test("accessibility_perftests") {
- testonly = true
- sources = [ "ax_node_position_perftest.cc" ]
- deps = [
- ":test_support",
- "//base",
- "//base/test:test_support",
- "//mojo/core/test:run_all_unittests",
- "//skia",
- "//testing/gmock",
- "//testing/gtest",
- "//testing/perf",
- "//ui/accessibility/mojom",
- ]
- }
|