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

Side by Side Diff: content/test/BUILD.gn

Issue 1417673004: Make unit_tests compile in Mac GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mac
Patch Set: merge Created 5 years, 2 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/chrome_build.gni") 5 import("//build/config/chrome_build.gni")
6 import("//build/config/crypto.gni") 6 import("//build/config/crypto.gni")
7 import("//build/config/features.gni") 7 import("//build/config/features.gni")
8 import("//build/config/ui.gni") 8 import("//build/config/ui.gni")
9 import("//build_overrides/v8.gni") 9 import("//build_overrides/v8.gni")
10 import("//media/media_options.gni") 10 import("//media/media_options.gni")
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 254
255 generate_jni("jni") { 255 generate_jni("jni") {
256 sources = [ 256 sources = [
257 "../public/test/android/javatests/src/org/chromium/content/browser/test/ NestedSystemMessageHandler.java", 257 "../public/test/android/javatests/src/org/chromium/content/browser/test/ NestedSystemMessageHandler.java",
258 ] 258 ]
259 jni_package = "content/public/test" 259 jni_package = "content/public/test"
260 } 260 }
261 } 261 }
262 } # !is_ios 262 } # !is_ios
263 263
264 # TODO(GYP) enable content_browsertests on Mac when it links. 264 # TODO(GYP): Delete this after we've converted everything to GN.
265 if (!is_mac) { 265 # The _run targets exist only for compatibility w/ GYP.
266 # TODO(GYP): Delete this after we've converted everything to GN. 266 group("content_browsertests_run") {
267 # The _run targets exist only for compatibility w/ GYP. 267 testonly = true
268 group("content_browsertests_run") { 268 deps = [
269 testonly = true 269 ":content_browsertests",
270 deps = [ 270 ]
271 ":content_browsertests", 271 }
272 ] 272
273 } 273 test("content_browsertests") {
274 274 sources = rebase_path(content_tests_gypi_values.content_browsertests_sources,
275 test("content_browsertests") { 275 ".",
276 sources = 276 "//content")
277 rebase_path(content_tests_gypi_values.content_browsertests_sources, 277
278 if (is_android || is_linux || is_mac || is_win) {
279 data = [
280 "data/",
281 "//net/data/",
282 "//media/test/data/",
283 ]
284
285 if (is_android) {
286 data += [ "$root_out_dir/content_shell_assets/content_shell.pak" ]
287 } else {
288 data += [
289 "$root_out_dir/content_shell.pak",
290 "//net/tools/testserver/",
291 "//ppapi/tests/test_case.html",
292 "//ppapi/tests/test_page.css",
293 "//third_party/pyftpdlib/",
294 "//third_party/pywebsocket/",
295 "//third_party/tlslite/",
296 ]
297
298 if (is_mac) {
299 data += [
300 "$root_out_dir/Content Shell.app/",
301 "$root_out_dir/plugins/test_netscape_plugin.plugin/",
302 ]
303 }
304 if (is_win) {
305 data += [ "$root_out_dir/plugins/np_test_netscape_plugin.dll" ]
306 }
307 }
308 }
309
310 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
311
312 if (proprietary_codecs && enable_hevc_demuxing) {
313 defines += [ "ENABLE_HEVC_DEMUXING" ]
314 }
315
316 configs += [
317 "//build/config:precompiled_headers",
318 "//build/config/compiler:no_size_t_to_int_warning",
319 ]
320
321 deps = [
322 ":browsertest_support",
323 ":web_ui_test_mojo_bindings",
324 "//base/allocator",
325 "//base/test:test_support",
326 "//content/browser/background_sync:background_sync_proto",
327 "//content/common:mojo_bindings",
328 "//content/gpu",
329 "//content/public/common",
330 "//content/public/plugin",
331 "//content/public/renderer",
332 "//content:resources",
333 "//content/shell:content_shell_lib",
334 "//content/shell:pak",
335 "//content/test:test_support",
336 "//device/battery",
337 "//device/battery:mojo_bindings",
338 "//device/vibration:mojo_bindings",
339 "//gin",
340 "//gpu",
341 "//ipc:test_support",
342 "//media:test_support",
343 "//media/audio:test_support",
344 "//media/base:test_support",
345 "//media:shared_memory_support",
346 "//mojo/application/public/cpp:cpp_for_chromium",
347 "//mojo/environment:chromium",
348 "//mojo/test:test_support",
349 "//net:test_support",
350 "//ppapi/host",
351 "//ppapi/proxy",
352 "//ppapi/proxy:ipc",
353 "//ppapi/shared_impl",
354 "//third_party/mojo/src/mojo/edk/system",
355 "//third_party/mojo/src/mojo/edk/test:test_support",
356 "//third_party/mojo/src/mojo/public/cpp/bindings",
357 "//third_party/mojo/src/mojo/public/js",
358 "//testing/gmock",
359 "//testing/gtest",
360 "//third_party/WebKit/public:blink",
361 "//third_party/leveldatabase",
362 "//third_party/mesa:osmesa",
363 "//third_party/zlib",
364 "//ui/accessibility",
365 "//ui/accessibility:ax_gen",
366 "//ui/base",
367 "//ui/base/ime",
368 "//ui/gfx",
369 "//ui/gfx/geometry",
370 "//ui/gl",
371 "//ui/gl:test_support",
372 "//ui/resources",
373 "//ui/shell_dialogs",
374 "//ui/snapshot",
375 ]
376
377 data_deps = [
378 "//ppapi:ppapi_tests",
379 "//third_party/mesa:osmesa",
380 ]
381
382 if (is_win) {
383 sources +=
384 rebase_path(content_tests_gypi_values.content_browsertests_win_sources,
278 ".", 385 ".",
279 "//content") 386 "//content")
280 387
281 if (is_android || is_linux || is_mac || is_win) { 388 deps += [
282 data = [ 389 "//content/app/strings",
283 "data/", 390 "//net:net_resources",
284 "//net/data/", 391 "//third_party/WebKit/public:resources",
285 "//media/test/data/", 392 "//third_party/iaccessible2",
286 ] 393 "//third_party/isimpledom",
287 394 ]
288 if (is_android) { 395
289 data += [ "$root_out_dir/content_shell_assets/content_shell.pak" ] 396 libs = [ "oleacc.lib" ]
290 } else { 397 }
291 data += [ 398
292 "$root_out_dir/content_shell.pak", 399 if (is_linux) {
293 "//net/tools/testserver/", 400 sources -=
294 "//ppapi/tests/test_case.html", 401 [ "../browser/accessibility/dump_accessibility_tree_browsertest.cc" ]
295 "//ppapi/tests/test_page.css", 402 }
296 "//third_party/pyftpdlib/", 403
297 "//third_party/pywebsocket/", 404 if (is_android) {
298 "//third_party/tlslite/", 405 sources += rebase_path(
299 ] 406 content_tests_gypi_values.content_browsertests_android_sources,
300 407 ".",
301 if (is_mac) { 408 "//content")
302 data += [ 409 sources -=
303 "$root_out_dir/Content Shell.app/", 410 [ "../browser/battery_status/battery_monitor_impl_browsertest.cc" ]
304 "$root_out_dir/plugins/test_netscape_plugin.plugin/", 411 deps -= [ "//device/battery" ]
305 ] 412 deps += [
306 } 413 "//content/shell/android:content_shell_jni_headers",
307 if (is_win) {
308 data += [ "$root_out_dir/plugins/np_test_netscape_plugin.dll" ]
309 }
310 }
311 }
312
313 defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
314
315 if (proprietary_codecs && enable_hevc_demuxing) {
316 defines += [ "ENABLE_HEVC_DEMUXING" ]
317 }
318
319 configs += [
320 "//build/config:precompiled_headers",
321 "//build/config/compiler:no_size_t_to_int_warning",
322 ]
323
324 deps = [
325 ":browsertest_support",
326 ":web_ui_test_mojo_bindings",
327 "//base/allocator",
328 "//base/test:test_support",
329 "//content/browser/background_sync:background_sync_proto",
330 "//content/common:mojo_bindings",
331 "//content/gpu",
332 "//content/public/common",
333 "//content/public/plugin",
334 "//content/public/renderer",
335 "//content:resources",
336 "//content/shell:content_shell_lib", 414 "//content/shell:content_shell_lib",
337 "//content/shell:pak", 415 "//testing/android/native_test:native_test_support",
338 "//content/test:test_support", 416 ]
339 "//device/battery", 417
340 "//device/battery:mojo_bindings", 418 use_launcher = false
341 "//device/vibration:mojo_bindings", 419 }
342 "//gin", 420
343 "//gpu", 421 if (is_mac) {
344 "//ipc:test_support", 422 sources += [ "../renderer/external_popup_menu_browsertest.cc" ]
345 "//media:test_support", 423 deps += [
346 "//media/audio:test_support", 424 # Needed for Content Shell.app's Helper.
347 "//media/base:test_support", 425 #"//content/shell:content_shell", #TODO(GYP) enable for mac
348 "//media:shared_memory_support", 426 ]
349 "//mojo/application/public/cpp:cpp_for_chromium", 427 }
350 "//mojo/environment:chromium", 428
351 "//mojo/test:test_support", 429 if (use_aura && !is_win) {
352 "//net:test_support", 430 deps += [ "//ui/events:test_support" ]
353 "//ppapi/host", 431 }
354 "//ppapi/proxy", 432
355 "//ppapi/proxy:ipc", 433 if (!use_aura && !is_mac) {
356 "//ppapi/shared_impl", 434 sources -=
357 "//third_party/mojo/src/mojo/edk/system", 435 [ "../browser/compositor/image_transport_factory_browsertest.cc" ]
358 "//third_party/mojo/src/mojo/edk/test:test_support", 436 }
359 "//third_party/mojo/src/mojo/public/cpp/bindings", 437
360 "//third_party/mojo/src/mojo/public/js", 438 if (enable_webrtc) {
361 "//testing/gmock", 439 sources += rebase_path(
362 "//testing/gtest", 440 content_tests_gypi_values.content_browsertests_webrtc_sources,
363 "//third_party/WebKit/public:blink", 441 ".",
364 "//third_party/leveldatabase", 442 "//content")
365 "//third_party/mesa:osmesa", 443 deps += [ "//testing/perf" ]
366 "//third_party/zlib", 444 }
367 "//ui/accessibility", 445
368 "//ui/accessibility:ax_gen", 446 if (enable_plugins) {
369 "//ui/base", 447 sources += rebase_path(
370 "//ui/base/ime", 448 content_tests_gypi_values.content_browsertests_plugins_sources,
371 "//ui/gfx", 449 ".",
372 "//ui/gfx/geometry", 450 "//content")
373 "//ui/gl", 451 data_deps += [ "//ppapi:ppapi_tests" ]
374 "//ui/gl:test_support", 452 }
375 "//ui/resources", 453
376 "//ui/shell_dialogs", 454 if (enable_web_speech) {
377 "//ui/snapshot", 455 sources += rebase_path(
378 ] 456 content_tests_gypi_values.content_browsertests_speech_sources,
379 457 ".",
380 data_deps = [ 458 "//content")
381 "//ppapi:ppapi_tests", 459 }
382 "//third_party/mesa:osmesa", 460
383 ] 461 if (!is_chrome_branded) {
384 462 sources += rebase_path(
385 if (is_win) { 463 content_tests_gypi_values.content_browsertests_unofficial_build_sour ces,
386 sources += rebase_path( 464 ".",
387 content_tests_gypi_values.content_browsertests_win_sources, 465 "//content")
388 ".", 466 }
389 "//content") 467
390 468 if (use_aura) {
391 deps += [ 469 deps += [
392 "//content/app/strings", 470 "//ui/touch_selection:test_support",
393 "//net:net_resources", 471 "//ui/touch_selection:touch_selection",
394 "//third_party/WebKit/public:resources", 472 ]
395 "//third_party/iaccessible2", 473 } else {
396 "//third_party/isimpledom", 474 sources -= [
397 ] 475 "../browser/accessibility/touch_accessibility_aura_browsertest.cc",
398 476 "../browser/renderer_host/input/touch_selection_controller_client_aura_bro wsertest.cc",
399 libs = [ "oleacc.lib" ] 477 "../browser/web_contents/web_contents_view_aura_browsertest.cc",
400 } 478 ]
401
402 if (is_linux) {
403 sources -=
404 [ "../browser/accessibility/dump_accessibility_tree_browsertest.cc" ]
405 }
406
407 if (is_android) {
408 sources += rebase_path(
409 content_tests_gypi_values.content_browsertests_android_sources,
410 ".",
411 "//content")
412 sources -=
413 [ "../browser/battery_status/battery_monitor_impl_browsertest.cc" ]
414 deps -= [ "//device/battery" ]
415 deps += [
416 "//content/shell/android:content_shell_jni_headers",
417 "//content/shell:content_shell_lib",
418 "//testing/android/native_test:native_test_support",
419 ]
420
421 use_launcher = false
422 }
423
424 if (is_mac) {
425 sources += [ "../renderer/external_popup_menu_browsertest.cc" ]
426 deps += [
427 # Needed for Content Shell.app's Helper.
428 #"//content/shell:content_shell", #TODO(GYP) enable for mac
429 ]
430 }
431
432 if (use_aura && !is_win) {
433 deps += [ "//ui/events:test_support" ]
434 }
435
436 if (!use_aura && !is_mac) {
437 sources -=
438 [ "../browser/compositor/image_transport_factory_browsertest.cc" ]
439 }
440
441 if (enable_webrtc) {
442 sources += rebase_path(
443 content_tests_gypi_values.content_browsertests_webrtc_sources,
444 ".",
445 "//content")
446 deps += [ "//testing/perf" ]
447 }
448
449 if (enable_plugins) {
450 sources += rebase_path(
451 content_tests_gypi_values.content_browsertests_plugins_sources,
452 ".",
453 "//content")
454 data_deps += [ "//ppapi:ppapi_tests" ]
455 }
456
457 if (enable_web_speech) {
458 sources += rebase_path(
459 content_tests_gypi_values.content_browsertests_speech_sources,
460 ".",
461 "//content")
462 }
463
464 if (!is_chrome_branded) {
465 sources += rebase_path(
466 content_tests_gypi_values.content_browsertests_unofficial_build_so urces,
467 ".",
468 "//content")
469 }
470
471 if (use_aura) {
472 deps += [
473 "//ui/touch_selection:test_support",
474 "//ui/touch_selection:touch_selection",
475 ]
476 } else {
477 sources -= [
478 "../browser/accessibility/touch_accessibility_aura_browsertest.cc",
479 "../browser/renderer_host/input/touch_selection_controller_client_aura_b rowsertest.cc",
480 "../browser/web_contents/web_contents_view_aura_browsertest.cc",
481 ]
482 }
483 } 479 }
484 } 480 }
485 481
486 # TODO(GYP): Delete this after we've converted everything to GN. 482 # TODO(GYP): Delete this after we've converted everything to GN.
487 # The _run targets exist only for compatibility w/ GYP. 483 # The _run targets exist only for compatibility w/ GYP.
488 group("content_unittests_run") { 484 group("content_unittests_run") {
489 testonly = true 485 testonly = true
490 deps = [ 486 deps = [
491 ":content_unittests", 487 ":content_unittests",
492 ] 488 ]
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 } else { 701 } else {
706 sources -= 702 sources -=
707 [ "../browser/compositor/software_output_device_ozone_unittest.cc" ] 703 [ "../browser/compositor/software_output_device_ozone_unittest.cc" ]
708 } 704 }
709 705
710 if (is_mac && use_openssl) { 706 if (is_mac && use_openssl) {
711 deps += [ "//third_party/boringssl" ] 707 deps += [ "//third_party/boringssl" ]
712 } 708 }
713 } 709 }
714 710
715 if (!is_mac) { # TODO(GYP) enable on Mac once it links. 711 test("content_perftests") {
716 test("content_perftests") { 712 sources = [
717 sources = [ 713 "../browser/renderer_host/input/input_router_impl_perftest.cc",
718 "../browser/renderer_host/input/input_router_impl_perftest.cc", 714 "../common/cc_messages_perftest.cc",
719 "../common/cc_messages_perftest.cc", 715 "../test/run_all_perftests.cc",
720 "../test/run_all_perftests.cc", 716 ]
721 ] 717 deps = [
722 deps = [ 718 "//base/allocator",
723 "//base/allocator", 719 "//base/test:test_support",
724 "//base/test:test_support", 720 "//content/public/browser",
725 "//content/public/browser", 721 "//content/public/common",
726 "//content/public/common", 722 "//content/test:test_support",
727 "//content/test:test_support", 723 "//cc",
728 "//cc", 724 "//skia",
729 "//skia", 725 "//testing/gtest",
730 "//testing/gtest", 726 "//testing/perf",
731 "//testing/perf", 727 "//ui/gfx",
732 "//ui/gfx", 728 "//ui/gfx/geometry",
733 "//ui/gfx/geometry", 729 ]
734 ]
735 730
736 if (is_android) { 731 if (is_android) {
737 deps += [ "//testing/android/native_test:native_test_native_code" ] 732 deps += [ "//testing/android/native_test:native_test_native_code" ]
738 }
739 } 733 }
734 }
740 735
741 # TODO(GYP): Delete this after we've converted everything to GN. 736 # TODO(GYP): Delete this after we've converted everything to GN.
742 # The _run targets exist only for compatibility w/ GYP. 737 # The _run targets exist only for compatibility w/ GYP.
743 group("content_gl_tests_run") { 738 group("content_gl_tests_run") {
744 testonly = true 739 testonly = true
745 deps = [ 740 deps = [
746 ":content_gl_tests", 741 ":content_gl_tests",
747 ] 742 ]
748 } 743 }
749 744
750 test("content_gl_tests") { 745 test("content_gl_tests") {
751 sources = [ 746 sources = [
752 "../common/gpu/client/gl_helper_unittest.cc", 747 "../common/gpu/client/gl_helper_unittest.cc",
753 "../common/gpu/client/gpu_in_process_context_tests.cc", 748 "../common/gpu/client/gpu_in_process_context_tests.cc",
754 ] 749 ]
755 750
756 deps = [ 751 deps = [
757 ":test_support", 752 ":test_support",
758 "//base/allocator", 753 "//base/allocator",
759 "//base/test:test_support", 754 "//base/test:test_support",
760 "//content/public/common", 755 "//content/public/common",
761 "//gpu/blink", 756 "//gpu/blink",
762 "//gpu/command_buffer/common", 757 "//gpu/command_buffer/common",
763 "//testing/gtest", 758 "//testing/gtest",
764 "//third_party/WebKit/public:blink", 759 "//third_party/WebKit/public:blink",
765 "//ui/base", 760 "//ui/base",
766 "//ui/gfx", 761 "//ui/gfx",
767 "//ui/gfx:test_support", 762 "//ui/gfx:test_support",
768 "//ui/gfx/geometry", 763 "//ui/gfx/geometry",
769 "//ui/gl", 764 "//ui/gl",
770 "//ui/gl:test_support", 765 "//ui/gl:test_support",
771 "//v8", 766 "//v8",
772 ] 767 ]
773 768
774 if (is_android) { 769 if (is_android) {
775 deps += [ "//testing/android/native_test:native_test_native_code" ] 770 deps += [ "//testing/android/native_test:native_test_native_code" ]
776 } else { 771 } else {
777 data_deps = [ 772 data_deps = [
778 "//third_party/ffmpeg", 773 "//third_party/ffmpeg",
779 "//third_party/mesa:osmesa", 774 "//third_party/mesa:osmesa",
780 ]
781 }
782 }
783
784 test("content_gl_benchmark") {
785 sources = [
786 "../common/gpu/client/gl_helper_benchmark.cc",
787 ]
788
789 deps = [
790 ":test_support",
791 "//base/allocator",
792 "//base/test:test_support",
793 "//content/public/common",
794 "//gpu/blink",
795 "//testing/gtest",
796 "//third_party/WebKit/public:blink",
797 "//ui/base",
798 "//ui/gfx",
799 "//ui/gfx/geometry",
800 "//ui/gl",
801 "//ui/gl:test_support",
802 ] 775 ]
803 } 776 }
804 } 777 }
778
779 test("content_gl_benchmark") {
780 sources = [
781 "../common/gpu/client/gl_helper_benchmark.cc",
782 ]
783
784 deps = [
785 ":test_support",
786 "//base/allocator",
787 "//base/test:test_support",
788 "//content/public/common",
789 "//gpu/blink",
790 "//testing/gtest",
791 "//third_party/WebKit/public:blink",
792 "//ui/base",
793 "//ui/gfx",
794 "//ui/gfx/geometry",
795 "//ui/gl",
796 "//ui/gl:test_support",
797 ]
798 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698