• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-2023 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("//foundation/arkui/ace_engine/test/unittest/ace_unittest.gni")
15
16ohos_unittest("image_provider_test_ng") {
17  module_out_path = image_test_output_path
18
19  sources = [
20    "$ace_root/frameworks/core/components_ng/image_provider/animated_image_object.cpp",
21    "$ace_root/frameworks/core/components_ng/image_provider/image_data.cpp",
22    "$ace_root/frameworks/core/components_ng/image_provider/image_loading_context.cpp",
23    "$ace_root/frameworks/core/components_ng/image_provider/image_provider.cpp",
24    "$ace_root/frameworks/core/components_ng/image_provider/image_state_manager.cpp",
25    "$ace_root/frameworks/core/components_ng/image_provider/pixel_map_image_object.cpp",
26    "$ace_root/frameworks/core/components_ng/image_provider/static_image_object.cpp",
27    "$ace_root/frameworks/core/components_ng/image_provider/svg_image_object.cpp",
28    "$ace_root/test/mock/adapter/mock_input_manager.cpp",
29    "$ace_root/test/mock/adapter/mock_ui_session_manager.cpp",
30    "$ace_root/test/mock/base/mock_ace_performance_check.cpp",
31    "$ace_root/test/mock/base/mock_ace_performance_monitor.cpp",
32    "$ace_root/test/mock/base/mock_download_manager.cpp",
33    "$ace_root/test/mock/base/mock_engine_helper.cpp",
34    "$ace_root/test/mock/base/mock_event_report.cpp",
35    "$ace_root/test/mock/base/mock_foldable_window.cpp",
36    "$ace_root/test/mock/base/mock_frame_report.cpp",
37    "$ace_root/test/mock/base/mock_frame_trace_adapter.cpp",
38    "$ace_root/test/mock/base/mock_image_source.cpp",
39    "$ace_root/test/mock/base/mock_jank_frame_report.cpp",
40    "$ace_root/test/mock/base/mock_lifecycle_checkable.cpp",
41    "$ace_root/test/mock/base/mock_localization.cpp",
42    "$ace_root/test/mock/base/mock_ressched_report.cpp",
43    "$ace_root/test/mock/base/mock_socperf_client_impl.cpp",
44    "$ace_root/test/mock/base/mock_subwindow.cpp",
45    "$ace_root/test/mock/base/mock_system_properties.cpp",
46    "$ace_root/test/mock/core/common/mock_ace_application_info.cpp",
47    "$ace_root/test/mock/core/common/mock_ace_engine.cpp",
48    "$ace_root/test/mock/core/common/mock_ace_engine_ext.cpp",
49    "$ace_root/test/mock/core/common/mock_clipboard.cpp",
50    "$ace_root/test/mock/core/common/mock_container.cpp",
51    "$ace_root/test/mock/core/common/mock_data_detector_adapter.cpp",
52    "$ace_root/test/mock/core/common/mock_font_manager_ng.cpp",
53    "$ace_root/test/mock/core/common/mock_image_analyzer_manager.cpp",
54    "$ace_root/test/mock/core/common/mock_interaction.cpp",
55    "$ace_root/test/mock/core/common/mock_layout_inspector.cpp",
56    "$ace_root/test/mock/core/common/mock_motion_path_evaluator.cpp",
57    "$ace_root/test/mock/core/common/mock_raw_recognizer.cpp",
58    "$ace_root/test/mock/core/common/mock_text_share_adapter.cpp",
59    "$ace_root/test/mock/core/common/mock_text_translation_adapter.cpp",
60    "$ace_root/test/mock/core/common/mock_theme_utils.cpp",
61    "$ace_root/test/mock/core/common/mock_udmf.cpp",
62    "$ace_root/test/mock/core/event/mock_statusbar_event_proxy.cpp",
63    "$ace_root/test/mock/core/event/mock_touch_event.cpp",
64    "$ace_root/test/mock/core/image_provider/mock_image_cache.cpp",
65    "$ace_root/test/mock/core/image_provider/mock_image_decoder.cpp",
66    "$ace_root/test/mock/core/image_provider/mock_image_loader.cpp",
67    "$ace_root/test/mock/core/image_provider/mock_image_source_info.cpp",
68    "$ace_root/test/mock/core/image_provider/mock_image_utils.cpp",
69    "$ace_root/test/mock/core/image_provider/mock_skia_image_data.cpp",
70    "$ace_root/test/mock/core/pipeline/mock_element_register.cpp",
71    "$ace_root/test/mock/core/pipeline/mock_pipeline_context.cpp",
72    "$ace_root/test/mock/core/render/mock_animated_image.cpp",
73    "$ace_root/test/mock/core/render/mock_animation_utils.cpp",
74    "$ace_root/test/mock/core/render/mock_canvas_image.cpp",
75    "$ace_root/test/mock/core/render/mock_font_collection.cpp",
76    "$ace_root/test/mock/core/render/mock_modifier_adapter.cpp",
77    "$ace_root/test/mock/core/render/mock_paragraph.cpp",
78    "$ace_root/test/mock/core/render/mock_pixmap_image.cpp",
79    "$ace_root/test/mock/core/render/mock_render_context_creator.cpp",
80    "$ace_root/test/mock/core/render/mock_render_surface_creator.cpp",
81    "$ace_root/test/mock/core/render/mock_skia_image.cpp",
82    "$ace_root/test/mock/core/render/mock_svg_canvas_image.cpp",
83    "$ace_root/test/mock/interfaces/mock_ace_forward_compatibility.cpp",
84    "$ace_root/test/mock/interfaces/mock_content_modifier.cpp",
85    "$ace_root/test/unittest/core/pattern/text/mock/mock_text_layout_adapter.cpp",
86    "$ace_root/test/unittest/core/pipeline/mock_input_method_manager.cpp",
87    "image_provider_test_ng.cpp",
88  ]
89
90  deps = [
91    "$ace_root/frameworks/core/components/theme:build_theme_code",
92    "$ace_root/test/unittest:ace_base",
93    "$ace_root/test/unittest:ace_components_base",
94    "$ace_root/test/unittest:ace_components_event",
95    "$ace_root/test/unittest:ace_components_gestures",
96    "$ace_root/test/unittest:ace_components_layout",
97    "$ace_root/test/unittest:ace_components_manager",
98    "$ace_root/test/unittest:ace_components_pattern",
99    "$ace_root/test/unittest:ace_components_property",
100    "$ace_root/test/unittest:ace_components_render",
101    "$ace_root/test/unittest:ace_components_syntax",
102    "$ace_root/test/unittest:ace_core_animation",
103    "$ace_root/test/unittest:ace_core_extra",
104    "$ace_root/test/unittest:ace_engine_unittest_flutter_deps",
105    "$ace_root/test/unittest:ace_unittest_log",
106    "$ace_root/test/unittest:ace_unittest_trace",
107    "$graphic_2d_path/rosen/modules/render_service_base:librender_service_base",
108  ]
109  external_deps = [
110    "cJSON:cjson",
111    "googletest:gmock_main",
112  ]
113
114  configs = [ "$ace_root/test/unittest:ace_unittest_config" ]
115}
116
117ohos_unittest("image_file_cache_test_ng") {
118  module_out_path = image_test_output_path
119
120  sources = [
121    "$ace_root/frameworks/core/components_ng/pattern/overlay/dialog_manager.cpp",
122    "$ace_root/frameworks/core/components_ng/pattern/overlay/sheet_manager.cpp",
123    "$ace_root/frameworks/core/image/image_file_cache.cpp",
124    "$ace_root/test/mock/base/mock_frame_report.cpp",
125    "$ace_root/test/mock/base/mock_frame_trace_adapter.cpp",
126    "$ace_root/test/mock/base/mock_image_packer.cpp",
127    "$ace_root/test/mock/base/mock_image_source.cpp",
128    "$ace_root/test/mock/base/mock_lifecycle_checkable.cpp",
129    "$ace_root/test/mock/base/mock_system_properties.cpp",
130    "$ace_root/test/mock/core/image_provider/mock_skia_image_data.cpp",
131    "image_file_cache_test_ng.cpp",
132  ]
133
134  deps = [
135    "$ace_root/test/unittest:ace_base",
136    "$ace_root/test/unittest:ace_core_extra",
137    "$ace_root/test/unittest:ace_engine_unittest_flutter_deps",
138    "$ace_root/test/unittest:ace_unittest_log",
139    "$ace_root/test/unittest:ace_unittest_trace",
140  ]
141
142  external_deps = [
143    "googletest:gmock_main",
144    "skia:skia_canvaskit",
145  ]
146
147  configs = [ "$ace_root/test/unittest:ace_unittest_config" ]
148}
149
150ohos_unittest("image_cache_test") {
151  module_out_path = image_test_output_path
152  sources = [
153    "$ace_root/frameworks/core/accessibility/accessibility_node.cpp",
154    "$ace_root/frameworks/core/common/ace_application_info.cpp",
155    "$ace_root/frameworks/core/common/ace_engine.cpp",
156    "$ace_root/frameworks/core/common/container_scope.cpp",
157    "$ace_root/frameworks/core/common/vibrator/vibrator_proxy.cpp",
158    "$ace_root/frameworks/core/common/window.cpp",
159    "$ace_root/frameworks/core/components/bubble/bubble_element.cpp",
160    "$ace_root/frameworks/core/components/common/properties/color.cpp",
161    "$ace_root/frameworks/core/components/common/properties/scroll_bar.cpp",
162    "$ace_root/frameworks/core/components/display/display_component.cpp",
163    "$ace_root/frameworks/core/components/display/render_display.cpp",
164    "$ace_root/frameworks/core/components/page/page_element.cpp",
165    "$ace_root/frameworks/core/components/refresh/render_refresh.cpp",
166    "$ace_root/frameworks/core/components/scroll/render_multi_child_scroll.cpp",
167    "$ace_root/frameworks/core/components/scroll/render_scroll.cpp",
168    "$ace_root/frameworks/core/components/scroll/render_single_child_scroll.cpp",
169    "$ace_root/frameworks/core/components/scroll/scroll_bar_controller.cpp",
170    "$ace_root/frameworks/core/components/stack/render_stack.cpp",
171    "$ace_root/frameworks/core/components/stage/render_stage.cpp",
172    "$ace_root/frameworks/core/components/stage/stage_element.cpp",
173    "$ace_root/frameworks/core/components/test/json/json_frontend.cpp",
174    "$ace_root/frameworks/core/components/test/unittest/mock/mock_render_common.cpp",
175    "$ace_root/frameworks/core/components/tween/tween_component.cpp",
176    "$ace_root/frameworks/core/event/back_end_event_manager.cpp",
177    "$ace_root/frameworks/core/event/multimodal/multimodal_manager.cpp",
178    "$ace_root/frameworks/core/event/multimodal/multimodal_scene.cpp",
179    "$ace_root/frameworks/core/focus/focus_node.cpp",
180    "$ace_root/frameworks/core/gestures/drag_recognizer.cpp",
181    "$ace_root/frameworks/core/image/image_cache.cpp",
182    "$ace_root/frameworks/core/image/image_loader.cpp",
183    "$ace_root/frameworks/core/image/image_provider.cpp",
184    "$ace_root/frameworks/core/image/test/mock/mock_image_loader.cpp",
185    "$ace_root/frameworks/core/pipeline/base/component_group_element.cpp",
186    "$ace_root/frameworks/core/pipeline/base/composed_component.cpp",
187    "$ace_root/frameworks/core/pipeline/base/composed_element.cpp",
188    "$ace_root/frameworks/core/pipeline/base/element.cpp",
189    "$ace_root/frameworks/core/pipeline/base/render_element.cpp",
190    "$ace_root/frameworks/core/pipeline/base/render_node.cpp",
191    "$ace_root/frameworks/core/pipeline/base/sole_child_element.cpp",
192    "$ace_root/frameworks/core/pipeline/pipeline_context.cpp",
193    "image_cache_test.cpp",
194  ]
195
196  configs = [ "$ace_root/test/unittest:ace_unittest_config" ]
197
198  deps = [
199    "$ace_root/adapter/ohos/osal:ace_osal_ohos_ohos",
200    "$ace_root/frameworks/base:ace_base_ohos",
201    "$ace_root/frameworks/base/resource:ace_resource",
202  ]
203  external_deps = [
204    "c_utils:utils",
205    "googletest:gmock_main",
206    "googletest:gtest_main",
207  ]
208  part_name = ace_engine_part
209}
210
211ohos_unittest("ImageProviderTest") {
212  module_out_path = image_test_output_path
213  sources = [
214    "$ace_root/frameworks/core/accessibility/accessibility_node.cpp",
215    "$ace_root/frameworks/core/common/ace_application_info.cpp",
216    "$ace_root/frameworks/core/common/ace_engine.cpp",
217    "$ace_root/frameworks/core/common/container_scope.cpp",
218    "$ace_root/frameworks/core/common/focus_animation_manager.cpp",
219    "$ace_root/frameworks/core/common/vibrator/vibrator_proxy.cpp",
220    "$ace_root/frameworks/core/common/window.cpp",
221    "$ace_root/frameworks/core/components/bubble/bubble_element.cpp",
222    "$ace_root/frameworks/core/components/common/properties/color.cpp",
223    "$ace_root/frameworks/core/components/common/properties/scroll_bar.cpp",
224    "$ace_root/frameworks/core/components/display/display_component.cpp",
225    "$ace_root/frameworks/core/components/display/render_display.cpp",
226    "$ace_root/frameworks/core/components/focus_animation/render_focus_animation.cpp",
227    "$ace_root/frameworks/core/components/page/page_element.cpp",
228    "$ace_root/frameworks/core/components/refresh/render_refresh.cpp",
229    "$ace_root/frameworks/core/components/scroll/render_multi_child_scroll.cpp",
230    "$ace_root/frameworks/core/components/scroll/render_scroll.cpp",
231    "$ace_root/frameworks/core/components/scroll/render_single_child_scroll.cpp",
232    "$ace_root/frameworks/core/components/scroll/scroll_bar_controller.cpp",
233    "$ace_root/frameworks/core/components/stack/render_stack.cpp",
234    "$ace_root/frameworks/core/components/stage/render_stage.cpp",
235    "$ace_root/frameworks/core/components/stage/stage_element.cpp",
236    "$ace_root/frameworks/core/components/test/json/json_frontend.cpp",
237    "$ace_root/frameworks/core/components/test/unittest/image/image_test_utils.cpp",
238    "$ace_root/frameworks/core/components/theme/theme_constants.cpp",
239    "$ace_root/frameworks/core/components/tween/tween_component.cpp",
240    "$ace_root/frameworks/core/event/back_end_event_manager.cpp",
241    "$ace_root/frameworks/core/event/multimodal/multimodal_manager.cpp",
242    "$ace_root/frameworks/core/event/multimodal/multimodal_scene.cpp",
243    "$ace_root/frameworks/core/focus/focus_node.cpp",
244    "$ace_root/frameworks/core/gestures/drag_recognizer.cpp",
245    "$ace_root/frameworks/core/image/image_cache.cpp",
246    "$ace_root/frameworks/core/image/image_loader.cpp",
247    "$ace_root/frameworks/core/image/image_provider.cpp",
248    "$ace_root/frameworks/core/image/image_source_info.cpp",
249    "$ace_root/frameworks/core/pipeline/base/component_group_element.cpp",
250    "$ace_root/frameworks/core/pipeline/base/composed_component.cpp",
251    "$ace_root/frameworks/core/pipeline/base/composed_element.cpp",
252    "$ace_root/frameworks/core/pipeline/base/element.cpp",
253    "$ace_root/frameworks/core/pipeline/base/render_element.cpp",
254    "$ace_root/frameworks/core/pipeline/base/render_node.cpp",
255    "$ace_root/frameworks/core/pipeline/base/sole_child_element.cpp",
256    "$ace_root/frameworks/core/pipeline/pipeline_context.cpp",
257    "$ace_root/test/mock/base/mock_download_manager.cpp",
258    "$ace_root/test/mock/core/common/mock_ace_application_info.cpp",
259    "image_provider_test.cpp",
260  ]
261
262  deps = [
263    "$ace_root/adapter/ohos/osal:ace_osal_ohos_ohos",
264    "$ace_root/frameworks/base:ace_base_ohos",
265    "$ace_root/frameworks/base/resource:ace_resource",
266  ]
267  external_deps = [
268    "c_utils:utils",
269    "googletest:gmock_main",
270    "googletest:gtest_main",
271  ]
272
273  part_name = ace_engine_part
274}
275
276ohos_unittest("ImageCompressorTest") {
277  module_out_path = image_test_output_path
278  sources = [
279    "$ace_root/frameworks/core/common/ace_application_info.cpp",
280    "$ace_root/frameworks/core/common/ace_engine.cpp",
281    "$ace_root/frameworks/core/common/container.cpp",
282    "$ace_root/frameworks/core/common/container_scope.cpp",
283    "$ace_root/frameworks/core/common/frontend.cpp",
284    "$ace_root/frameworks/core/common/window.cpp",
285    "$ace_root/frameworks/core/components/display/display_component.cpp",
286    "$ace_root/frameworks/core/components/display/render_display.cpp",
287    "$ace_root/frameworks/core/image/image_cache.cpp",
288    "$ace_root/frameworks/core/image/image_compressor.cpp",
289    "$ace_root/frameworks/core/image/image_loader.cpp",
290    "$ace_root/frameworks/core/image/image_provider.cpp",
291    "$ace_root/frameworks/core/image/image_source_info.cpp",
292    "$ace_root/test/mock/base/mock_ace_container.cpp",
293    "$ace_root/test/mock/core/common/mock_ace_application_info.cpp",
294    "image_compressor_test.cpp",
295  ]
296
297  deps = [
298    "$ace_root/adapter/ohos/osal:ace_osal_ohos_ohos",
299    "$ace_root/frameworks/base:ace_base_ohos",
300    "$ace_root/frameworks/base/resource:ace_resource",
301  ]
302
303  configs = [ "$ace_root/test/unittest:ace_unittest_config" ]
304
305  defines = [ "ENABLE_OPENCL" ]
306  external_deps = [
307    "c_utils:utils",
308    "googletest:gmock_main",
309    "googletest:gtest_main",
310    "opencl-headers:libcl",
311  ]
312  part_name = ace_engine_part
313}
314