blob: 4d3aa944c585811fa6ee304717c7bcbe426bf2e3 [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
Hidehiko Abe3375cfe52020-09-29 08:48:265import("//build/config/linux/pkg_config.gni")
brettwb5440a92015-12-03 00:47:126import("//build/config/ui.gni")
Steven Bennetts99f5b692018-11-27 16:31:407import("//chrome/common/features.gni")
revemanb195f41d2015-11-19 22:16:488import("//testing/test.gni")
Hidehiko Abe3375cfe52020-09-29 08:48:269import("//ui/base/ui_features.gni")
10
11if (use_xkbcommon) {
12 pkg_config("xkbcommon") {
13 packages = [ "xkbcommon" ]
14 }
15}
revemanb195f41d2015-11-19 22:16:4816
Mitsuru Oshima51bf3d5472020-06-17 21:28:3417static_library("exo") {
revemanb195f41d2015-11-19 22:16:4818 sources = [
19 "buffer.cc",
20 "buffer.h",
Daichi Hironofc1a9fb2017-07-19 07:14:5521 "data_device.cc",
22 "data_device.h",
23 "data_device_delegate.h",
24 "data_offer.cc",
25 "data_offer.h",
26 "data_offer_delegate.h",
Daichi Hirono29647ac2017-08-15 09:11:5227 "data_offer_observer.h",
Daichi Hironofc1a9fb2017-07-19 07:14:5528 "data_source.cc",
29 "data_source.h",
30 "data_source_delegate.h",
Daichi Hirono19ff5882017-11-30 03:37:3431 "data_source_observer.h",
revemanb195f41d2015-11-19 22:16:4832 "display.cc",
33 "display.h",
Fergus Dalla4293852019-07-26 07:13:4734 "drag_drop_operation.cc",
35 "drag_drop_operation.h",
Nick Diego Yamane92544dc2020-09-27 15:40:1336 "extended_drag_offer.cc",
37 "extended_drag_offer.h",
38 "extended_drag_source.cc",
39 "extended_drag_source.h",
Albert Chaulk56e96582019-01-30 19:33:1840 "frame_sink_resource_manager.cc",
41 "frame_sink_resource_manager.h",
[email protected]bfb23cb2019-05-29 21:02:5742 "input_trace.h",
reveman5cacf70c2015-12-09 22:50:0243 "keyboard_delegate.h",
yhanada5d5b8cb52016-12-10 04:16:0244 "keyboard_device_configuration_delegate.h",
yhanadaaaaf52e2017-07-14 09:53:5645 "keyboard_observer.h",
danakjc7afae52017-06-20 21:12:4146 "layer_tree_frame_sink_holder.cc",
47 "layer_tree_frame_sink_holder.h",
Fergus Dall9a9d37c2019-05-16 03:32:2548 "mime_utils.cc",
49 "mime_utils.h",
Nicholas Hollingumbad8a05f62019-12-05 05:56:2150 "permission.cc",
51 "permission.h",
Daniel Nicoara64d43752019-06-10 16:57:1552 "pointer.cc",
53 "pointer.h",
Nicholas Hollingume9a6744f2019-10-03 05:57:2954 "pointer_constraint_delegate.h",
Daniel Nicoara64d43752019-06-10 16:57:1555 "pointer_delegate.h",
Daichi Hirono3d3468d2017-11-20 02:02:3456 "seat.cc",
57 "seat.h",
58 "seat_observer.h",
revemanb195f41d2015-11-19 22:16:4859 "shared_memory.cc",
60 "shared_memory.h",
Shawn Galleaa2c085e2018-11-27 18:40:2361 "shell_surface_util.cc",
62 "shell_surface_util.h",
reveman27fe2642015-11-20 06:33:3963 "sub_surface.cc",
64 "sub_surface.h",
revemanb195f41d2015-11-19 22:16:4865 "surface.cc",
66 "surface.h",
67 "surface_delegate.h",
reveman27fe2642015-11-20 06:33:3968 "surface_observer.h",
Peng Huangb07b0652017-06-27 17:25:2269 "surface_tree_host.cc",
70 "surface_tree_host.h",
reveman90b85ed2015-12-10 02:39:3371 "touch.cc",
72 "touch.h",
73 "touch_delegate.h",
kylechar5361171352019-04-26 18:23:1274 "vsync_timing_manager.cc",
75 "vsync_timing_manager.h",
penghuang76977a52016-08-16 15:40:0776 "wm_helper.cc",
77 "wm_helper.h",
revemanb195f41d2015-11-19 22:16:4878 ]
79
80 deps = [
revemanb195f41d2015-11-19 22:16:4881 "//base",
82 "//cc",
Eliot Courtney9d620302019-06-14 00:40:4983 "//components/viz/host",
denniskempin68de18242016-07-14 00:04:5984 "//device/gamepad",
juncai2f298a82017-04-18 03:51:3985 "//device/gamepad/public/cpp:shared_with_blink",
revemanb195f41d2015-11-19 22:16:4886 "//gpu",
Daniele Castagnaa8ace632019-04-03 18:01:2987 "//gpu/command_buffer/client:raster_interface",
Fergus Dall9a9d37c2019-05-16 03:32:2588 "//net",
89 "//services/data_decoder/public/cpp",
Miyoung Shin2be27f52019-07-27 15:35:3990 "//services/viz/privileged/mojom/compositing",
revemanb195f41d2015-11-19 22:16:4891 "//skia",
Fergus Dall9a9d37c2019-05-16 03:32:2592 "//third_party/blink/public/common",
revemanb195f41d2015-11-19 22:16:4893 "//ui/aura",
Henrique Ferreiro41a8f462020-05-21 15:59:1594 "//ui/base/cursor",
Jun Mukaia446ee7f2018-07-20 22:55:1595 "//ui/base/ime",
revemanb195f41d2015-11-19 22:16:4896 "//ui/compositor",
Tommy C. Li092c628a2018-03-29 20:32:1597 "//ui/compositor_extra",
kylechar731f85f92016-12-01 20:50:4698 "//ui/display/manager",
yhanada5d5b8cb52016-12-10 04:16:0299 "//ui/events/devices:devices",
Michael Spang4305feb42019-11-20 18:24:27100 "//ui/events/ozone",
revemanb195f41d2015-11-19 22:16:48101 "//ui/gfx",
102 "//ui/gfx/geometry",
103 "//ui/gl",
Toshiki Kikuchi7c2894d2018-10-10 01:02:09104 "//ui/message_center",
105 "//ui/message_center/public/cpp",
Jingkui Wang9ec45ba2017-09-12 21:27:48106 "//ui/ozone",
revemanb195f41d2015-11-19 22:16:48107 "//ui/views",
skycea631e2016-12-16 21:52:22108 "//ui/wm",
Thiago Farina3b086a02017-05-30 22:32:50109 "//ui/wm/public",
revemanb195f41d2015-11-19 22:16:48110 ]
erosky9f31b772016-10-04 01:10:16111
Mitsuru Oshima19d909272020-06-26 19:13:15112 assert_no_deps = [
113 "//components/arc",
114 "//content/public/browser",
115 "//content/public/common",
116 ]
117
Henrique Ferreiro3a6bd7c72020-02-27 09:51:20118 public_deps = [
Henrique Ferreirob111d602020-05-21 15:47:51119 "//ui/base/cursor:cursor_base",
Henrique Ferreiroe09c0efd2020-05-07 14:29:46120 "//ui/base/cursor/mojom:cursor_type",
Henrique Ferreiro1748fd12020-08-04 12:51:46121 "//ui/base/dragdrop/mojom:mojom_headers",
Henrique Ferreiro3a6bd7c72020-02-27 09:51:20122 ]
Henrique Ferreirob43235cf2020-02-27 01:05:36123
erosky9f31b772016-10-04 01:10:16124 if (is_chromeos) {
Shawn Gallea41ed30262018-10-19 17:23:37125 deps += [
Mitsuru Oshima51bf3d5472020-06-17 21:28:34126 "//ash",
Darren Shen50e14952019-05-14 03:40:43127 "//ash/keyboard/ui",
Shawn Gallea41ed30262018-10-19 17:23:37128 "//ash/public/cpp",
Nicholas Hollingume9a6744f2019-10-03 05:57:29129 "//chromeos/constants",
Hidehiko Abe302fc7f2020-10-09 01:43:00130 "//chromeos/crosapi/cpp",
Antonio Gomes2b02c8412020-10-09 22:47:07131 "//chromeos/ui/base",
Antonio Gomes5c833252020-10-13 18:42:19132 "//chromeos/ui/frame",
Hidehiko Abe4f0a1152020-09-17 10:34:20133 "//ui/events/ozone/layout",
Shawn Gallea41ed30262018-10-19 17:23:37134 ]
135 sources += [
Mikolaj Walczak297ece62019-10-11 02:55:40136 "client_controlled_accelerators.cc",
137 "client_controlled_accelerators.h",
Shawn Gallea41ed30262018-10-19 17:23:37138 "client_controlled_shell_surface.cc",
139 "client_controlled_shell_surface.h",
Merissa Tan2b79cc92020-08-18 00:59:43140 "gamepad.cc",
141 "gamepad.h",
142 "gamepad_observer.h",
Shawn Gallea41ed30262018-10-19 17:23:37143 "gaming_seat.cc",
144 "gaming_seat.h",
145 "input_method_surface.cc",
146 "input_method_surface.h",
147 "input_method_surface_manager.h",
148 "keyboard.cc",
149 "keyboard.h",
Hidehiko Abe23f5e812020-09-20 02:57:19150 "keyboard_modifiers.h",
Shawn Gallea41ed30262018-10-19 17:23:37151 "notification.cc",
152 "notification.h",
153 "notification_surface.cc",
154 "notification_surface.h",
155 "notification_surface_manager.h",
Shawn Gallea41ed30262018-10-19 17:23:37156 "shell_surface.cc",
157 "shell_surface.h",
158 "shell_surface_base.cc",
159 "shell_surface_base.h",
160 "text_input.cc",
161 "text_input.h",
Toshiki Kikuchi87e95102020-07-09 03:32:58162 "toast_surface.cc",
163 "toast_surface.h",
164 "toast_surface_manager.h",
Chloe Pellinga0e11359d2020-08-27 07:26:57165 "ui_lock_controller.cc",
166 "ui_lock_controller.h",
Shawn Gallea0a2ee0a2018-11-05 18:55:04167 "wm_helper_chromeos.cc",
168 "wm_helper_chromeos.h",
Shawn Gallea41ed30262018-10-19 17:23:37169 "xdg_shell_surface.cc",
170 "xdg_shell_surface.h",
Hidehiko Abe4f0a1152020-09-17 10:34:20171 "xkb_tracker.cc",
172 "xkb_tracker.h",
Shawn Gallea41ed30262018-10-19 17:23:37173 ]
Hidehiko Abe3375cfe52020-09-29 08:48:26174 if (use_xkbcommon) {
175 configs += [ ":xkbcommon" ]
176 }
erosky9f31b772016-10-04 01:10:16177 }
Shawn Gallead1908432018-11-12 15:49:39178
179 if (is_chromecast) {
Randy Rossi45693bf2019-07-31 14:57:25180 deps += [ "//ui/accessibility:accessibility" ]
Shawn Gallead1908432018-11-12 15:49:39181 sources += [
182 "fullscreen_shell_surface.cc",
183 "fullscreen_shell_surface.h",
184 ]
185 }
revemanb195f41d2015-11-19 22:16:48186}
187
188source_set("test_support") {
189 testonly = true
190
Daniel Nicoara3e65fb52018-12-05 22:02:46191 sources = [
yjliu00982d22020-10-14 00:31:12192 "mock_vsync_timing_observer.cc",
193 "mock_vsync_timing_observer.h",
Peter Kastingb2600ae32019-05-14 04:42:25194 "test/exo_test_base_views.cc",
195 "test/exo_test_base_views.h",
Daniel Nicoara332761202018-12-10 20:00:59196 "test/exo_test_suite_aura.cc",
197 "test/exo_test_suite_aura.h",
Daniel Nicoara3e65fb52018-12-05 22:02:46198 ]
199
Mirko Bonadei1c098b882020-03-07 04:46:03200 public_deps = [ "//testing/gtest" ]
201
revemanb195f41d2015-11-19 22:16:48202 deps = [
penghuang608523d42016-08-18 17:05:28203 ":exo",
revemanb195f41d2015-11-19 22:16:48204 "//base",
Daniel Nicoara332761202018-12-10 20:00:59205 "//base/test:test_support",
kylechara4a664e62020-01-15 18:46:44206 "//components/viz/service",
brettw15764b12015-11-30 22:11:05207 "//gpu",
revemanb195f41d2015-11-19 22:16:48208 "//skia",
brettw15764b12015-11-30 22:11:05209 "//ui/aura",
Michael Spang539c6f32019-04-03 19:08:52210 "//ui/base/ime/init",
brettw15764b12015-11-30 22:11:05211 "//ui/compositor",
Daniel Nicoaraec62bcf42018-12-05 21:22:42212 "//ui/compositor:test_support",
213 "//ui/display/manager",
brettw15764b12015-11-30 22:11:05214 "//ui/gfx/geometry",
Daniel Nicoara332761202018-12-10 20:00:59215 "//ui/gl:test_support",
denniskempin31a496e2016-12-17 00:20:57216 "//ui/views",
Peter Kastingb2600ae32019-05-14 04:42:25217 "//ui/views:test_support",
Thiago Farina3b086a02017-05-30 22:32:50218 "//ui/wm",
revemanb195f41d2015-11-19 22:16:48219 ]
Shawn Gallea41ed30262018-10-19 17:23:37220
221 if (is_chromeos) {
Daniel Nicoara3e65fb52018-12-05 22:02:46222 sources += [
Shawn Gallead1908432018-11-12 15:49:39223 "test/exo_test_base.cc",
224 "test/exo_test_base.h",
225 "test/exo_test_helper.cc",
226 "test/exo_test_helper.h",
Shawn Gallead1908432018-11-12 15:49:39227 ]
Shawn Gallea41ed30262018-10-19 17:23:37228 deps += [
Scott Violet6ac56412018-12-19 17:25:50229 "//ash:test_support",
Shawn Gallea41ed30262018-10-19 17:23:37230 "//ash/public/cpp",
Antonio Gomes2b02c8412020-10-09 22:47:07231 "//chromeos/ui/base",
Shawn Gallea41ed30262018-10-19 17:23:37232 ]
233 }
revemanb195f41d2015-11-19 22:16:48234}
235
236source_set("unit_tests") {
237 testonly = true
238
revemanb195f41d2015-11-19 22:16:48239 deps = [
reveman27fe2642015-11-20 06:33:39240 ":exo",
241 ":test_support",
brettw15764b12015-11-30 22:11:05242 "//base",
denniskempin68de18242016-07-14 00:04:59243 "//base/test:test_support",
brettw15764b12015-11-30 22:11:05244 "//cc",
eseckler599d86bb2017-03-15 09:02:55245 "//cc:test_support",
revemanb195f41d2015-11-19 22:16:48246 "//components/user_manager",
Fady Samuel764e0a42017-07-13 22:35:44247 "//components/viz/service",
Fady Samuelc296f5fb2017-07-21 04:02:19248 "//components/viz/test:test_support",
Fergus Dall9a9d37c2019-05-16 03:32:25249 "//content/test:test_support",
denniskempin68de18242016-07-14 00:04:59250 "//device/gamepad:test_helpers",
Daniele Castagnaa8ace632019-04-03 18:01:29251 "//gpu/command_buffer/client:raster_interface",
revemanb195f41d2015-11-19 22:16:48252 "//skia",
reveman39b32c872015-12-08 05:34:05253 "//testing/gmock",
revemanb195f41d2015-11-19 22:16:48254 "//testing/gtest",
brettw15764b12015-11-30 22:11:05255 "//ui/aura",
Alex Zhang3f8482b2017-08-01 15:16:24256 "//ui/compositor:test_support",
Tommy C. Li092c628a2018-03-29 20:32:15257 "//ui/compositor_extra",
reveman5cacf70c2015-12-09 22:50:02258 "//ui/events:dom_keycode_converter",
reveman39b32c872015-12-08 05:34:05259 "//ui/events:test_support",
Michael Spang4305feb42019-11-20 18:24:27260 "//ui/events/ozone",
brettw15764b12015-11-30 22:11:05261 "//ui/gfx",
revemanb195f41d2015-11-19 22:16:48262 "//ui/message_center",
brettw15764b12015-11-30 22:11:05263 "//ui/views",
skycea631e2016-12-16 21:52:22264 "//ui/wm",
revemanb195f41d2015-11-19 22:16:48265 ]
brettwb5440a92015-12-03 00:47:12266
Nico Weber5b5acd82020-01-13 19:55:59267 sources = [ "mime_utils_unittest.cc" ]
Fergus Dall9a9d37c2019-05-16 03:32:25268
brettwb5440a92015-12-03 00:47:12269 if (use_ozone) {
270 deps += [ "//ui/ozone" ]
271 }
Shawn Gallea41ed30262018-10-19 17:23:37272
273 if (is_chromeos) {
Fergus Dall9a9d37c2019-05-16 03:32:25274 sources += [
Shawn Gallead1908432018-11-12 15:49:39275 "../../ui/events/ozone/gamepad/gamepad_event.cc",
276 "buffer_unittest.cc",
277 "client_controlled_shell_surface_unittest.cc",
278 "data_device_unittest.cc",
279 "data_offer_unittest.cc",
280 "data_source_unittest.cc",
281 "display_unittest.cc",
Tetsui Ohkuboaec98802020-06-04 00:33:56282 "drag_drop_operation_unittest.cc",
Merissa Tan2b79cc92020-08-18 00:59:43283 "gamepad_unittest.cc",
Shawn Gallead1908432018-11-12 15:49:39284 "gaming_seat_unittest.cc",
Tetsui Ohkubo57fcf732020-02-10 03:09:10285 "input_method_surface_unittest.cc",
Shawn Gallead1908432018-11-12 15:49:39286 "keyboard_unittest.cc",
287 "notification_unittest.cc",
Nicholas Hollingumbad8a05f62019-12-05 05:56:21288 "permission_unittest.cc",
Shawn Gallead1908432018-11-12 15:49:39289 "pointer_unittest.cc",
290 "seat_unittest.cc",
291 "shared_memory_unittest.cc",
292 "shell_surface_unittest.cc",
293 "sub_surface_unittest.cc",
294 "surface_unittest.cc",
295 "text_input_unittest.cc",
Toshiki Kikuchi87e95102020-07-09 03:32:58296 "toast_surface_unittest.cc",
Shawn Gallead1908432018-11-12 15:49:39297 "touch_unittest.cc",
Chloe Pellinga0e11359d2020-08-27 07:26:57298 "ui_lock_controller_unittest.cc",
yjliu00982d22020-10-14 00:31:12299 "wm_helper_chromeos_unittest.cc",
Nicholas Hollingumdf801312019-09-30 05:31:17300 "xdg_shell_surface_unittest.cc",
Shawn Gallead1908432018-11-12 15:49:39301 ]
302
Shawn Gallea41ed30262018-10-19 17:23:37303 deps += [
304 "//ash",
Scott Violet6ac56412018-12-19 17:25:50305 "//ash:test_support",
Darren Shen50e14952019-05-14 03:40:43306 "//ash/keyboard/ui",
Shawn Gallea41ed30262018-10-19 17:23:37307 "//ash/public/cpp",
Prabir Pradhan0eb25912020-01-08 18:26:42308 "//chromeos/constants",
Antonio Gomes5c833252020-10-13 18:42:19309 "//chromeos/ui/frame",
Yuichiro Hanada3a6c31d02020-06-03 08:45:12310 "//ui/base:test_support",
Henrique Ferreiroe09c0efd2020-05-07 14:29:46311 "//ui/base/cursor/mojom:cursor_type",
Henrique Ferreiro1748fd12020-08-04 12:51:46312 "//ui/base/dragdrop/mojom:mojom_shared",
Shawn Gallea41ed30262018-10-19 17:23:37313 ]
314 }
Shawn Gallead1908432018-11-12 15:49:39315
316 if (is_chromecast) {
Randy Rossi45693bf2019-07-31 14:57:25317 deps += [ "//ui/accessibility:accessibility" ]
Fergus Dall9a9d37c2019-05-16 03:32:25318 sources += [ "fullscreen_shell_surface_unittest.cc" ]
Shawn Gallead1908432018-11-12 15:49:39319 }
revemanb195f41d2015-11-19 22:16:48320}
321
322test("exo_unittests") {
Dirk Pranke79d065d2020-08-29 03:28:30323 use_xvfb = use_xvfb_in_this_config
324
Nico Weber5b5acd82020-01-13 19:55:59325 sources = [ "test/run_all_unittests.cc" ]
oshima2a44e112016-06-23 17:59:18326
revemanb195f41d2015-11-19 22:16:48327 deps = [
Daniel Nicoara332761202018-12-10 20:00:59328 ":test_support",
revemanb195f41d2015-11-19 22:16:48329 ":unit_tests",
brettw15764b12015-11-30 22:11:05330 "//base",
331 "//base/test:test_support",
Scott Violet260dabf2017-07-14 17:17:51332 "//cc:test_support",
333 "//components/viz/test:test_support",
denniskempin68de18242016-07-14 00:04:59334 "//device/gamepad:test_helpers",
Ken Rockot9b26bc52018-07-04 19:57:49335 "//mojo/core/embedder",
skyd06586d2017-02-22 17:46:36336 "//testing/gtest",
337 "//ui/aura",
Scott Violet348ecf72017-11-28 18:28:19338 "//ui/aura:test_support",
skyd06586d2017-02-22 17:46:36339 "//ui/base",
sky25b49b282017-03-31 14:41:13340 "//ui/compositor:test_support",
Jun Mukai17c449d2018-04-13 18:38:38341 "//ui/display:display_manager_test_api",
skyd06586d2017-02-22 17:46:36342 "//ui/gl:test_support",
revemanb195f41d2015-11-19 22:16:48343 ]
oshima2a44e112016-06-23 17:59:18344
Steven Bennetts6972bbe2018-12-05 02:18:53345 data_deps = []
oshima2a44e112016-06-23 17:59:18346
Sean McAllister8ccdb7642020-07-30 20:05:52347 if (is_linux || is_chromeos) {
revemanb195f41d2015-11-19 22:16:48348 deps += [ "//components/exo/wayland:unit_tests" ]
349 }
Shawn Gallea41ed30262018-10-19 17:23:37350
351 if (is_chromeos) {
352 sources += [
353 "../../ash/test/ash_test_suite.cc",
354 "../../ash/test/ash_test_suite.h",
355 ]
356
357 deps += [
Scott Violet6ac56412018-12-19 17:25:50358 "//ash:test_support",
Shawn Gallea41ed30262018-10-19 17:23:37359 "//ash/public/cpp",
360 ]
361
362 data_deps += [
Shawn Gallea41ed30262018-10-19 17:23:37363 "//ash/resources:ash_test_resources_100_percent",
364 "//ash/resources:ash_test_resources_200_percent",
Natalie Chouinardf699c352019-12-16 20:23:30365 "//ash/strings:ash_test_strings",
Shawn Gallea41ed30262018-10-19 17:23:37366 ]
367 }
revemanb195f41d2015-11-19 22:16:48368}