1# Copyright (c) 2021-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")
16
17module_out_path = "window_manager/wms"
18
19group("systemtest") {
20  testonly = true
21
22  deps = [
23    ":wms_window_animation_transition_test",
24    ":wms_window_app_floating_window_test",
25    ":wms_window_dialogwindow_test",
26    ":wms_window_display_zoom_test",
27    ":wms_window_drag_test",
28    ":wms_window_effect_test",
29    ":wms_window_gamut_test",
30    ":wms_window_gesture_navigation_enabled_test",
31    ":wms_window_immersive_test",
32    ":wms_window_input_method_test",
33    ":wms_window_input_test",
34    ":wms_window_mode_support_info_test",
35    ":wms_window_multi_ability_test",
36    ":wms_window_nointeraction_listener_test",
37    ":wms_window_occupied_area_change_test",
38    ":wms_window_raisetoapptop_test",
39    ":wms_window_rotation_test",
40    ":wms_window_split_immersive_test",
41    ":wms_window_split_test",
42    ":wms_window_subwindow_test",
43    ":wms_window_system_toast_window_test",
44    ":wms_window_systemsubwindow_test",
45    ":wms_window_touch_outside_test",
46    ":wms_window_visibility_info_test",
47    ":wms_window_water_mark_test",
48  ]
49  if (!window_manager_use_sceneboard) {
50    deps += [
51      ":wms_window_focus_test",
52      ":wms_window_move_drag_test",
53    ]
54  }
55  if (window_manager_use_sceneboard) {
56    deps += [ ":wms_window_layout_test" ]
57  }
58}
59
60ohos_systemtest("wms_window_layout_test") {
61  module_out_path = module_out_path
62
63  sources = [ "window_layout_test.cpp" ]
64
65  include_dirs = [
66    "${window_base_path}/window_scene/test/mock",
67    "${window_base_path}/window_scene/interfaces/include",
68  ]
69
70  deps = [
71    ":wms_systemtest_common",
72    "${window_base_path}/window_scene/common:window_scene_common",
73    "${window_base_path}/window_scene/interfaces/innerkits:libwsutils",
74    "${window_base_path}/window_scene/session:scene_session",
75  ]
76
77  external_deps = [
78    "c_utils:utils",
79    "hilog:libhilog",
80    "power_manager:powermgr_client",
81  ]
82}
83
84ohos_systemtest("wms_window_effect_test") {
85  module_out_path = module_out_path
86
87  sources = [ "window_effect_test.cpp" ]
88
89  deps = [ ":wms_systemtest_common" ]
90
91  external_deps = [
92    "c_utils:utils",
93    "hilog:libhilog",
94    "power_manager:powermgr_client",
95  ]
96}
97
98ohos_systemtest("wms_window_multi_ability_test") {
99  module_out_path = module_out_path
100
101  sources = [ "window_multi_ability_test.cpp" ]
102
103  deps = [ ":wms_systemtest_common" ]
104
105  external_deps = [
106    "c_utils:utils",
107    "hilog:libhilog",
108    "power_manager:powermgr_client",
109  ]
110}
111
112ohos_systemtest("wms_window_subwindow_test") {
113  module_out_path = module_out_path
114
115  sources = [ "window_subwindow_test.cpp" ]
116
117  deps = [ ":wms_systemtest_common" ]
118
119  external_deps = [
120    "bundle_framework:appexecfwk_base",
121    "c_utils:utils",
122    "hilog:libhilog",
123  ]
124}
125
126ohos_systemtest("wms_window_systemsubwindow_test") {
127  module_out_path = module_out_path
128
129  sources = [ "window_systemsubwindow_test.cpp" ]
130
131  deps = [ ":wms_systemtest_common" ]
132
133  external_deps = [
134    "bundle_framework:appexecfwk_base",
135    "c_utils:utils",
136    "hilog:libhilog",
137    "power_manager:powermgr_client",
138  ]
139}
140
141ohos_systemtest("wms_window_dialogwindow_test") {
142  module_out_path = module_out_path
143
144  sources = [ "window_dialogwindow_test.cpp" ]
145
146  deps = [ ":wms_systemtest_common" ]
147
148  external_deps = [
149    "bundle_framework:appexecfwk_base",
150    "c_utils:utils",
151    "common_event_service:cesfwk_innerkits",
152    "hilog:libhilog",
153  ]
154}
155
156ohos_systemtest("wms_window_immersive_test") {
157  module_out_path = module_out_path
158
159  sources = [ "window_immersive_test.cpp" ]
160
161  deps = [ ":wms_systemtest_common" ]
162
163  external_deps = [
164    "c_utils:utils",
165    "hilog:libhilog",
166    "power_manager:powermgr_client",
167  ]
168}
169
170ohos_systemtest("wms_window_focus_test") {
171  module_out_path = module_out_path
172
173  sources = [ "window_focus_test.cpp" ]
174
175  deps = [ ":wms_systemtest_common" ]
176
177  external_deps = [
178    "c_utils:utils",
179    "hilog:libhilog",
180    "power_manager:powermgr_client",
181  ]
182}
183
184ohos_systemtest("wms_window_split_immersive_test") {
185  module_out_path = module_out_path
186
187  sources = [ "window_split_immersive_test.cpp" ]
188
189  deps = [ ":wms_systemtest_common" ]
190
191  external_deps = [
192    "c_utils:utils",
193    "hilog:libhilog",
194    "power_manager:powermgr_client",
195  ]
196}
197
198ohos_systemtest("wms_window_split_test") {
199  module_out_path = module_out_path
200
201  sources = [ "window_split_test.cpp" ]
202
203  deps = [ ":wms_systemtest_common" ]
204
205  external_deps = [
206    "c_utils:utils",
207    "hilog:libhilog",
208    "power_manager:powermgr_client",
209  ]
210}
211
212ohos_systemtest("wms_window_move_drag_test") {
213  module_out_path = module_out_path
214
215  sources = [ "window_move_drag_test.cpp" ]
216
217  deps = [ ":wms_systemtest_common" ]
218
219  external_deps = [
220    "bundle_framework:appexecfwk_base",
221    "c_utils:utils",
222    "hilog:libhilog",
223    "power_manager:powermgr_client",
224  ]
225}
226
227ohos_systemtest("wms_window_input_method_test") {
228  module_out_path = module_out_path
229
230  sources = [ "window_input_method_test.cpp" ]
231
232  deps = [ ":wms_systemtest_common" ]
233
234  external_deps = [
235    "c_utils:utils",
236    "hilog:libhilog",
237    "power_manager:powermgr_client",
238  ]
239}
240
241ohos_systemtest("wms_window_gamut_test") {
242  module_out_path = module_out_path
243
244  sources = [ "window_gamut_test.cpp" ]
245
246  deps = [ ":wms_systemtest_common" ]
247
248  external_deps = [
249    "c_utils:utils",
250    "hilog:libhilog",
251    "power_manager:powermgr_client",
252  ]
253}
254
255ohos_systemtest("wms_window_gesture_navigation_enabled_test") {
256  module_out_path = module_out_path
257
258  sources = [ "window_gesture_navigation_enabled_test.cpp" ]
259
260  deps = [ ":wms_systemtest_common" ]
261
262  external_deps = [
263    "c_utils:utils",
264    "hilog:libhilog",
265  ]
266}
267
268ohos_systemtest("wms_window_input_test") {
269  module_out_path = module_out_path
270
271  sources = [ "window_input_test.cpp" ]
272
273  deps = [ ":wms_systemtest_common" ]
274
275  external_deps = [
276    "c_utils:utils",
277    "hilog:libhilog",
278    "power_manager:powermgr_client",
279  ]
280}
281
282ohos_systemtest("wms_window_visibility_info_test") {
283  module_out_path = module_out_path
284
285  sources = [ "window_visibility_info_test.cpp" ]
286
287  deps = [ ":wms_systemtest_common" ]
288
289  external_deps = [
290    "c_utils:utils",
291    "hilog:libhilog",
292    "power_manager:powermgr_client",
293  ]
294}
295
296ohos_systemtest("wms_window_display_zoom_test") {
297  module_out_path = module_out_path
298
299  sources = [ "window_display_zoom_test.cpp" ]
300
301  deps = [ ":wms_systemtest_common" ]
302
303  external_deps = [
304    "c_utils:utils",
305    "hilog:libhilog",
306    "power_manager:powermgr_client",
307  ]
308}
309
310ohos_systemtest("wms_window_drag_test") {
311  module_out_path = module_out_path
312
313  sources = [ "window_drag_test.cpp" ]
314
315  deps = [ ":wms_systemtest_common" ]
316
317  external_deps = [
318    "c_utils:utils",
319    "hilog:libhilog",
320    "power_manager:powermgr_client",
321  ]
322}
323
324ohos_systemtest("wms_window_raisetoapptop_test") {
325  module_out_path = module_out_path
326
327  sources = [ "window_raisetoapptop_test.cpp" ]
328
329  deps = [ ":wms_systemtest_common" ]
330
331  external_deps = [
332    "c_utils:utils",
333    "hilog:libhilog",
334    "power_manager:powermgr_client",
335  ]
336}
337
338ohos_systemtest("wms_window_rotation_test") {
339  module_out_path = module_out_path
340
341  sources = [ "window_rotation_test.cpp" ]
342
343  deps = [ ":wms_systemtest_common" ]
344
345  external_deps = [
346    "c_utils:utils",
347    "hilog:libhilog",
348    "power_manager:powermgr_client",
349  ]
350}
351
352ohos_systemtest("wms_window_occupied_area_change_test") {
353  module_out_path = module_out_path
354
355  sources = [ "window_occupied_area_change_test.cpp" ]
356
357  deps = [ ":wms_systemtest_common" ]
358
359  external_deps = [
360    "c_utils:utils",
361    "hilog:libhilog",
362    "power_manager:powermgr_client",
363  ]
364}
365
366ohos_systemtest("wms_window_touch_outside_test") {
367  module_out_path = module_out_path
368
369  sources = [ "window_touch_outside_test.cpp" ]
370
371  deps = [ ":wms_systemtest_common" ]
372
373  external_deps = [
374    "c_utils:utils",
375    "hilog:libhilog",
376    "power_manager:powermgr_client",
377  ]
378}
379
380ohos_systemtest("wms_window_mode_support_info_test") {
381  module_out_path = module_out_path
382
383  sources = [ "window_mode_support_info_test.cpp" ]
384
385  deps = [ ":wms_systemtest_common" ]
386
387  external_deps = [
388    "c_utils:utils",
389    "hilog:libhilog",
390    "power_manager:powermgr_client",
391  ]
392}
393
394ohos_systemtest("wms_window_app_floating_window_test") {
395  module_out_path = module_out_path
396
397  sources = [ "window_app_floating_window_test.cpp" ]
398
399  deps = [ ":wms_systemtest_common" ]
400
401  external_deps = [
402    "c_utils:utils",
403    "common_event_service:cesfwk_innerkits",
404    "hilog:libhilog",
405    "power_manager:powermgr_client",
406  ]
407}
408
409ohos_systemtest("wms_window_system_toast_window_test") {
410  module_out_path = module_out_path
411
412  sources = [ "window_system_toast_test.cpp" ]
413
414  deps = [ ":wms_systemtest_common" ]
415
416  external_deps = [
417    "c_utils:utils",
418    "common_event_service:cesfwk_innerkits",
419    "hilog:libhilog",
420    "power_manager:powermgr_client",
421  ]
422}
423
424ohos_systemtest("wms_window_animation_transition_test") {
425  module_out_path = module_out_path
426
427  sources = [ "window_animation_transition_test.cpp" ]
428
429  deps = [ ":wms_systemtest_common" ]
430
431  external_deps = [
432    "c_utils:utils",
433    "hilog:libhilog",
434    "power_manager:powermgr_client",
435  ]
436}
437
438ohos_systemtest("wms_window_water_mark_test") {
439  module_out_path = module_out_path
440
441  sources = [ "window_water_mark_test.cpp" ]
442
443  deps = [ ":wms_systemtest_common" ]
444
445  external_deps = [
446    "c_utils:utils",
447    "hilog:libhilog",
448    "power_manager:powermgr_client",
449  ]
450}
451
452ohos_systemtest("wms_window_nointeraction_listener_test") {
453  module_out_path = module_out_path
454
455  sources = [ "window_nointeraction_listener_test.cpp" ]
456
457  deps = [ ":wms_systemtest_common" ]
458
459  external_deps = [
460    "c_utils:utils",
461    "hilog:libhilog",
462    "power_manager:powermgr_client",
463  ]
464}
465
466## Build wms_systemtest_common.a {{{
467config("wms_systemtest_common_public_config") {
468  include_dirs = [
469    "${window_base_path}/dm/include",
470    "${window_base_path}/dmserver/include",
471    "${window_base_path}/wm/include",
472    "${window_base_path}/wmserver/include",
473    "${window_base_path}/interfaces/innerkits/wm",
474    "${window_base_path}/utils/include",
475    "//commonlibrary/c_utils/base/include",
476    "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include",
477    "//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
478    "//third_party/googletest/googlemock/include",
479    "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics/include",
480
481    # for abilityContext
482    "${ability_runtime_path}/interfaces/kits/native/ability/ability_runtime",
483    "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context",
484    "//base/global/resource_management/interfaces/inner_api/include",
485    "//third_party/node/deps/icu-small/source/common",
486    "${ability_runtime_inner_api_path}/ability_manager/include",
487
488    # abilityContext end
489  ]
490}
491
492ohos_static_library("wms_systemtest_common") {
493  visibility = [ ":*" ]
494  testonly = true
495
496  sources = [ "window_test_utils.cpp" ]
497
498  public_configs = [
499    ":wms_systemtest_common_public_config",
500    "${window_base_path}/resources/config/build:coverage_flags",
501    "${window_base_path}/resources/config/build:testcase_flags",
502  ]
503
504  public_deps = [
505    "//foundation/arkui/ace_engine/interfaces/inner_api/ace:ace_uicontent",
506
507    # need delete it for abilitycontext
508    "${ability_runtime_inner_api_path}/ability_manager:ability_manager",
509    "${window_base_path}/dm:libdm",
510    "${window_base_path}/dmserver:libdms",
511    "${window_base_path}/utils:libwmutil",
512    "${window_base_path}/utils:libwmutil_base",
513    "${window_base_path}/window_scene/interfaces/innerkits:libwsutils",
514    "${window_base_path}/wm:libwm",
515    "//commonlibrary/c_utils/base:utils",
516    "//foundation/arkui/napi:ace_napi",
517    "//foundation/graphic/graphic_2d/rosen/modules/animation/window_animation:window_animation",
518    "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client",
519    "//foundation/multimodalinput/input/frameworks/proxy:libmmi-client",
520    "//third_party/googletest:gmock",
521    "//third_party/googletest:gtest_main",
522  ]
523  external_deps = [
524    "ability_base:base",
525    "ability_base:want",
526    "ability_base:zuri",
527    "ability_runtime:ability_context_native",
528    "bundle_framework:appexecfwk_base",
529    "c_utils:utils",
530    "hilog:libhilog",
531    "ipc:ipc_single",
532    "power_manager:powermgr_client",
533  ]
534
535  part_name = "window_manager"
536  subsystem_name = "window"
537}
538## Build wms_systemtest_common.a }}}
539