1# Copyright (c) 2023-2025 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/window_manager/window_scene" 17 18group("unittest") { 19 testonly = true 20 21 deps = [ 22 ":ws_ability_info_manager_test", 23 ":ws_anomaly_detection_test", 24 ":ws_compatible_mode_property_test", 25 ":ws_dfx_hisysevent_test", 26 ":ws_distributed_client_test", 27 ":ws_ffrt_helper_test", 28 ":ws_main_session_lifecycle_test", 29 ":ws_move_drag_controller_test", 30 ":ws_multi_instance_manager_test", 31 ":ws_root_scene_session_test", 32 ":ws_scb_system_session_test", 33 ":ws_scene_board_judgement_test", 34 ":ws_scene_persistence_test", 35 ":ws_scene_persistent_storage_test", 36 ":ws_scene_screen_change_listener_test", 37 ":ws_scene_session_converter_test", 38 ":ws_scene_session_manager_lifecycle_test2", 39 ":ws_scene_session_manager_lite_test", 40 ":ws_scene_session_manager_proxy_lifecycle_test", 41 ":ws_scene_session_manager_stub_lifecycle_test", 42 ":ws_scene_session_manager_stub_test", 43 ":ws_scene_session_manager_supplement_test", 44 ":ws_scene_system_ability_listener_test", 45 ":ws_session_change_recorder_test", 46 ":ws_session_coordinate_helper_test", 47 ":ws_session_helper_test", 48 ":ws_session_manager_agent_controller_test", 49 ":ws_session_manager_service_recover_proxy_test", 50 ":ws_session_permission_test", 51 ":ws_session_proxy_immersive_test", 52 ":ws_session_proxy_lifecycle_test", 53 ":ws_session_proxy_mock_test", 54 ":ws_session_specific_window_test", 55 ":ws_session_stage_proxy_lifecycle_test", 56 ":ws_session_stage_proxy_test", 57 ":ws_session_stage_stub_lifecycle_test", 58 ":ws_session_stage_stub_test", 59 ":ws_session_stub_mock_test", 60 ":ws_session_stub_property_test", 61 ":ws_ssmgr_specific_window_test", 62 ":ws_sub_session_lifecycle_test", 63 ":ws_system_session_lifecycle_test", 64 ":ws_task_scheduler_test", 65 ":ws_window_event_channel_proxy_mock_test", 66 ":ws_window_event_channel_proxy_test", 67 ":ws_window_event_channel_stub_mock_test", 68 ":ws_window_event_channel_stub_test", 69 ":ws_window_event_channel_test", 70 ":ws_window_manager_lru_test", 71 ":ws_window_manager_service_dump_test", 72 ":ws_window_scene_config_test", 73 "animation:ws_scene_session_animation_test", 74 "animation:ws_session_proxy_animation_test", 75 "animation:ws_window_session_property_animation_test", 76 "animation:ws_ui_effect_controller_test", 77 "animation:ws_ui_effect_controller_proxy_test", 78 "animation:ws_ui_effect_controller_stub_test", 79 "event_distribution:ws_intention_event_manager_test", 80 "event_distribution:ws_scene_input_manager_test", 81 "event_distribution:ws_scene_session_dirty_manager_test2", 82 "rotation:ws_scene_session_manager_rotation_test", 83 "rotation:ws_scene_session_rotation_test", 84 "rotation:ws_session_stage_proxy_rotation_test", 85 "rotation:ws_session_stage_stub_rotation_test", 86 "rotation:ws_window_session_property_rotation_test", 87 "ui_extension:unittest", 88 "window_focus:unittest", 89 "window_pattern:window_pattern_starting_window_rdb_test", 90 "window_recover:ws_window_recover_session_test", 91 ] 92 93 if (window_manager_use_sceneboard) { 94 deps += [ 95 ":ws_hidumper_controller_test", 96 ":ws_keyboard_session_test", 97 ":ws_mock_session_manager_service_test", 98 ":ws_main_session_test", 99 ":ws_pc_fold_screen_controller_test", 100 ":ws_scene_session_lifecycle_test", 101 ":ws_scene_session_manager_kiosk_test", 102 ":ws_scene_session_manager_lifecycle_test", 103 ":ws_scene_session_manager_lite_stub_test", 104 ":ws_scene_session_manager_one_test", 105 ":ws_scene_session_manager_proxy_test", 106 ":ws_scene_session_manager_stub_test2", 107 ":ws_scene_session_manager_test", 108 ":ws_scene_session_manager_two_test", 109 ":ws_scene_session_test", 110 ":ws_session_lifecycle_test", 111 ":ws_session_listener_controller_test", 112 ":ws_session_manager_lite_test", 113 ":ws_session_manager_test", 114 ":ws_session_proxy_property_test", 115 ":ws_session_proxy_test", 116 ":ws_session_stub_immersive_test", 117 ":ws_session_stub_lifecycle_test", 118 ":ws_session_stub_test", 119 ":ws_session_test", 120 ":ws_sub_session_test", 121 ":ws_system_session_test", 122 ":ws_window_session_property_test", 123 "event_distribution:ws_scene_session_dirty_manager_test", 124 "layout:ws_layout_test", 125 "multi_user:unittest", 126 "window_pattern:window_pattern_snapshot_test", 127 "window_pattern:window_pattern_starting_window_test", 128 ] 129 } else { 130 deps += [ 131 ":ws_session_manager_lite_ut_test", 132 ":ws_session_manager_ut_test", 133 ] 134 } 135} 136 137test_external_deps = [ 138 "ability_base:configuration", 139 "ability_runtime:ability_manager", 140 "ability_runtime:app_manager", 141 "ability_runtime:session_handler", 142 "access_token:libaccesstoken_sdk", 143 "accessibility:accessibility_common", 144 "accessibility:accessibility_interface", 145 "bundle_framework:libappexecfwk_common", 146 "c_utils:utils", 147 "ffrt:libffrt", 148 "googletest:gmock", 149 "googletest:gtest", 150 "googletest:gtest_main", 151 "graphic_2d:librender_service_base", 152 "graphic_2d:librender_service_client", 153 "graphic_2d:window_animation", 154 "hilog:libhilog", 155 "image_framework:image_native", 156 "input:libmmi-client", 157 "input:libmmi-napi", 158 "ipc:ipc_single", 159 "libxml2:libxml2", 160 "napi:ace_napi", 161 "safwk:system_ability_fwk", 162] 163 164ohos_unittest("ws_ability_info_manager_test") { 165 module_out_path = module_out_path 166 167 sources = [ "ability_info_manager_test.cpp" ] 168 169 deps = [ ":ws_unittest_common" ] 170 171 external_deps = [ 172 "ability_base:configuration", 173 "ability_base:session_info", 174 "ability_runtime:ability_context_native", 175 "bundle_framework:appexecfwk_base", 176 "bundle_framework:appexecfwk_core", 177 "bundle_framework:libappexecfwk_common", 178 "hilog:libhilog", 179 ] 180} 181 182ohos_unittest("ws_anomaly_detection_test") { 183 module_out_path = module_out_path 184 185 sources = [ "anomaly_detection_test.cpp" ] 186 187 deps = [ ":ws_unittest_common" ] 188 189 external_deps = test_external_deps 190 external_deps += [ 191 "ability_base:session_info", 192 "ability_runtime:ability_context_native", 193 "ability_runtime:mission_info", 194 ] 195} 196 197ohos_unittest("ws_system_session_test") { 198 module_out_path = module_out_path 199 200 sources = [ 201 "${window_base_path}/window_scene/test/mock/mock_accesstoken_kit.cpp", 202 "system_session_test.cpp" 203 ] 204 205 deps = [ ":ws_unittest_common" ] 206 207 external_deps = test_external_deps 208} 209 210ohos_unittest("ws_session_helper_test") { 211 module_out_path = module_out_path 212 213 sources = [ "session_helper_test.cpp" ] 214 215 deps = [ ":ws_unittest_common" ] 216 217 external_deps = test_external_deps 218} 219 220ohos_unittest("ws_system_session_lifecycle_test") { 221 module_out_path = module_out_path 222 223 sources = [ "system_session_lifecycle_test.cpp" ] 224 225 deps = [ ":ws_unittest_common" ] 226 227 external_deps = test_external_deps 228} 229 230ohos_unittest("ws_main_session_test") { 231 module_out_path = module_out_path 232 233 sources = [ "main_session_test.cpp" ] 234 235 deps = [ ":ws_unittest_common" ] 236 237 external_deps = test_external_deps 238} 239 240ohos_unittest("ws_main_session_lifecycle_test") { 241 module_out_path = module_out_path 242 243 sources = [ "main_session_lifecycle_test.cpp" ] 244 245 deps = [ ":ws_unittest_common" ] 246 247 external_deps = test_external_deps 248} 249 250ohos_unittest("ws_scb_system_session_test") { 251 module_out_path = module_out_path 252 253 sources = [ "scb_system_session_test.cpp" ] 254 255 deps = [ ":ws_unittest_common" ] 256 257 external_deps = test_external_deps 258} 259 260ohos_unittest("ws_sub_session_test") { 261 module_out_path = module_out_path 262 263 include_dirs = [ "${window_base_path}/window_scene/test/mock" ] 264 265 defines = [ "ENABLE_MOCK_WRITE_STRING" ] 266 267 sources = [ "sub_session_test.cpp" ] 268 269 deps = [ ":ws_unittest_common" ] 270 271 external_deps = test_external_deps 272} 273 274ohos_unittest("ws_sub_session_lifecycle_test") { 275 module_out_path = module_out_path 276 277 sources = [ "sub_session_lifecycle_test.cpp" ] 278 279 deps = [ ":ws_unittest_common" ] 280 281 external_deps = test_external_deps 282} 283 284ohos_unittest("ws_task_scheduler_test") { 285 module_out_path = module_out_path 286 287 sources = [ "task_scheduler_test.cpp" ] 288 289 deps = [ ":ws_unittest_common" ] 290 291 external_deps = test_external_deps 292 external_deps += [ "eventhandler:libeventhandler" ] 293} 294 295ohos_unittest("ws_session_permission_test") { 296 module_out_path = module_out_path 297 298 sources = [ "session_permission_test.cpp" ] 299 300 deps = [ ":ws_unittest_common" ] 301 302 external_deps = test_external_deps 303} 304 305ohos_unittest("ws_session_listener_controller_test") { 306 module_out_path = module_out_path 307 308 sources = [ "session_listener_controller_test.cpp" ] 309 310 deps = [ 311 ":ws_unittest_common", 312 "${window_base_path}/window_scene/interfaces/innerkits:libwsutils", 313 ] 314 315 external_deps = test_external_deps 316} 317 318ohos_unittest("ws_scene_persistent_storage_test") { 319 module_out_path = module_out_path 320 321 sources = [ "scene_persistent_storage_test.cpp" ] 322 323 include_dirs = [ "${window_base_path}/window_scene/session/host/include" ] 324 325 deps = [ ":ws_unittest_common" ] 326 327 external_deps = test_external_deps 328 external_deps += [ 329 "ability_base:session_info", 330 "ability_base:want", 331 "preferences:native_preferences", 332 ] 333} 334 335ohos_unittest("ws_ffrt_helper_test") { 336 module_out_path = module_out_path 337 338 sources = [ "ws_ffrt_helper_test.cpp" ] 339 include_dirs = [ "${window_base_path}/window_scene/session/host/include" ] 340 341 deps = [ ":ws_unittest_common" ] 342 343 external_deps = test_external_deps 344} 345 346ohos_unittest("ws_root_scene_session_test") { 347 module_out_path = module_out_path 348 349 sources = [ "root_scene_session_test.cpp" ] 350 351 include_dirs = [ "${window_base_path}/window_scene/session/host/include" ] 352 353 deps = [ ":ws_unittest_common" ] 354 355 external_deps = test_external_deps 356 external_deps += [ "ability_runtime:mission_info" ] 357} 358 359ohos_unittest("ws_scene_persistence_test") { 360 module_out_path = module_out_path 361 362 sources = [ "scene_persistence_test.cpp" ] 363 364 include_dirs = [ "${window_base_path}/window_scene/session/host/include" ] 365 366 deps = [ ":ws_unittest_common" ] 367 368 external_deps = test_external_deps 369} 370 371ohos_unittest("ws_session_test") { 372 module_out_path = module_out_path 373 374 sources = [ 375 "session_test.cpp", 376 "session_test2.cpp", 377 "session_test3.cpp", 378 "session_test4.cpp", 379 ] 380 381 cflags_cc = [ "-Wno-thread-safety" ] 382 383 deps = [ ":ws_unittest_common" ] 384 385 external_deps = test_external_deps 386 external_deps += [ 387 "ability_base:session_info", 388 "ability_base:want", 389 "ability_runtime:app_manager", 390 "ability_runtime:process_options", 391 "accessibility:accessibility_common", 392 "eventhandler:libeventhandler", 393 ] 394 395 cflags = [] 396 defines = [] 397 if (window_manager_feature_asbng_path_enable) { 398 defines += [ "WINDOW_ATOMIC_SERVICE_ATTRIBUTION_ENABLE" ] 399 cflags += [ "-DACE_ENGINE_PLUGIN_PATH=\"${window_manager_feature_asbng_path}\"" ] 400 } 401} 402 403ohos_unittest("ws_session_lifecycle_test") { 404 module_out_path = module_out_path 405 406 sources = [ "session_lifecycle_test.cpp" ] 407 408 cflags_cc = [ "-Wno-thread-safety" ] 409 410 deps = [ ":ws_unittest_common" ] 411 412 external_deps = test_external_deps 413 external_deps += [ 414 "ability_base:session_info", 415 "ability_base:want", 416 "ability_runtime:app_manager", 417 "accessibility:accessibility_common", 418 "eventhandler:libeventhandler", 419 ] 420} 421 422ohos_unittest("ws_scene_board_judgement_test") { 423 module_out_path = module_out_path 424 425 include_dirs = 426 [ "${window_base_path}/window_scene/interfaces/innerkits/include" ] 427 428 sources = [ "scene_board_judgement_test.cpp" ] 429 430 deps = [ 431 ":ws_unittest_common", 432 "${window_base_path}/window_scene/interfaces/innerkits:libwsutils", 433 ] 434} 435 436ohos_unittest("ws_window_scene_config_test") { 437 module_out_path = module_out_path 438 439 sources = [ "window_scene_config_test.cpp" ] 440 441 deps = [ ":ws_unittest_common" ] 442 443 external_deps = test_external_deps 444} 445 446ohos_unittest("ws_scene_session_manager_lite_test") { 447 module_out_path = module_out_path 448 449 sources = [ "scene_session_manager_lite_test.cpp" ] 450 451 deps = [ ":ws_unittest_common" ] 452 453 external_deps = test_external_deps 454} 455 456ohos_unittest("ws_scene_session_manager_lifecycle_test") { 457 module_out_path = module_out_path 458 459 sources = [ "scene_session_manager_lifecycle_test.cpp" ] 460 461 cflags_cc = [ "-Wno-thread-safety" ] 462 463 deps = [ ":ws_unittest_common" ] 464 465 external_deps = test_external_deps 466 external_deps += [ 467 "ability_base:configuration", 468 "ability_base:session_info", 469 "ability_runtime:ability_context_native", 470 "ability_runtime:mission_info", 471 "bundle_framework:appexecfwk_base", 472 "bundle_framework:appexecfwk_core", 473 "eventhandler:libeventhandler", 474 "ffrt:libffrt", 475 ] 476} 477 478ohos_unittest("ws_scene_session_manager_lifecycle_test2") { 479 module_out_path = module_out_path 480 481 sources = [ "scene_session_manager_lifecycle_test2.cpp" ] 482 483 cflags_cc = [ "-Wno-thread-safety" ] 484 485 deps = [ ":ws_unittest_common" ] 486 487 external_deps = test_external_deps 488 external_deps += [ 489 "ability_base:configuration", 490 "ability_base:session_info", 491 "ability_runtime:ability_context_native", 492 "ability_runtime:mission_info", 493 "bundle_framework:appexecfwk_base", 494 "bundle_framework:appexecfwk_core", 495 "eventhandler:libeventhandler", 496 ] 497} 498 499ohos_unittest("ws_scene_session_manager_proxy_lifecycle_test") { 500 module_out_path = module_out_path 501 502 sources = [ "scene_session_manager_proxy_lifecycle_test.cpp" ] 503 504 deps = [ ":ws_unittest_common" ] 505 506 external_deps = test_external_deps 507 external_deps += [ 508 "ability_runtime:app_manager", 509 "ability_runtime:mission_info", 510 ] 511} 512 513ohos_unittest("ws_scene_session_manager_stub_lifecycle_test") { 514 module_out_path = module_out_path 515 516 sources = [ "scene_session_manager_stub_lifecycle_test.cpp" ] 517 518 deps = [ ":ws_unittest_common" ] 519 520 external_deps = test_external_deps 521} 522 523ohos_unittest("ws_session_stage_proxy_lifecycle_test") { 524 module_out_path = module_out_path 525 526 sources = [ 527 "../mock/mock_message_parcel.cpp", 528 "session_stage_proxy_lifecycle_test.cpp", 529 ] 530 531 include_dirs = [ "${window_base_path}/window_scene/test/mock" ] 532 deps = [ ":ws_unittest_common" ] 533 534 external_deps = test_external_deps 535 external_deps += [ "ability_base:base" ] 536} 537 538ohos_unittest("ws_session_stage_stub_lifecycle_test") { 539 module_out_path = module_out_path 540 541 sources = [ "session_stage_stub_lifecycle_test.cpp" ] 542 543 deps = [ ":ws_unittest_common" ] 544 545 external_deps = test_external_deps 546} 547 548ohos_unittest("ws_scene_session_manager_test") { 549 module_out_path = module_out_path 550 551 include_dirs = [ 552 "${window_base_path}/test/common/utils/include/", 553 "${window_base_path}/window_scene/test/mock", 554 ] 555 556 sources = [ 557 "${window_base_path}/window_scene/test/mock/mock_accesstoken_kit.cpp", 558 "scene_session_manager_test.cpp", 559 ] 560 561 cflags_cc = [ "-Wno-thread-safety" ] 562 563 deps = [ ":ws_unittest_common" ] 564 565 external_deps = test_external_deps 566 external_deps += [ 567 "ability_base:configuration", 568 "ability_base:session_info", 569 "ability_runtime:ability_context_native", 570 "ability_runtime:ability_manager", 571 "ability_runtime:app_context", 572 "ability_runtime:mission_info", 573 "bundle_framework:appexecfwk_base", 574 "bundle_framework:appexecfwk_core", 575 "eventhandler:libeventhandler", 576 "safwk:system_ability_fwk", 577 ] 578} 579 580ohos_unittest("ws_scene_session_manager_one_test") { 581 module_out_path = module_out_path 582 583 include_dirs = [ 584 "${window_base_path}/test/common/utils/include/", 585 "${window_base_path}/window_scene/test/mock", 586 ] 587 588 sources = [ 589 "${window_base_path}/window_scene/test/mock/mock_accesstoken_kit.cpp", 590 "scene_session_manager_test2.cpp", 591 "scene_session_manager_test3.cpp", 592 "scene_session_manager_test4.cpp", 593 "scene_session_manager_test5.cpp", 594 "scene_session_manager_test6.cpp", 595 "scene_session_manager_test7.cpp", 596 "scene_session_manager_test8.cpp", 597 "scene_session_manager_test9.cpp", 598 ] 599 600 cflags_cc = [ "-Wno-thread-safety" ] 601 602 deps = [ ":ws_unittest_common" ] 603 604 external_deps = test_external_deps 605 external_deps += [ 606 "ability_base:configuration", 607 "ability_base:session_info", 608 "ability_runtime:ability_context_native", 609 "ability_runtime:ability_manager", 610 "ability_runtime:app_context", 611 "ability_runtime:mission_info", 612 "ability_runtime:runtime", 613 "bundle_framework:appexecfwk_base", 614 "bundle_framework:appexecfwk_core", 615 "eventhandler:libeventhandler", 616 "safwk:system_ability_fwk", 617 ] 618} 619 620ohos_unittest("ws_scene_session_manager_two_test") { 621 module_out_path = module_out_path 622 623 include_dirs = [ 624 "${window_base_path}/test/common/utils/include/", 625 "${window_base_path}/window_scene/test/mock", 626 "${window_base_path}/window_scene/session/host/include/", 627 ] 628 629 sources = [ 630 "${window_base_path}/window_scene/test/mock/mock_accesstoken_kit.cpp", 631 "scene_session_manager_test10.cpp", 632 "scene_session_manager_test11.cpp", 633 "scene_session_manager_test12.cpp", 634 ] 635 636 cflags_cc = [ "-Wno-thread-safety" ] 637 638 deps = [ ":ws_unittest_common" ] 639 640 external_deps = test_external_deps 641 external_deps += [ 642 "ability_base:configuration", 643 "ability_base:session_info", 644 "ability_runtime:ability_context_native", 645 "ability_runtime:ability_manager", 646 "ability_runtime:app_context", 647 "ability_runtime:mission_info", 648 "ability_runtime:runtime", 649 "bundle_framework:appexecfwk_base", 650 "bundle_framework:appexecfwk_core", 651 "eventhandler:libeventhandler", 652 "safwk:system_ability_fwk", 653 ] 654} 655 656ohos_unittest("ws_scene_session_manager_kiosk_test") { 657 module_out_path = module_out_path 658 659 include_dirs = [ 660 "${window_base_path}/test/common/utils/include/", 661 "${window_base_path}/window_scene/test/mock", 662 ] 663 664 sources = [ 665 "${window_base_path}/window_scene/test/mock/mock_accesstoken_kit.cpp", 666 "scene_session_manager_kiosk_test.cpp", 667 ] 668 669 deps = [ ":ws_unittest_common" ] 670 671 external_deps = test_external_deps 672 external_deps += [ "eventhandler:libeventhandler" ] 673} 674 675ohos_unittest("ws_window_manager_service_dump_test") { 676 module_out_path = module_out_path 677 include_dirs = [ "${window_base_path}/test/common/utils/include/" ] 678 679 sources = [ 680 "${window_base_path}/window_scene/test/mock/mock_accesstoken_kit.cpp", 681 "window_manager_service_dump_test.cpp", 682 ] 683 684 deps = [ ":ws_unittest_common" ] 685 686 external_deps = test_external_deps 687 external_deps += [ 688 "ability_base:configuration", 689 "ability_base:session_info", 690 "ability_runtime:ability_context_native", 691 "ability_runtime:mission_info", 692 "bundle_framework:appexecfwk_base", 693 "bundle_framework:appexecfwk_core", 694 "eventhandler:libeventhandler", 695 ] 696} 697 698ohos_unittest("ws_ssmgr_specific_window_test") { 699 module_out_path = module_out_path 700 701 sources = [ "ssmgr_specific_window_test.cpp" ] 702 703 cflags_cc = [ "-Wno-thread-safety" ] 704 705 deps = [ ":ws_unittest_common" ] 706 707 external_deps = test_external_deps 708 external_deps += [ 709 "ability_base:configuration", 710 "ability_base:session_info", 711 "ability_runtime:ability_context_native", 712 "ability_runtime:mission_info", 713 "bundle_framework:appexecfwk_base", 714 "bundle_framework:appexecfwk_core", 715 "eventhandler:libeventhandler", 716 ] 717} 718 719ohos_unittest("ws_scene_session_manager_proxy_test") { 720 module_out_path = module_out_path 721 722 configs = [ "${window_base_path}/window_scene/session:ui_effect_public_config" ] 723 724 sources = [ 725 "../mock/mock_message_parcel.cpp", 726 "scene_session_manager_proxy_test.cpp", 727 ] 728 729 defines = [ "ENABLE_MOCK_READ_INT32" ] 730 731 deps = [ ":ws_unittest_common" ] 732 733 external_deps = test_external_deps 734 external_deps += [ "ability_runtime:mission_info" ] 735} 736 737ohos_unittest("ws_session_manager_agent_controller_test") { 738 module_out_path = module_out_path 739 740 sources = [ "session_manager_agent_controller_test.cpp" ] 741 742 deps = [ ":ws_unittest_common" ] 743 744 external_deps = test_external_deps 745} 746 747ohos_unittest("ws_session_manager_test") { 748 module_out_path = module_out_path 749 750 sources = [ "session_manager_test.cpp" ] 751 752 deps = [ 753 ":ws_unittest_common", 754 "${window_base_path}/window_scene/interfaces/innerkits:libwsutils", 755 ] 756 757 external_deps = test_external_deps 758 external_deps += [ 759 "ability_base:session_info", 760 "init:libbegetutil", 761 ] 762} 763 764ohos_unittest("ws_session_manager_ut_test") { 765 module_out_path = module_out_path 766 767 sources = [ "session_manager_ut_test.cpp" ] 768 769 deps = [ 770 ":ws_unittest_common", 771 "${window_base_path}/window_scene/interfaces/innerkits:libwsutils", 772 ] 773 774 external_deps = test_external_deps 775 external_deps += [ 776 "ability_base:session_info", 777 "init:libbegetutil", 778 ] 779} 780 781ohos_unittest("ws_session_manager_lite_test") { 782 module_out_path = module_out_path 783 784 include_dirs = [ 785 "${window_base_path}/window_scene/screen_session_manager/include/zidl", 786 "${window_base_path}/window_scene/session_manager/include/zidl", 787 ] 788 789 sources = [ 790 "${window_base_path}/window_scene/session_manager/src/session_manager_lite.cpp", 791 "${window_base_path}/window_scene/session_manager/src/zidl/scene_session_manager_lite_proxy.cpp", 792 "session_manager_lite_test.cpp", 793 ] 794 795 deps = [ 796 ":ws_unittest_common", 797 "${window_base_path}/window_scene/interfaces/innerkits:libwsutils", 798 ] 799 800 external_deps = test_external_deps 801 external_deps += [ 802 "ability_base:session_info", 803 "ability_base:want", 804 "ability_runtime:mission_info", 805 "ipc:ipc_single", 806 "samgr:samgr_proxy", 807 ] 808} 809 810ohos_unittest("ws_session_manager_lite_ut_test") { 811 module_out_path = module_out_path 812 813 include_dirs = [ 814 "${window_base_path}/window_scene/screen_session_manager/include/zidl", 815 "${window_base_path}/window_scene/session_manager/include/zidl", 816 ] 817 818 sources = [ 819 "${window_base_path}/window_scene/session_manager/src/session_manager_lite.cpp", 820 "${window_base_path}/window_scene/session_manager/src/zidl/scene_session_manager_lite_proxy.cpp", 821 "session_manager_lite_ut_test.cpp", 822 ] 823 824 deps = [ 825 ":ws_unittest_common", 826 "${window_base_path}/window_scene/interfaces/innerkits:libwsutils", 827 ] 828 829 external_deps = test_external_deps 830 external_deps += [ 831 "ability_base:session_info", 832 "ability_base:want", 833 "ability_runtime:mission_info", 834 "ipc:ipc_single", 835 "samgr:samgr_proxy", 836 ] 837} 838 839ohos_unittest("ws_scene_session_manager_stub_test") { 840 module_out_path = module_out_path 841 842 sources = [ "scene_session_manager_stub_test.cpp" ] 843 844 deps = [ ":ws_unittest_common" ] 845 846 external_deps = test_external_deps 847} 848 849ohos_unittest("ws_scene_session_manager_stub_test2") { 850 module_out_path = module_out_path 851 852 sources = [ 853 "${window_base_path}/window_scene/test/mock/mock_message_parcel.cpp", 854 "scene_session_manager_stub_test2.cpp", 855 ] 856 857 deps = [ 858 ":ws_unittest_common", 859 "${window_base_path}/window_scene/session:ui_effect_controller", 860 "${window_base_path}/window_scene/session:ui_effect_controller_client", 861 ] 862 863 external_deps = test_external_deps 864} 865 866ohos_unittest("ws_scene_session_manager_supplement_test") { 867 module_out_path = module_out_path 868 include_dirs = [ "${window_base_path}/test/common/utils/include/" ] 869 sources = [ "scene_session_manager_supplement_test.cpp" ] 870 871 cflags_cc = [ "-Wno-thread-safety" ] 872 873 deps = [ 874 ":ws_unittest_common", 875 "${window_base_path}/test/common/utils:libtestutil", 876 ] 877 878 public_deps = 879 [ "${window_base_path}/window_scene/interfaces/innerkits:libwsutils" ] 880 881 external_deps = test_external_deps 882 external_deps += [ 883 "ability_base:session_info", 884 "ability_runtime:ability_context_native", 885 "ability_runtime:mission_info", 886 "bundle_framework:appexecfwk_base", 887 "bundle_framework:appexecfwk_core", 888 ] 889} 890 891ohos_unittest("ws_scene_session_test") { 892 module_out_path = module_out_path 893 894 sources = [ 895 "${window_base_path}/window_scene/test/mock/mock_accesstoken_kit.cpp", 896 "scene_session_test.cpp", 897 "scene_session_test2.cpp", 898 "scene_session_test3.cpp", 899 "scene_session_test4.cpp", 900 "scene_session_test5.cpp", 901 "scene_session_test6.cpp", 902 ] 903 904 cflags_cc = [ "-Wno-thread-safety" ] 905 906 deps = [ ":ws_unittest_common" ] 907 908 external_deps = test_external_deps 909 external_deps += [ 910 "ability_base:session_info", 911 "ability_runtime:app_context", 912 "eventhandler:libeventhandler", 913 "preferences:native_preferences", 914 ] 915} 916 917ohos_unittest("ws_session_specific_window_test") { 918 module_out_path = module_out_path 919 920 sources = [ "session_specific_window_test.cpp" ] 921 922 deps = [ ":ws_unittest_common" ] 923 924 external_deps = test_external_deps 925 external_deps += [ 926 "ability_base:session_info", 927 "ability_base:want", 928 "ability_runtime:process_options", 929 "eventhandler:libeventhandler", 930 ] 931} 932 933ohos_unittest("ws_scene_session_lifecycle_test") { 934 module_out_path = module_out_path 935 936 sources = [ "scene_session_lifecycle_test.cpp" ] 937 938 cflags_cc = [ "-Wno-thread-safety" ] 939 940 deps = [ ":ws_unittest_common" ] 941 942 external_deps = test_external_deps 943 external_deps += [ "ability_base:session_info" ] 944 945 cflags = [] 946 defines = [] 947 if (window_manager_feature_asbng_path_enable) { 948 defines += [ "WINDOW_ATOMIC_SERVICE_ATTRIBUTION_ENABLE" ] 949 cflags += [ "-DACE_ENGINE_PLUGIN_PATH=\"${window_manager_feature_asbng_path}\"" ] 950 } 951} 952 953ohos_unittest("ws_window_session_property_test") { 954 module_out_path = module_out_path 955 956 sources = [ "window_session_property_test.cpp" ] 957 958 deps = [ ":ws_unittest_common" ] 959 960 external_deps = test_external_deps 961} 962 963ohos_unittest("ws_compatible_mode_property_test") { 964 module_out_path = module_out_path 965 966 sources = [ "compatible_mode_property_test.cpp" ] 967 968 deps = [ ":ws_unittest_common" ] 969 970 external_deps = test_external_deps 971} 972 973ohos_unittest("ws_window_event_channel_test") { 974 module_out_path = module_out_path 975 976 sources = [ "window_event_channel_test.cpp" ] 977 978 deps = [ 979 ":ws_unittest_common", 980 "${window_base_path}/window_scene/interfaces/innerkits:libwsutils", 981 ] 982 983 external_deps = test_external_deps 984} 985 986ohos_unittest("ws_move_drag_controller_test") { 987 module_out_path = module_out_path 988 989 sources = [ "move_drag_controller_test.cpp" ] 990 991 deps = [ 992 ":ws_unittest_common", 993 "${window_base_path}/window_scene/interfaces/innerkits:libwsutils", 994 ] 995 996 external_deps = test_external_deps 997} 998 999ohos_unittest("ws_multi_instance_manager_test") { 1000 module_out_path = module_out_path 1001 1002 sources = [ "multi_instance_manager_test.cpp" ] 1003 1004 deps = [ ":ws_unittest_common" ] 1005 1006 external_deps = test_external_deps 1007 external_deps += [ 1008 "bundle_framework:appexecfwk_base", 1009 "bundle_framework:appexecfwk_core", 1010 ] 1011} 1012 1013ohos_unittest("ws_pc_fold_screen_controller_test") { 1014 module_out_path = module_out_path 1015 1016 sources = [ "pc_fold_screen_controller_test.cpp" ] 1017 1018 deps = [ ":ws_unittest_common" ] 1019 1020 external_deps = test_external_deps 1021} 1022 1023ohos_unittest("ws_session_proxy_test") { 1024 module_out_path = module_out_path 1025 1026 include_dirs = [ 1027 "${window_base_path}/window_scene/session/host/include/zidl", 1028 "${window_base_path}/window_scene/test/mock", 1029 ] 1030 sources = [ 1031 "${window_base_path}/window_scene/test/mock/mock_message_parcel.cpp", 1032 "session_proxy_test.cpp", 1033 ] 1034 1035 defines = [ 1036 "ENABLE_MOCK_READ_UINT32", 1037 "ENABLE_MOCK_READ_INT32", 1038 ] 1039 1040 deps = [ 1041 ":ws_unittest_common", 1042 "${window_base_path}/window_scene/session:screen_session", 1043 ] 1044 1045 external_deps = test_external_deps 1046 external_deps += [ 1047 "ability_base:session_info", 1048 "ability_base:want", 1049 ] 1050} 1051 1052ohos_unittest("ws_session_proxy_lifecycle_test") { 1053 module_out_path = module_out_path 1054 1055 include_dirs = 1056 [ "${window_base_path}/window_scene/session/host/include/zidl" ] 1057 sources = [ "session_proxy_lifecycle_test.cpp" ] 1058 1059 deps = [ 1060 ":ws_unittest_common", 1061 "${window_base_path}/window_scene/session:screen_session", 1062 ] 1063 1064 external_deps = test_external_deps 1065 external_deps += [ 1066 "ability_base:session_info", 1067 "ability_base:want", 1068 ] 1069} 1070 1071ohos_unittest("ws_session_proxy_mock_test") { 1072 module_out_path = module_out_path 1073 1074 include_dirs = [ 1075 "${window_base_path}/window_scene/session/host/include/zidl", 1076 "${window_base_path}/window_scene/test/mock", 1077 ] 1078 1079 sources = [ 1080 "../mock/mock_message_parcel.cpp", 1081 "session_proxy_mock_test.cpp", 1082 ] 1083 1084 deps = [ 1085 ":ws_unittest_common", 1086 "${window_base_path}/window_scene/session:screen_session", 1087 ] 1088 1089 external_deps = test_external_deps 1090 external_deps += [ 1091 "ability_base:session_info", 1092 "ability_base:want", 1093 ] 1094} 1095 1096ohos_unittest("ws_session_proxy_immersive_test") { 1097 module_out_path = module_out_path 1098 1099 include_dirs = 1100 [ "${window_base_path}/window_scene/session/host/include/zidl" ] 1101 sources = [ "session_proxy_immersive_test.cpp" ] 1102 1103 deps = [ 1104 ":ws_unittest_common", 1105 "${window_base_path}/window_scene/session:screen_session", 1106 ] 1107 1108 external_deps = test_external_deps 1109 external_deps += [ 1110 "ability_base:session_info", 1111 "ability_base:want", 1112 ] 1113} 1114 1115ohos_unittest("ws_session_proxy_property_test") { 1116 module_out_path = module_out_path 1117 1118 include_dirs = [ 1119 "${window_base_path}/window_scene/session/host/include/zidl", 1120 "${window_base_path}/window_scene/test/mock", 1121 ] 1122 1123 sources = [ 1124 "../mock/mock_message_parcel.cpp", 1125 "session_proxy_property_test.cpp", 1126 ] 1127 1128 deps = [ 1129 ":ws_unittest_common", 1130 "${window_base_path}/window_scene/session:screen_session", 1131 ] 1132 1133 external_deps = test_external_deps 1134 external_deps += [ 1135 "ability_base:session_info", 1136 "ability_base:want", 1137 ] 1138} 1139 1140ohos_unittest("ws_scene_session_converter_test") { 1141 module_out_path = module_out_path 1142 1143 sources = [ "scene_session_converter_test.cpp" ] 1144 1145 deps = [ ":ws_unittest_common" ] 1146 1147 external_deps = test_external_deps 1148 external_deps += [ 1149 "ability_runtime:mission_info", 1150 "bundle_framework:appexecfwk_base", 1151 "bundle_framework:appexecfwk_core", 1152 ] 1153} 1154 1155ohos_unittest("ws_session_stage_proxy_test") { 1156 module_out_path = module_out_path 1157 1158 sources = [ 1159 "../mock/mock_message_parcel.cpp", 1160 "session_stage_proxy_test.cpp", 1161 ] 1162 1163 defines = [ "ENABLE_MOCK_WRITE_STRING" ] 1164 1165 include_dirs = [ "${window_base_path}/window_scene/test/mock" ] 1166 1167 deps = [ ":ws_unittest_common" ] 1168 1169 external_deps = test_external_deps 1170 external_deps += [ "ability_base:base" ] 1171} 1172 1173ohos_unittest("ws_session_stage_stub_test") { 1174 module_out_path = module_out_path 1175 1176 sources = [ "session_stage_stub_test.cpp" ] 1177 1178 deps = [ ":ws_unittest_common" ] 1179 1180 external_deps = test_external_deps 1181 external_deps += [ "ability_base:base" ] 1182} 1183 1184ohos_unittest("ws_window_event_channel_proxy_test") { 1185 module_out_path = module_out_path 1186 1187 sources = [ "window_event_channel_proxy_test.cpp" ] 1188 1189 deps = [ ":ws_unittest_common" ] 1190 1191 external_deps = test_external_deps 1192} 1193 1194ohos_unittest("ws_window_event_channel_proxy_mock_test") { 1195 module_out_path = module_out_path 1196 1197 sources = [ 1198 "../mock/mock_message_parcel.cpp", 1199 "window_event_channel_proxy_mock_test.cpp", 1200 ] 1201 1202 include_dirs = [ "${window_base_path}/window_scene/test/mock" ] 1203 1204 defines = [ 1205 "ENABLE_MOCK_WRITE_STRING", 1206 "ENABLE_MOCK_WRITE_STRING_VECTOR", 1207 "ENABLE_MOCK_READ_INT64", 1208 ] 1209 1210 deps = [ ":ws_unittest_common" ] 1211 1212 external_deps = test_external_deps 1213} 1214 1215ohos_unittest("ws_window_event_channel_stub_test") { 1216 module_out_path = module_out_path 1217 1218 sources = [ "window_event_channel_stub_test.cpp" ] 1219 1220 deps = [ ":ws_unittest_common" ] 1221 1222 external_deps = test_external_deps 1223} 1224 1225ohos_unittest("ws_window_event_channel_stub_mock_test") { 1226 module_out_path = module_out_path 1227 1228 sources = [ 1229 "../mock/mock_message_parcel.cpp", 1230 "window_event_channel_stub_mock_test.cpp", 1231 ] 1232 1233 include_dirs = [ "${window_base_path}/window_scene/test/mock" ] 1234 1235 deps = [ ":ws_unittest_common" ] 1236 1237 external_deps = test_external_deps 1238} 1239 1240ohos_unittest("ws_hidumper_controller_test") { 1241 module_out_path = module_out_path 1242 1243 sources = [ "hidumper_controller_test.cpp" ] 1244 1245 deps = [ ":ws_unittest_common" ] 1246 1247 external_deps = test_external_deps 1248} 1249 1250ohos_unittest("ws_session_stub_test") { 1251 module_out_path = module_out_path 1252 1253 sources = [ "session_stub_test.cpp" ] 1254 1255 deps = [ ":ws_unittest_common" ] 1256 1257 external_deps = test_external_deps 1258 1259 public_external_deps = [ "accessibility:accessibility_interface" ] 1260} 1261 1262ohos_unittest("ws_session_stub_lifecycle_test") { 1263 module_out_path = module_out_path 1264 1265 sources = [ "session_stub_lifecycle_test.cpp" ] 1266 1267 deps = [ ":ws_unittest_common" ] 1268 1269 external_deps = test_external_deps 1270 1271 public_external_deps = [ "accessibility:accessibility_interface" ] 1272} 1273 1274ohos_unittest("ws_session_stub_mock_test") { 1275 module_out_path = module_out_path 1276 1277 sources = [ 1278 "../mock/mock_message_parcel.cpp", 1279 "session_stub_mock_test.cpp", 1280 ] 1281 1282 defines = [ "ENABLE_MOCK_READ_INT64" ] 1283 1284 include_dirs = [ "${window_base_path}/window_scene/test/mock" ] 1285 1286 deps = [ ":ws_unittest_common" ] 1287 1288 external_deps = test_external_deps 1289 1290 public_external_deps = [ "accessibility:accessibility_interface" ] 1291} 1292 1293ohos_unittest("ws_session_stub_immersive_test") { 1294 module_out_path = module_out_path 1295 1296 sources = [ "session_stub_immersive_test.cpp" ] 1297 1298 deps = [ ":ws_unittest_common" ] 1299 1300 external_deps = test_external_deps 1301 1302 public_external_deps = [ "accessibility:accessibility_interface" ] 1303} 1304 1305ohos_unittest("ws_session_stub_property_test") { 1306 module_out_path = module_out_path 1307 1308 sources = [ "session_stub_property_test.cpp" ] 1309 1310 deps = [ ":ws_unittest_common" ] 1311 1312 external_deps = test_external_deps 1313 1314 public_external_deps = [ "accessibility:accessibility_interface" ] 1315} 1316 1317ohos_unittest("ws_distributed_client_test") { 1318 module_out_path = module_out_path 1319 1320 sources = [ 1321 "../mock/mock_message_parcel.cpp", 1322 "distributed_client_test.cpp", 1323 ] 1324 1325 deps = [ ":ws_unittest_common" ] 1326 1327 external_deps = test_external_deps 1328 external_deps += [ "ability_runtime:mission_info" ] 1329} 1330 1331ohos_unittest("ws_scene_session_manager_lite_stub_test") { 1332 module_out_path = module_out_path 1333 1334 sources = [ "scene_session_manager_lite_stub_test.cpp" ] 1335 1336 deps = [ ":ws_unittest_common" ] 1337 1338 external_deps = test_external_deps 1339} 1340 1341ohos_unittest("ws_session_manager_service_recover_proxy_test") { 1342 module_out_path = module_out_path 1343 1344 include_dirs = [ "../mock" ] 1345 1346 sources = [ 1347 "../mock/mock_message_parcel.cpp", 1348 "session_manager_service_recover_proxy_test.cpp", 1349 ] 1350 1351 deps = [ 1352 ":ws_unittest_common", 1353 "${window_base_path}/wmserver:sms", 1354 ] 1355 1356 external_deps = test_external_deps 1357} 1358 1359ohos_unittest("ws_mock_session_manager_service_test") { 1360 module_out_path = module_out_path 1361 1362 include_dirs = [ "../mock" ] 1363 1364 sources = [ "mock_session_manager_service_test.cpp" ] 1365 1366 deps = [ 1367 ":ws_unittest_common", 1368 "${window_base_path}/window_scene/interfaces/innerkits:libwsutils", 1369 "${window_base_path}/wmserver:sms", 1370 ] 1371 1372 external_deps = test_external_deps 1373 external_deps += [ "safwk:system_ability_fwk" ] 1374} 1375 1376ohos_unittest("ws_dfx_hisysevent_test") { 1377 module_out_path = module_out_path 1378 1379 sources = [ "dfx_hisysevent_test.cpp" ] 1380 1381 deps = [ ":ws_unittest_common" ] 1382 1383 external_deps = test_external_deps 1384 external_deps += [ "hisysevent:libhisysevent" ] 1385} 1386 1387ohos_unittest("ws_window_manager_lru_test") { 1388 module_out_path = module_out_path 1389 1390 sources = [ "window_manager_lru_test.cpp" ] 1391 1392 deps = [ ":ws_unittest_common" ] 1393 1394 external_deps = test_external_deps 1395} 1396 1397## Build ws_unittest_common.a {{{ 1398config("ws_unittest_common_public_config") { 1399 include_dirs = [ 1400 "${window_base_path}/test/common/mock", 1401 1402 # for WMError Code 1403 "${window_base_path}/dm/include", 1404 "${window_base_path}/dmserver/include", 1405 "${window_base_path}/interfaces/innerkits/dm", 1406 "${window_base_path}/interfaces/innerkits/wm", 1407 "${window_base_path}/window_scene/screen_session_manager_client/include", 1408 "${window_base_path}/window_scene/screen_session_manager/include", 1409 "${window_base_path}/window_scene/session_manager/include", 1410 "${window_base_path}/window_scene/session_manager_service/include", 1411 "${window_base_path}/window_scene/common/include", 1412 "${window_base_path}/window_scene", 1413 "${window_base_path}/window_scene/test", 1414 "${window_base_path}/window_scene/intention_event/service/event_stage/include", 1415 1416 # for window_manager_interface 1417 "${window_base_path}/wmserver/include", 1418 "${window_base_path}/wmserver/include/zidl", 1419 "${window_base_path}/wm/include", 1420 "${window_base_path}/wm/include/zidl", 1421 1422 # for session 1423 "${window_base_path}/window_scene/session/container/include/zidl", 1424 1425 # for session_manager 1426 "${window_base_path}/window_scene/interfaces/include", 1427 1428 "${window_base_path}/wm/include", 1429 "${window_base_path}/wm/include/zidl", 1430 1431 # for window_manager_hilog 1432 "${window_base_path}/utils/include", 1433 1434 "${dmserver_gen_path}", 1435 ] 1436} 1437 1438ohos_static_library("ws_unittest_common") { 1439 visibility = [ 1440 ":*", 1441 "animation:*", 1442 "event_distribution:*", 1443 "layout:*", 1444 "multi_user:*", 1445 "rotation:*", 1446 "ui_extension:*", 1447 "window_focus:*", 1448 "window_keyboard:*", 1449 "window_pattern:*", 1450 "window_recover:*", 1451 ] 1452 testonly = true 1453 1454 public_configs = [ 1455 ":ws_unittest_common_public_config", 1456 "${window_base_path}/resources/config/build:coverage_flags", 1457 "${window_base_path}/resources/config/build:testcase_flags", 1458 "${window_base_path}/wmserver:libidl_config", 1459 ] 1460 1461 deps = [ 1462 "${window_base_path}/dm:libdm", 1463 "${window_base_path}/utils:libwmutil", 1464 "${window_base_path}/utils:libwmutil_base", 1465 "${window_base_path}/window_scene/common:window_scene_common", 1466 "${window_base_path}/window_scene/intention_event/service:intention_event_anr_manager", 1467 "${window_base_path}/window_scene/screen_session_manager:screen_session_manager", 1468 "${window_base_path}/window_scene/screen_session_manager_client:screen_session_manager_client", 1469 "${window_base_path}/window_scene/session:scene_session", 1470 "${window_base_path}/window_scene/session:screen_session", 1471 "${window_base_path}/window_scene/session_manager:scene_session_manager", 1472 "${window_base_path}/window_scene/session_manager:session_manager", 1473 "${window_base_path}/window_scene/session_manager:session_manager_lite", 1474 "${window_base_path}/wm:libwm", 1475 "${window_base_path}/wm:libwm_lite", 1476 ] 1477 1478 public_deps = [ 1479 "${window_base_path}/utils:libwmutil", 1480 "${window_base_path}/utils:libwmutil_base", 1481 ] 1482 1483 external_deps = test_external_deps 1484 1485 public_external_deps = [ 1486 "ability_base:session_info", 1487 "ability_base:want", 1488 ] 1489 defines = [] 1490 if (defined(global_parts_info) && defined(global_parts_info.sensors_sensor)) { 1491 external_deps += [ "sensor:sensor_interface_native" ] 1492 defines += [ "SENSOR_ENABLE" ] 1493 } 1494 1495 part_name = "window_manager" 1496 subsystem_name = "window" 1497} 1498 1499ohos_unittest("ws_scene_system_ability_listener_test") { 1500 module_out_path = module_out_path 1501 1502 sources = [ "scene_system_ability_listener_test.cpp" ] 1503 1504 deps = [ ":ws_unittest_common" ] 1505 1506 external_deps = test_external_deps 1507 external_deps += [ 1508 "eventhandler:libeventhandler", 1509 "samgr:samgr_proxy", 1510 ] 1511 1512 if (defined(global_parts_info) && 1513 defined(global_parts_info.resourceschedule_resource_schedule_service)) { 1514 external_deps += [ "resource_schedule_service:ressched_client" ] 1515 defines = [ "RESOURCE_SCHEDULE_SERVICE_ENABLE" ] 1516 } 1517} 1518 1519ohos_unittest("ws_session_change_recorder_test") { 1520 module_out_path = module_out_path 1521 1522 sources = [ "session_change_recorder_test.cpp" ] 1523 1524 cflags_cc = [ "-Wno-thread-safety" ] 1525 1526 deps = [ ":ws_unittest_common" ] 1527 1528 external_deps = [ 1529 "ability_base:configuration", 1530 "ability_base:session_info", 1531 "ability_runtime:ability_context_native", 1532 "ability_runtime:mission_info", 1533 "bundle_framework:appexecfwk_base", 1534 "bundle_framework:appexecfwk_core", 1535 "eventhandler:libeventhandler", 1536 "hilog:libhilog", 1537 "image_framework:image_native", 1538 "image_framework:pixelconvertadapter", 1539 ] 1540} 1541 1542ohos_unittest("ws_scene_screen_change_listener_test") { 1543 module_out_path = module_out_path 1544 1545 include_dirs = [ 1546 "${window_base_path}/test/common/utils/include/", 1547 "${window_base_path}/window_scene/test/mock/", 1548 ] 1549 1550 sources = [ "scene_screen_change_listener_test.cpp" ] 1551 1552 cflags_cc = [ "-Wno-thread-safety" ] 1553 1554 deps = [ ":ws_unittest_common" ] 1555 1556 external_deps = test_external_deps 1557 external_deps += [ "ability_base:session_info" ] 1558} 1559 1560ohos_unittest("ws_session_coordinate_helper_test") { 1561 module_out_path = module_out_path 1562 1563 include_dirs = [ 1564 "${window_base_path}/test/common/utils/include/", 1565 "${window_base_path}/window_scene/test/mock/", 1566 ] 1567 1568 sources = [ "session_coordinate_helper_test.cpp" ] 1569 1570 cflags_cc = [ "-Wno-thread-safety" ] 1571 1572 deps = [ ":ws_unittest_common" ] 1573 1574 external_deps = test_external_deps 1575} 1576## Build ws_unittest_common.a }}} 1577