blob: 96040ecf5832538d6d6c27cf4a600b8f3af75760 [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",
Henrique Ferreiro41a8f462020-05-21 15:59:1582 "//ui/base/cursor",
Jun Mukaia446ee7f2018-07-20 22:55:1583 "//ui/base/ime",
revemanb195f41d2015-11-19 22:16:4884 "//ui/compositor",
Tommy C. Li092c628a2018-03-29 20:32:1585 "//ui/compositor_extra",
kylechar731f85f92016-12-01 20:50:4686 "//ui/display/manager",
yhanada5d5b8cb52016-12-10 04:16:0287 "//ui/events/devices:devices",
Michael Spang4305feb42019-11-20 18:24:2788 "//ui/events/ozone",
revemanb195f41d2015-11-19 22:16:4889 "//ui/gfx",
90 "//ui/gfx/geometry",
91 "//ui/gl",
Toshiki Kikuchi7c2894d2018-10-10 01:02:0992 "//ui/message_center",
93 "//ui/message_center/public/cpp",
Jingkui Wang9ec45ba2017-09-12 21:27:4894 "//ui/ozone",
revemanb195f41d2015-11-19 22:16:4895 "//ui/views",
skycea631e2016-12-16 21:52:2296 "//ui/wm",
Thiago Farina3b086a02017-05-30 22:32:5097 "//ui/wm/public",
revemanb195f41d2015-11-19 22:16:4898 ]
erosky9f31b772016-10-04 01:10:1699
Henrique Ferreiro3a6bd7c72020-02-27 09:51:20100 public_deps = [
Henrique Ferreirob111d602020-05-21 15:47:51101 "//ui/base/cursor:cursor_base",
Henrique Ferreiroe09c0efd2020-05-07 14:29:46102 "//ui/base/cursor/mojom:cursor_type",
Henrique Ferreiro3a6bd7c72020-02-27 09:51:20103 ]
Henrique Ferreirob43235cf2020-02-27 01:05:36104
erosky9f31b772016-10-04 01:10:16105 if (is_chromeos) {
Shawn Gallea41ed30262018-10-19 17:23:37106 deps += [
Darren Shen50e14952019-05-14 03:40:43107 "//ash/keyboard/ui",
Shawn Gallea41ed30262018-10-19 17:23:37108 "//ash/public/cpp",
Nicholas Hollingume9a6744f2019-10-03 05:57:29109 "//chromeos/constants",
Shawn Gallea41ed30262018-10-19 17:23:37110 ]
111 sources += [
Mikolaj Walczak297ece62019-10-11 02:55:40112 "client_controlled_accelerators.cc",
113 "client_controlled_accelerators.h",
Shawn Gallea41ed30262018-10-19 17:23:37114 "client_controlled_shell_surface.cc",
115 "client_controlled_shell_surface.h",
116 "gaming_seat.cc",
117 "gaming_seat.h",
118 "input_method_surface.cc",
119 "input_method_surface.h",
120 "input_method_surface_manager.h",
121 "keyboard.cc",
122 "keyboard.h",
123 "notification.cc",
124 "notification.h",
125 "notification_surface.cc",
126 "notification_surface.h",
127 "notification_surface_manager.h",
Shawn Gallea41ed30262018-10-19 17:23:37128 "shell_surface.cc",
129 "shell_surface.h",
130 "shell_surface_base.cc",
131 "shell_surface_base.h",
132 "text_input.cc",
133 "text_input.h",
Shawn Gallea0a2ee0a2018-11-05 18:55:04134 "wm_helper_chromeos.cc",
135 "wm_helper_chromeos.h",
Shawn Gallea41ed30262018-10-19 17:23:37136 "xdg_shell_surface.cc",
137 "xdg_shell_surface.h",
138 ]
erosky9f31b772016-10-04 01:10:16139 }
Shawn Gallead1908432018-11-12 15:49:39140
141 if (is_chromecast) {
Randy Rossi45693bf2019-07-31 14:57:25142 deps += [ "//ui/accessibility:accessibility" ]
Shawn Gallead1908432018-11-12 15:49:39143 sources += [
144 "fullscreen_shell_surface.cc",
145 "fullscreen_shell_surface.h",
146 ]
147 }
revemanb195f41d2015-11-19 22:16:48148}
149
150source_set("test_support") {
151 testonly = true
152
Daniel Nicoara3e65fb52018-12-05 22:02:46153 sources = [
Peter Kastingb2600ae32019-05-14 04:42:25154 "test/exo_test_base_views.cc",
155 "test/exo_test_base_views.h",
Daniel Nicoara332761202018-12-10 20:00:59156 "test/exo_test_suite_aura.cc",
157 "test/exo_test_suite_aura.h",
Daniel Nicoara3e65fb52018-12-05 22:02:46158 ]
159
Mirko Bonadei1c098b882020-03-07 04:46:03160 public_deps = [ "//testing/gtest" ]
161
revemanb195f41d2015-11-19 22:16:48162 deps = [
penghuang608523d42016-08-18 17:05:28163 ":exo",
revemanb195f41d2015-11-19 22:16:48164 "//base",
Daniel Nicoara332761202018-12-10 20:00:59165 "//base/test:test_support",
kylechara4a664e62020-01-15 18:46:44166 "//components/viz/service",
brettw15764b12015-11-30 22:11:05167 "//gpu",
revemanb195f41d2015-11-19 22:16:48168 "//skia",
brettw15764b12015-11-30 22:11:05169 "//ui/aura",
Michael Spang539c6f32019-04-03 19:08:52170 "//ui/base/ime/init",
brettw15764b12015-11-30 22:11:05171 "//ui/compositor",
Daniel Nicoaraec62bcf42018-12-05 21:22:42172 "//ui/compositor:test_support",
173 "//ui/display/manager",
brettw15764b12015-11-30 22:11:05174 "//ui/gfx/geometry",
Daniel Nicoara332761202018-12-10 20:00:59175 "//ui/gl:test_support",
denniskempin31a496e2016-12-17 00:20:57176 "//ui/views",
Peter Kastingb2600ae32019-05-14 04:42:25177 "//ui/views:test_support",
Thiago Farina3b086a02017-05-30 22:32:50178 "//ui/wm",
revemanb195f41d2015-11-19 22:16:48179 ]
Shawn Gallea41ed30262018-10-19 17:23:37180
181 if (is_chromeos) {
Daniel Nicoara3e65fb52018-12-05 22:02:46182 sources += [
Shawn Gallead1908432018-11-12 15:49:39183 "test/exo_test_base.cc",
184 "test/exo_test_base.h",
185 "test/exo_test_helper.cc",
186 "test/exo_test_helper.h",
Shawn Gallead1908432018-11-12 15:49:39187 ]
Shawn Gallea41ed30262018-10-19 17:23:37188 deps += [
Scott Violet6ac56412018-12-19 17:25:50189 "//ash:test_support",
Shawn Gallea41ed30262018-10-19 17:23:37190 "//ash/public/cpp",
191 ]
192 }
revemanb195f41d2015-11-19 22:16:48193}
194
195source_set("unit_tests") {
196 testonly = true
197
revemanb195f41d2015-11-19 22:16:48198 deps = [
reveman27fe2642015-11-20 06:33:39199 ":exo",
200 ":test_support",
brettw15764b12015-11-30 22:11:05201 "//base",
denniskempin68de18242016-07-14 00:04:59202 "//base/test:test_support",
brettw15764b12015-11-30 22:11:05203 "//cc",
eseckler599d86bb2017-03-15 09:02:55204 "//cc:test_support",
revemanb195f41d2015-11-19 22:16:48205 "//components/user_manager",
Fady Samuel764e0a42017-07-13 22:35:44206 "//components/viz/service",
Fady Samuelc296f5fb2017-07-21 04:02:19207 "//components/viz/test:test_support",
Fergus Dall9a9d37c2019-05-16 03:32:25208 "//content/test:test_support",
denniskempin68de18242016-07-14 00:04:59209 "//device/gamepad:test_helpers",
Daniele Castagnaa8ace632019-04-03 18:01:29210 "//gpu/command_buffer/client:raster_interface",
revemanb195f41d2015-11-19 22:16:48211 "//skia",
reveman39b32c872015-12-08 05:34:05212 "//testing/gmock",
revemanb195f41d2015-11-19 22:16:48213 "//testing/gtest",
brettw15764b12015-11-30 22:11:05214 "//ui/aura",
Alex Zhang3f8482b2017-08-01 15:16:24215 "//ui/compositor:test_support",
Tommy C. Li092c628a2018-03-29 20:32:15216 "//ui/compositor_extra",
reveman5cacf70c2015-12-09 22:50:02217 "//ui/events:dom_keycode_converter",
reveman39b32c872015-12-08 05:34:05218 "//ui/events:test_support",
Michael Spang4305feb42019-11-20 18:24:27219 "//ui/events/ozone",
brettw15764b12015-11-30 22:11:05220 "//ui/gfx",
revemanb195f41d2015-11-19 22:16:48221 "//ui/message_center",
brettw15764b12015-11-30 22:11:05222 "//ui/views",
skycea631e2016-12-16 21:52:22223 "//ui/wm",
revemanb195f41d2015-11-19 22:16:48224 ]
brettwb5440a92015-12-03 00:47:12225
Nico Weber5b5acd82020-01-13 19:55:59226 sources = [ "mime_utils_unittest.cc" ]
Fergus Dall9a9d37c2019-05-16 03:32:25227
brettwb5440a92015-12-03 00:47:12228 if (use_ozone) {
229 deps += [ "//ui/ozone" ]
230 }
Shawn Gallea41ed30262018-10-19 17:23:37231
232 if (is_chromeos) {
Fergus Dall9a9d37c2019-05-16 03:32:25233 sources += [
Shawn Gallead1908432018-11-12 15:49:39234 "../../ui/events/ozone/gamepad/gamepad_event.cc",
235 "buffer_unittest.cc",
236 "client_controlled_shell_surface_unittest.cc",
237 "data_device_unittest.cc",
238 "data_offer_unittest.cc",
239 "data_source_unittest.cc",
240 "display_unittest.cc",
Tetsui Ohkuboaec98802020-06-04 00:33:56241 "drag_drop_operation_unittest.cc",
Shawn Gallead1908432018-11-12 15:49:39242 "gaming_seat_unittest.cc",
Tetsui Ohkubo57fcf732020-02-10 03:09:10243 "input_method_surface_unittest.cc",
Shawn Gallead1908432018-11-12 15:49:39244 "keyboard_unittest.cc",
245 "notification_unittest.cc",
Nicholas Hollingumbad8a05f62019-12-05 05:56:21246 "permission_unittest.cc",
Shawn Gallead1908432018-11-12 15:49:39247 "pointer_unittest.cc",
248 "seat_unittest.cc",
249 "shared_memory_unittest.cc",
250 "shell_surface_unittest.cc",
251 "sub_surface_unittest.cc",
252 "surface_unittest.cc",
253 "text_input_unittest.cc",
254 "touch_unittest.cc",
Nicholas Hollingumdf801312019-09-30 05:31:17255 "xdg_shell_surface_unittest.cc",
Shawn Gallead1908432018-11-12 15:49:39256 ]
257
Shawn Gallea41ed30262018-10-19 17:23:37258 deps += [
259 "//ash",
Scott Violet6ac56412018-12-19 17:25:50260 "//ash:test_support",
Darren Shen50e14952019-05-14 03:40:43261 "//ash/keyboard/ui",
Shawn Gallea41ed30262018-10-19 17:23:37262 "//ash/public/cpp",
Prabir Pradhan0eb25912020-01-08 18:26:42263 "//chromeos/constants",
Yuichiro Hanada3a6c31d02020-06-03 08:45:12264 "//ui/base:test_support",
Henrique Ferreiroe09c0efd2020-05-07 14:29:46265 "//ui/base/cursor/mojom:cursor_type",
Shawn Gallea41ed30262018-10-19 17:23:37266 ]
267 }
Shawn Gallead1908432018-11-12 15:49:39268
269 if (is_chromecast) {
Randy Rossi45693bf2019-07-31 14:57:25270 deps += [ "//ui/accessibility:accessibility" ]
Fergus Dall9a9d37c2019-05-16 03:32:25271 sources += [ "fullscreen_shell_surface_unittest.cc" ]
Shawn Gallead1908432018-11-12 15:49:39272 }
revemanb195f41d2015-11-19 22:16:48273}
274
275test("exo_unittests") {
Nico Weber5b5acd82020-01-13 19:55:59276 sources = [ "test/run_all_unittests.cc" ]
oshima2a44e112016-06-23 17:59:18277
revemanb195f41d2015-11-19 22:16:48278 deps = [
Daniel Nicoara332761202018-12-10 20:00:59279 ":test_support",
revemanb195f41d2015-11-19 22:16:48280 ":unit_tests",
brettw15764b12015-11-30 22:11:05281 "//base",
282 "//base/test:test_support",
Scott Violet260dabf2017-07-14 17:17:51283 "//cc:test_support",
284 "//components/viz/test:test_support",
denniskempin68de18242016-07-14 00:04:59285 "//device/gamepad:test_helpers",
Ken Rockot9b26bc52018-07-04 19:57:49286 "//mojo/core/embedder",
skyd06586d2017-02-22 17:46:36287 "//testing/gtest",
288 "//ui/aura",
Scott Violet348ecf72017-11-28 18:28:19289 "//ui/aura:test_support",
skyd06586d2017-02-22 17:46:36290 "//ui/base",
sky25b49b282017-03-31 14:41:13291 "//ui/compositor:test_support",
Jun Mukai17c449d2018-04-13 18:38:38292 "//ui/display:display_manager_test_api",
skyd06586d2017-02-22 17:46:36293 "//ui/gl:test_support",
revemanb195f41d2015-11-19 22:16:48294 ]
oshima2a44e112016-06-23 17:59:18295
Steven Bennetts6972bbe2018-12-05 02:18:53296 data_deps = []
oshima2a44e112016-06-23 17:59:18297
revemanb195f41d2015-11-19 22:16:48298 if (is_linux) {
299 deps += [ "//components/exo/wayland:unit_tests" ]
300 }
Shawn Gallea41ed30262018-10-19 17:23:37301
302 if (is_chromeos) {
303 sources += [
304 "../../ash/test/ash_test_suite.cc",
305 "../../ash/test/ash_test_suite.h",
306 ]
307
308 deps += [
Scott Violet6ac56412018-12-19 17:25:50309 "//ash:test_support",
Shawn Gallea41ed30262018-10-19 17:23:37310 "//ash/public/cpp",
311 ]
312
313 data_deps += [
Shawn Gallea41ed30262018-10-19 17:23:37314 "//ash/resources:ash_test_resources_100_percent",
315 "//ash/resources:ash_test_resources_200_percent",
Natalie Chouinardf699c352019-12-16 20:23:30316 "//ash/strings:ash_test_strings",
Shawn Gallea41ed30262018-10-19 17:23:37317 ]
318 }
revemanb195f41d2015-11-19 22:16:48319}