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