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