| 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 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 Loading... |
| 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 Loading... |
| 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 "//skia", |
| 260 ] |
| 261 } |
| 262 |
| 245 static_library("test_support_with_content") { | 263 static_library("test_support_with_content") { |
| 246 testonly = true | 264 testonly = true |
| 247 sources = gypi_values.ash_test_support_with_content_sources | 265 sources = gypi_values.ash_test_support_with_content_sources |
| 266 sources += [ |
| 267 "test/ash_test_environment_content.cc", |
| 268 "test/ash_test_environment_content.h", |
| 269 ] |
| 248 configs += [ "//build/config:precompiled_headers" ] | 270 configs += [ "//build/config:precompiled_headers" ] |
| 249 | 271 |
| 250 deps = [ | 272 public_deps = [ |
| 251 ":ash_with_content", | 273 ":ash_with_content", |
| 274 ":test_support_common", |
| 275 "//content/public/browser", |
| 252 "//content/test:test_support", | 276 "//content/test:test_support", |
| 253 "//skia", | 277 "//skia", |
| 254 ] | 278 ] |
| 255 } | 279 } |
| 256 | 280 |
| 257 static_library("interactive_ui_test_support") { | 281 static_library("interactive_ui_test_support") { |
| 258 testonly = true | 282 testonly = true |
| 259 configs += [ "//build/config:precompiled_headers" ] | 283 configs += [ "//build/config:precompiled_headers" ] |
| 260 public_deps = [ | 284 public_deps = [ |
| 261 ":ash", | 285 ":ash", |
| 262 ":test_support", | 286 ":test_support_without_content", |
| 263 ] | 287 ] |
| 264 sources = [ | 288 sources = [ |
| 265 "test/ash_interactive_ui_test_base.cc", | 289 "test/ash_interactive_ui_test_base.cc", |
| 266 "test/ash_interactive_ui_test_base.h", | 290 "test/ash_interactive_ui_test_base.h", |
| 267 ] | 291 ] |
| 268 deps = [ | 292 deps = [ |
| 269 ":ash", | 293 ":ash", |
| 270 ":test_support", | 294 ":test_support_with_content", |
| 271 "//base", | 295 "//base", |
| 272 "//skia", | 296 "//skia", |
| 273 "//testing/gtest", | 297 "//testing/gtest", |
| 274 "//ui/aura", | 298 "//ui/aura", |
| 275 "//ui/base", | 299 "//ui/base", |
| 276 "//ui/gl:test_support", | 300 "//ui/gl:test_support", |
| 277 ] | 301 ] |
| 278 } | 302 } |
| 279 | 303 |
| 280 static_library("ash_shell_lib") { | 304 static_library("ash_shell_lib") { |
| 281 testonly = true | 305 testonly = true |
| 282 sources = gypi_values.ash_shell_lib_sources | 306 sources = gypi_values.ash_shell_lib_sources |
| 283 | 307 |
| 284 deps = [ | 308 deps = [ |
| 285 ":ash", | 309 ":ash", |
| 286 ":ash_with_content", | 310 ":ash_with_content", |
| 287 ":test_support", | 311 ":test_support_without_content", |
| 288 "//ash/common/strings", | 312 "//ash/common/strings", |
| 289 "//ash/resources", | 313 "//ash/resources", |
| 290 "//base", | 314 "//base", |
| 291 "//base:i18n", | 315 "//base:i18n", |
| 292 "//components/user_manager", | 316 "//components/user_manager", |
| 293 "//net", | 317 "//net", |
| 294 "//skia", | 318 "//skia", |
| 295 "//third_party/icu", | 319 "//third_party/icu", |
| 296 "//ui/app_list/presenter", | 320 "//ui/app_list/presenter", |
| 297 "//ui/aura", | 321 "//ui/aura", |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 "//ui/message_center", | 360 "//ui/message_center", |
| 337 "//ui/views:test_support", | 361 "//ui/views:test_support", |
| 338 "//ui/wm", | 362 "//ui/wm", |
| 339 ] | 363 ] |
| 340 | 364 |
| 341 if (is_chromeos) { | 365 if (is_chromeos) { |
| 342 deps += [ "//chromeos" ] | 366 deps += [ "//chromeos" ] |
| 343 } | 367 } |
| 344 } | 368 } |
| 345 | 369 |
| 370 # This target is intended for tests that use content. In general very few tests |
| 371 # need or use content and should be placed in |ash_unittests| instead. |
| 372 test("ash_content_unittests") { |
| 373 sources = [ |
| 374 "content/display/screen_orientation_controller_chromeos_unittest.cc", |
| 375 "content/keyboard_overlay/keyboard_overlay_delegate_unittest.cc", |
| 376 "content/keyboard_overlay/keyboard_overlay_view_unittest.cc", |
| 377 "test/ash_unittests.cc", |
| 378 ] |
| 379 configs += [ |
| 380 "//build/config:precompiled_headers", |
| 381 "//build/config/compiler:no_size_t_to_int_warning", |
| 382 ] |
| 383 |
| 384 deps = [ |
| 385 ":ash", |
| 386 ":ash_with_content", |
| 387 ":test_support_with_content", |
| 388 "//base", |
| 389 "//base/test:test_support", |
| 390 "//components/signin/core/account_id", |
| 391 "//components/user_manager", |
| 392 "//content/public/browser", |
| 393 "//content/test:test_support", |
| 394 "//mojo/edk/system", |
| 395 "//skia", |
| 396 "//testing/gtest", |
| 397 "//ui/aura", |
| 398 "//ui/aura:test_support", |
| 399 "//ui/message_center", |
| 400 "//ui/message_center:test_support", |
| 401 "//ui/views", |
| 402 "//ui/views:test_support", |
| 403 "//ui/views/controls/webview:test_support", |
| 404 "//ui/web_dialogs:test_support", |
| 405 ] |
| 406 |
| 407 data_deps = [ |
| 408 "//ash/common/strings:ash_test_strings", |
| 409 "//ash/resources:ash_test_resources_100_percent", |
| 410 "//ash/resources:ash_test_resources_200_percent", |
| 411 ] |
| 412 |
| 413 if (is_chromeos) { |
| 414 deps += [ |
| 415 "//chromeos", |
| 416 "//chromeos:power_manager_proto", |
| 417 "//chromeos:test_support_without_gmock", |
| 418 "//components/quirks", |
| 419 "//device/bluetooth", |
| 420 "//net:net", |
| 421 "//ui/chromeos", |
| 422 "//ui/display", |
| 423 "//ui/display:test_support", |
| 424 "//ui/display:test_util", |
| 425 ] |
| 426 } |
| 427 } |
| 428 |
| 346 test("ash_unittests") { | 429 test("ash_unittests") { |
| 347 sources = gypi_values.ash_unittests_sources | 430 sources = gypi_values.ash_unittests_sources |
| 348 configs += [ "//build/config:precompiled_headers" ] | 431 sources += [ "test/ash_test_environment_default.cc" ] |
| 432 configs += [ |
| 433 "//build/config:precompiled_headers", |
| 434 "//build/config/compiler:no_size_t_to_int_warning", |
| 435 ] |
| 349 | 436 |
| 350 deps = [ | 437 deps = [ |
| 351 ":ash", | 438 ":ash", |
| 352 ":ash_with_content", | 439 ":test_support_without_content", |
| 353 ":test_support", | |
| 354 ":test_support_with_content", | |
| 355 "//ash/autoclick/common:autoclick", | 440 "//ash/autoclick/common:autoclick", |
| 356 "//ash/common/strings", | 441 "//ash/common/strings", |
| 357 "//ash/resources", | 442 "//ash/resources", |
| 358 "//ash/touch_hud", | 443 "//ash/touch_hud", |
| 359 "//base", | 444 "//base", |
| 360 "//base/test:test_support", | 445 "//base/test:test_support", |
| 361 "//components/signin/core/account_id", | 446 "//components/signin/core/account_id", |
| 362 "//components/user_manager", | 447 "//components/user_manager", |
| 363 "//content/public/browser", | |
| 364 "//content/test:test_support", | |
| 365 "//mojo/edk/system", | 448 "//mojo/edk/system", |
| 366 "//skia", | 449 "//skia", |
| 450 "//testing/gmock", |
| 367 "//testing/gtest", | 451 "//testing/gtest", |
| 368 "//third_party/icu", | 452 "//third_party/icu", |
| 369 "//ui/accessibility", | 453 "//ui/accessibility", |
| 370 "//ui/app_list/presenter", | 454 "//ui/app_list/presenter", |
| 371 "//ui/aura", | 455 "//ui/aura", |
| 372 "//ui/aura:test_support", | 456 "//ui/aura:test_support", |
| 373 "//ui/base", | 457 "//ui/base", |
| 374 "//ui/base:test_support", | 458 "//ui/base:test_support", |
| 375 "//ui/base/ime", | 459 "//ui/base/ime", |
| 376 "//ui/compositor", | 460 "//ui/compositor", |
| 377 "//ui/compositor:test_support", | 461 "//ui/compositor:test_support", |
| 378 "//ui/display/types", | 462 "//ui/display/types", |
| 379 "//ui/events", | 463 "//ui/events", |
| 380 "//ui/events:gesture_detection", | 464 "//ui/events:gesture_detection", |
| 381 "//ui/events:test_support", | 465 "//ui/events:test_support", |
| 382 "//ui/events/devices", | 466 "//ui/events/devices", |
| 383 "//ui/gfx", | 467 "//ui/gfx", |
| 384 "//ui/gfx/geometry", | 468 "//ui/gfx/geometry", |
| 385 "//ui/keyboard", | 469 "//ui/keyboard", |
| 386 "//ui/keyboard:keyboard_with_content", | |
| 387 "//ui/message_center", | 470 "//ui/message_center", |
| 388 "//ui/message_center:test_support", | 471 "//ui/message_center:test_support", |
| 389 "//ui/resources", | 472 "//ui/resources", |
| 390 "//ui/strings", | 473 "//ui/strings", |
| 391 "//ui/views", | 474 "//ui/views", |
| 392 "//ui/views:test_support", | 475 "//ui/views:test_support", |
| 393 "//ui/views/controls/webview:test_support", | |
| 394 "//ui/web_dialogs:test_support", | |
| 395 "//ui/wm", | 476 "//ui/wm", |
| 396 "//ui/wm:test_support", | 477 "//ui/wm:test_support", |
| 397 "//url", | 478 "//url", |
| 398 ] | 479 ] |
| 399 | 480 |
| 400 data_deps = [ | 481 data_deps = [ |
| 401 "//ash/common/strings:ash_test_strings", | 482 "//ash/common/strings:ash_test_strings", |
| 402 "//ash/resources:ash_test_resources_100_percent", | 483 "//ash/resources:ash_test_resources_100_percent", |
| 403 "//ash/resources:ash_test_resources_200_percent", | 484 "//ash/resources:ash_test_resources_200_percent", |
| 404 ] | 485 ] |
| 405 | 486 |
| 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) { | 487 if (!use_x11) { |
| 434 sources -= [ "host/ash_window_tree_host_x11_unittest.cc" ] | 488 sources -= [ "host/ash_window_tree_host_x11_unittest.cc" ] |
| 435 } | 489 } |
| 490 |
| 436 if (is_chromeos) { | 491 if (is_chromeos) { |
| 437 sources += [ "first_run/first_run_helper_unittest.cc" ] | 492 sources += [ "first_run/first_run_helper_unittest.cc" ] |
| 438 deps += [ | 493 deps += [ |
| 439 "//chromeos", | 494 "//chromeos", |
| 440 "//chromeos:power_manager_proto", | 495 "//chromeos:power_manager_proto", |
| 441 "//chromeos:test_support_without_gmock", | 496 "//chromeos:test_support_without_gmock", |
| 442 "//components/quirks", | 497 "//components/quirks", |
| 443 "//device/bluetooth", | 498 "//device/bluetooth", |
| 444 "//net:net", | 499 "//net:net", |
| 445 "//ui/chromeos", | 500 "//ui/chromeos", |
| 446 "//ui/display", | 501 "//ui/display", |
| 447 "//ui/display:test_support", | 502 "//ui/display:test_support", |
| 448 "//ui/display:test_util", | 503 "//ui/display:test_util", |
| 449 ] | 504 ] |
| 450 } else { | 505 } else { |
| 451 sources -= [ | 506 sources -= [ |
| 452 "accelerators/magnifier_key_scroller_unittest.cc", | 507 "accelerators/magnifier_key_scroller_unittest.cc", |
| 453 "accelerators/spoken_feedback_toggler_unittest.cc", | 508 "accelerators/spoken_feedback_toggler_unittest.cc", |
| 509 |
| 510 # Can't resize on Windows Ash. http://crbug.com/165962 |
| 511 "autoclick/autoclick_unittest.cc", |
| 454 "display/resolution_notification_controller_unittest.cc", | 512 "display/resolution_notification_controller_unittest.cc", |
| 513 |
| 514 # TODO(zork): fix this test to build on Windows. See: crosbug.com/26906 |
| 515 "focus_cycler_unittest.cc", |
| 516 "magnifier/magnification_controller_unittest.cc", |
| 517 "magnifier/partial_magnification_controller_unittest.cc", |
| 518 "sticky_keys/sticky_keys_overlay_unittest.cc", |
| 519 "sticky_keys/sticky_keys_unittest.cc", |
| 455 "touch/touchscreen_util_unittest.cc", | 520 "touch/touchscreen_util_unittest.cc", |
| 521 "virtual_keyboard_controller_unittest.cc", |
| 522 |
| 523 # All tests for multiple displays: not supported on Windows Ash. |
| 524 "wm/drag_window_resizer_unittest.cc", |
| 525 |
| 526 # Talks to ChromeOS system services. |
| 527 "wm/lock_state_controller_unittest.cc", |
| 528 |
| 529 # Maximize mode is only available on Chrome OS. |
| 530 "wm/maximize_mode/maximize_mode_controller_unittest.cc", |
| 531 "wm/maximize_mode/maximize_mode_window_manager_unittest.cc", |
| 532 "wm/workspace/workspace_window_resizer_unittest.cc", |
| 456 ] | 533 ] |
| 457 } | 534 } |
| 458 | 535 |
| 459 if (!use_x11 || !is_chromeos) { | 536 if (!use_x11 || !is_chromeos) { |
| 460 sources -= [ "touch/touch_transformer_controller_unittest.cc" ] | 537 sources -= [ "touch/touch_transformer_controller_unittest.cc" ] |
| 461 } | 538 } |
| 462 | |
| 463 if (!is_chromeos) { | |
| 464 sources -= [ "sticky_keys/sticky_keys_unittest.cc" ] | |
| 465 } | |
| 466 } | 539 } |
| 467 | 540 |
| 468 executable("ash_shell_with_content") { | 541 executable("ash_shell_with_content") { |
| 469 testonly = true | 542 testonly = true |
| 470 sources = [ | 543 sources = [ |
| 471 "shell/content/shell_with_content_main.cc", | 544 "shell/content/shell_with_content_main.cc", |
| 472 ] | 545 ] |
| 473 | 546 |
| 474 deps = [ | 547 deps = [ |
| 475 ":ash_shell_lib_with_content", | 548 ":ash_shell_lib_with_content", |
| (...skipping 16 matching lines...) Expand all Loading... |
| 492 configs += [ "//build/config/win:windowed" ] | 565 configs += [ "//build/config/win:windowed" ] |
| 493 deps += [ "//sandbox" ] | 566 deps += [ "//sandbox" ] |
| 494 } | 567 } |
| 495 | 568 |
| 496 if (is_chromeos) { | 569 if (is_chromeos) { |
| 497 deps += [ "//device/bluetooth" ] | 570 deps += [ "//device/bluetooth" ] |
| 498 } | 571 } |
| 499 } | 572 } |
| 500 # When adding support for isolates, please have a look at run-time dependencies | 573 # When adding support for isolates, please have a look at run-time dependencies |
| 501 # in the ash_unittests_run target in ash.gyp. | 574 # in the ash_unittests_run target in ash.gyp. |
| OLD | NEW |