# Copyright (C) 2025 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//build/test.gni")
ohos_unittest("preload_napi_test") {
module_out_path = "request/request/request"
include_dirs = [
"include",
"../../../../frameworks/js/napi/preload_napi/include",
"../../../../interfaces/inner_kits/cache_download/napi/include",
"../../../../interfaces/inner_kits/cache_download/native/include",
]
sources = [
"../../../../frameworks/js/napi/preload_napi/src/napi_utils.cpp",
"../../../../frameworks/js/napi/preload_napi/src/preload_common.cpp",
"../../../../frameworks/js/napi/preload_napi/src/preload_napi.cpp",
"src/preload_callback_test.cpp",
"src/preload_napi_test.cpp",
]
deps = [
"../../../../frameworks/native/cache_download:preload_native",
]
external_deps = [
"bundle_framework:appexecfwk_core_headers",
"common_event_service:cesfwk_innerkits",
"googletest:gtest_main",
"hisysevent:libhisysevent",
"ability_base:zuri",
"ability_runtime:abilitykit_native",
"ability_runtime:app_context",
"ability_runtime:data_ability_helper",
"ability_runtime:extensionkit_native",
"ability_runtime:napi_base_context",
"c_utils:utils",
"curl:curl_shared",
"hilog:libhilog",
"init:libbegetutil",
"ipc:ipc_single",
"napi:ace_napi",
"rust_cxx:cxx_cppdeps",
"node:node_header_notice",
]
}
group("unittest") {
testonly = true
deps = [ ":preload_napi_test" ]
}