1# Copyright (c) 2022 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("../../../windowmanager_aafwk.gni") 16module_out_path = "window_manager/wmserver" 17 18group("unittest") { 19 testonly = true 20 deps = [ 21 ":wmserver_accessibility_connection_test", 22 ":wmserver_avoid_area_controller_test", 23 ":wmserver_display_group_controller_test", 24 ":wmserver_display_group_info_test", 25 ":wmserver_drag_controller_test", 26 ":wmserver_input_window_monitor_test", 27 ":wmserver_minimize_app_test", 28 ":wmserver_mock_screen_manager_service_test", 29 ":wmserver_mock_session_manager_service_test", 30 ":wmserver_remote_animation_test", 31 ":wmserver_starting_window_test", 32 ":wmserver_window_controller_test", 33 ":wmserver_window_display_zoom_controller_test", 34 ":wmserver_window_dumper_test", 35 ":wmserver_window_freeze_controller_test", 36 ":wmserver_window_group_mgr_test", 37 ":wmserver_window_inner_manager_test", 38 ":wmserver_window_inner_window_test", 39 ":wmserver_window_layout_policy_test", 40 ":wmserver_window_manager_config_test", 41 ":wmserver_window_manager_proxy_test", 42 ":wmserver_window_manager_service_test", 43 ":wmserver_window_manager_service_utils_test", 44 ":wmserver_window_manager_stub_test", 45 ":wmserver_window_node_container_test", 46 ":wmserver_window_node_test", 47 ":wmserver_window_pair_test", 48 ":wmserver_window_root_test", 49 ":wmserver_window_snapshot_test", 50 ":wmserver_window_system_effect_test", 51 ":wmserver_window_zorder_policy_test", 52 ] 53} 54 55test_external_deps = [ 56 "ability_base:want", 57 "ability_runtime:ability_context_native", 58 "ability_runtime:ability_manager", 59 "ace_engine:ace_uicontent", 60 "bundle_framework:appexecfwk_base", 61 "c_utils:utils", 62 "common_event_service:cesfwk_innerkits", 63 "config_policy:configpolicy_util", 64 "display_manager:displaymgr", 65 "eventhandler:libeventhandler", 66 "graphic_2d:window_animation", 67 "hicollie:libhicollie", 68 "hilog:libhilog", 69 "hisysevent:libhisysevent", 70 "hitrace:hitrace_meter", 71 "input:libmmi-client", 72 "ipc:ipc_single", 73 "napi:ace_napi", 74 "power_manager:powermgr_client", 75 "safwk:system_ability_fwk", 76] 77 78test_public_deps = [ 79 "//third_party/googletest:gmock", 80 "//third_party/googletest:gtest_main", 81] 82 83test_inner_deps = [ 84 "${window_base_path}/dm:libdm", 85 "${window_base_path}/utils:libwmutil", 86 "${window_base_path}/wm:libwm", 87 "${window_base_path}/wmserver:sms", 88 "../..:libwms", 89 "../../../dmserver:libdms", 90 "../../../test/common/utils:libtestutil", 91 "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client", 92] 93 94config("wmserver_unittest_common_public_config") { 95 include_dirs = [ 96 "../../../test/common/mock", 97 "../../../test/common/utils/include", 98 "../../../wm/include", 99 "../../include", 100 "../../include/zidl", 101 "../../include/window_snapshot", 102 "../../../interfaces/innerkits/wm", 103 "../../../utils/include", 104 "//third_party/googletest/googlemock/include", 105 "foundation/graphic/graphic_2d/rosen/modules/2d_graphics/include/", 106 ] 107} 108 109test_public_config = [ 110 ":wmserver_unittest_common_public_config", 111 "../../../resources/config/build:coverage_flags", 112 "../../../resources/config/build:testcase_flags", 113] 114 115ohos_unittest("wmserver_window_manager_service_test") { 116 module_out_path = module_out_path 117 118 sources = [ "window_manager_service_test.cpp" ] 119 configs = test_public_config 120 121 deps = test_inner_deps 122 public_deps = test_public_deps 123 external_deps = test_external_deps 124} 125 126ohos_unittest("wmserver_input_window_monitor_test") { 127 module_out_path = module_out_path 128 configs = test_public_config 129 sources = [ "input_window_monitor_test.cpp" ] 130 131 deps = test_inner_deps 132 public_deps = test_public_deps 133 external_deps = test_external_deps 134} 135 136ohos_unittest("wmserver_avoid_area_controller_test") { 137 module_out_path = module_out_path 138 configs = test_public_config 139 sources = [ "avoid_area_controller_test.cpp" ] 140 141 deps = test_inner_deps 142 public_deps = test_public_deps 143 external_deps = test_external_deps 144} 145 146ohos_unittest("wmserver_window_controller_test") { 147 module_out_path = module_out_path 148 configs = test_public_config 149 sources = [ "window_controller_test.cpp" ] 150 151 deps = test_inner_deps 152 public_deps = test_public_deps 153 external_deps = test_external_deps 154} 155 156ohos_unittest("wmserver_minimize_app_test") { 157 module_out_path = module_out_path 158 configs = test_public_config 159 sources = [ "minimize_app_test.cpp" ] 160 161 deps = test_inner_deps 162 public_deps = test_public_deps 163 external_deps = test_external_deps 164} 165 166ohos_unittest("wmserver_window_layout_policy_test") { 167 module_out_path = module_out_path 168 configs = test_public_config 169 sources = [ "window_layout_policy_test.cpp" ] 170 171 deps = test_inner_deps 172 public_deps = test_public_deps 173 external_deps = test_external_deps 174} 175 176ohos_unittest("wmserver_window_manager_config_test") { 177 module_out_path = module_out_path 178 configs = test_public_config 179 sources = [ "window_manager_config_test.cpp" ] 180 deps = test_inner_deps 181 public_deps = test_public_deps 182 external_deps = test_external_deps 183 184 deps += [ "//third_party/libxml2:libxml2" ] 185} 186 187ohos_unittest("wmserver_window_snapshot_test") { 188 module_out_path = module_out_path 189 configs = test_public_config 190 sources = [ "window_snapshot_test.cpp" ] 191 192 deps = test_inner_deps 193 public_deps = test_public_deps 194 external_deps = test_external_deps 195 196 external_deps += [ "image_framework:image_native" ] 197} 198 199ohos_unittest("wmserver_window_zorder_policy_test") { 200 module_out_path = module_out_path 201 configs = test_public_config 202 sources = [ "window_zorder_policy_test.cpp" ] 203 204 deps = test_inner_deps 205 public_deps = test_public_deps 206 external_deps = test_external_deps 207} 208 209ohos_unittest("wmserver_window_node_container_test") { 210 module_out_path = module_out_path 211 configs = test_public_config 212 sources = [ "window_node_container_test.cpp" ] 213 214 deps = test_inner_deps 215 public_deps = test_public_deps 216 external_deps = test_external_deps 217} 218 219ohos_unittest("wmserver_window_node_test") { 220 module_out_path = module_out_path 221 configs = test_public_config 222 sources = [ "window_node_test.cpp" ] 223 224 deps = test_inner_deps 225 public_deps = test_public_deps 226 external_deps = test_external_deps 227} 228 229ohos_unittest("wmserver_window_pair_test") { 230 module_out_path = module_out_path 231 configs = test_public_config 232 233 sources = [ "window_pair_test.cpp" ] 234 235 deps = test_inner_deps 236 public_deps = test_public_deps 237 external_deps = test_external_deps 238} 239 240ohos_unittest("wmserver_window_manager_stub_test") { 241 module_out_path = module_out_path 242 configs = test_public_config 243 sources = [ "window_manager_stub_test.cpp" ] 244 245 deps = test_inner_deps 246 public_deps = test_public_deps 247 external_deps = test_external_deps 248} 249 250ohos_unittest("wmserver_starting_window_test") { 251 module_out_path = module_out_path 252 configs = test_public_config 253 sources = [ "starting_window_test.cpp" ] 254 255 deps = test_inner_deps 256 public_deps = test_public_deps 257 external_deps = test_external_deps 258} 259 260ohos_unittest("wmserver_window_manager_proxy_test") { 261 module_out_path = module_out_path 262 configs = test_public_config 263 sources = [ "window_manager_proxy_test.cpp" ] 264 265 deps = test_inner_deps 266 public_deps = test_public_deps 267 external_deps = test_external_deps 268} 269 270ohos_unittest("wmserver_window_dumper_test") { 271 module_out_path = module_out_path 272 configs = test_public_config 273 sources = [ "window_dumper_test.cpp" ] 274 275 deps = test_inner_deps 276 public_deps = test_public_deps 277 external_deps = test_external_deps 278} 279 280ohos_unittest("wmserver_display_group_controller_test") { 281 module_out_path = module_out_path 282 configs = test_public_config 283 sources = [ "display_group_controller_test.cpp" ] 284 285 deps = test_inner_deps 286 public_deps = test_public_deps 287 external_deps = test_external_deps 288} 289 290ohos_unittest("wmserver_window_display_zoom_controller_test") { 291 module_out_path = module_out_path 292 configs = test_public_config 293 sources = [ "window_display_zoom_controller_test.cpp" ] 294 295 deps = test_inner_deps 296 public_deps = test_public_deps 297 external_deps = test_external_deps 298} 299 300ohos_unittest("wmserver_display_group_info_test") { 301 module_out_path = module_out_path 302 configs = test_public_config 303 sources = [ "display_group_info_test.cpp" ] 304 305 deps = test_inner_deps 306 public_deps = test_public_deps 307 external_deps = test_external_deps 308} 309 310ohos_unittest("wmserver_accessibility_connection_test") { 311 module_out_path = module_out_path 312 configs = test_public_config 313 sources = [ "accessibility_connection_test.cpp" ] 314 315 deps = test_inner_deps 316 public_deps = test_public_deps 317 external_deps = test_external_deps 318} 319 320ohos_unittest("wmserver_window_freeze_controller_test") { 321 module_out_path = module_out_path 322 configs = test_public_config 323 sources = [ "window_freeze_controller_test.cpp" ] 324 325 deps = test_inner_deps 326 public_deps = test_public_deps 327 external_deps = test_external_deps 328} 329 330ohos_unittest("wmserver_window_inner_window_test") { 331 module_out_path = module_out_path 332 configs = test_public_config 333 sources = [ "window_inner_window_test.cpp" ] 334 335 deps = test_inner_deps 336 public_deps = test_public_deps 337 external_deps = test_external_deps 338} 339 340ohos_unittest("wmserver_remote_animation_test") { 341 module_out_path = module_out_path 342 configs = test_public_config 343 sources = [ "remote_animation_test.cpp" ] 344 345 deps = test_inner_deps 346 public_deps = test_public_deps 347 external_deps = test_external_deps 348} 349 350ohos_unittest("wmserver_drag_controller_test") { 351 module_out_path = module_out_path 352 configs = test_public_config 353 sources = [ "drag_controller_test.cpp" ] 354 355 deps = test_inner_deps 356 public_deps = test_public_deps 357 external_deps = test_external_deps 358} 359 360ohos_unittest("wmserver_window_inner_manager_test") { 361 module_out_path = module_out_path 362 configs = test_public_config 363 sources = [ "window_inner_manager_test.cpp" ] 364 365 deps = test_inner_deps 366 public_deps = test_public_deps 367 external_deps = test_external_deps 368} 369 370ohos_unittest("wmserver_window_root_test") { 371 module_out_path = module_out_path 372 configs = test_public_config 373 sources = [ "window_root_test.cpp" ] 374 375 deps = test_inner_deps 376 public_deps = test_public_deps 377 external_deps = test_external_deps 378} 379 380ohos_unittest("wmserver_window_system_effect_test") { 381 module_out_path = module_out_path 382 configs = test_public_config 383 sources = [ "window_system_effect_test.cpp" ] 384 385 deps = test_inner_deps 386 public_deps = test_public_deps 387 external_deps = test_external_deps 388} 389 390ohos_unittest("wmserver_window_manager_service_utils_test") { 391 module_out_path = module_out_path 392 configs = test_public_config 393 sources = [ "window_manager_service_utils_test.cpp" ] 394 395 deps = test_inner_deps 396 public_deps = test_public_deps 397 external_deps = test_external_deps 398 if (is_standard_system) { 399 external_deps += [ "init:libbegetutil" ] 400 } else { 401 external_deps += [ "init_lite:libbegetutil" ] 402 } 403} 404 405ohos_unittest("wmserver_window_group_mgr_test") { 406 module_out_path = module_out_path 407 configs = test_public_config 408 sources = [ "window_group_mgr_test.cpp" ] 409 410 deps = test_inner_deps 411 public_deps = test_public_deps 412 external_deps = test_external_deps 413} 414 415ohos_unittest("wmserver_mock_screen_manager_service_test") { 416 module_out_path = module_out_path 417 configs = test_public_config 418 sources = [ "mock_screen_manager_service_test.cpp" ] 419 420 deps = test_inner_deps 421 public_deps = test_public_deps 422 external_deps = test_external_deps 423} 424 425ohos_unittest("wmserver_mock_session_manager_service_test") { 426 module_out_path = module_out_path 427 configs = test_public_config 428 sources = [ "mock_session_manager_service_test.cpp" ] 429 430 deps = test_inner_deps 431 public_deps = test_public_deps 432 external_deps = test_external_deps 433} 434