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("//base/web/webview/web_aafwk.gni") 15import("//build/ohos.gni") 16 17config("nweb_test_config") { 18 include_dirs = [ 19 "ohos_nweb", 20 "//base/web/webview/interfaces/innerkits/ohos_nweb", 21 "//foundation/window/window_manager/interfaces/innerkits/wm", 22 "//foundation/multimodalinput/input/interfaces/native/innerkits/event/include", 23 "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include", 24 ] 25 26 cflags = [ 27 "-Wall", 28 "-Werror", 29 "-g3", 30 ] 31} 32 33ohos_executable("nweb_test") { 34 install_enable = false 35 36 sources = [ 37 "ohos_nweb/nweb_downloadlistener_impl_test.cpp", 38 "ohos_nweb/nweb_handler_impl_test.cpp", 39 "ohos_nweb/nweb_handler_impl_test_for_intercept.cpp", 40 "ohos_nweb/nweb_input_event_consumer_test.cpp", 41 "ohos_nweb/nweb_javascript_result_callback_test.cpp", 42 "ohos_nweb/nweb_js_dialog_impl_test.cpp", 43 "ohos_nweb/ohos_nweb_test.cpp", 44 ] 45 46 configs = [ ":nweb_test_config" ] 47 48 deps = [ 49 "//base/web/webview/ohos_nweb:libnweb", 50 "//foundation/graphic/graphic_2d/rosen/modules/composer:libcomposer", 51 "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client", 52 "//foundation/window/window_manager/wm:libwm", 53 "//third_party/zlib:libz", 54 ] 55 56 external_deps = [ 57 "eventhandler:libeventhandler", 58 "hiviewdfx_hilog_native:libhilog", 59 "input:libmmi-client", 60 ] 61 62 part_name = "webview" 63 subsystem_name = "web" 64} 65 66ohos_executable("web_render") { 67 install_enable = false 68 69 sources = [ "ohos_nweb/nweb_web_render.cpp" ] 70 71 configs = [ ":nweb_test_config" ] 72 73 external_deps = [ "hiviewdfx_hilog_native:libhilog" ] 74 75 part_name = "webview" 76 subsystem_name = "web" 77} 78