1# Copyright (c) 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("../../../web_aafwk.gni") 16 17module_output_path = "webview/webview" 18 19ohos_unittest("arkweb_scheme_handler_test") { 20 module_out_path = module_output_path 21 22 sources = [ "arkweb_scheme_handler_test.cpp" ] 23 24 include_dirs = [ "../common" ] 25 26 deps = [ 27 "$webview_path/interfaces/native:ohweb", 28 "$webview_path/ohos_nweb:web_configs", 29 ] 30 31 external_deps = [ 32 "ability_runtime:app_context", 33 "bundle_framework:appexecfwk_base", 34 "bundle_framework:appexecfwk_core", 35 "c_utils:utils", 36 "googletest:gmock_main", 37 "googletest:gtest_main", 38 "graphic_2d:librender_service_client", 39 "hilog:libhilog", 40 "libxml2:libxml2", 41 "webview:libnweb", 42 "window_manager:libwm", 43 ] 44} 45 46ohos_unittest("arkweb_interface_test") { 47 module_out_path = module_output_path 48 49 sources = [ "arkweb_interface_test.cpp" ] 50 51 include_dirs = [ "../common" ] 52 53 deps = [ 54 "$webview_path/interfaces/native:ohweb", 55 "$webview_path/ohos_nweb:web_configs", 56 ] 57 58 external_deps = [ 59 "ability_runtime:app_context", 60 "bundle_framework:appexecfwk_base", 61 "bundle_framework:appexecfwk_core", 62 "c_utils:utils", 63 "googletest:gmock_main", 64 "googletest:gtest_main", 65 "graphic_2d:librender_service_client", 66 "hilog:libhilog", 67 "libxml2:libxml2", 68 "webview:libnweb", 69 "window_manager:libwm", 70 ] 71} 72 73ohos_unittest("native_javascript_execute_callback_test") { 74 module_out_path = module_output_path 75 76 sources = [ "native_javascript_execute_callback_test.cpp" ] 77 78 include_dirs = [ "../common" ] 79 80 deps = [ 81 "$webview_path/interfaces/native:ohweb", 82 "$webview_path/ohos_nweb:web_configs", 83 ] 84 85 external_deps = [ 86 "ability_runtime:app_context", 87 "bundle_framework:appexecfwk_base", 88 "bundle_framework:appexecfwk_core", 89 "c_utils:utils", 90 "googletest:gmock_main", 91 "googletest:gtest_main", 92 "graphic_2d:librender_service_client", 93 "hilog:libhilog", 94 "webview:libnweb", 95 "window_manager:libwm", 96 ] 97} 98 99ohos_unittest("native_interface_arkweb_test") { 100 module_out_path = module_output_path 101 102 sources = [ "native_interface_arkweb_test.cpp" ] 103 104 include_dirs = [ 105 "../common", 106 "$webview_path/interfaces/native" 107 ] 108 109 deps = [ 110 "$webview_path/arkweb_utils:libarkweb_utils", 111 "$webview_path/interfaces/native:ohweb", 112 "$webview_path/ohos_nweb:web_configs", 113 ] 114 115 external_deps = [ 116 "ability_runtime:app_context", 117 "bundle_framework:appexecfwk_base", 118 "bundle_framework:appexecfwk_core", 119 "c_utils:utils", 120 "googletest:gmock_main", 121 "googletest:gtest_main", 122 "graphic_2d:librender_service_client", 123 "hilog:libhilog", 124 "init:libbegetutil", 125 "webview:libnweb", 126 "window_manager:libwm", 127 ] 128} 129 130group("unittest") { 131 testonly = true 132 deps = [ 133 ":arkweb_interface_test", 134 ":arkweb_scheme_handler_test", 135 ":native_interface_arkweb_test", 136 ":native_javascript_execute_callback_test", 137 ] 138} 139