1# Copyright (c) 2024 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("../../../web_aafwk.gni") 16 17module_output_path = "web/webview" 18 19ohos_unittest("napi_common_test") { 20 module_out_path = module_output_path 21 22 sources = [ "napi_parse_utils_unittest.cpp" ] 23 24 include_dirs = [ 25 "$webview_path/interfaces/kits/napi/common", 26 "$webview_path/interfaces/kits/napi/webadsblockmanager", 27 "$webview_path/interfaces/kits/napi/webasynccontroller", 28 "$webview_path/interfaces/kits/napi/webcookiemanager", 29 "$webview_path/interfaces/kits/napi/webdatabase", 30 "$webview_path/interfaces/kits/napi/webfunction", 31 "$webview_path/interfaces/kits/napi/webstorage", 32 "$webview_path/interfaces/kits/napi/webviewcontroller", 33 "$target_gen_dir/protos", 34 "$webview_path/interfaces/native", 35 "../../../ohos_adapter/ohos_resource_adapter/include", 36 ] 37 38 use_exceptions = true 39 40 deps = [ 41 "$webview_path/interfaces/native:ohweb", 42 "../../../ohos_adapter:nweb_ohos_adapter", 43 "//third_party/googletest:gmock_main", 44 "//third_party/googletest:gtest_main", 45 ] 46 47 external_deps = [ 48 "ability_base:extractortool", 49 "ability_runtime:app_context", 50 "bundle_framework:appexecfwk_base", 51 "bundle_framework:appexecfwk_core", 52 "c_utils:utils", 53 "common_event_service:cesfwk_innerkits", 54 "hilog:libhilog", 55 "image_framework:image", 56 "image_framework:image_native", 57 "init:libbegetutil", 58 "ipc:ipc_core", 59 "napi:ace_napi", 60 "protobuf:protobuf_lite", 61 "samgr:samgr_proxy", 62 "webview:libnweb", 63 "window_manager:libwm", 64 ] 65} 66 67group("unittest") { 68 testonly = true 69 deps = [ ":napi_common_test" ] 70} 71