Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(338)

Side by Side Diff: ash/BUILD.gn

Issue 2296973002: Moves ash content specific tests into ash_content_unittests (Closed)
Patch Set: add dep to base test suport Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « BUILD.gn ('k') | ash/ash.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 import("//ui/base/ui_features.gni") 8 import("//ui/base/ui_features.gni")
9 9
10 assert(use_aura) 10 assert(use_aura)
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 "//ui/keyboard:keyboard_with_content", 178 "//ui/keyboard:keyboard_with_content",
179 "//ui/resources", 179 "//ui/resources",
180 "//ui/strings", 180 "//ui/strings",
181 "//ui/views", 181 "//ui/views",
182 "//ui/views/controls/webview", 182 "//ui/views/controls/webview",
183 "//ui/web_dialogs", 183 "//ui/web_dialogs",
184 "//url", 184 "//url",
185 ] 185 ]
186 } 186 }
187 187
188 # TODO(msw): Move support code with content deps to test_support_with_content. 188 # Internal target consumed by |test_support_with_content| and
189 static_library("test_support") { 189 # |test_support_without_content|. This target contains all the test support
190 # files, with the exception of an implementation of AshTestEnvironment.
191 # Consumers of ash should use one of |test_support_with_content| or
192 # |test_support_without_content|.
193 static_library("test_support_common") {
190 testonly = true 194 testonly = true
195 visibility = [ ":*" ]
191 sources = gypi_values.ash_test_support_sources 196 sources = gypi_values.ash_test_support_sources
192 configs += [ "//build/config:precompiled_headers" ] 197 configs += [ "//build/config:precompiled_headers" ]
193 198
194 public_deps = [ 199 public_deps = [
195 ":ash", 200 ":ash",
196 ] 201 ]
197 deps = [ 202 deps = [
198 ":test_support_with_content", # TODO(beng): reverse this direction.
199 "//ash/resources", 203 "//ash/resources",
200 "//base:i18n", 204 "//base:i18n",
201 "//base/test:test_support", 205 "//base/test:test_support",
202 "//components/signin/core/account_id", 206 "//components/signin/core/account_id",
203 "//components/user_manager:user_manager", 207 "//components/user_manager:user_manager",
204 "//content/public/browser",
205 "//content/test:test_support",
206 "//device/bluetooth", 208 "//device/bluetooth",
207 "//skia", 209 "//skia",
208 "//testing/gtest", 210 "//testing/gtest",
209 "//ui/accessibility", 211 "//ui/accessibility",
210 "//ui/app_list:test_support", 212 "//ui/app_list:test_support",
211 "//ui/app_list/presenter", 213 "//ui/app_list/presenter",
212 "//ui/aura", 214 "//ui/aura",
213 "//ui/aura:test_support", 215 "//ui/aura:test_support",
214 "//ui/base:test_support", 216 "//ui/base:test_support",
215 "//ui/compositor:test_support", 217 "//ui/compositor:test_support",
(...skipping 19 matching lines...) Expand all
235 } 237 }
236 238
237 if (is_chromeos) { 239 if (is_chromeos) {
238 deps += [ 240 deps += [
239 "//chromeos", 241 "//chromeos",
240 "//ui/display", 242 "//ui/display",
241 ] 243 ]
242 } 244 }
243 } 245 }
244 246
247 static_library("test_support_without_content") {
248 testonly = true
249 sources = [
250 "test/ash_test_environment_default.cc",
251 ]
252
253 public_deps = [
254 ":test_support_common",
255 ]
256
257 deps = [
258 "//base",
259 "//base/test:test_support",
260 "//skia",
261 ]
262 }
263
245 static_library("test_support_with_content") { 264 static_library("test_support_with_content") {
246 testonly = true 265 testonly = true
247 sources = gypi_values.ash_test_support_with_content_sources 266 sources = gypi_values.ash_test_support_with_content_sources
267 sources += [
268 "test/ash_test_environment_content.cc",
269 "test/ash_test_environment_content.h",
270 ]
248 configs += [ "//build/config:precompiled_headers" ] 271 configs += [ "//build/config:precompiled_headers" ]
249 272
250 deps = [ 273 public_deps = [
251 ":ash_with_content", 274 ":ash_with_content",
275 ":test_support_common",
276 "//content/public/browser",
252 "//content/test:test_support", 277 "//content/test:test_support",
253 "//skia", 278 "//skia",
254 ] 279 ]
255 } 280 }
256 281
257 static_library("interactive_ui_test_support") { 282 static_library("interactive_ui_test_support") {
258 testonly = true 283 testonly = true
259 configs += [ "//build/config:precompiled_headers" ] 284 configs += [ "//build/config:precompiled_headers" ]
260 public_deps = [ 285 public_deps = [
261 ":ash", 286 ":ash",
262 ":test_support", 287 ":test_support_without_content",
263 ] 288 ]
264 sources = [ 289 sources = [
265 "test/ash_interactive_ui_test_base.cc", 290 "test/ash_interactive_ui_test_base.cc",
266 "test/ash_interactive_ui_test_base.h", 291 "test/ash_interactive_ui_test_base.h",
267 ] 292 ]
268 deps = [ 293 deps = [
269 ":ash", 294 ":ash",
270 ":test_support", 295 ":test_support_with_content",
271 "//base", 296 "//base",
272 "//skia", 297 "//skia",
273 "//testing/gtest", 298 "//testing/gtest",
274 "//ui/aura", 299 "//ui/aura",
275 "//ui/base", 300 "//ui/base",
276 "//ui/gl:test_support", 301 "//ui/gl:test_support",
277 ] 302 ]
278 } 303 }
279 304
280 static_library("ash_shell_lib") { 305 static_library("ash_shell_lib") {
281 testonly = true 306 testonly = true
282 sources = gypi_values.ash_shell_lib_sources 307 sources = gypi_values.ash_shell_lib_sources
283 308
284 deps = [ 309 deps = [
285 ":ash", 310 ":ash",
286 ":ash_with_content", 311 ":ash_with_content",
287 ":test_support", 312 ":test_support_without_content",
288 "//ash/common/strings", 313 "//ash/common/strings",
289 "//ash/resources", 314 "//ash/resources",
290 "//base", 315 "//base",
291 "//base:i18n", 316 "//base:i18n",
292 "//components/user_manager", 317 "//components/user_manager",
293 "//net", 318 "//net",
294 "//skia", 319 "//skia",
295 "//third_party/icu", 320 "//third_party/icu",
296 "//ui/app_list/presenter", 321 "//ui/app_list/presenter",
297 "//ui/aura", 322 "//ui/aura",
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 "//ui/message_center", 361 "//ui/message_center",
337 "//ui/views:test_support", 362 "//ui/views:test_support",
338 "//ui/wm", 363 "//ui/wm",
339 ] 364 ]
340 365
341 if (is_chromeos) { 366 if (is_chromeos) {
342 deps += [ "//chromeos" ] 367 deps += [ "//chromeos" ]
343 } 368 }
344 } 369 }
345 370
371 # This target is intended for tests that use content. In general very few tests
372 # need or use content and should be placed in |ash_unittests| instead.
373 test("ash_content_unittests") {
374 sources = [
375 "content/display/screen_orientation_controller_chromeos_unittest.cc",
376 "content/keyboard_overlay/keyboard_overlay_delegate_unittest.cc",
377 "content/keyboard_overlay/keyboard_overlay_view_unittest.cc",
378 "test/ash_unittests.cc",
379 ]
380 configs += [
381 "//build/config:precompiled_headers",
382 "//build/config/compiler:no_size_t_to_int_warning",
383 ]
384
385 deps = [
386 ":ash",
387 ":ash_with_content",
388 ":test_support_with_content",
389 "//base",
390 "//base/test:test_support",
391 "//components/signin/core/account_id",
392 "//components/user_manager",
393 "//content/public/browser",
394 "//content/test:test_support",
395 "//mojo/edk/system",
396 "//skia",
397 "//testing/gtest",
398 "//ui/aura",
399 "//ui/aura:test_support",
400 "//ui/message_center",
401 "//ui/message_center:test_support",
402 "//ui/views",
403 "//ui/views:test_support",
404 "//ui/views/controls/webview:test_support",
405 "//ui/web_dialogs:test_support",
406 ]
407
408 data_deps = [
409 "//ash/common/strings:ash_test_strings",
410 "//ash/resources:ash_test_resources_100_percent",
411 "//ash/resources:ash_test_resources_200_percent",
412 ]
413
414 if (is_chromeos) {
415 deps += [
416 "//chromeos",
417 "//chromeos:power_manager_proto",
418 "//chromeos:test_support_without_gmock",
419 "//components/quirks",
420 "//device/bluetooth",
421 "//net:net",
422 "//ui/chromeos",
423 "//ui/display",
424 "//ui/display:test_support",
425 "//ui/display:test_util",
426 ]
427 }
428 }
429
346 test("ash_unittests") { 430 test("ash_unittests") {
347 sources = gypi_values.ash_unittests_sources 431 sources = gypi_values.ash_unittests_sources
348 configs += [ "//build/config:precompiled_headers" ] 432 sources += [ "test/ash_test_environment_default.cc" ]
433 configs += [
434 "//build/config:precompiled_headers",
435 "//build/config/compiler:no_size_t_to_int_warning",
436 ]
349 437
350 deps = [ 438 deps = [
351 ":ash", 439 ":ash",
352 ":ash_with_content", 440 ":test_support_without_content",
353 ":test_support",
354 ":test_support_with_content",
355 "//ash/autoclick/common:autoclick", 441 "//ash/autoclick/common:autoclick",
356 "//ash/common/strings", 442 "//ash/common/strings",
357 "//ash/resources", 443 "//ash/resources",
358 "//ash/touch_hud", 444 "//ash/touch_hud",
359 "//base", 445 "//base",
360 "//base/test:test_support", 446 "//base/test:test_support",
361 "//components/signin/core/account_id", 447 "//components/signin/core/account_id",
362 "//components/user_manager", 448 "//components/user_manager",
363 "//content/public/browser",
364 "//content/test:test_support",
365 "//mojo/edk/system", 449 "//mojo/edk/system",
366 "//skia", 450 "//skia",
451 "//testing/gmock",
367 "//testing/gtest", 452 "//testing/gtest",
368 "//third_party/icu", 453 "//third_party/icu",
369 "//ui/accessibility", 454 "//ui/accessibility",
370 "//ui/app_list/presenter", 455 "//ui/app_list/presenter",
371 "//ui/aura", 456 "//ui/aura",
372 "//ui/aura:test_support", 457 "//ui/aura:test_support",
373 "//ui/base", 458 "//ui/base",
374 "//ui/base:test_support", 459 "//ui/base:test_support",
375 "//ui/base/ime", 460 "//ui/base/ime",
376 "//ui/compositor", 461 "//ui/compositor",
377 "//ui/compositor:test_support", 462 "//ui/compositor:test_support",
378 "//ui/display/types", 463 "//ui/display/types",
379 "//ui/events", 464 "//ui/events",
380 "//ui/events:gesture_detection", 465 "//ui/events:gesture_detection",
381 "//ui/events:test_support", 466 "//ui/events:test_support",
382 "//ui/events/devices", 467 "//ui/events/devices",
383 "//ui/gfx", 468 "//ui/gfx",
384 "//ui/gfx/geometry", 469 "//ui/gfx/geometry",
385 "//ui/keyboard", 470 "//ui/keyboard",
386 "//ui/keyboard:keyboard_with_content",
387 "//ui/message_center", 471 "//ui/message_center",
388 "//ui/message_center:test_support", 472 "//ui/message_center:test_support",
389 "//ui/resources", 473 "//ui/resources",
390 "//ui/strings", 474 "//ui/strings",
391 "//ui/views", 475 "//ui/views",
392 "//ui/views:test_support", 476 "//ui/views:test_support",
393 "//ui/views/controls/webview:test_support",
394 "//ui/web_dialogs:test_support",
395 "//ui/wm", 477 "//ui/wm",
396 "//ui/wm:test_support", 478 "//ui/wm:test_support",
397 "//url", 479 "//url",
398 ] 480 ]
399 481
400 data_deps = [ 482 data_deps = [
401 "//ash/common/strings:ash_test_strings", 483 "//ash/common/strings:ash_test_strings",
402 "//ash/resources:ash_test_resources_100_percent", 484 "//ash/resources:ash_test_resources_100_percent",
403 "//ash/resources:ash_test_resources_200_percent", 485 "//ash/resources:ash_test_resources_200_percent",
404 ] 486 ]
405 487
406 if (!is_chromeos) {
407 sources -= [
408 # TODO(zork): fix this test to build on Windows. See: crosbug.com/26906
409 "focus_cycler_unittest.cc",
410
411 # All tests for multiple displays: not supported on Windows Ash.
412 "wm/drag_window_resizer_unittest.cc",
413
414 # Talks to ChromeOS system services.
415 "wm/lock_state_controller_unittest.cc",
416
417 # Maximize mode is only available on Chrome OS.
418 "wm/maximize_mode/maximize_mode_controller_unittest.cc",
419 "wm/maximize_mode/maximize_mode_window_manager_unittest.cc",
420
421 # Can't resize on Windows Ash. http://crbug.com/165962
422 "autoclick/autoclick_unittest.cc",
423 "magnifier/magnification_controller_unittest.cc",
424 "magnifier/partial_magnification_controller_unittest.cc",
425 "sticky_keys/sticky_keys_overlay_unittest.cc",
426 "virtual_keyboard_controller_unittest.cc",
427 "wm/workspace/workspace_window_resizer_unittest.cc",
428 ]
429 }
430
431 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
432
433 if (!use_x11) { 488 if (!use_x11) {
434 sources -= [ "host/ash_window_tree_host_x11_unittest.cc" ] 489 sources -= [ "host/ash_window_tree_host_x11_unittest.cc" ]
435 } 490 }
491
436 if (is_chromeos) { 492 if (is_chromeos) {
437 sources += [ "first_run/first_run_helper_unittest.cc" ] 493 sources += [ "first_run/first_run_helper_unittest.cc" ]
438 deps += [ 494 deps += [
439 "//chromeos", 495 "//chromeos",
440 "//chromeos:power_manager_proto", 496 "//chromeos:power_manager_proto",
441 "//chromeos:test_support_without_gmock", 497 "//chromeos:test_support_without_gmock",
442 "//components/quirks", 498 "//components/quirks",
443 "//device/bluetooth", 499 "//device/bluetooth",
444 "//net:net", 500 "//net:net",
445 "//ui/chromeos", 501 "//ui/chromeos",
446 "//ui/display", 502 "//ui/display",
447 "//ui/display:test_support", 503 "//ui/display:test_support",
448 "//ui/display:test_util", 504 "//ui/display:test_util",
449 ] 505 ]
450 } else { 506 } else {
451 sources -= [ 507 sources -= [
452 "accelerators/magnifier_key_scroller_unittest.cc", 508 "accelerators/magnifier_key_scroller_unittest.cc",
453 "accelerators/spoken_feedback_toggler_unittest.cc", 509 "accelerators/spoken_feedback_toggler_unittest.cc",
510
511 # Can't resize on Windows Ash. http://crbug.com/165962
512 "autoclick/autoclick_unittest.cc",
454 "display/resolution_notification_controller_unittest.cc", 513 "display/resolution_notification_controller_unittest.cc",
514
515 # TODO(zork): fix this test to build on Windows. See: crosbug.com/26906
516 "focus_cycler_unittest.cc",
517 "magnifier/magnification_controller_unittest.cc",
518 "magnifier/partial_magnification_controller_unittest.cc",
519 "sticky_keys/sticky_keys_overlay_unittest.cc",
520 "sticky_keys/sticky_keys_unittest.cc",
455 "touch/touchscreen_util_unittest.cc", 521 "touch/touchscreen_util_unittest.cc",
522 "virtual_keyboard_controller_unittest.cc",
523
524 # All tests for multiple displays: not supported on Windows Ash.
525 "wm/drag_window_resizer_unittest.cc",
526
527 # Talks to ChromeOS system services.
528 "wm/lock_state_controller_unittest.cc",
529
530 # Maximize mode is only available on Chrome OS.
531 "wm/maximize_mode/maximize_mode_controller_unittest.cc",
532 "wm/maximize_mode/maximize_mode_window_manager_unittest.cc",
533 "wm/workspace/workspace_window_resizer_unittest.cc",
456 ] 534 ]
457 } 535 }
458 536
459 if (!use_x11 || !is_chromeos) { 537 if (!use_x11 || !is_chromeos) {
460 sources -= [ "touch/touch_transformer_controller_unittest.cc" ] 538 sources -= [ "touch/touch_transformer_controller_unittest.cc" ]
461 } 539 }
462
463 if (!is_chromeos) {
464 sources -= [ "sticky_keys/sticky_keys_unittest.cc" ]
465 }
466 } 540 }
467 541
468 executable("ash_shell_with_content") { 542 executable("ash_shell_with_content") {
469 testonly = true 543 testonly = true
470 sources = [ 544 sources = [
471 "shell/content/shell_with_content_main.cc", 545 "shell/content/shell_with_content_main.cc",
472 ] 546 ]
473 547
474 deps = [ 548 deps = [
475 ":ash_shell_lib_with_content", 549 ":ash_shell_lib_with_content",
(...skipping 16 matching lines...) Expand all
492 configs += [ "//build/config/win:windowed" ] 566 configs += [ "//build/config/win:windowed" ]
493 deps += [ "//sandbox" ] 567 deps += [ "//sandbox" ]
494 } 568 }
495 569
496 if (is_chromeos) { 570 if (is_chromeos) {
497 deps += [ "//device/bluetooth" ] 571 deps += [ "//device/bluetooth" ]
498 } 572 }
499 } 573 }
500 # When adding support for isolates, please have a look at run-time dependencies 574 # When adding support for isolates, please have a look at run-time dependencies
501 # in the ash_unittests_run target in ash.gyp. 575 # in the ash_unittests_run target in ash.gyp.
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | ash/ash.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698