OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
6 import("//build/config/ui.gni") | 6 import("//build/config/ui.gni") |
7 import("//testing/test.gni") | 7 import("//testing/test.gni") |
8 | 8 |
9 gypi_values = exec_script("//build/gypi_to_gn.py", | 9 gypi_values = exec_script("//build/gypi_to_gn.py", |
10 [ rebase_path("ash.gyp") ], | 10 [ rebase_path("ash.gyp") ], |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 "//ui/gfx/geometry", | 161 "//ui/gfx/geometry", |
162 "//ui/resources", | 162 "//ui/resources", |
163 "//ui/strings", | 163 "//ui/strings", |
164 "//ui/views", | 164 "//ui/views", |
165 "//ui/views/controls/webview", | 165 "//ui/views/controls/webview", |
166 "//ui/web_dialogs", | 166 "//ui/web_dialogs", |
167 "//url", | 167 "//url", |
168 ] | 168 ] |
169 } | 169 } |
170 | 170 |
171 static_library("test_support") { | 171 # TODO(brettw) enable on Windows. This should link but is disabled due to bot |
172 testonly = true | 172 # capacity issues. |
173 sources = gypi_values.ash_test_support_sources | 173 if (!is_win) { |
174 | 174 static_library("test_support") { |
175 public_deps = [ | 175 testonly = true |
176 ":ash", | 176 sources = gypi_values.ash_test_support_sources |
177 ] | 177 |
178 deps = [ | 178 public_deps = [ |
179 "//ash/resources", | 179 ":ash", |
180 "//content/test:test_support", | 180 ] |
181 "//skia", | 181 deps = [ |
182 "//testing/gtest", | 182 "//ash/resources", |
183 "//ui/accessibility", | 183 "//content/test:test_support", |
184 "//ui/app_list", | 184 "//skia", |
185 "//ui/app_list:test_support", | 185 "//testing/gtest", |
186 "//ui/events:events_base", | 186 "//ui/accessibility", |
187 "//ui/events/devices", | 187 "//ui/app_list", |
188 "//ui/gl", | 188 "//ui/app_list:test_support", |
189 "//ui/views", | 189 "//ui/events:events_base", |
190 "//ui/views:test_support", | 190 "//ui/events/devices", |
191 ] | 191 "//ui/gl", |
192 | 192 "//ui/views", |
193 if (is_win) { | 193 "//ui/views:test_support", |
194 sources += [ | 194 ] |
195 "test/test_metro_viewer_process_host.cc", | 195 |
196 "test/test_metro_viewer_process_host.h", | 196 if (is_win) { |
197 ] | 197 sources += [ |
198 deps += [ | 198 "test/test_metro_viewer_process_host.cc", |
199 "//ipc", | 199 "test/test_metro_viewer_process_host.h", |
200 "//ui/metro_viewer", | 200 ] |
201 "//win8:metro_viewer", | 201 deps += [ |
202 "//win8:test_support_win8", | 202 "//ipc", |
203 "//win8:test_registrar", | 203 "//ui/metro_viewer", |
204 ] | 204 "//win8:metro_viewer", |
| 205 "//win8:test_support_win8", |
| 206 "//win8:test_registrar", |
| 207 ] |
| 208 } |
| 209 } |
| 210 |
| 211 static_library("ash_shell_lib") { |
| 212 testonly = true |
| 213 sources = gypi_values.ash_shell_lib_sources |
| 214 |
| 215 deps = [ |
| 216 ":ash", |
| 217 ":ash_with_content", |
| 218 ":test_support", |
| 219 "//ash/resources", |
| 220 "//ash/strings", |
| 221 "//base", |
| 222 "//base:i18n", |
| 223 |
| 224 #"//chrome:packed_resources", TODO(GYP) |
| 225 "//content", |
| 226 "//content/shell:content_shell_lib", |
| 227 "//net", |
| 228 "//skia", |
| 229 "//third_party/icu", |
| 230 "//ui/app_list", |
| 231 "//ui/aura", |
| 232 "//ui/base", |
| 233 "//ui/compositor", |
| 234 "//ui/events", |
| 235 "//ui/events:events_base", |
| 236 "//ui/gfx", |
| 237 "//ui/gfx/geometry", |
| 238 "//ui/keyboard", |
| 239 "//ui/message_center", |
| 240 "//ui/resources", |
| 241 "//ui/views", |
| 242 "//ui/views:test_support", |
| 243 "//ui/views/examples:views_examples_lib", |
| 244 "//ui/views/examples:views_examples_with_content_lib", |
| 245 ] |
| 246 } |
| 247 |
| 248 test("ash_unittests") { |
| 249 sources = gypi_values.ash_unittests_sources |
| 250 |
| 251 deps = [ |
| 252 ":ash", |
| 253 ":ash_with_content", |
| 254 ":test_support", |
| 255 "//ash/resources", |
| 256 "//ash/strings", |
| 257 "//base", |
| 258 "//base/allocator", |
| 259 "//base/test:test_support", |
| 260 "//components/user_manager", |
| 261 "//content/public/browser", |
| 262 "//content/test:test_support", |
| 263 "//skia", |
| 264 "//testing/gtest", |
| 265 "//third_party/icu", |
| 266 "//ui/accelerometer", |
| 267 "//ui/accessibility", |
| 268 "//ui/aura", |
| 269 "//ui/aura:test_support", |
| 270 "//ui/base", |
| 271 "//ui/base:test_support", |
| 272 "//ui/compositor", |
| 273 "//ui/compositor:test_support", |
| 274 "//ui/events", |
| 275 "//ui/events/devices", |
| 276 "//ui/events:test_support", |
| 277 "//ui/events:gesture_detection", |
| 278 "//ui/gfx", |
| 279 "//ui/gfx/geometry", |
| 280 "//ui/keyboard", |
| 281 "//ui/message_center", |
| 282 "//ui/message_center:test_support", |
| 283 "//ui/resources", |
| 284 "//ui/views", |
| 285 "//ui/views:test_support", |
| 286 "//ui/views/controls/webview:test_support", |
| 287 "//ui/web_dialogs:test_support", |
| 288 "//ui/wm", |
| 289 "//url", |
| 290 ] |
| 291 |
| 292 if (!is_chromeos) { |
| 293 sources -= [ |
| 294 # TODO(zork): fix this test to build on Windows. See: crosbug.com/26906 |
| 295 "focus_cycler_unittest.cc", |
| 296 |
| 297 # All tests for multiple displays: not supported on Windows Ash. |
| 298 "wm/drag_window_resizer_unittest.cc", |
| 299 |
| 300 # Accelerometer is only available on Chrome OS. |
| 301 "wm/maximize_mode/maximize_mode_controller_unittest.cc", |
| 302 |
| 303 # Can't resize on Windows Ash. http://crbug.com/165962 |
| 304 "magnifier/magnification_controller_unittest.cc", |
| 305 "wm/workspace/workspace_window_resizer_unittest.cc", |
| 306 "sticky_keys/sticky_keys_overlay_unittest.cc", |
| 307 "system/tray/media_security/multi_profile_media_tray_item_unittest.cc", |
| 308 "autoclick/autoclick_unittest.cc", |
| 309 "virtual_keyboard_controller_unittest.cc", |
| 310 ] |
| 311 sources += [ |
| 312 #'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_unscaled_resources.rc', TO
DO(GYP) |
| 313 ] |
| 314 } |
| 315 |
| 316 if (is_win) { |
| 317 cflags = [ "/wd4267" ] |
| 318 } |
| 319 |
| 320 if (!use_x11) { |
| 321 sources -= [ "host/ash_window_tree_host_x11_unittest.cc" ] |
| 322 } |
| 323 if (is_chromeos) { |
| 324 sources += [ "first_run/first_run_helper_unittest.cc" ] |
| 325 deps += [ |
| 326 "//device/bluetooth", |
| 327 "//ui/display", |
| 328 "//ui/display:test_util", |
| 329 "//ui/display/types", |
| 330 "//chromeos:power_manager_proto", |
| 331 "//chromeos:test_support_without_gmock", |
| 332 ] |
| 333 } else { |
| 334 sources -= [ |
| 335 "accelerators/magnifier_key_scroller_unittest.cc", |
| 336 "accelerators/spoken_feedback_toggler_unittest.cc", |
| 337 "display/resolution_notification_controller_unittest.cc", |
| 338 "touch/touchscreen_util_unittest.cc", |
| 339 ] |
| 340 } |
| 341 |
| 342 if (!use_x11 || !is_chromeos) { |
| 343 sources -= [ "touch/touch_transformer_controller_unittest.cc" ] |
| 344 } |
| 345 |
| 346 # TODO(GYP) is this necessary? |
| 347 #['OS=="linux" and component=="shared_library" and use_allocator!="none"', { |
| 348 # ldflags = "-rdynamic" |
| 349 |
| 350 if (!is_chromeos || use_ozone) { |
| 351 sources -= [ "sticky_keys/sticky_keys_unittest.cc" ] # crbug.com/354035 |
| 352 } |
| 353 } |
| 354 |
| 355 executable("ash_shell") { |
| 356 testonly = true |
| 357 sources = [ |
| 358 "shell/shell_main.cc", |
| 359 ] |
| 360 |
| 361 deps = [ |
| 362 ":ash_shell_lib", |
| 363 "//components/user_manager", |
| 364 ] |
| 365 |
| 366 if (is_win) { |
| 367 configs -= [ "//build/config/win:console" ] |
| 368 configs += [ "//build/config/win:windowed" ] |
| 369 deps += [ "//sandbox" ] |
| 370 } |
| 371 |
| 372 if (is_chromeos) { |
| 373 deps += [ "//device/bluetooth" ] |
| 374 } |
| 375 } |
| 376 |
| 377 test("ash_shell_unittests") { |
| 378 sources = [ |
| 379 "shell/window_watcher_unittest.cc", |
| 380 "test/ash_unittests.cc", |
| 381 ] |
| 382 |
| 383 deps = [ |
| 384 ":ash_shell_lib", |
| 385 ":test_support", |
| 386 "//base/test:test_support", |
| 387 "//components/user_manager", |
| 388 "//content/test:test_support", |
| 389 "//skia", |
| 390 "//testing/gtest", |
| 391 "//ui/accessibility", |
| 392 ] |
| 393 |
| 394 if (is_chromeos) { |
| 395 deps += [ "//ui/display" ] |
| 396 } |
205 } | 397 } |
206 } | 398 } |
207 | |
208 static_library("ash_shell_lib") { | |
209 testonly = true | |
210 sources = gypi_values.ash_shell_lib_sources | |
211 | |
212 deps = [ | |
213 ":ash", | |
214 ":ash_with_content", | |
215 ":test_support", | |
216 "//ash/resources", | |
217 "//ash/strings", | |
218 "//base", | |
219 "//base:i18n", | |
220 | |
221 #"//chrome:packed_resources", TODO(GYP) | |
222 "//content", | |
223 "//content/shell:content_shell_lib", | |
224 "//net", | |
225 "//skia", | |
226 "//third_party/icu", | |
227 "//ui/app_list", | |
228 "//ui/aura", | |
229 "//ui/base", | |
230 "//ui/compositor", | |
231 "//ui/events", | |
232 "//ui/events:events_base", | |
233 "//ui/gfx", | |
234 "//ui/gfx/geometry", | |
235 "//ui/keyboard", | |
236 "//ui/message_center", | |
237 "//ui/resources", | |
238 "//ui/views", | |
239 "//ui/views:test_support", | |
240 "//ui/views/examples:views_examples_lib", | |
241 "//ui/views/examples:views_examples_with_content_lib", | |
242 ] | |
243 } | |
244 | |
245 test("ash_unittests") { | |
246 sources = gypi_values.ash_unittests_sources | |
247 | |
248 deps = [ | |
249 ":ash", | |
250 ":ash_with_content", | |
251 ":test_support", | |
252 "//ash/resources", | |
253 "//ash/strings", | |
254 "//base", | |
255 "//base/allocator", | |
256 "//base/test:test_support", | |
257 "//components/user_manager", | |
258 "//content/public/browser", | |
259 "//content/test:test_support", | |
260 "//skia", | |
261 "//testing/gtest", | |
262 "//third_party/icu", | |
263 "//ui/accelerometer", | |
264 "//ui/accessibility", | |
265 "//ui/aura", | |
266 "//ui/aura:test_support", | |
267 "//ui/base", | |
268 "//ui/base:test_support", | |
269 "//ui/compositor", | |
270 "//ui/compositor:test_support", | |
271 "//ui/events", | |
272 "//ui/events/devices", | |
273 "//ui/events:test_support", | |
274 "//ui/events:gesture_detection", | |
275 "//ui/gfx", | |
276 "//ui/gfx/geometry", | |
277 "//ui/keyboard", | |
278 "//ui/message_center", | |
279 "//ui/message_center:test_support", | |
280 "//ui/resources", | |
281 "//ui/views", | |
282 "//ui/views:test_support", | |
283 "//ui/views/controls/webview:test_support", | |
284 "//ui/web_dialogs:test_support", | |
285 "//ui/wm", | |
286 "//url", | |
287 ] | |
288 | |
289 if (!is_chromeos) { | |
290 sources -= [ | |
291 # TODO(zork): fix this test to build on Windows. See: crosbug.com/26906 | |
292 "focus_cycler_unittest.cc", | |
293 | |
294 # All tests for multiple displays: not supported on Windows Ash. | |
295 "wm/drag_window_resizer_unittest.cc", | |
296 | |
297 # Accelerometer is only available on Chrome OS. | |
298 "wm/maximize_mode/maximize_mode_controller_unittest.cc", | |
299 | |
300 # Can't resize on Windows Ash. http://crbug.com/165962 | |
301 "magnifier/magnification_controller_unittest.cc", | |
302 "wm/workspace/workspace_window_resizer_unittest.cc", | |
303 "sticky_keys/sticky_keys_overlay_unittest.cc", | |
304 "system/tray/media_security/multi_profile_media_tray_item_unittest.cc", | |
305 "autoclick/autoclick_unittest.cc", | |
306 "virtual_keyboard_controller_unittest.cc", | |
307 ] | |
308 sources += [ | |
309 #'<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_unscaled_resources.rc', TODO
(GYP) | |
310 ] | |
311 } | |
312 | |
313 if (is_win) { | |
314 cflags = [ "/wd4267" ] | |
315 } | |
316 | |
317 if (!use_x11) { | |
318 sources -= [ "host/ash_window_tree_host_x11_unittest.cc" ] | |
319 } | |
320 if (is_chromeos) { | |
321 sources += [ "first_run/first_run_helper_unittest.cc" ] | |
322 deps += [ | |
323 "//device/bluetooth", | |
324 "//ui/display", | |
325 "//ui/display:test_util", | |
326 "//ui/display/types", | |
327 "//chromeos:power_manager_proto", | |
328 "//chromeos:test_support_without_gmock", | |
329 ] | |
330 } else { | |
331 sources -= [ | |
332 "accelerators/magnifier_key_scroller_unittest.cc", | |
333 "accelerators/spoken_feedback_toggler_unittest.cc", | |
334 "display/resolution_notification_controller_unittest.cc", | |
335 "touch/touchscreen_util_unittest.cc", | |
336 ] | |
337 } | |
338 | |
339 if (!use_x11 || !is_chromeos) { | |
340 sources -= [ "touch/touch_transformer_controller_unittest.cc" ] | |
341 } | |
342 | |
343 # TODO(GYP) is this necessary? | |
344 #['OS=="linux" and component=="shared_library" and use_allocator!="none"', { | |
345 # ldflags = "-rdynamic" | |
346 | |
347 if (!is_chromeos || use_ozone) { | |
348 sources -= [ "sticky_keys/sticky_keys_unittest.cc" ] # crbug.com/354035 | |
349 } | |
350 } | |
351 | |
352 executable("ash_shell") { | |
353 testonly = true | |
354 sources = [ | |
355 "shell/shell_main.cc", | |
356 ] | |
357 | |
358 deps = [ | |
359 ":ash_shell_lib", | |
360 "//components/user_manager", | |
361 ] | |
362 | |
363 if (is_win) { | |
364 configs -= [ "//build/config/win:console" ] | |
365 configs += [ "//build/config/win:windowed" ] | |
366 deps += [ "//sandbox" ] | |
367 } | |
368 | |
369 if (is_chromeos) { | |
370 deps += [ "//device/bluetooth" ] | |
371 } | |
372 } | |
373 | |
374 test("ash_shell_unittests") { | |
375 sources = [ | |
376 "shell/window_watcher_unittest.cc", | |
377 "test/ash_unittests.cc", | |
378 ] | |
379 | |
380 deps = [ | |
381 ":ash_shell_lib", | |
382 ":test_support", | |
383 "//base/test:test_support", | |
384 "//components/user_manager", | |
385 "//content/test:test_support", | |
386 "//skia", | |
387 "//testing/gtest", | |
388 "//ui/accessibility", | |
389 ] | |
390 | |
391 if (is_chromeos) { | |
392 deps += [ "//ui/display" ] | |
393 } | |
394 } | |
OLD | NEW |