1# Copyright (c) 2025 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/test.gni") 15import("../../../../multimodalinput_mini.gni") 16 17module_output_path = "input/input" 18 19ohos_unittest("InputActiveSubscribeManagerTest") { 20 module_out_path = module_output_path 21 include_dirs = [ 22 "$root_out_dir/diff_libinput_mmi/export_include", 23 "${mmi_path}/service/filter/include", 24 "${mmi_path}/service/nap_process/include", 25 "${mmi_path}/service/module_loader//include", 26 "${mmi_path}/service/connect_manager/include", 27 ] 28 29 sources = [ "input_active_subscribe_manager_test.cpp" ] 30 31 configs = [ 32 "${mmi_path}:coverage_flags", 33 "${mmi_path}/frameworks/proxy:libmmi_test_util", 34 "${mmi_path}/service/filter:mmi_event_filter_config", 35 "${mmi_path}/service/connect_manager:mmi_connect_manager_config", 36 "${mmi_path}/common/anco/comm:mmi_anco_channel_config", 37 ] 38 39 cflags = [ 40 "-Dprivate=public", 41 "-Dprotected=public", 42 ] 43 44 deps = [ 45 "${mmi_path}/frameworks/proxy:libmmi-client", 46 "${mmi_path}/service/connect_manager:mmi_connect_manager_proxy", 47 "${mmi_path}/util:libmmi-util", 48 ] 49 external_deps = [ 50 "ability_runtime:abilitykit_native", 51 "access_token:libaccesstoken_sdk", 52 "access_token:libnativetoken_shared", 53 "access_token:libtokensetproc_shared", 54 "c_utils:utils", 55 "eventhandler:libeventhandler", 56 "googletest:gmock_main", 57 "googletest:gtest_main", 58 "hilog:libhilog", 59 "ipc:ipc_single", 60 "samgr:samgr_proxy", 61 ] 62} 63 64ohos_unittest("MultimodalEventHandlerTest") { 65 module_out_path = module_output_path 66 include_dirs = [ "${mmi_path}/frameworks/proxy/event_handler/include" ] 67 68 sources = [ 69 "multimodal_event_handler_test.cpp", 70 "${mmi_path}/frameworks/proxy/event_handler/src/bytrace_adapter.cpp", 71 "${mmi_path}/frameworks/proxy/event_handler/src/input_active_subscribe_manager.cpp", 72 "${mmi_path}/frameworks/proxy/event_handler/src/input_device_consumer.cpp", 73 "${mmi_path}/frameworks/proxy/event_handler/src/input_manager_impl.cpp", 74 "${mmi_path}/frameworks/proxy/event_handler/src/key_event_input_subscribe_manager.cpp", 75 "${mmi_path}/frameworks/proxy/event_handler/src/long_press_event_subscribe_manager.cpp", 76 "${mmi_path}/frameworks/proxy/event_handler/src/multimodal_event_handler.cpp", 77 "${mmi_path}/frameworks/proxy/event_handler/src/pre_monitor_manager.cpp", 78 "${mmi_path}/frameworks/proxy/event_handler/src/switch_event_input_subscribe_manager.cpp", 79 "${mmi_path}/frameworks/proxy/event_handler/src/tablet_event_input_subscribe_manager.cpp", 80 "${mmi_path}/frameworks/proxy/events/src/input_manager.cpp", 81 ] 82 83 sanitize = { 84 cfi = true 85 cfi_cross_dso = true 86 debug = false 87 blocklist = "./../../ipc_blocklist.txt" 88 } 89 90 configs = [ 91 "${mmi_path}/common/anco/comm:mmi_anco_channel_config", 92 "${mmi_path}:coverage_flags", 93 "${mmi_path}/service/connect_manager:mmi_connect_manager_config", 94 "${mmi_path}/service/filter:mmi_event_filter_config", 95 ] 96 97 cflags = [ 98 "-Dprivate=public", 99 "-Dprotected=public", 100 ] 101 102 deps = [ 103 "${mmi_path}/service/connect_manager:mmi_connect_manager_proxy", 104 "${mmi_path}/test/facility/config_policy_utils_mock:config_policy_utils_mock", 105 "${mmi_path}/util:libmmi-util", 106 ] 107 108 external_deps = [ 109 "cJSON:cjson", 110 "c_utils:utils", 111 "eventhandler:libeventhandler", 112 "googletest:gmock_main", 113 "googletest:gtest_main", 114 "hilog:libhilog", 115 "image_framework:image_native", 116 "init:libbegetutil", 117 "samgr:samgr_proxy", 118 ] 119} 120