blob: 22e8d2dbb402b973d1e97dcd40f88aface2bfb18 [file] [log] [blame]
revemanb195f41d2015-11-19 22:16:481# Copyright 2015 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
brettwb5440a92015-12-03 00:47:125import("//build/config/ui.gni")
Steven Bennetts99f5b692018-11-27 16:31:406import("//chrome/common/features.gni")
revemanb195f41d2015-11-19 22:16:487import("//testing/test.gni")
8
9source_set("exo") {
10 sources = [
11 "buffer.cc",
12 "buffer.h",
Daichi Hironofc1a9fb2017-07-19 07:14:5513 "data_device.cc",
14 "data_device.h",
15 "data_device_delegate.h",
16 "data_offer.cc",
17 "data_offer.h",
18 "data_offer_delegate.h",
Daichi Hirono29647ac2017-08-15 09:11:5219 "data_offer_observer.h",
Daichi Hironofc1a9fb2017-07-19 07:14:5520 "data_source.cc",
21 "data_source.h",
22 "data_source_delegate.h",
Daichi Hirono19ff5882017-11-30 03:37:3423 "data_source_observer.h",
revemanb195f41d2015-11-19 22:16:4824 "display.cc",
25 "display.h",
Fergus Dalla4293852019-07-26 07:13:4726 "drag_drop_operation.cc",
27 "drag_drop_operation.h",
Albert Chaulk56e96582019-01-30 19:33:1828 "frame_sink_resource_manager.cc",
29 "frame_sink_resource_manager.h",
[email protected]bfb23cb2019-05-29 21:02:5730 "input_trace.h",
reveman5cacf70c2015-12-09 22:50:0231 "keyboard_delegate.h",
yhanada5d5b8cb52016-12-10 04:16:0232 "keyboard_device_configuration_delegate.h",
yhanadaaaaf52e2017-07-14 09:53:5633 "keyboard_observer.h",
danakjc7afae52017-06-20 21:12:4134 "layer_tree_frame_sink_holder.cc",
35 "layer_tree_frame_sink_holder.h",
Fergus Dall9a9d37c2019-05-16 03:32:2536 "mime_utils.cc",
37 "mime_utils.h",
Nicholas Hollingumbad8a05f62019-12-05 05:56:2138 "permission.cc",
39 "permission.h",
Daniel Nicoara64d43752019-06-10 16:57:1540 "pointer.cc",
41 "pointer.h",
Nicholas Hollingume9a6744f2019-10-03 05:57:2942 "pointer_constraint_delegate.h",
Daniel Nicoara64d43752019-06-10 16:57:1543 "pointer_delegate.h",
Daichi Hirono3d3468d2017-11-20 02:02:3444 "seat.cc",
45 "seat.h",
46 "seat_observer.h",
revemanb195f41d2015-11-19 22:16:4847 "shared_memory.cc",
48 "shared_memory.h",
Shawn Galleaa2c085e2018-11-27 18:40:2349 "shell_surface_util.cc",
50 "shell_surface_util.h",
reveman27fe2642015-11-20 06:33:3951 "sub_surface.cc",
52 "sub_surface.h",
revemanb195f41d2015-11-19 22:16:4853 "surface.cc",
54 "surface.h",
55 "surface_delegate.h",
reveman27fe2642015-11-20 06:33:3956 "surface_observer.h",
Peng Huangb07b0652017-06-27 17:25:2257 "surface_tree_host.cc",
58 "surface_tree_host.h",
reveman90b85ed2015-12-10 02:39:3359 "touch.cc",
60 "touch.h",
61 "touch_delegate.h",
kylechar5361171352019-04-26 18:23:1262 "vsync_timing_manager.cc",
63 "vsync_timing_manager.h",
penghuang76977a52016-08-16 15:40:0764 "wm_helper.cc",
65 "wm_helper.h",
revemanb195f41d2015-11-19 22:16:4866 ]
67
68 deps = [
revemanb195f41d2015-11-19 22:16:4869 "//base",
70 "//cc",
Eliot Courtney9d620302019-06-14 00:40:4971 "//components/viz/host",
denniskempin68de18242016-07-14 00:04:5972 "//device/gamepad",
juncai2f298a82017-04-18 03:51:3973 "//device/gamepad/public/cpp:shared_with_blink",
revemanb195f41d2015-11-19 22:16:4874 "//gpu",
Daniele Castagnaa8ace632019-04-03 18:01:2975 "//gpu/command_buffer/client:raster_interface",
Fergus Dall9a9d37c2019-05-16 03:32:2576 "//net",
77 "//services/data_decoder/public/cpp",
Miyoung Shin2be27f52019-07-27 15:35:3978 "//services/viz/privileged/mojom/compositing",
revemanb195f41d2015-11-19 22:16:4879 "//skia",
Fergus Dall9a9d37c2019-05-16 03:32:2580 "//third_party/blink/public/common",
revemanb195f41d2015-11-19 22:16:4881 "//ui/aura",
Jun Mukaia446ee7f2018-07-20 22:55:1582 "//ui/base/ime",
revemanb195f41d2015-11-19 22:16:4883 "//ui/compositor",
Tommy C. Li092c628a2018-03-29 20:32:1584 "//ui/compositor_extra",
kylechar731f85f92016-12-01 20:50:4685 "//ui/display/manager",
yhanada5d5b8cb52016-12-10 04:16:0286 "//ui/events/devices:devices",
Michael Spang4305feb42019-11-20 18:24:2787 "//ui/events/ozone",
revemanb195f41d2015-11-19 22:16:4888 "//ui/gfx",
89 "//ui/gfx/geometry",
90 "//ui/gl",
Toshiki Kikuchi7c2894d2018-10-10 01:02:0991 "//ui/message_center",
92 "//ui/message_center/public/cpp",
Jingkui Wang9ec45ba2017-09-12 21:27:4893 "//ui/ozone",
revemanb195f41d2015-11-19 22:16:4894 "//ui/views",
skycea631e2016-12-16 21:52:2295 "//ui/wm",
Thiago Farina3b086a02017-05-30 22:32:5096 "//ui/wm/public",
revemanb195f41d2015-11-19 22:16:4897 ]
erosky9f31b772016-10-04 01:10:1698
99 if (is_chromeos) {
Shawn Gallea41ed30262018-10-19 17:23:37100 deps += [
Darren Shen50e14952019-05-14 03:40:43101 "//ash/keyboard/ui",
Shawn Gallea41ed30262018-10-19 17:23:37102 "//ash/public/cpp",
Nicholas Hollingume9a6744f2019-10-03 05:57:29103 "//chromeos/constants",
Shawn Gallea41ed30262018-10-19 17:23:37104 ]
105 sources += [
Mikolaj Walczak297ece62019-10-11 02:55:40106 "client_controlled_accelerators.cc",
107 "client_controlled_accelerators.h",
Shawn Gallea41ed30262018-10-19 17:23:37108 "client_controlled_shell_surface.cc",
109 "client_controlled_shell_surface.h",
110 "gaming_seat.cc",
111 "gaming_seat.h",
112 "input_method_surface.cc",
113 "input_method_surface.h",
114 "input_method_surface_manager.h",
115 "keyboard.cc",
116 "keyboard.h",
117 "notification.cc",
118 "notification.h",
119 "notification_surface.cc",
120 "notification_surface.h",
121 "notification_surface_manager.h",
Shawn Gallea41ed30262018-10-19 17:23:37122 "shell_surface.cc",
123 "shell_surface.h",
124 "shell_surface_base.cc",
125 "shell_surface_base.h",
126 "text_input.cc",
127 "text_input.h",
Shawn Gallea0a2ee0a2018-11-05 18:55:04128 "wm_helper_chromeos.cc",
129 "wm_helper_chromeos.h",
Shawn Gallea41ed30262018-10-19 17:23:37130 "xdg_shell_surface.cc",
131 "xdg_shell_surface.h",
132 ]
erosky9f31b772016-10-04 01:10:16133 }
Shawn Gallead1908432018-11-12 15:49:39134
135 if (is_chromecast) {
Randy Rossi45693bf2019-07-31 14:57:25136 deps += [ "//ui/accessibility:accessibility" ]
Shawn Gallead1908432018-11-12 15:49:39137 sources += [
138 "fullscreen_shell_surface.cc",
139 "fullscreen_shell_surface.h",
140 ]
141 }
revemanb195f41d2015-11-19 22:16:48142}
143
144source_set("test_support") {
145 testonly = true
146
Daniel Nicoara3e65fb52018-12-05 22:02:46147 sources = [
Peter Kastingb2600ae32019-05-14 04:42:25148 "test/exo_test_base_views.cc",
149 "test/exo_test_base_views.h",
Daniel Nicoara332761202018-12-10 20:00:59150 "test/exo_test_suite_aura.cc",
151 "test/exo_test_suite_aura.h",
Daniel Nicoara3e65fb52018-12-05 22:02:46152 ]
153
revemanb195f41d2015-11-19 22:16:48154 deps = [
penghuang608523d42016-08-18 17:05:28155 ":exo",
revemanb195f41d2015-11-19 22:16:48156 "//base",
Daniel Nicoara332761202018-12-10 20:00:59157 "//base/test:test_support",
kylechara4a664e62020-01-15 18:46:44158 "//components/viz/service",
brettw15764b12015-11-30 22:11:05159 "//gpu",
revemanb195f41d2015-11-19 22:16:48160 "//skia",
161 "//testing/gtest",
brettw15764b12015-11-30 22:11:05162 "//ui/aura",
Michael Spang539c6f32019-04-03 19:08:52163 "//ui/base/ime/init",
brettw15764b12015-11-30 22:11:05164 "//ui/compositor",
Daniel Nicoaraec62bcf42018-12-05 21:22:42165 "//ui/compositor:test_support",
166 "//ui/display/manager",
brettw15764b12015-11-30 22:11:05167 "//ui/gfx/geometry",
Daniel Nicoara332761202018-12-10 20:00:59168 "//ui/gl:test_support",
denniskempin31a496e2016-12-17 00:20:57169 "//ui/views",
Peter Kastingb2600ae32019-05-14 04:42:25170 "//ui/views:test_support",
Thiago Farina3b086a02017-05-30 22:32:50171 "//ui/wm",
revemanb195f41d2015-11-19 22:16:48172 ]
Shawn Gallea41ed30262018-10-19 17:23:37173
174 if (is_chromeos) {
Daniel Nicoara3e65fb52018-12-05 22:02:46175 sources += [
Shawn Gallead1908432018-11-12 15:49:39176 "test/exo_test_base.cc",
177 "test/exo_test_base.h",
178 "test/exo_test_helper.cc",
179 "test/exo_test_helper.h",
Shawn Gallead1908432018-11-12 15:49:39180 ]
Shawn Gallea41ed30262018-10-19 17:23:37181 deps += [
Scott Violet6ac56412018-12-19 17:25:50182 "//ash:test_support",
Shawn Gallea41ed30262018-10-19 17:23:37183 "//ash/public/cpp",
184 ]
185 }
revemanb195f41d2015-11-19 22:16:48186}
187
188source_set("unit_tests") {
189 testonly = true
190
revemanb195f41d2015-11-19 22:16:48191 deps = [
reveman27fe2642015-11-20 06:33:39192 ":exo",
193 ":test_support",
brettw15764b12015-11-30 22:11:05194 "//base",
denniskempin68de18242016-07-14 00:04:59195 "//base/test:test_support",
brettw15764b12015-11-30 22:11:05196 "//cc",
eseckler599d86bb2017-03-15 09:02:55197 "//cc:test_support",
revemanb195f41d2015-11-19 22:16:48198 "//components/user_manager",
Fady Samuel764e0a42017-07-13 22:35:44199 "//components/viz/service",
Fady Samuelc296f5fb2017-07-21 04:02:19200 "//components/viz/test:test_support",
Fergus Dall9a9d37c2019-05-16 03:32:25201 "//content/test:test_support",
denniskempin68de18242016-07-14 00:04:59202 "//device/gamepad:test_helpers",
Daniele Castagnaa8ace632019-04-03 18:01:29203 "//gpu/command_buffer/client:raster_interface",
revemanb195f41d2015-11-19 22:16:48204 "//skia",
reveman39b32c872015-12-08 05:34:05205 "//testing/gmock",
revemanb195f41d2015-11-19 22:16:48206 "//testing/gtest",
brettw15764b12015-11-30 22:11:05207 "//ui/aura",
Alex Zhang3f8482b2017-08-01 15:16:24208 "//ui/compositor:test_support",
Tommy C. Li092c628a2018-03-29 20:32:15209 "//ui/compositor_extra",
reveman5cacf70c2015-12-09 22:50:02210 "//ui/events:dom_keycode_converter",
reveman39b32c872015-12-08 05:34:05211 "//ui/events:test_support",
Michael Spang4305feb42019-11-20 18:24:27212 "//ui/events/ozone",
brettw15764b12015-11-30 22:11:05213 "//ui/gfx",
revemanb195f41d2015-11-19 22:16:48214 "//ui/message_center",
brettw15764b12015-11-30 22:11:05215 "//ui/views",
skycea631e2016-12-16 21:52:22216 "//ui/wm",
revemanb195f41d2015-11-19 22:16:48217 ]
brettwb5440a92015-12-03 00:47:12218
Nico Weber5b5acd82020-01-13 19:55:59219 sources = [ "mime_utils_unittest.cc" ]
Fergus Dall9a9d37c2019-05-16 03:32:25220
brettwb5440a92015-12-03 00:47:12221 if (use_ozone) {
222 deps += [ "//ui/ozone" ]
223 }
Shawn Gallea41ed30262018-10-19 17:23:37224
225 if (is_chromeos) {
Fergus Dall9a9d37c2019-05-16 03:32:25226 sources += [
Shawn Gallead1908432018-11-12 15:49:39227 "../../ui/events/ozone/gamepad/gamepad_event.cc",
228 "buffer_unittest.cc",
229 "client_controlled_shell_surface_unittest.cc",
230 "data_device_unittest.cc",
231 "data_offer_unittest.cc",
232 "data_source_unittest.cc",
233 "display_unittest.cc",
234 "gaming_seat_unittest.cc",
235 "keyboard_unittest.cc",
236 "notification_unittest.cc",
Nicholas Hollingumbad8a05f62019-12-05 05:56:21237 "permission_unittest.cc",
Shawn Gallead1908432018-11-12 15:49:39238 "pointer_unittest.cc",
239 "seat_unittest.cc",
240 "shared_memory_unittest.cc",
241 "shell_surface_unittest.cc",
242 "sub_surface_unittest.cc",
243 "surface_unittest.cc",
244 "text_input_unittest.cc",
245 "touch_unittest.cc",
Nicholas Hollingumdf801312019-09-30 05:31:17246 "xdg_shell_surface_unittest.cc",
Shawn Gallead1908432018-11-12 15:49:39247 ]
248
Shawn Gallea41ed30262018-10-19 17:23:37249 deps += [
250 "//ash",
Scott Violet6ac56412018-12-19 17:25:50251 "//ash:test_support",
Darren Shen50e14952019-05-14 03:40:43252 "//ash/keyboard/ui",
Shawn Gallea41ed30262018-10-19 17:23:37253 "//ash/public/cpp",
Prabir Pradhan0eb25912020-01-08 18:26:42254 "//chromeos/constants",
Shawn Gallea41ed30262018-10-19 17:23:37255 ]
256 }
Shawn Gallead1908432018-11-12 15:49:39257
258 if (is_chromecast) {
Randy Rossi45693bf2019-07-31 14:57:25259 deps += [ "//ui/accessibility:accessibility" ]
Fergus Dall9a9d37c2019-05-16 03:32:25260 sources += [ "fullscreen_shell_surface_unittest.cc" ]
Shawn Gallead1908432018-11-12 15:49:39261 }
revemanb195f41d2015-11-19 22:16:48262}
263
264test("exo_unittests") {
Nico Weber5b5acd82020-01-13 19:55:59265 sources = [ "test/run_all_unittests.cc" ]
oshima2a44e112016-06-23 17:59:18266
revemanb195f41d2015-11-19 22:16:48267 deps = [
Daniel Nicoara332761202018-12-10 20:00:59268 ":test_support",
revemanb195f41d2015-11-19 22:16:48269 ":unit_tests",
brettw15764b12015-11-30 22:11:05270 "//base",
271 "//base/test:test_support",
Scott Violet260dabf2017-07-14 17:17:51272 "//cc:test_support",
273 "//components/viz/test:test_support",
denniskempin68de18242016-07-14 00:04:59274 "//device/gamepad:test_helpers",
Ken Rockot9b26bc52018-07-04 19:57:49275 "//mojo/core/embedder",
skyd06586d2017-02-22 17:46:36276 "//testing/gtest",
277 "//ui/aura",
Scott Violet348ecf72017-11-28 18:28:19278 "//ui/aura:test_support",
skyd06586d2017-02-22 17:46:36279 "//ui/base",
sky25b49b282017-03-31 14:41:13280 "//ui/compositor:test_support",
Jun Mukai17c449d2018-04-13 18:38:38281 "//ui/display:display_manager_test_api",
skyd06586d2017-02-22 17:46:36282 "//ui/gl:test_support",
revemanb195f41d2015-11-19 22:16:48283 ]
oshima2a44e112016-06-23 17:59:18284
Steven Bennetts6972bbe2018-12-05 02:18:53285 data_deps = []
oshima2a44e112016-06-23 17:59:18286
revemanb195f41d2015-11-19 22:16:48287 if (is_linux) {
288 deps += [ "//components/exo/wayland:unit_tests" ]
289 }
Shawn Gallea41ed30262018-10-19 17:23:37290
291 if (is_chromeos) {
292 sources += [
293 "../../ash/test/ash_test_suite.cc",
294 "../../ash/test/ash_test_suite.h",
295 ]
296
297 deps += [
Scott Violet6ac56412018-12-19 17:25:50298 "//ash:test_support",
Shawn Gallea41ed30262018-10-19 17:23:37299 "//ash/public/cpp",
300 ]
301
302 data_deps += [
Shawn Gallea41ed30262018-10-19 17:23:37303 "//ash/resources:ash_test_resources_100_percent",
304 "//ash/resources:ash_test_resources_200_percent",
Natalie Chouinardf699c352019-12-16 20:23:30305 "//ash/strings:ash_test_strings",
Shawn Gallea41ed30262018-10-19 17:23:37306 ]
307 }
revemanb195f41d2015-11-19 22:16:48308}