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

Side by Side Diff: ash/BUILD.gn

Issue 2296973002: Moves ash content specific tests into ash_content_unittests (Closed)
Patch Set: remove GetMessageLoop and merge 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
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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 "//ui/keyboard:keyboard_with_content", 177 "//ui/keyboard:keyboard_with_content",
178 "//ui/resources", 178 "//ui/resources",
179 "//ui/strings", 179 "//ui/strings",
180 "//ui/views", 180 "//ui/views",
181 "//ui/views/controls/webview", 181 "//ui/views/controls/webview",
182 "//ui/web_dialogs", 182 "//ui/web_dialogs",
183 "//url", 183 "//url",
184 ] 184 ]
185 } 185 }
186 186
187 # TODO(msw): Move support code with content deps to test_support_with_content. 187 # Internal target consumed by |test_support| and |test_support_with_content|.
188 static_library("test_support") { 188 # This target contains all the test support files, with the exception of
189 # an implementation of AshTestEnvironment. Consumers of ash should use one of
190 # test_support_with_content or test_support, depending upon whether they use
191 # content or use content.
James Cook 2016/08/31 16:20:16 nit: use content or don't use content (or maybe no
192 static_library("test_support_no_environment") {
James Cook 2016/08/31 16:20:16 nit: How about test_support_common or test_support
sky 2016/08/31 17:35:57 Good idea, renamed to test_support_shared.
189 testonly = true 193 testonly = true
194 visibility = [ ":*" ]
190 sources = gypi_values.ash_test_support_sources 195 sources = gypi_values.ash_test_support_sources
191 configs += [ "//build/config:precompiled_headers" ] 196 configs += [ "//build/config:precompiled_headers" ]
192 197
193 public_deps = [ 198 public_deps = [
194 ":ash", 199 ":ash",
195 ] 200 ]
196 deps = [ 201 deps = [
197 ":test_support_with_content", # TODO(beng): reverse this direction.
198 "//ash/resources", 202 "//ash/resources",
199 "//base:i18n", 203 "//base:i18n",
200 "//base/test:test_support", 204 "//base/test:test_support",
201 "//components/signin/core/account_id", 205 "//components/signin/core/account_id",
202 "//components/user_manager:user_manager", 206 "//components/user_manager:user_manager",
203 "//content/public/browser",
204 "//content/test:test_support",
205 "//device/bluetooth", 207 "//device/bluetooth",
206 "//skia", 208 "//skia",
207 "//testing/gtest", 209 "//testing/gtest",
208 "//ui/accessibility", 210 "//ui/accessibility",
209 "//ui/app_list:test_support", 211 "//ui/app_list:test_support",
210 "//ui/app_list/presenter", 212 "//ui/app_list/presenter",
211 "//ui/aura", 213 "//ui/aura",
212 "//ui/aura:test_support", 214 "//ui/aura:test_support",
213 "//ui/base:test_support", 215 "//ui/base:test_support",
214 "//ui/compositor:test_support", 216 "//ui/compositor:test_support",
(...skipping 19 matching lines...) Expand all
234 } 236 }
235 237
236 if (is_chromeos) { 238 if (is_chromeos) {
237 deps += [ 239 deps += [
238 "//chromeos", 240 "//chromeos",
239 "//ui/display", 241 "//ui/display",
240 ] 242 ]
241 } 243 }
242 } 244 }
243 245
246 static_library("test_support") {
James Cook 2016/08/31 16:20:16 nit: How about test_support_without_content ?
sky 2016/08/31 17:35:57 Great idea! Done.
247 testonly = true
248 sources = [
249 "test/ash_test_environment_default.cc",
250 ]
251
252 public_deps = [
253 ":test_support_no_environment",
254 ]
255
256 deps = [
257 "//base",
258 "//skia",
259 ]
260 }
261
244 static_library("test_support_with_content") { 262 static_library("test_support_with_content") {
245 testonly = true 263 testonly = true
246 sources = gypi_values.ash_test_support_with_content_sources 264 sources = gypi_values.ash_test_support_with_content_sources
265 sources += [
266 "test/ash_test_environment_content.cc",
267 "test/ash_test_environment_content.h",
268 ]
247 configs += [ "//build/config:precompiled_headers" ] 269 configs += [ "//build/config:precompiled_headers" ]
248 270
249 deps = [ 271 public_deps = [
250 ":ash_with_content", 272 ":ash_with_content",
273 ":test_support_no_environment",
274 "//content/public/browser",
251 "//content/test:test_support", 275 "//content/test:test_support",
252 "//skia", 276 "//skia",
253 ] 277 ]
254 } 278 }
255 279
256 static_library("interactive_ui_test_support") { 280 static_library("interactive_ui_test_support") {
257 testonly = true 281 testonly = true
258 configs += [ "//build/config:precompiled_headers" ] 282 configs += [ "//build/config:precompiled_headers" ]
259 public_deps = [ 283 public_deps = [
260 ":ash", 284 ":ash",
261 ":test_support", 285 ":test_support",
262 ] 286 ]
263 sources = [ 287 sources = [
264 "test/ash_interactive_ui_test_base.cc", 288 "test/ash_interactive_ui_test_base.cc",
265 "test/ash_interactive_ui_test_base.h", 289 "test/ash_interactive_ui_test_base.h",
266 ] 290 ]
267 deps = [ 291 deps = [
268 ":ash", 292 ":ash",
269 ":test_support", 293 ":test_support_with_content",
270 "//base", 294 "//base",
271 "//skia", 295 "//skia",
272 "//testing/gtest", 296 "//testing/gtest",
273 "//ui/aura", 297 "//ui/aura",
274 "//ui/base", 298 "//ui/base",
275 "//ui/gl:test_support", 299 "//ui/gl:test_support",
276 ] 300 ]
277 } 301 }
278 302
279 static_library("ash_shell_lib") { 303 static_library("ash_shell_lib") {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 "//ui/message_center", 359 "//ui/message_center",
336 "//ui/views:test_support", 360 "//ui/views:test_support",
337 "//ui/wm", 361 "//ui/wm",
338 ] 362 ]
339 363
340 if (is_chromeos) { 364 if (is_chromeos) {
341 deps += [ "//chromeos" ] 365 deps += [ "//chromeos" ]
342 } 366 }
343 } 367 }
344 368
345 test("ash_unittests") { 369 test("ash_content_unittests") {
James Cook 2016/08/31 16:20:16 nit: I would comment here about the content depend
sky 2016/08/31 17:35:57 Done.
346 sources = gypi_values.ash_unittests_sources 370 sources = [
347 configs += [ "//build/config:precompiled_headers" ] 371 "content/display/screen_orientation_controller_chromeos_unittest.cc",
372 "content/keyboard_overlay/keyboard_overlay_delegate_unittest.cc",
373 "content/keyboard_overlay/keyboard_overlay_view_unittest.cc",
374 "test/ash_unittests.cc",
375 ]
376 configs += [
377 "//build/config:precompiled_headers",
378 "//build/config/compiler:no_size_t_to_int_warning",
379 ]
348 380
349 deps = [ 381 deps = [
350 ":ash", 382 ":ash",
351 ":ash_with_content", 383 ":ash_with_content",
352 ":test_support",
353 ":test_support_with_content", 384 ":test_support_with_content",
354 "//ash/autoclick/common:autoclick", 385 "//ash/autoclick/common:autoclick",
James Cook 2016/08/31 16:20:16 I suspect a lot of these deps are not required. Ma
sky 2016/08/31 17:35:57 Indeed. I just copied the list from ash_unittests.
355 "//ash/common/strings", 386 "//ash/common/strings",
356 "//ash/resources", 387 "//ash/resources",
357 "//ash/touch_hud", 388 "//ash/touch_hud",
358 "//base", 389 "//base",
359 "//base/test:test_support", 390 "//base/test:test_support",
360 "//components/signin/core/account_id", 391 "//components/signin/core/account_id",
361 "//components/user_manager", 392 "//components/user_manager",
362 "//content/public/browser", 393 "//content/public/browser",
363 "//content/test:test_support", 394 "//content/test:test_support",
364 "//mojo/edk/system", 395 "//mojo/edk/system",
365 "//skia", 396 "//skia",
397 "//testing/gmock",
366 "//testing/gtest", 398 "//testing/gtest",
367 "//third_party/icu", 399 "//third_party/icu",
368 "//ui/accessibility", 400 "//ui/accessibility",
369 "//ui/app_list/presenter", 401 "//ui/app_list/presenter",
370 "//ui/aura", 402 "//ui/aura",
371 "//ui/aura:test_support", 403 "//ui/aura:test_support",
372 "//ui/base", 404 "//ui/base",
373 "//ui/base:test_support", 405 "//ui/base:test_support",
374 "//ui/base/ime", 406 "//ui/base/ime",
375 "//ui/compositor", 407 "//ui/compositor",
(...skipping 19 matching lines...) Expand all
395 "//ui/wm:test_support", 427 "//ui/wm:test_support",
396 "//url", 428 "//url",
397 ] 429 ]
398 430
399 data_deps = [ 431 data_deps = [
400 "//ash/common/strings:ash_test_strings", 432 "//ash/common/strings:ash_test_strings",
401 "//ash/resources:ash_test_resources_100_percent", 433 "//ash/resources:ash_test_resources_100_percent",
402 "//ash/resources:ash_test_resources_200_percent", 434 "//ash/resources:ash_test_resources_200_percent",
403 ] 435 ]
404 436
405 if (!is_chromeos) { 437 if (is_chromeos) {
406 sources -= [ 438 deps += [
407 # TODO(zork): fix this test to build on Windows. See: crosbug.com/26906 439 "//chromeos",
408 "focus_cycler_unittest.cc", 440 "//chromeos:power_manager_proto",
409 441 "//chromeos:test_support_without_gmock",
410 # All tests for multiple displays: not supported on Windows Ash. 442 "//components/quirks",
411 "wm/drag_window_resizer_unittest.cc", 443 "//device/bluetooth",
412 444 "//net:net",
413 # Talks to ChromeOS system services. 445 "//ui/chromeos",
414 "wm/lock_state_controller_unittest.cc", 446 "//ui/display",
415 447 "//ui/display:test_support",
416 # Maximize mode is only available on Chrome OS. 448 "//ui/display:test_util",
417 "wm/maximize_mode/maximize_mode_controller_unittest.cc",
418 "wm/maximize_mode/maximize_mode_window_manager_unittest.cc",
419
420 # Can't resize on Windows Ash. http://crbug.com/165962
421 "autoclick/autoclick_unittest.cc",
422 "magnifier/magnification_controller_unittest.cc",
423 "magnifier/partial_magnification_controller_unittest.cc",
424 "sticky_keys/sticky_keys_overlay_unittest.cc",
425 "virtual_keyboard_controller_unittest.cc",
426 "wm/workspace/workspace_window_resizer_unittest.cc",
427 ] 449 ]
428 } 450 }
451 }
429 452
430 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] 453 test("ash_unittests") {
454 sources = gypi_values.ash_unittests_sources
455 sources += [ "test/ash_test_environment_default.cc" ]
456 configs += [
457 "//build/config:precompiled_headers",
458 "//build/config/compiler:no_size_t_to_int_warning",
459 ]
460
461 deps = [
462 ":ash",
463 ":test_support",
464 "//ash/autoclick/common:autoclick",
465 "//ash/common/strings",
466 "//ash/resources",
467 "//ash/touch_hud",
468 "//base",
469 "//base/test:test_support",
470 "//components/signin/core/account_id",
471 "//components/user_manager",
472 "//mojo/edk/system",
473 "//skia",
474 "//testing/gmock",
475 "//testing/gtest",
476 "//third_party/icu",
477 "//ui/accessibility",
478 "//ui/app_list/presenter",
479 "//ui/aura",
480 "//ui/aura:test_support",
481 "//ui/base",
482 "//ui/base:test_support",
483 "//ui/base/ime",
484 "//ui/compositor",
485 "//ui/compositor:test_support",
486 "//ui/display/types",
487 "//ui/events",
488 "//ui/events:gesture_detection",
489 "//ui/events:test_support",
490 "//ui/events/devices",
491 "//ui/gfx",
492 "//ui/gfx/geometry",
493 "//ui/keyboard",
494 "//ui/message_center",
495 "//ui/message_center:test_support",
496 "//ui/resources",
497 "//ui/strings",
498 "//ui/views",
499 "//ui/views:test_support",
500 "//ui/wm",
501 "//ui/wm:test_support",
502 "//url",
503 ]
504
505 data_deps = [
506 "//ash/common/strings:ash_test_strings",
507 "//ash/resources:ash_test_resources_100_percent",
508 "//ash/resources:ash_test_resources_200_percent",
509 ]
431 510
432 if (!use_x11) { 511 if (!use_x11) {
433 sources -= [ "host/ash_window_tree_host_x11_unittest.cc" ] 512 sources -= [ "host/ash_window_tree_host_x11_unittest.cc" ]
434 } 513 }
514
435 if (is_chromeos) { 515 if (is_chromeos) {
436 sources += [ "first_run/first_run_helper_unittest.cc" ] 516 sources += [ "first_run/first_run_helper_unittest.cc" ]
437 deps += [ 517 deps += [
438 "//chromeos", 518 "//chromeos",
439 "//chromeos:power_manager_proto", 519 "//chromeos:power_manager_proto",
440 "//chromeos:test_support_without_gmock", 520 "//chromeos:test_support_without_gmock",
441 "//components/quirks", 521 "//components/quirks",
442 "//device/bluetooth", 522 "//device/bluetooth",
443 "//net:net", 523 "//net:net",
444 "//ui/chromeos", 524 "//ui/chromeos",
445 "//ui/display", 525 "//ui/display",
446 "//ui/display:test_support", 526 "//ui/display:test_support",
447 "//ui/display:test_util", 527 "//ui/display:test_util",
448 ] 528 ]
449 } else { 529 } else {
450 sources -= [ 530 sources -= [
451 "accelerators/magnifier_key_scroller_unittest.cc", 531 "accelerators/magnifier_key_scroller_unittest.cc",
452 "accelerators/spoken_feedback_toggler_unittest.cc", 532 "accelerators/spoken_feedback_toggler_unittest.cc",
533
534 # Can't resize on Windows Ash. http://crbug.com/165962
535 "autoclick/autoclick_unittest.cc",
453 "display/resolution_notification_controller_unittest.cc", 536 "display/resolution_notification_controller_unittest.cc",
537
538 # TODO(zork): fix this test to build on Windows. See: crosbug.com/26906
539 "focus_cycler_unittest.cc",
540 "magnifier/magnification_controller_unittest.cc",
541 "magnifier/partial_magnification_controller_unittest.cc",
542 "sticky_keys/sticky_keys_overlay_unittest.cc",
543 "sticky_keys/sticky_keys_unittest.cc",
454 "touch/touchscreen_util_unittest.cc", 544 "touch/touchscreen_util_unittest.cc",
545 "virtual_keyboard_controller_unittest.cc",
546
547 # All tests for multiple displays: not supported on Windows Ash.
548 "wm/drag_window_resizer_unittest.cc",
549
550 # Talks to ChromeOS system services.
551 "wm/lock_state_controller_unittest.cc",
552
553 # Maximize mode is only available on Chrome OS.
554 "wm/maximize_mode/maximize_mode_controller_unittest.cc",
555 "wm/maximize_mode/maximize_mode_window_manager_unittest.cc",
556 "wm/workspace/workspace_window_resizer_unittest.cc",
455 ] 557 ]
456 } 558 }
457 559
458 if (!use_x11 || !is_chromeos) { 560 if (!use_x11 || !is_chromeos) {
459 sources -= [ "touch/touch_transformer_controller_unittest.cc" ] 561 sources -= [ "touch/touch_transformer_controller_unittest.cc" ]
460 } 562 }
461
462 if (!is_chromeos) {
463 sources -= [ "sticky_keys/sticky_keys_unittest.cc" ]
464 }
465 } 563 }
466 564
467 executable("ash_shell_with_content") { 565 executable("ash_shell_with_content") {
468 testonly = true 566 testonly = true
469 sources = [ 567 sources = [
470 "shell/content/shell_with_content_main.cc", 568 "shell/content/shell_with_content_main.cc",
471 ] 569 ]
472 570
473 deps = [ 571 deps = [
474 ":ash_shell_lib_with_content", 572 ":ash_shell_lib_with_content",
(...skipping 16 matching lines...) Expand all
491 configs += [ "//build/config/win:windowed" ] 589 configs += [ "//build/config/win:windowed" ]
492 deps += [ "//sandbox" ] 590 deps += [ "//sandbox" ]
493 } 591 }
494 592
495 if (is_chromeos) { 593 if (is_chromeos) {
496 deps += [ "//device/bluetooth" ] 594 deps += [ "//device/bluetooth" ]
497 } 595 }
498 } 596 }
499 # When adding support for isolates, please have a look at run-time dependencies 597 # When adding support for isolates, please have a look at run-time dependencies
500 # in the ash_unittests_run target in ash.gyp. 598 # in the ash_unittests_run target in ash.gyp.
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | ash/ash.gyp » ('j') | ash/test/ash_test_environment.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698