| 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/buildflag_header.gni") | 5 import("//build/buildflag_header.gni") |
| 6 import("//build/config/android/config.gni") | 6 import("//build/config/android/config.gni") |
| 7 import("//build/config/arm.gni") | 7 import("//build/config/arm.gni") |
| 8 import("//build/config/features.gni") | 8 import("//build/config/features.gni") |
| 9 import("//build/config/linux/pkg_config.gni") | 9 import("//build/config/linux/pkg_config.gni") |
| 10 import("//build/config/ui.gni") | 10 import("//build/config/ui.gni") |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 static_library("cdm_paths") { | 511 static_library("cdm_paths") { |
| 512 sources = [ | 512 sources = [ |
| 513 "cdm/cdm_paths.cc", | 513 "cdm/cdm_paths.cc", |
| 514 "cdm/cdm_paths.h", | 514 "cdm/cdm_paths.h", |
| 515 ] | 515 ] |
| 516 deps = [ | 516 deps = [ |
| 517 "//base", | 517 "//base", |
| 518 ] | 518 ] |
| 519 } | 519 } |
| 520 | 520 |
| 521 test("media_unittests") { | 521 # TODO(xhwang): Move these into source_sets in respective subfolders. |
| 522 source_set("unit_tests") { |
| 523 testonly = true |
| 522 sources = [ | 524 sources = [ |
| 523 "cdm/aes_decryptor_unittest.cc", | 525 "cdm/aes_decryptor_unittest.cc", |
| 524 "cdm/external_clear_key_test_helper.cc", | 526 "cdm/external_clear_key_test_helper.cc", |
| 525 "cdm/external_clear_key_test_helper.h", | 527 "cdm/external_clear_key_test_helper.h", |
| 526 "cdm/json_web_key_unittest.cc", | 528 "cdm/json_web_key_unittest.cc", |
| 527 "cdm/simple_cdm_allocator.cc", | 529 "cdm/simple_cdm_allocator.cc", |
| 528 "cdm/simple_cdm_allocator.h", | 530 "cdm/simple_cdm_allocator.h", |
| 529 "cdm/simple_cdm_allocator_unittest.cc", | 531 "cdm/simple_cdm_allocator_unittest.cc", |
| 530 "cdm/simple_cdm_buffer.cc", | 532 "cdm/simple_cdm_buffer.cc", |
| 531 "cdm/simple_cdm_buffer.h", | 533 "cdm/simple_cdm_buffer.h", |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 | 594 |
| 593 deps = [ | 595 deps = [ |
| 594 ":cdm_api", | 596 ":cdm_api", |
| 595 ":cdm_paths", | 597 ":cdm_paths", |
| 596 ":media", | 598 ":media", |
| 597 ":test_support", | 599 ":test_support", |
| 598 "//base/test:test_support", | 600 "//base/test:test_support", |
| 599 "//gpu:test_support", | 601 "//gpu:test_support", |
| 600 "//gpu/command_buffer/common", | 602 "//gpu/command_buffer/common", |
| 601 "//media/audio:test_support", | 603 "//media/audio:test_support", |
| 602 "//media/audio:unittests", | |
| 603 "//media/base:test_support", | 604 "//media/base:test_support", |
| 604 "//media/base:unittests", | |
| 605 "//media/test:pipeline_integration_tests", | |
| 606 "//ppapi/features", | 605 "//ppapi/features", |
| 607 "//skia", # Direct dependency required to inherit config. | 606 "//skia", # Direct dependency required to inherit config. |
| 608 "//testing/gmock", | 607 "//testing/gmock", |
| 609 "//testing/gtest", | 608 "//testing/gtest", |
| 610 "//third_party/libwebm", | 609 "//third_party/libwebm", |
| 611 "//third_party/libyuv", | 610 "//third_party/libyuv", |
| 612 "//third_party/widevine/cdm:headers", | 611 "//third_party/widevine/cdm:headers", |
| 613 "//ui/gfx:test_support", | 612 "//ui/gfx:test_support", |
| 614 "//url", | 613 "//url", |
| 615 ] | 614 ] |
| 616 | 615 |
| 617 data_deps = [] | 616 data_deps = [] |
| 618 | 617 |
| 619 if (is_android) { | 618 if (is_android) { |
| 620 sources -= [ | 619 sources -= [ |
| 621 "filters/decrypting_audio_decoder_unittest.cc", | 620 "filters/decrypting_audio_decoder_unittest.cc", |
| 622 "filters/decrypting_video_decoder_unittest.cc", | 621 "filters/decrypting_video_decoder_unittest.cc", |
| 623 ] | 622 ] |
| 624 deps += [ | |
| 625 "//media/base/android:media_java", | |
| 626 "//media/base/android:unittests", | |
| 627 "//ui/android:ui_java", | |
| 628 ] | |
| 629 } | 623 } |
| 630 if (is_mac || is_ios) { | 624 if (is_mac || is_ios) { |
| 631 deps += [ "//media/base/mac:unittests" ] | 625 deps += [ "//media/base/mac:unit_tests" ] |
| 632 } | 626 } |
| 633 | 627 |
| 634 # If ExternalClearKey is built, we can test CdmAdapter. | 628 # If ExternalClearKey is built, we can test CdmAdapter. |
| 635 if (enable_pepper_cdms) { | 629 if (enable_pepper_cdms) { |
| 636 sources += [ "cdm/cdm_adapter_unittest.cc" ] | 630 sources += [ "cdm/cdm_adapter_unittest.cc" ] |
| 637 data_deps += [ "//media/cdm/ppapi:clearkeycdm" ] | 631 data_deps += [ "//media/cdm/ppapi:clearkeycdm" ] |
| 638 } | 632 } |
| 639 | 633 |
| 640 if (media_use_ffmpeg) { | 634 if (media_use_ffmpeg) { |
| 641 deps += [ "//media/ffmpeg:ffmpeg_unittests" ] | 635 deps += [ "//media/ffmpeg:ffmpeg_unittests" ] |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 } | 693 } |
| 700 } | 694 } |
| 701 | 695 |
| 702 if (is_mac || is_ios) { | 696 if (is_mac || is_ios) { |
| 703 libs = [ | 697 libs = [ |
| 704 "AppKit.framework", | 698 "AppKit.framework", |
| 705 "Foundation.framework", | 699 "Foundation.framework", |
| 706 ] | 700 ] |
| 707 } | 701 } |
| 708 | 702 |
| 709 # include_dirs += [ | |
| 710 # # Needed by media_drm_bridge.cc. | |
| 711 # target_gen_dir, | |
| 712 # ], | |
| 713 | |
| 714 configs += [ ":media_config" ] | 703 configs += [ ":media_config" ] |
| 715 | 704 |
| 716 if (media_use_ffmpeg) { | 705 if (media_use_ffmpeg) { |
| 717 deps += [ "//third_party/ffmpeg" ] # Direct dependency required to inherit
config. | 706 # Direct dependency required to inherit config. |
| 707 deps += [ "//third_party/ffmpeg" ] |
| 718 } | 708 } |
| 719 } | 709 } |
| 720 | 710 |
| 711 # Contains tests for all targets in the "media" folder. |
| 712 # TODO(xhwang): Move mojo/capture/remoting tests here where applicable. |
| 713 test("media_unittests") { |
| 714 deps = [ |
| 715 ":unit_tests", |
| 716 "//media/audio:unit_tests", |
| 717 "//media/base:unit_tests", |
| 718 "//media/test:pipeline_integration_tests", |
| 719 "//media/test:run_all_unittests", |
| 720 ] |
| 721 |
| 722 if (is_android) { |
| 723 deps += [ |
| 724 # The test needs the java dependencies to add the java classes for their |
| 725 # native counterparts to the test apk. |
| 726 "//media/base/android:media_java", |
| 727 "//ui/android:ui_java", |
| 728 ] |
| 729 } |
| 730 } |
| 731 |
| 721 test("media_perftests") { | 732 test("media_perftests") { |
| 722 configs += [ ":media_config" ] | 733 configs += [ ":media_config" ] |
| 723 deps = [ | 734 deps = [ |
| 724 ":media", | 735 ":media", |
| 725 ":shared_memory_support", | 736 ":shared_memory_support", |
| 726 ":test_support", | 737 ":test_support", |
| 727 "//base/test:test_support", | 738 "//base/test:test_support", |
| 728 "//media/audio:test_support", | 739 "//media/audio:test_support", |
| 729 "//media/base:perftests", | 740 "//media/base:perftests", |
| 730 "//media/base:test_support", | 741 "//media/base:test_support", |
| 731 "//media/test:pipeline_integration_perftests", | 742 "//media/test:pipeline_integration_perftests", |
| 732 "//testing/gmock", | 743 "//testing/gmock", |
| 733 "//testing/gtest", | 744 "//testing/gtest", |
| 734 "//testing/perf", | 745 "//testing/perf", |
| 735 "//third_party/widevine/cdm:headers", | 746 "//third_party/widevine/cdm:headers", |
| 736 "//ui/gfx:test_support", | 747 "//ui/gfx:test_support", |
| 737 ] | 748 ] |
| 738 if (media_use_ffmpeg) { | 749 if (media_use_ffmpeg) { |
| 739 deps += [ "//third_party/ffmpeg" ] # Direct dependency required to inherit
config. | 750 # Direct dependency required to inherit config. |
| 751 deps += [ "//third_party/ffmpeg" ] |
| 740 } | 752 } |
| 741 | 753 |
| 742 # This target should not require the Chrome executable to run. | 754 # This target should not require the Chrome executable to run. |
| 743 assert_no_deps = [ "//chrome" ] | 755 assert_no_deps = [ "//chrome" ] |
| 744 | 756 |
| 745 data = [ | 757 data = [ |
| 746 "test/data/", | 758 "test/data/", |
| 747 ] | 759 ] |
| 748 } | 760 } |
| 749 | 761 |
| 750 # For running the subset of media_unittests that might require audio hardware | 762 # For running the subset of media_unittests that might require audio hardware |
| 751 # separately on GPU bots. media_unittests includes these too. | 763 # separately on GPU bots. media_unittests includes these too. |
| 752 test("audio_unittests") { | 764 test("audio_unittests") { |
| 753 sources = [ | |
| 754 "base/run_all_unittests.cc", | |
| 755 ] | |
| 756 deps = [ | 765 deps = [ |
| 757 ":test_support", | 766 ":test_support", |
| 758 "//base/test:test_support", | 767 "//base/test:test_support", |
| 759 "//media/audio:unittests", | 768 "//media/audio:unit_tests", |
| 760 "//media/base:test_support", | 769 "//media/base:test_support", |
| 770 "//media/test:run_all_unittests", |
| 761 "//ui/gfx:test_support", | 771 "//ui/gfx:test_support", |
| 762 ] | 772 ] |
| 763 } | 773 } |
| 764 | 774 |
| 765 static_library("test_support") { | 775 static_library("test_support") { |
| 766 testonly = true | 776 testonly = true |
| 767 sources = [ | 777 sources = [ |
| 768 "renderers/mock_gpu_memory_buffer_video_frame_pool.cc", | 778 "renderers/mock_gpu_memory_buffer_video_frame_pool.cc", |
| 769 "renderers/mock_gpu_memory_buffer_video_frame_pool.h", | 779 "renderers/mock_gpu_memory_buffer_video_frame_pool.h", |
| 770 "renderers/mock_gpu_video_accelerator_factories.cc", | 780 "renderers/mock_gpu_video_accelerator_factories.cc", |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 815 deps = [ | 825 deps = [ |
| 816 "//base", | 826 "//base", |
| 817 "//ui/gfx/geometry", | 827 "//ui/gfx/geometry", |
| 818 ] | 828 ] |
| 819 } | 829 } |
| 820 | 830 |
| 821 # TODO(watk): Refactor tests that could be made to run on Android. See | 831 # TODO(watk): Refactor tests that could be made to run on Android. See |
| 822 # http://crbug.com/570762 | 832 # http://crbug.com/570762 |
| 823 if (media_use_ffmpeg && !is_android) { | 833 if (media_use_ffmpeg && !is_android) { |
| 824 test("ffmpeg_regression_tests") { | 834 test("ffmpeg_regression_tests") { |
| 825 sources = [ | |
| 826 "base/run_all_unittests.cc", | |
| 827 ] | |
| 828 | |
| 829 configs += [ "//media:media_config" ] | 835 configs += [ "//media:media_config" ] |
| 830 | 836 |
| 831 deps = [ | 837 deps = [ |
| 832 "//base/test:test_support", | 838 "//base/test:test_support", |
| 833 "//media", | 839 "//media", |
| 834 "//media:test_support", | 840 "//media:test_support", |
| 835 "//media/audio:test_support", | 841 "//media/audio:test_support", |
| 836 "//media/base:test_support", | 842 "//media/base:test_support", |
| 837 "//media/ffmpeg:ffmpeg_regression_tests", | 843 "//media/ffmpeg:ffmpeg_regression_tests", |
| 838 "//media/test:pipeline_integration_tests", | 844 "//media/test:pipeline_integration_tests", |
| 845 "//media/test:run_all_unittests", |
| 839 "//testing/gmock", | 846 "//testing/gmock", |
| 840 "//testing/gtest", | 847 "//testing/gtest", |
| 841 "//ui/gfx:test_support", | 848 "//ui/gfx:test_support", |
| 842 "//ui/gfx/geometry", | 849 "//ui/gfx/geometry", |
| 843 ] | 850 ] |
| 844 } | 851 } |
| 845 } | 852 } |
| 846 | 853 |
| 847 if (proprietary_codecs) { | 854 if (proprietary_codecs) { |
| 848 fuzzer_test("media_cenc_utils_fuzzer") { | 855 fuzzer_test("media_cenc_utils_fuzzer") { |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 916 fuzzer_test("media_mp4_avcc_parser_fuzzer") { | 923 fuzzer_test("media_mp4_avcc_parser_fuzzer") { |
| 917 sources = [ | 924 sources = [ |
| 918 "formats/mp4/mp4_avcc_parser_fuzzer.cc", | 925 "formats/mp4/mp4_avcc_parser_fuzzer.cc", |
| 919 ] | 926 ] |
| 920 deps = [ | 927 deps = [ |
| 921 ":media", | 928 ":media", |
| 922 "//base", | 929 "//base", |
| 923 ] | 930 ] |
| 924 } | 931 } |
| 925 } | 932 } |
| OLD | NEW |