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

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

Powered by Google App Engine
This is Rietveld 408576698