1# Copyright (c) 2021-2023 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("//foundation/ability/ability_runtime/ability_runtime.gni") 16import("//foundation/arkui/ace_engine/ace_config.gni") 17 18module_output_path = "ace_engine_full/jsframework/event" 19 20ohos_unittest("CommonEventTest") { 21 module_out_path = module_output_path 22 23 sources = [ 24 "../dom_node_factory.cpp", 25 "common_event_test.cpp", 26 ] 27 28 configs = [ 29 ":config_domnode_test", 30 "$ace_root:ace_test_config", 31 ] 32 33 deps = [ 34 "$ace_root/build:ace_ohos_unittest_base", 35 "//third_party/googletest:gmock_main", 36 ] 37 38 external_deps = [ 39 "ability_base:configuration", 40 "ability_runtime:abilitykit_native", 41 "c_utils:utils", 42 "input:libmmi-client", 43 "ipc:ipc_single", 44 "napi:ace_napi", 45 "window_manager:libdm", 46 "window_manager:libwm", 47 "window_manager:scene_session", 48 "window_manager:scene_session_manager", 49 ] 50 51 part_name = ace_engine_part 52 sources += [ 53 "$ace_root/test/mock/adapter/mock_mmi_event_convertor.cpp", 54 "$ace_root/test/mock/core/common/mock_udmf.cpp", 55 ] 56 57 if (ability_runtime_graphics) { 58 external_deps += [ "image_framework:image_native" ] 59 } 60} 61 62config("config_domnode_test") { 63 visibility = [ ":*" ] 64 include_dirs = [ "$ace_root" ] 65} 66 67group("unittest") { 68 testonly = true 69 deps = [] 70 71 deps += [ ":CommonEventTest" ] 72} 73