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") 16module_out_path = "window_manager/extension/window_extension" 17 18group("unittest") { 19 testonly = true 20 21 deps = [ 22 ":extension_window_extension_context_test", 23 ":extension_window_extension_proxy_test", 24 ":extension_window_extension_stub_impl_test", 25 ] 26} 27 28ohos_unittest("extension_window_extension_proxy_test") { 29 module_out_path = module_out_path 30 31 sources = [ "window_extension_proxy_test.cpp" ] 32 33 deps = [ ":window_extension_unittest_common" ] 34} 35 36ohos_unittest("extension_window_extension_stub_impl_test") { 37 module_out_path = module_out_path 38 39 sources = [ "window_extension_stub_impl_test.cpp" ] 40 41 deps = [ ":window_extension_unittest_common" ] 42} 43 44ohos_unittest("extension_window_extension_context_test") { 45 module_out_path = module_out_path 46 47 sources = [ "window_extension_context_test.cpp" ] 48 49 deps = [ ":window_extension_unittest_common" ] 50 51 external_deps = [ 52 "ability_base:want", 53 "ability_runtime:ability_context_native", 54 "ability_runtime:ability_manager", 55 "ability_runtime:app_context", 56 "ability_runtime:extensionkit_native", 57 "ability_runtime:napi_common", 58 "ability_runtime:runtime", 59 "c_utils:utils", 60 "common_event_service:cesfwk_innerkits", 61 "eventhandler:libeventhandler", 62 "graphic_2d:librender_service_client", 63 "hilog:libhilog", 64 "hitrace:hitrace_meter", 65 "input:libmmi-client", 66 "ipc:ipc_single", 67 "napi:ace_napi", 68 ] 69} 70 71## Build window_extension_unittest_common.a {{{ 72config("window_extension_unittest_common_public_config") { 73 include_dirs = [ 74 "../../../../interfaces/innerkits/wm", 75 "../../../../window_scene/session/host/include", 76 "../../../../wm/include", 77 "../../include", 78 "../../include/zidl", 79 "../../../extension_connection/include", 80 "../../../extension_connection/include/zidl", 81 "../../../../interfaces/innerkits/extension", 82 "//third_party/googletest/googlemock/include", 83 ] 84} 85 86ohos_static_library("window_extension_unittest_common") { 87 visibility = [ ":*" ] 88 testonly = true 89 90 public_configs = [ 91 ":window_extension_unittest_common_public_config", 92 "../../../../resources/config/build:coverage_flags", 93 "../../../../resources/config/build:testcase_flags", 94 ] 95 96 public_deps = [ 97 "//commonlibrary/c_utils/base:utils", 98 "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client", 99 "//foundation/multimedia/image_framework/interfaces/innerkits:image_native", 100 "//foundation/multimodalinput/input/frameworks/proxy:libmmi-client", 101 "//third_party/googletest:gmock", 102 "//third_party/googletest:gtest_main", 103 ] 104 105 deps = [ 106 "../..:libwindow_extension", 107 "../../../../interfaces/kits/napi/window_runtime:window_native_kit", 108 "../../../../window_scene/session:scene_session", 109 "../../../../wm:libwm", 110 "../../../extension_connection:libwindow_extension_client", 111 ] 112 113 external_deps = [ 114 "c_utils:utils", 115 "hilog:libhilog", 116 "input:libmmi-client", 117 "ipc:ipc_single", 118 ] 119 subsystem_name = "window" 120 part_name = "window_manager" 121} 122