1# Copyright (c) 2021-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") 16 17module_out_path = "window_manager/wms" 18 19group("systemtest") { 20 testonly = true 21 22 deps = [ 23 ":wms_window_animation_transition_test", 24 ":wms_window_app_floating_window_test", 25 ":wms_window_dialogwindow_test", 26 ":wms_window_display_zoom_test", 27 ":wms_window_drag_test", 28 ":wms_window_effect_test", 29 ":wms_window_focus_test", 30 ":wms_window_gamut_test", 31 ":wms_window_gesture_navigation_enabled_test", 32 ":wms_window_immersive_test", 33 ":wms_window_input_method_test", 34 ":wms_window_input_test", 35 ":wms_window_layout_test", 36 ":wms_window_mode_support_info_test", 37 ":wms_window_multi_ability_test", 38 ":wms_window_nointeraction_listener_test", 39 ":wms_window_occupied_area_change_test", 40 ":wms_window_raisetoapptop_test", 41 ":wms_window_rotation_test", 42 ":wms_window_split_immersive_test", 43 ":wms_window_split_test", 44 ":wms_window_subwindow_test", 45 ":wms_window_system_toast_window_test", 46 ":wms_window_systemsubwindow_test", 47 ":wms_window_touch_outside_test", 48 ":wms_window_visibility_info_test", 49 ":wms_window_water_mark_test", 50 ] 51 if (!window_manager_use_sceneboard) { 52 deps += [ ":wms_window_move_drag_test" ] 53 } 54} 55 56ohos_systemtest("wms_window_layout_test") { 57 module_out_path = module_out_path 58 59 sources = [ "window_layout_test.cpp" ] 60 61 deps = [ ":wms_systemtest_common" ] 62 63 external_deps = [ 64 "c_utils:utils", 65 "hilog:libhilog", 66 "power_manager:powermgr_client", 67 ] 68} 69 70ohos_systemtest("wms_window_effect_test") { 71 module_out_path = module_out_path 72 73 sources = [ "window_effect_test.cpp" ] 74 75 deps = [ ":wms_systemtest_common" ] 76 77 external_deps = [ 78 "c_utils:utils", 79 "hilog:libhilog", 80 "power_manager:powermgr_client", 81 ] 82} 83 84ohos_systemtest("wms_window_multi_ability_test") { 85 module_out_path = module_out_path 86 87 sources = [ "window_multi_ability_test.cpp" ] 88 89 deps = [ ":wms_systemtest_common" ] 90 91 external_deps = [ 92 "c_utils:utils", 93 "hilog:libhilog", 94 "power_manager:powermgr_client", 95 ] 96} 97 98ohos_systemtest("wms_window_subwindow_test") { 99 module_out_path = module_out_path 100 101 sources = [ "window_subwindow_test.cpp" ] 102 103 deps = [ ":wms_systemtest_common" ] 104 105 external_deps = [ 106 "bundle_framework:appexecfwk_base", 107 "c_utils:utils", 108 "hilog:libhilog", 109 ] 110} 111 112ohos_systemtest("wms_window_systemsubwindow_test") { 113 module_out_path = module_out_path 114 115 sources = [ "window_systemsubwindow_test.cpp" ] 116 117 deps = [ ":wms_systemtest_common" ] 118 119 external_deps = [ 120 "bundle_framework:appexecfwk_base", 121 "c_utils:utils", 122 "hilog:libhilog", 123 "power_manager:powermgr_client", 124 ] 125} 126 127ohos_systemtest("wms_window_dialogwindow_test") { 128 module_out_path = module_out_path 129 130 sources = [ "window_dialogwindow_test.cpp" ] 131 132 deps = [ ":wms_systemtest_common" ] 133 134 external_deps = [ 135 "bundle_framework:appexecfwk_base", 136 "c_utils:utils", 137 "common_event_service:cesfwk_innerkits", 138 "hilog:libhilog", 139 ] 140} 141 142ohos_systemtest("wms_window_immersive_test") { 143 module_out_path = module_out_path 144 145 sources = [ "window_immersive_test.cpp" ] 146 147 deps = [ ":wms_systemtest_common" ] 148 149 external_deps = [ 150 "c_utils:utils", 151 "hilog:libhilog", 152 "power_manager:powermgr_client", 153 ] 154} 155 156ohos_systemtest("wms_window_focus_test") { 157 module_out_path = module_out_path 158 159 sources = [ "window_focus_test.cpp" ] 160 161 deps = [ ":wms_systemtest_common" ] 162 163 external_deps = [ 164 "c_utils:utils", 165 "hilog:libhilog", 166 "power_manager:powermgr_client", 167 ] 168} 169 170ohos_systemtest("wms_window_split_immersive_test") { 171 module_out_path = module_out_path 172 173 sources = [ "window_split_immersive_test.cpp" ] 174 175 deps = [ ":wms_systemtest_common" ] 176 177 external_deps = [ 178 "c_utils:utils", 179 "hilog:libhilog", 180 "power_manager:powermgr_client", 181 ] 182} 183 184ohos_systemtest("wms_window_split_test") { 185 module_out_path = module_out_path 186 187 sources = [ "window_split_test.cpp" ] 188 189 deps = [ ":wms_systemtest_common" ] 190 191 external_deps = [ 192 "c_utils:utils", 193 "hilog:libhilog", 194 "power_manager:powermgr_client", 195 ] 196} 197 198ohos_systemtest("wms_window_move_drag_test") { 199 module_out_path = module_out_path 200 201 sources = [ "window_move_drag_test.cpp" ] 202 203 deps = [ ":wms_systemtest_common" ] 204 205 external_deps = [ 206 "bundle_framework:appexecfwk_base", 207 "c_utils:utils", 208 "hilog:libhilog", 209 "power_manager:powermgr_client", 210 ] 211} 212 213ohos_systemtest("wms_window_input_method_test") { 214 module_out_path = module_out_path 215 216 sources = [ "window_input_method_test.cpp" ] 217 218 deps = [ ":wms_systemtest_common" ] 219 220 external_deps = [ 221 "c_utils:utils", 222 "hilog:libhilog", 223 "power_manager:powermgr_client", 224 ] 225} 226 227ohos_systemtest("wms_window_gamut_test") { 228 module_out_path = module_out_path 229 230 sources = [ "window_gamut_test.cpp" ] 231 232 deps = [ ":wms_systemtest_common" ] 233 234 external_deps = [ 235 "c_utils:utils", 236 "hilog:libhilog", 237 "power_manager:powermgr_client", 238 ] 239} 240 241ohos_systemtest("wms_window_gesture_navigation_enabled_test") { 242 module_out_path = module_out_path 243 244 sources = [ "window_gesture_navigation_enabled_test.cpp" ] 245 246 deps = [ ":wms_systemtest_common" ] 247 248 external_deps = [ 249 "c_utils:utils", 250 "hilog:libhilog", 251 ] 252} 253 254ohos_systemtest("wms_window_input_test") { 255 module_out_path = module_out_path 256 257 sources = [ "window_input_test.cpp" ] 258 259 deps = [ ":wms_systemtest_common" ] 260 261 external_deps = [ 262 "c_utils:utils", 263 "hilog:libhilog", 264 "power_manager:powermgr_client", 265 ] 266} 267 268ohos_systemtest("wms_window_visibility_info_test") { 269 module_out_path = module_out_path 270 271 sources = [ "window_visibility_info_test.cpp" ] 272 273 deps = [ ":wms_systemtest_common" ] 274 275 external_deps = [ 276 "c_utils:utils", 277 "hilog:libhilog", 278 "power_manager:powermgr_client", 279 ] 280} 281 282ohos_systemtest("wms_window_display_zoom_test") { 283 module_out_path = module_out_path 284 285 sources = [ "window_display_zoom_test.cpp" ] 286 287 deps = [ ":wms_systemtest_common" ] 288 289 external_deps = [ 290 "c_utils:utils", 291 "hilog:libhilog", 292 "power_manager:powermgr_client", 293 ] 294} 295 296ohos_systemtest("wms_window_drag_test") { 297 module_out_path = module_out_path 298 299 sources = [ "window_drag_test.cpp" ] 300 301 deps = [ ":wms_systemtest_common" ] 302 303 external_deps = [ 304 "c_utils:utils", 305 "hilog:libhilog", 306 "power_manager:powermgr_client", 307 ] 308} 309 310ohos_systemtest("wms_window_raisetoapptop_test") { 311 module_out_path = module_out_path 312 313 sources = [ "window_raisetoapptop_test.cpp" ] 314 315 deps = [ ":wms_systemtest_common" ] 316 317 external_deps = [ 318 "c_utils:utils", 319 "hilog:libhilog", 320 "power_manager:powermgr_client", 321 ] 322} 323 324ohos_systemtest("wms_window_rotation_test") { 325 module_out_path = module_out_path 326 327 sources = [ "window_rotation_test.cpp" ] 328 329 deps = [ ":wms_systemtest_common" ] 330 331 external_deps = [ 332 "c_utils:utils", 333 "hilog:libhilog", 334 "power_manager:powermgr_client", 335 ] 336} 337 338ohos_systemtest("wms_window_occupied_area_change_test") { 339 module_out_path = module_out_path 340 341 sources = [ "window_occupied_area_change_test.cpp" ] 342 343 deps = [ ":wms_systemtest_common" ] 344 345 external_deps = [ 346 "c_utils:utils", 347 "hilog:libhilog", 348 "power_manager:powermgr_client", 349 ] 350} 351 352ohos_systemtest("wms_window_touch_outside_test") { 353 module_out_path = module_out_path 354 355 sources = [ "window_touch_outside_test.cpp" ] 356 357 deps = [ ":wms_systemtest_common" ] 358 359 external_deps = [ 360 "c_utils:utils", 361 "hilog:libhilog", 362 "power_manager:powermgr_client", 363 ] 364} 365 366ohos_systemtest("wms_window_mode_support_info_test") { 367 module_out_path = module_out_path 368 369 sources = [ "window_mode_support_info_test.cpp" ] 370 371 deps = [ ":wms_systemtest_common" ] 372 373 external_deps = [ 374 "c_utils:utils", 375 "hilog:libhilog", 376 "power_manager:powermgr_client", 377 ] 378} 379 380ohos_systemtest("wms_window_app_floating_window_test") { 381 module_out_path = module_out_path 382 383 sources = [ "window_app_floating_window_test.cpp" ] 384 385 deps = [ ":wms_systemtest_common" ] 386 387 external_deps = [ 388 "c_utils:utils", 389 "common_event_service:cesfwk_innerkits", 390 "hilog:libhilog", 391 "power_manager:powermgr_client", 392 ] 393} 394 395ohos_systemtest("wms_window_system_toast_window_test") { 396 module_out_path = module_out_path 397 398 sources = [ "window_system_toast_test.cpp" ] 399 400 deps = [ ":wms_systemtest_common" ] 401 402 external_deps = [ 403 "c_utils:utils", 404 "common_event_service:cesfwk_innerkits", 405 "hilog:libhilog", 406 "power_manager:powermgr_client", 407 ] 408} 409 410ohos_systemtest("wms_window_animation_transition_test") { 411 module_out_path = module_out_path 412 413 sources = [ "window_animation_transition_test.cpp" ] 414 415 deps = [ ":wms_systemtest_common" ] 416 417 external_deps = [ 418 "c_utils:utils", 419 "hilog:libhilog", 420 "power_manager:powermgr_client", 421 ] 422} 423 424ohos_systemtest("wms_window_water_mark_test") { 425 module_out_path = module_out_path 426 427 sources = [ "window_water_mark_test.cpp" ] 428 429 deps = [ ":wms_systemtest_common" ] 430 431 external_deps = [ 432 "c_utils:utils", 433 "hilog:libhilog", 434 "power_manager:powermgr_client", 435 ] 436} 437 438ohos_systemtest("wms_window_nointeraction_listener_test") { 439 module_out_path = module_out_path 440 441 sources = [ "window_nointeraction_listener_test.cpp" ] 442 443 deps = [ ":wms_systemtest_common" ] 444 445 external_deps = [ 446 "c_utils:utils", 447 "hilog:libhilog", 448 "power_manager:powermgr_client", 449 ] 450} 451 452## Build wms_systemtest_common.a {{{ 453config("wms_systemtest_common_public_config") { 454 include_dirs = [ 455 "${window_base_path}/dm/include", 456 "${window_base_path}/dmserver/include", 457 "${window_base_path}/wm/include", 458 "${window_base_path}/wmserver/include", 459 "${window_base_path}/interfaces/innerkits/wm", 460 "${window_base_path}/utils/include", 461 "//commonlibrary/c_utils/base/include", 462 "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", 463 "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", 464 "//third_party/googletest/googlemock/include", 465 "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics/include", 466 467 # for abilityContext 468 "${ability_runtime_path}/interfaces/kits/native/ability/ability_runtime", 469 "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context", 470 "//base/global/resource_management/interfaces/inner_api/include", 471 "//third_party/node/deps/icu-small/source/common", 472 "${ability_runtime_inner_api_path}/ability_manager/include", 473 474 # abilityContext end 475 ] 476} 477 478ohos_static_library("wms_systemtest_common") { 479 visibility = [ ":*" ] 480 testonly = true 481 482 sources = [ "window_test_utils.cpp" ] 483 484 public_configs = [ 485 ":wms_systemtest_common_public_config", 486 "${window_base_path}/resources/config/build:coverage_flags", 487 "${window_base_path}/resources/config/build:testcase_flags", 488 ] 489 490 public_deps = [ 491 "//foundation/arkui/ace_engine/interfaces/inner_api/ace:ace_uicontent", 492 493 # need delete it for abilitycontext 494 "${ability_runtime_inner_api_path}/ability_manager:ability_manager", 495 "${window_base_path}/dm:libdm", 496 "${window_base_path}/dmserver:libdms", 497 "${window_base_path}/utils:libwmutil", 498 "${window_base_path}/utils:libwmutil_base", 499 "${window_base_path}/window_scene/interfaces/innerkits:libwsutils", 500 "${window_base_path}/wm:libwm", 501 "//commonlibrary/c_utils/base:utils", 502 "//foundation/arkui/napi:ace_napi", 503 "//foundation/graphic/graphic_2d/rosen/modules/animation/window_animation:window_animation", 504 "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client", 505 "//foundation/multimodalinput/input/frameworks/proxy:libmmi-client", 506 "//third_party/googletest:gmock", 507 "//third_party/googletest:gtest_main", 508 ] 509 external_deps = [ 510 "ability_base:base", 511 "ability_base:want", 512 "ability_base:zuri", 513 "ability_runtime:ability_context_native", 514 "bundle_framework:appexecfwk_base", 515 "c_utils:utils", 516 "hilog:libhilog", 517 "ipc:ipc_single", 518 "power_manager:powermgr_client", 519 ] 520 521 part_name = "window_manager" 522 subsystem_name = "window" 523} 524## Build wms_systemtest_common.a }}} 525