# 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("../../../windowmanager_aafwk.gni") module_out_path = "window_manager/wmserver" group("unittest") { testonly = true deps = [ ":wmserver_accessibility_connection_test", ":wmserver_display_group_controller_test", ":wmserver_display_group_info_test", ":wmserver_drag_controller_test", ":wmserver_mock_session_manager_service_test", ":wmserver_window_common_event_test", ":wmserver_window_display_zoom_controller_test", ":wmserver_window_dumper_test", ":wmserver_window_freeze_controller_test", ":wmserver_window_group_mgr_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_utils_test", ":wmserver_window_node_container_test", ":wmserver_window_snapshot_test", ":wmserver_window_zorder_policy_test", ] if (window_manager_use_sceneboard) { deps += [ ":wmserver_window_manager_stub_test", ":wmserver_window_system_effect_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_2d:librender_service_client", "graphic_2d:window_animation", "hicollie:libhicollie", "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", "input:libmmi-client", "ipc:ipc_single", "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 = [ "${window_base_path}/dm:libdm", "${window_base_path}/utils:libwmutil", "${window_base_path}/utils:libwmutil_base", "${window_base_path}/window_scene/interfaces/innerkits:libwsutils", "${window_base_path}/wm:libwm", "${window_base_path}/wmserver:sms", "../..:libwms", "../../../dmserver:libdms", "../../../test/common/utils:libtestutil", "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client", ] config("wmserver_unittest_common_public_config") { include_dirs = [ "../../../test/common/mock", "../../../test/common/utils/include", "../../../wm/include", "../../include", "../../include/zidl", "../../include/window_snapshot", "../../../interfaces/innerkits/wm", "../../../utils/include", "//third_party/googletest/googlemock/include", "foundation/graphic/graphic_2d/rosen/modules/2d_graphics/include/", ] } test_public_config = [ ":wmserver_unittest_common_public_config", "../../../resources/config/build:coverage_flags", "../../../resources/config/build:testcase_flags", ] ohos_unittest("wmserver_window_manager_service_test") { module_out_path = module_out_path sources = [ "window_manager_service_test.cpp" ] configs = test_public_config deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } 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 += [ "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_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_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_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_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_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_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 } ohos_unittest("wmserver_window_system_effect_test") { module_out_path = module_out_path configs = test_public_config sources = [ "window_system_effect_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } ohos_unittest("wmserver_window_manager_service_utils_test") { module_out_path = module_out_path configs = test_public_config sources = [ "window_manager_service_utils_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps if (is_standard_system) { external_deps += [ "init:libbegetutil" ] } else { external_deps += [ "init_lite:libbegetutil" ] } } ohos_unittest("wmserver_window_group_mgr_test") { module_out_path = module_out_path configs = test_public_config sources = [ "window_group_mgr_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } ohos_unittest("wmserver_mock_session_manager_service_test") { module_out_path = module_out_path configs = test_public_config sources = [ "mock_session_manager_service_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps } ohos_unittest("wmserver_window_common_event_test") { module_out_path = module_out_path configs = test_public_config sources = [ "window_common_event_test.cpp" ] deps = test_inner_deps public_deps = test_public_deps external_deps = test_external_deps }