blob: 40352bf5bea1b93c9f1132e2302915f19ff72fd8 [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",
reveman5cacf70c2015-12-09 22:50:0226 "keyboard_delegate.h",
yhanada5d5b8cb52016-12-10 04:16:0227 "keyboard_device_configuration_delegate.h",
yhanadaaaaf52e2017-07-14 09:53:5628 "keyboard_observer.h",
danakjc7afae52017-06-20 21:12:4129 "layer_tree_frame_sink_holder.cc",
30 "layer_tree_frame_sink_holder.h",
Daichi Hirono3d3468d2017-11-20 02:02:3431 "seat.cc",
32 "seat.h",
33 "seat_observer.h",
revemanb195f41d2015-11-19 22:16:4834 "shared_memory.cc",
35 "shared_memory.h",
Shawn Galleaa2c085e2018-11-27 18:40:2336 "shell_surface_util.cc",
37 "shell_surface_util.h",
reveman27fe2642015-11-20 06:33:3938 "sub_surface.cc",
39 "sub_surface.h",
revemanb195f41d2015-11-19 22:16:4840 "surface.cc",
41 "surface.h",
42 "surface_delegate.h",
reveman27fe2642015-11-20 06:33:3943 "surface_observer.h",
Peng Huangb07b0652017-06-27 17:25:2244 "surface_tree_host.cc",
45 "surface_tree_host.h",
reveman90b85ed2015-12-10 02:39:3346 "touch.cc",
47 "touch.h",
48 "touch_delegate.h",
penghuang76977a52016-08-16 15:40:0749 "wm_helper.cc",
50 "wm_helper.h",
revemanb195f41d2015-11-19 22:16:4851 ]
52
53 deps = [
revemanb195f41d2015-11-19 22:16:4854 "//base",
55 "//cc",
Fady Samuele4786072017-07-24 20:03:3856 "//components/viz/service",
denniskempin68de18242016-07-14 00:04:5957 "//device/gamepad",
juncai2f298a82017-04-18 03:51:3958 "//device/gamepad/public/cpp:shared_with_blink",
revemanb195f41d2015-11-19 22:16:4859 "//gpu",
brettw15764b12015-11-30 22:11:0560 "//gpu/command_buffer/client:gles2_interface",
Scott Violet2462c1e2018-08-23 21:50:5261 "//services/ws/public/mojom",
revemanb195f41d2015-11-19 22:16:4862 "//skia",
63 "//ui/aura",
Jun Mukaia446ee7f2018-07-20 22:55:1564 "//ui/base/ime",
revemanb195f41d2015-11-19 22:16:4865 "//ui/compositor",
Tommy C. Li092c628a2018-03-29 20:32:1566 "//ui/compositor_extra",
kylechar731f85f92016-12-01 20:50:4667 "//ui/display/manager",
yhanada5d5b8cb52016-12-10 04:16:0268 "//ui/events/devices:devices",
Jingkui Wang9ec45ba2017-09-12 21:27:4869 "//ui/events/ozone:events_ozone_evdev",
revemanb195f41d2015-11-19 22:16:4870 "//ui/gfx",
71 "//ui/gfx/geometry",
72 "//ui/gl",
Toshiki Kikuchi7c2894d2018-10-10 01:02:0973 "//ui/message_center",
74 "//ui/message_center/public/cpp",
Jingkui Wang9ec45ba2017-09-12 21:27:4875 "//ui/ozone",
revemanb195f41d2015-11-19 22:16:4876 "//ui/views",
penghuange399c0a2016-08-23 01:45:2777 "//ui/views/mus",
skycea631e2016-12-16 21:52:2278 "//ui/wm",
Thiago Farina3b086a02017-05-30 22:32:5079 "//ui/wm/public",
revemanb195f41d2015-11-19 22:16:4880 ]
erosky9f31b772016-10-04 01:10:1681
82 if (is_chromeos) {
Shawn Gallea41ed30262018-10-19 17:23:3783 deps += [
84 "//ash/public/cpp",
85 "//chromeos",
86 "//ui/keyboard",
Steven Bennetts99f5b692018-11-27 16:31:4087 "//ui/keyboard:mojom",
Shawn Gallea41ed30262018-10-19 17:23:3788 ]
89 sources += [
90 "client_controlled_shell_surface.cc",
91 "client_controlled_shell_surface.h",
92 "gaming_seat.cc",
93 "gaming_seat.h",
94 "input_method_surface.cc",
95 "input_method_surface.h",
96 "input_method_surface_manager.h",
97 "keyboard.cc",
98 "keyboard.h",
99 "notification.cc",
100 "notification.h",
101 "notification_surface.cc",
102 "notification_surface.h",
103 "notification_surface_manager.h",
104 "pointer.cc",
105 "pointer.h",
106 "pointer_delegate.h",
107 "shell_surface.cc",
108 "shell_surface.h",
109 "shell_surface_base.cc",
110 "shell_surface_base.h",
111 "text_input.cc",
112 "text_input.h",
Shawn Gallea0a2ee0a2018-11-05 18:55:04113 "wm_helper_chromeos.cc",
114 "wm_helper_chromeos.h",
Shawn Gallea41ed30262018-10-19 17:23:37115 "xdg_shell_surface.cc",
116 "xdg_shell_surface.h",
117 ]
erosky9f31b772016-10-04 01:10:16118 }
Shawn Gallead1908432018-11-12 15:49:39119
120 if (is_chromecast) {
121 sources += [
122 "fullscreen_shell_surface.cc",
123 "fullscreen_shell_surface.h",
124 ]
125 }
revemanb195f41d2015-11-19 22:16:48126}
127
128source_set("test_support") {
129 testonly = true
130
revemanb195f41d2015-11-19 22:16:48131 deps = [
penghuang608523d42016-08-18 17:05:28132 ":exo",
revemanb195f41d2015-11-19 22:16:48133 "//base",
brettw15764b12015-11-30 22:11:05134 "//gpu",
revemanb195f41d2015-11-19 22:16:48135 "//skia",
136 "//testing/gtest",
brettw15764b12015-11-30 22:11:05137 "//ui/aura",
138 "//ui/compositor",
139 "//ui/gfx/geometry",
denniskempin31a496e2016-12-17 00:20:57140 "//ui/views",
Thiago Farina3b086a02017-05-30 22:32:50141 "//ui/wm",
revemanb195f41d2015-11-19 22:16:48142 ]
Shawn Gallea41ed30262018-10-19 17:23:37143
144 if (is_chromeos) {
Shawn Gallead1908432018-11-12 15:49:39145 sources = [
146 "test/exo_test_base.cc",
147 "test/exo_test_base.h",
148 "test/exo_test_helper.cc",
149 "test/exo_test_helper.h",
150 "test/test_client_controlled_state_delegate.cc",
151 "test/test_client_controlled_state_delegate.h",
152 ]
Shawn Gallea41ed30262018-10-19 17:23:37153 deps += [
154 "//ash:test_support_without_content",
155 "//ash/public/cpp",
156 ]
157 }
Shawn Gallead1908432018-11-12 15:49:39158
159 if (is_chromecast) {
160 sources = [
161 "test/exo_test_base_cast.cc",
162 "test/exo_test_base_cast.h",
163 ]
164 }
revemanb195f41d2015-11-19 22:16:48165}
166
167source_set("unit_tests") {
168 testonly = true
169
revemanb195f41d2015-11-19 22:16:48170 deps = [
reveman27fe2642015-11-20 06:33:39171 ":exo",
172 ":test_support",
brettw15764b12015-11-30 22:11:05173 "//base",
denniskempin68de18242016-07-14 00:04:59174 "//base/test:test_support",
brettw15764b12015-11-30 22:11:05175 "//cc",
eseckler599d86bb2017-03-15 09:02:55176 "//cc:test_support",
revemanb195f41d2015-11-19 22:16:48177 "//components/user_manager",
Fady Samuel764e0a42017-07-13 22:35:44178 "//components/viz/service",
Fady Samuelc296f5fb2017-07-21 04:02:19179 "//components/viz/test:test_support",
denniskempin68de18242016-07-14 00:04:59180 "//device/gamepad:test_helpers",
brettw15764b12015-11-30 22:11:05181 "//gpu/command_buffer/client:gles2_interface",
revemanb195f41d2015-11-19 22:16:48182 "//skia",
reveman39b32c872015-12-08 05:34:05183 "//testing/gmock",
revemanb195f41d2015-11-19 22:16:48184 "//testing/gtest",
brettw15764b12015-11-30 22:11:05185 "//ui/aura",
Alex Zhang3f8482b2017-08-01 15:16:24186 "//ui/compositor:test_support",
Tommy C. Li092c628a2018-03-29 20:32:15187 "//ui/compositor_extra",
reveman5cacf70c2015-12-09 22:50:02188 "//ui/events:dom_keycode_converter",
reveman39b32c872015-12-08 05:34:05189 "//ui/events:test_support",
Jingkui Wang9ec45ba2017-09-12 21:27:48190 "//ui/events/ozone:events_ozone_evdev",
brettw15764b12015-11-30 22:11:05191 "//ui/gfx",
revemanb195f41d2015-11-19 22:16:48192 "//ui/message_center",
brettw15764b12015-11-30 22:11:05193 "//ui/views",
skycea631e2016-12-16 21:52:22194 "//ui/wm",
revemanb195f41d2015-11-19 22:16:48195 ]
brettwb5440a92015-12-03 00:47:12196
197 if (use_ozone) {
198 deps += [ "//ui/ozone" ]
199 }
Shawn Gallea41ed30262018-10-19 17:23:37200
201 if (is_chromeos) {
Shawn Gallead1908432018-11-12 15:49:39202 sources = [
203 "../../ui/events/ozone/gamepad/gamepad_event.cc",
204 "buffer_unittest.cc",
205 "client_controlled_shell_surface_unittest.cc",
206 "data_device_unittest.cc",
207 "data_offer_unittest.cc",
208 "data_source_unittest.cc",
209 "display_unittest.cc",
210 "gaming_seat_unittest.cc",
211 "keyboard_unittest.cc",
212 "notification_unittest.cc",
213 "pointer_unittest.cc",
214 "seat_unittest.cc",
215 "shared_memory_unittest.cc",
216 "shell_surface_unittest.cc",
217 "sub_surface_unittest.cc",
218 "surface_unittest.cc",
219 "text_input_unittest.cc",
220 "touch_unittest.cc",
221 ]
222
Shawn Gallea41ed30262018-10-19 17:23:37223 deps += [
224 "//ash",
225 "//ash:test_support_without_content",
226 "//ash/public/cpp",
227 "//ui/keyboard",
228 ]
229 }
Shawn Gallead1908432018-11-12 15:49:39230
231 if (is_chromecast) {
232 sources = [
233 "fullscreen_shell_surface_unittest.cc",
234 ]
235 }
revemanb195f41d2015-11-19 22:16:48236}
237
238test("exo_unittests") {
239 sources = [
revemanb195f41d2015-11-19 22:16:48240 "test/run_all_unittests.cc",
241 ]
oshima2a44e112016-06-23 17:59:18242
revemanb195f41d2015-11-19 22:16:48243 deps = [
revemanb195f41d2015-11-19 22:16:48244 ":unit_tests",
brettw15764b12015-11-30 22:11:05245 "//base",
246 "//base/test:test_support",
Scott Violet260dabf2017-07-14 17:17:51247 "//cc:test_support",
248 "//components/viz/test:test_support",
denniskempin68de18242016-07-14 00:04:59249 "//device/gamepad:test_helpers",
Ken Rockot9b26bc52018-07-04 19:57:49250 "//mojo/core/embedder",
skyd06586d2017-02-22 17:46:36251 "//testing/gtest",
252 "//ui/aura",
Scott Violet348ecf72017-11-28 18:28:19253 "//ui/aura:test_support",
skyd06586d2017-02-22 17:46:36254 "//ui/base",
sky25b49b282017-03-31 14:41:13255 "//ui/compositor:test_support",
Jun Mukai17c449d2018-04-13 18:38:38256 "//ui/display:display_manager_test_api",
skyd06586d2017-02-22 17:46:36257 "//ui/gl:test_support",
revemanb195f41d2015-11-19 22:16:48258 ]
oshima2a44e112016-06-23 17:59:18259
260 data_deps = [
Steven Bennettsb4634b32018-10-18 16:12:11261 "//testing/buildbot/filters:exo_unittests_filters",
oshima2a44e112016-06-23 17:59:18262 ]
263
revemanb195f41d2015-11-19 22:16:48264 if (is_linux) {
265 deps += [ "//components/exo/wayland:unit_tests" ]
266 }
Shawn Gallea41ed30262018-10-19 17:23:37267
268 if (is_chromeos) {
269 sources += [
270 "../../ash/test/ash_test_suite.cc",
271 "../../ash/test/ash_test_suite.h",
272 ]
273
274 deps += [
275 "//ash:test_support_without_content",
276 "//ash/public/cpp",
277 ]
278
279 data_deps += [
280 "//ash/strings:ash_test_strings",
281 "//ash/resources:ash_test_resources_100_percent",
282 "//ash/resources:ash_test_resources_200_percent",
283 ]
284 }
revemanb195f41d2015-11-19 22:16:48285}