# Copyright (c) 2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/test.gni") import("//foundation/window/window_manager/windowmanager_aafwk.gni") module_out_path = "window_manager/wmserver" group("unittest") { testonly = true deps = [ ":wmserver_accessibility_connection_test", ":wmserver_avoid_area_controller_test", ":wmserver_display_group_controller_test", ":wmserver_display_group_info_test", ":wmserver_drag_controller_test", ":wmserver_input_window_monitor_test", ":wmserver_minimize_app_test", ":wmserver_remote_animation_test", ":wmserver_starting_window_test", ":wmserver_window_controller_test", ":wmserver_window_dumper_test", ":wmserver_window_display_zoom_controller_test", ":wmserver_window_freeze_controller_test", ":wmserver_window_inner_manager_test", ":wmserver_window_inner_window_test", ":wmserver_window_layout_policy_test", ":wmserver_window_manager_config_test", ":wmserver_window_manager_proxy_test", ":wmserver_window_manager_service_test", ":wmserver_window_manager_stub_test", ":wmserver_window_node_container_test", ":wmserver_window_node_test", ":wmserver_window_pair_test", ":wmserver_window_root_test", ":wmserver_window_snapshot_test", ":wmserver_window_zorder_policy_test", ] } test_external_deps = [ "ability_base:want", "ability_runtime:ability_context_native", "ability_runtime:ability_manager", "ace_engine:ace_uicontent", "bundle_framework:appexecfwk_base", "c_utils:utils", "common_event_service:cesfwk_innerkits", "config_policy:configpolicy_util", "display_manager:displaymgr", "eventhandler:libeventhandler", "graphic_standard:window_animation", "hicollie_native:libhicollie", "hilog_native:libhilog", "hisysevent_native:libhisysevent", "hitrace_native:hitrace_meter", "input:libmmi-client", "ipc:ipc_core", "napi:ace_napi", "power_manager:powermgr_client", "safwk:system_ability_fwk", ] test_public_deps = [ "//third_party/googletest:gmock", "//third_party/googletest:gtest_main", ] test_inner_deps = [ "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client", "//foundation/window/window_manager/dm:libdm", "//foundation/window/window_manager/dmserver:libdms", "//foundation/window/window_manager/test/common/utils:libtestutil", "//foundation/window/window_manager/utils:libwmutil", "//foundation/window/window_manager/wm:libwm", "//foundation/window/window_manager/wmserver:libwms", ] config("wmserver_unittest_common_public_config") { include_dirs = [ "//foundation/window/window_manager/test/common/mock", "//foundation/window/window_manager/test/common/utils/include", "//foundation/window/window_manager/wm/include", "//foundation/window/window_manager/wmserver/include", "//foundation/window/window_manager/wmserver/include/zidl", "//foundation/window/window_manager/wmserver/include/window_snapshot", "//foundation/window/window_manager/interfaces/innerkits/wm", "//foundation/window/window_manager/utils/include", "//third_party/googletest/googlemock/include", "foundation/graphic/graphic_2d/rosen/modules/2d_graphics/include/", ] } test_public_config = [ ":wmserver_unittest_common_public_config", "//foundation/window/window_manager/resources/config/build:coverage_flags", "//foundation/window/window_manager/resources/config/build:testcase_flags", ] ohos_unittest("wmserver_input_window_monitor_test") { module_out_path = module_out_path configs = test_public_config sources = [ "input_window_monitor_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } ohos_unittest("wmserver_avoid_area_controller_test") { module_out_path = module_out_path configs = test_public_config sources = [ "avoid_area_controller_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } ohos_unittest("wmserver_window_controller_test") { module_out_path = module_out_path configs = test_public_config sources = [ "window_controller_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } ohos_unittest("wmserver_minimize_app_test") { module_out_path = module_out_path configs = test_public_config sources = [ "minimize_app_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } ohos_unittest("wmserver_window_layout_policy_test") { module_out_path = module_out_path configs = test_public_config sources = [ "window_layout_policy_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } ohos_unittest("wmserver_window_manager_config_test") { module_out_path = module_out_path configs = test_public_config sources = [ "window_manager_config_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps deps += [ "//third_party/libxml2:libxml2" ] } ohos_unittest("wmserver_window_snapshot_test") { module_out_path = module_out_path configs = test_public_config sources = [ "window_snapshot_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps external_deps += [ "multimedia_image_framework:image_native" ] } ohos_unittest("wmserver_window_zorder_policy_test") { module_out_path = module_out_path configs = test_public_config sources = [ "window_zorder_policy_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } ohos_unittest("wmserver_window_node_container_test") { module_out_path = module_out_path configs = test_public_config sources = [ "window_node_container_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } ohos_unittest("wmserver_window_node_test") { module_out_path = module_out_path configs = test_public_config sources = [ "window_node_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } ohos_unittest("wmserver_window_pair_test") { module_out_path = module_out_path configs = test_public_config sources = [ "window_pair_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } ohos_unittest("wmserver_window_manager_stub_test") { module_out_path = module_out_path configs = test_public_config sources = [ "window_manager_stub_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } ohos_unittest("wmserver_starting_window_test") { module_out_path = module_out_path configs = test_public_config sources = [ "starting_window_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } ohos_unittest("wmserver_window_manager_service_test") { module_out_path = module_out_path configs = test_public_config sources = [ "window_manager_service_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } ohos_unittest("wmserver_window_manager_proxy_test") { module_out_path = module_out_path configs = test_public_config sources = [ "window_manager_proxy_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } ohos_unittest("wmserver_display_group_info_test") { module_out_path = module_out_path configs = test_public_config sources = [ "display_group_info_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } ohos_unittest("wmserver_accessibility_connection_test") { module_out_path = module_out_path configs = test_public_config sources = [ "accessibility_connection_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } ohos_unittest("wmserver_window_dumper_test") { module_out_path = module_out_path configs = test_public_config sources = [ "window_dumper_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } ohos_unittest("wmserver_display_group_controller_test") { module_out_path = module_out_path configs = test_public_config sources = [ "display_group_controller_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } ohos_unittest("wmserver_window_display_zoom_controller_test") { module_out_path = module_out_path configs = test_public_config sources = [ "window_display_zoom_controller_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } ohos_unittest("wmserver_remote_animation_test") { module_out_path = module_out_path configs = test_public_config sources = [ "remote_animation_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } ohos_unittest("wmserver_window_freeze_controller_test") { module_out_path = module_out_path configs = test_public_config sources = [ "window_freeze_controller_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } ohos_unittest("wmserver_window_inner_window_test") { module_out_path = module_out_path configs = test_public_config sources = [ "window_inner_window_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } ohos_unittest("wmserver_drag_controller_test") { module_out_path = module_out_path configs = test_public_config sources = [ "drag_controller_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } ohos_unittest("wmserver_window_inner_manager_test") { module_out_path = module_out_path configs = test_public_config sources = [ "window_inner_manager_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } ohos_unittest("wmserver_window_root_test") { module_out_path = module_out_path configs = test_public_config sources = [ "window_root_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps }