• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("//build/test.gni")
15import("../../../windowmanager_aafwk.gni")
16module_out_path = "window_manager/window_manager/wmserver"
17
18group("unittest") {
19  testonly = true
20  deps = [
21    ":wmserver_accessibility_connection_test",
22    ":wmserver_display_group_controller_test",
23    ":wmserver_display_group_info_test",
24    ":wmserver_drag_controller_test",
25    ":wmserver_mock_session_manager_service_test",
26    ":wmserver_window_common_event_test",
27    ":wmserver_window_display_zoom_controller_test",
28    ":wmserver_window_dumper_test",
29    ":wmserver_window_freeze_controller_test",
30    ":wmserver_window_group_mgr_test",
31    ":wmserver_window_inner_window_test",
32    ":wmserver_window_layout_policy_test",
33    ":wmserver_window_manager_config_test",
34    ":wmserver_window_manager_proxy_test",
35    ":wmserver_window_manager_service_utils_test",
36    ":wmserver_window_manager_stub_test",
37    ":wmserver_window_node_container_test",
38    ":wmserver_window_snapshot_test",
39    ":wmserver_window_system_effect_test",
40    ":wmserver_window_zorder_policy_test",
41  ]
42}
43
44test_external_deps = [
45  "ability_base:want",
46  "ability_runtime:ability_context_native",
47  "ability_runtime:ability_manager",
48  "ace_engine:ace_uicontent",
49  "bundle_framework:appexecfwk_base",
50  "c_utils:utils",
51  "common_event_service:cesfwk_innerkits",
52  "config_policy:configpolicy_util",
53  "display_manager:displaymgr",
54  "eventhandler:libeventhandler",
55  "googletest:gmock",
56  "googletest:gtest_main",
57  "graphic_2d:librender_service_client",
58  "graphic_2d:window_animation",
59  "hicollie:libhicollie",
60  "hilog:libhilog",
61  "hisysevent:libhisysevent",
62  "hitrace:hitrace_meter",
63  "input:libmmi-client",
64  "ipc:ipc_single",
65  "napi:ace_napi",
66  "power_manager:powermgr_client",
67  "safwk:system_ability_fwk",
68]
69
70test_inner_deps = [
71  "${window_base_path}/dm:libdm",
72  "${window_base_path}/utils:libwmutil",
73  "${window_base_path}/utils:libwmutil_base",
74  "${window_base_path}/window_scene/interfaces/innerkits:libwsutils",
75  "${window_base_path}/wm:libwm",
76  "${window_base_path}/wmserver:sms",
77  "../..:libwms",
78  "../../../dmserver:libdms",
79  "../../../test/common/utils:libtestutil",
80  "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client",
81]
82
83config("wmserver_unittest_common_public_config") {
84  include_dirs = [
85    "../../../test/common/mock",
86    "../../../test/common/utils/include",
87    "../../../wm/include",
88    "../../include",
89    "../../include/zidl",
90    "../../include/window_snapshot",
91    "../../../interfaces/innerkits/wm",
92    "../../../utils/include",
93    "//third_party/googletest/googlemock/include",
94    "foundation/graphic/graphic_2d/rosen/modules/2d_graphics/include/",
95  ]
96}
97
98test_public_config = [
99  ":wmserver_unittest_common_public_config",
100  "../../../resources/config/build:coverage_flags",
101  "../../../resources/config/build:testcase_flags",
102]
103
104ohos_unittest("wmserver_window_manager_service_test") {
105  module_out_path = module_out_path
106
107  sources = [ "window_manager_service_test.cpp" ]
108  configs = test_public_config
109
110  deps = test_inner_deps
111  external_deps = test_external_deps
112}
113
114ohos_unittest("wmserver_input_window_monitor_test") {
115  module_out_path = module_out_path
116  configs = test_public_config
117  sources = [ "input_window_monitor_test.cpp" ]
118
119  deps = test_inner_deps
120  external_deps = test_external_deps
121}
122
123ohos_unittest("wmserver_avoid_area_controller_test") {
124  module_out_path = module_out_path
125  configs = test_public_config
126  sources = [ "avoid_area_controller_test.cpp" ]
127
128  deps = test_inner_deps
129  external_deps = test_external_deps
130}
131
132ohos_unittest("wmserver_window_controller_test") {
133  module_out_path = module_out_path
134  configs = test_public_config
135  sources = [ "window_controller_test.cpp" ]
136
137  deps = test_inner_deps
138  external_deps = test_external_deps
139}
140
141ohos_unittest("wmserver_minimize_app_test") {
142  module_out_path = module_out_path
143  configs = test_public_config
144  sources = [ "minimize_app_test.cpp" ]
145
146  deps = test_inner_deps
147  external_deps = test_external_deps
148}
149
150ohos_unittest("wmserver_window_layout_policy_test") {
151  module_out_path = module_out_path
152  configs = test_public_config
153  sources = [ "window_layout_policy_test.cpp" ]
154
155  deps = test_inner_deps
156  external_deps = test_external_deps
157}
158
159ohos_unittest("wmserver_window_manager_config_test") {
160  module_out_path = module_out_path
161  configs = test_public_config
162  sources = [ "window_manager_config_test.cpp" ]
163  deps = test_inner_deps
164  external_deps = test_external_deps
165
166  deps += [ "//third_party/libxml2:libxml2" ]
167}
168
169ohos_unittest("wmserver_window_snapshot_test") {
170  module_out_path = module_out_path
171  configs = test_public_config
172  sources = [ "window_snapshot_test.cpp" ]
173
174  deps = test_inner_deps
175  external_deps = test_external_deps
176
177  external_deps += [ "image_framework:image_native" ]
178}
179
180ohos_unittest("wmserver_window_zorder_policy_test") {
181  module_out_path = module_out_path
182  configs = test_public_config
183  sources = [ "window_zorder_policy_test.cpp" ]
184
185  deps = test_inner_deps
186  external_deps = test_external_deps
187}
188
189ohos_unittest("wmserver_window_node_container_test") {
190  module_out_path = module_out_path
191  configs = test_public_config
192  sources = [ "window_node_container_test.cpp" ]
193
194  deps = test_inner_deps
195  external_deps = test_external_deps
196}
197
198ohos_unittest("wmserver_window_node_test") {
199  module_out_path = module_out_path
200  configs = test_public_config
201  sources = [ "window_node_test.cpp" ]
202
203  deps = test_inner_deps
204  external_deps = test_external_deps
205}
206
207ohos_unittest("wmserver_window_pair_test") {
208  module_out_path = module_out_path
209  configs = test_public_config
210
211  sources = [ "window_pair_test.cpp" ]
212
213  deps = test_inner_deps
214  external_deps = test_external_deps
215}
216
217ohos_unittest("wmserver_window_manager_stub_test") {
218  module_out_path = module_out_path
219  configs = test_public_config
220  sources = [ "window_manager_stub_test.cpp" ]
221
222  deps = test_inner_deps
223  external_deps = test_external_deps
224}
225
226ohos_unittest("wmserver_starting_window_test") {
227  module_out_path = module_out_path
228  configs = test_public_config
229  sources = [ "starting_window_test.cpp" ]
230
231  deps = test_inner_deps
232  external_deps = test_external_deps
233}
234
235ohos_unittest("wmserver_window_manager_proxy_test") {
236  module_out_path = module_out_path
237  configs = test_public_config
238  sources = [ "window_manager_proxy_test.cpp" ]
239
240  deps = test_inner_deps
241  external_deps = test_external_deps
242}
243
244ohos_unittest("wmserver_window_dumper_test") {
245  module_out_path = module_out_path
246  configs = test_public_config
247  sources = [ "window_dumper_test.cpp" ]
248
249  deps = test_inner_deps
250  external_deps = test_external_deps
251}
252
253ohos_unittest("wmserver_display_group_controller_test") {
254  module_out_path = module_out_path
255  configs = test_public_config
256  sources = [ "display_group_controller_test.cpp" ]
257
258  deps = test_inner_deps
259  external_deps = test_external_deps
260}
261
262ohos_unittest("wmserver_window_display_zoom_controller_test") {
263  module_out_path = module_out_path
264  configs = test_public_config
265  sources = [ "window_display_zoom_controller_test.cpp" ]
266
267  deps = test_inner_deps
268  external_deps = test_external_deps
269}
270
271ohos_unittest("wmserver_display_group_info_test") {
272  module_out_path = module_out_path
273  configs = test_public_config
274  sources = [ "display_group_info_test.cpp" ]
275
276  deps = test_inner_deps
277  external_deps = test_external_deps
278}
279
280ohos_unittest("wmserver_accessibility_connection_test") {
281  module_out_path = module_out_path
282  configs = test_public_config
283  sources = [ "accessibility_connection_test.cpp" ]
284
285  deps = test_inner_deps
286  external_deps = test_external_deps
287}
288
289ohos_unittest("wmserver_window_freeze_controller_test") {
290  module_out_path = module_out_path
291  configs = test_public_config
292  sources = [ "window_freeze_controller_test.cpp" ]
293
294  deps = test_inner_deps
295  external_deps = test_external_deps
296}
297
298ohos_unittest("wmserver_window_inner_window_test") {
299  module_out_path = module_out_path
300  configs = test_public_config
301  sources = [ "window_inner_window_test.cpp" ]
302
303  deps = test_inner_deps
304  external_deps = test_external_deps
305}
306
307ohos_unittest("wmserver_remote_animation_test") {
308  module_out_path = module_out_path
309  configs = test_public_config
310  sources = [ "remote_animation_test.cpp" ]
311
312  deps = test_inner_deps
313  external_deps = test_external_deps
314}
315
316ohos_unittest("wmserver_drag_controller_test") {
317  module_out_path = module_out_path
318  configs = test_public_config
319  sources = [ "drag_controller_test.cpp" ]
320
321  deps = test_inner_deps
322  external_deps = test_external_deps
323}
324
325ohos_unittest("wmserver_window_inner_manager_test") {
326  module_out_path = module_out_path
327  configs = test_public_config
328  sources = [ "window_inner_manager_test.cpp" ]
329
330  deps = test_inner_deps
331  external_deps = test_external_deps
332}
333
334ohos_unittest("wmserver_window_root_test") {
335  module_out_path = module_out_path
336  configs = test_public_config
337  sources = [ "window_root_test.cpp" ]
338
339  deps = test_inner_deps
340  external_deps = test_external_deps
341}
342
343ohos_unittest("wmserver_window_system_effect_test") {
344  module_out_path = module_out_path
345  configs = test_public_config
346  sources = [ "window_system_effect_test.cpp" ]
347
348  deps = test_inner_deps
349  external_deps = test_external_deps
350}
351
352ohos_unittest("wmserver_window_manager_service_utils_test") {
353  module_out_path = module_out_path
354  configs = test_public_config
355  sources = [ "window_manager_service_utils_test.cpp" ]
356
357  deps = test_inner_deps
358  external_deps = test_external_deps
359  if (is_standard_system) {
360    external_deps += [ "init:libbegetutil" ]
361  } else {
362    external_deps += [ "init_lite:libbegetutil" ]
363  }
364}
365
366ohos_unittest("wmserver_window_group_mgr_test") {
367  module_out_path = module_out_path
368  configs = test_public_config
369  sources = [ "window_group_mgr_test.cpp" ]
370
371  deps = test_inner_deps
372  external_deps = test_external_deps
373}
374
375ohos_unittest("wmserver_mock_session_manager_service_test") {
376  module_out_path = module_out_path
377  configs = test_public_config
378  sources = [ "mock_session_manager_service_test.cpp" ]
379
380  deps = test_inner_deps
381  external_deps = test_external_deps
382}
383
384ohos_unittest("wmserver_window_common_event_test") {
385  module_out_path = module_out_path
386  configs = test_public_config
387  sources = [ "window_common_event_test.cpp" ]
388
389  deps = test_inner_deps
390  external_deps = test_external_deps
391}
392