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") 15 16module_output_path = "web/webview" 17 18config("module_private_config") { 19 visibility = [ ":*" ] 20 21 include_dirs = [ 22 "//base/web/webview/interfaces/innerkits/ohos_nweb", 23 "//foundation/window/window_manager/interfaces/innerkits/wm", 24 "//foundation/multimodalinput/input/interfaces/native/innerkits/event/include", 25 "//base/web/webview/test/unittest/common", 26 "//foundation/window/window_manager/wm/include", 27 "//foundation/ability/ability_runtime/interfaces/kits/native/ability/ability_runtime", 28 "//foundation/ability/ability_base/interfaces/kits/native/configuration/include", 29 "//foundation/ability/ability_runtime/interfaces/inner_api/ability_manager/include", 30 "//foundation/window/window_manager/interfaces/innerkits/dm", 31 "//foundation/graphic/graphic_2d/rosen/modules/render_service_client/core/ui", 32 "//foundation/graphic/graphic_2d/frameworks/vsync/include", 33 "//third_party/googletest/googlemock/include", 34 "//foundation/graphic/graphic_2d/frameworks/surface/include", 35 ] 36} 37 38ohos_unittest("nweb_surface_adapter_test") { 39 module_out_path = module_output_path 40 41 sources = [ 42 "//base/web/webview/test/unittest/common/nweb_create_window.cpp", 43 "nweb_surface_adapter_test.cpp", 44 ] 45 46 configs = [ ":module_private_config" ] 47 48 deps = [ 49 "//base/web/webview/ohos_nweb:libnweb", 50 "//foundation/graphic/graphic_2d:libsurface", 51 "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client", 52 "//foundation/window/window_manager/utils:libwmutil", 53 "//foundation/window/window_manager/wm:libwm", 54 "//third_party/googletest:gmock_main", 55 "//third_party/googletest:gtest_main", 56 "//third_party/zlib:libz", 57 ] 58 external_deps = [ 59 "ability_base:want", 60 "ability_runtime:ability_context_native", 61 "ability_runtime:ability_manager", 62 "ace_engine:ace_uicontent", 63 "bundle_framework:appexecfwk_base", 64 "bundle_framework:appexecfwk_core", 65 "c_utils:utils", 66 "graphic_standard:surface", 67 "graphic_standard:window_animation", 68 "hicollie_native:libhicollie", 69 "hilog_native:libhilog", 70 "hisysevent_native:libhisysevent", 71 "imf:inputmethod_client", 72 "input:libmmi-client", 73 "ipc:ipc_core", 74 "multimedia_image_framework:image", 75 "multimedia_image_framework:image_native", 76 "napi:ace_napi", 77 "resource_management:global_resmgr", 78 "safwk:system_ability_fwk", 79 "samgr:samgr_proxy", 80 ] 81} 82 83group("unittest") { 84 testonly = true 85 deps = [ ":nweb_surface_adapter_test" ] 86} 87