# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS.  All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.

import("//build/config/ui.gni")
import("../webrtc.gni")
if (is_android) {
  import("//build/config/android/rules.gni")
}

if (!build_with_chromium) {
  group("test") {
    testonly = true

    deps = [
      ":copy_to_file_audio_capturer",
      ":rtp_test_utils",
      ":test_common",
      ":test_renderer",
      ":test_support",
      ":test_video_capturer",
      ":video_test_common",
    ]

    if (rtc_include_tests) {
      deps += [
        ":test_main",
        ":test_support_unittests",
        "pc/e2e",
      ]
    }
  }
}

rtc_library("frame_generator_impl") {
  visibility = [
    ":*",
    "../api:create_frame_generator",
  ]
  testonly = true
  sources = [
    "frame_generator.cc",
    "frame_generator.h",
    "testsupport/ivf_video_frame_generator.cc",
    "testsupport/ivf_video_frame_generator.h",
  ]
  deps = [
    ":frame_utils",
    "../api:frame_generator_api",
    "../api:scoped_refptr",
    "../api:sequence_checker",
    "../api/environment",
    "../api/video:encoded_image",
    "../api/video:video_frame",
    "../api/video:video_frame_i010",
    "../api/video:video_rtp_headers",
    "../api/video_codecs:video_codecs_api",
    "../common_video",
    "../media:media_constants",
    "../modules/video_coding:video_codec_interface",
    "../modules/video_coding:video_coding_utility",
    "../modules/video_coding:webrtc_h264",
    "../modules/video_coding:webrtc_vp8",
    "../modules/video_coding:webrtc_vp9",
    "../modules/video_coding/codecs/av1:dav1d_decoder",
    "../rtc_base:checks",
    "../rtc_base:criticalsection",
    "../rtc_base:logging",
    "../rtc_base:random",
    "../rtc_base:rtc_event",
    "../rtc_base/synchronization:mutex",
    "../rtc_base/system:file_wrapper",
    "../system_wrappers",
    "//third_party/abseil-cpp/absl/strings:string_view",
  ]
}

rtc_library("y4m_frame_generator") {
  visibility = [ "*" ]
  testonly = true
  sources = [
    "testsupport/y4m_frame_generator.cc",
    "testsupport/y4m_frame_generator.h",
  ]
  deps = [
    ":video_test_support",
    "../api:frame_generator_api",
    "../api:scoped_refptr",
    "../api/video:video_frame",
    "../rtc_base:checks",
    "//third_party/abseil-cpp/absl/strings:string_view",
  ]
}

rtc_library("frame_utils") {
  visibility = [ "*" ]
  testonly = true
  sources = [
    "frame_utils.cc",
    "frame_utils.h",
  ]
  deps = [
    "../api:scoped_refptr",
    "../api/video:video_frame",
  ]
}

rtc_library("test_video_capturer") {
  testonly = true
  sources = [
    "test_video_capturer.cc",
    "test_video_capturer.h",
  ]
  deps = [
    "../api:scoped_refptr",
    "../api/video:video_frame",
    "../api/video:video_rtp_headers",
    "../media:video_adapter",
    "../media:video_broadcaster",
    "../rtc_base/synchronization:mutex",
  ]
}

rtc_library("create_frame_generator_capturer") {
  visibility = [ "*" ]
  testonly = true
  sources = [
    "create_frame_generator_capturer.cc",
    "create_frame_generator_capturer.h",
  ]
  deps = [
    ":fileutils",
    ":frame_generator_capturer",
    "../api:create_frame_generator",
    "../api:frame_generator_api",
    "../api/task_queue",
    "../api/units:time_delta",
    "../rtc_base:checks",
    "../system_wrappers",
    "//third_party/abseil-cpp/absl/strings",
  ]
}

rtc_library("frame_generator_capturer") {
  visibility = [ "*" ]
  testonly = true
  sources = [
    "frame_generator_capturer.cc",
    "frame_generator_capturer.h",
  ]
  deps = [
    ":test_video_capturer",
    "../api:frame_generator_api",
    "../api/task_queue",
    "../api/units:time_delta",
    "../api/video:video_frame",
    "../api/video:video_rtp_headers",
    "../rtc_base:checks",
    "../rtc_base:logging",
    "../rtc_base:macromagic",
    "../rtc_base/synchronization:mutex",
    "../rtc_base/task_utils:repeating_task",
    "../system_wrappers",
  ]
}

rtc_library("video_test_common") {
  visibility = [ "*" ]
  testonly = true
  sources = [
    "fake_texture_frame.cc",
    "fake_texture_frame.h",
    "fake_videorenderer.h",
    "frame_forwarder.cc",
    "frame_forwarder.h",
    "mappable_native_buffer.cc",
    "mappable_native_buffer.h",
    "video_codec_settings.h",
    "video_decoder_proxy_factory.h",
    "video_encoder_nullable_proxy_factory.h",
    "video_encoder_proxy_factory.h",
  ]

  deps = [
    ":create_frame_generator_capturer",
    ":fileutils",
    ":frame_utils",
    ":scoped_key_value_config",
    ":test_video_capturer",
    "../api:array_view",
    "../api:create_frame_generator",
    "../api:frame_generator_api",
    "../api:scoped_refptr",
    "../api/environment",
    "../api/task_queue",
    "../api/video:video_frame",
    "../api/video:video_rtp_headers",
    "../api/video_codecs:video_codecs_api",
    "../common_video",
    "../rtc_base:checks",
    "../rtc_base:criticalsection",
    "../rtc_base:logging",
    "../rtc_base:refcount",
    "../rtc_base:timeutils",
    "../rtc_base/synchronization:mutex",
    "../rtc_base/task_utils:repeating_task",
    "../system_wrappers",
    "//third_party/abseil-cpp/absl/algorithm:container",
  ]
}

rtc_library("audio_test_common") {
  visibility = [ "*" ]
  testonly = true
  sources = [
    "audio_decoder_proxy_factory.h",
    "function_audio_decoder_factory.h",
  ]
  deps = [
    "../api/audio_codecs:audio_codecs_api",
    "../api/environment",
    "../rtc_base:buffer",
    "../rtc_base:checks",
    "//third_party/abseil-cpp/absl/memory",
  ]
}

if (!build_with_chromium) {
  if (is_mac || is_ios) {
    rtc_library("video_test_mac") {
      testonly = true
      sources = [
        "mac_capturer.h",
        "mac_capturer.mm",
      ]
      deps = [
        ":test_video_capturer",
        ":video_test_common",
        "../api:libjingle_peerconnection_api",
        "../api:media_stream_interface",
        "../api:scoped_refptr",
        "../modules/video_capture:video_capture_module",
        "../rtc_base:logging",
        "../rtc_base:threading",
        "../sdk:base_objc",
        "../sdk:native_api",
        "../sdk:native_video",
        "../sdk:videocapture_objc",
      ]
    }
  }

  rtc_library("platform_video_capturer") {
    testonly = true
    sources = [
      "platform_video_capturer.cc",
      "platform_video_capturer.h",
    ]
    deps = [
      ":test_video_capturer",
      ":video_test_common",
      "//third_party/abseil-cpp/absl/memory",
    ]
    if (is_mac || is_ios) {
      deps += [ ":video_test_mac" ]
    } else {
      sources += [
        "vcm_capturer.cc",
        "vcm_capturer.h",
      ]
      deps += [
        ":scoped_key_value_config",
        "../api:scoped_refptr",
        "../modules/video_capture:video_capture_module",
        "../rtc_base:checks",
        "../rtc_base:logging",
      ]
    }
  }
}

rtc_library("rtp_test_utils") {
  testonly = true
  sources = [
    "rtcp_packet_parser.cc",
    "rtcp_packet_parser.h",
    "rtp_file_reader.cc",
    "rtp_file_reader.h",
    "rtp_file_writer.cc",
    "rtp_file_writer.h",
  ]

  deps = [
    "../api:array_view",
    "../api:rtp_parameters",
    "../modules/rtp_rtcp",
    "../modules/rtp_rtcp:rtp_rtcp_format",
    "../rtc_base:checks",
    "../rtc_base:criticalsection",
    "../rtc_base:logging",
    "../rtc_base:macromagic",
    "../rtc_base:timeutils",
    "../rtc_base/synchronization:mutex",
    "../rtc_base/system:arch",
    "//third_party/abseil-cpp/absl/strings:string_view",
  ]
}

rtc_library("field_trial") {
  testonly = true
  visibility = [ "*" ]
  sources = [
    "field_trial.cc",
    "field_trial.h",
  ]

  deps = [
    "../rtc_base:checks",
    "../system_wrappers:field_trial",
    "//third_party/abseil-cpp/absl/strings:string_view",
  ]
}

rtc_library("explicit_key_value_config") {
  sources = [
    "explicit_key_value_config.cc",
    "explicit_key_value_config.h",
  ]

  deps = [
    "../api:field_trials_registry",
    "../rtc_base:checks",
    "//third_party/abseil-cpp/absl/strings:string_view",
  ]
}

rtc_library("scoped_key_value_config") {
  testonly = true
  visibility = [ "*" ]
  sources = [
    "scoped_key_value_config.cc",
    "scoped_key_value_config.h",
  ]

  deps = [
    ":field_trial",
    "../api:field_trials_registry",
    "../rtc_base:checks",
    "../system_wrappers:field_trial",
    "//third_party/abseil-cpp/absl/strings:string_view",
  ]
}

rtc_library("perf_test") {
  visibility = [ "*" ]
  testonly = true
  sources = [
    "testsupport/perf_test.cc",
    "testsupport/perf_test.h",
    "testsupport/perf_test_histogram_writer.h",
    "testsupport/perf_test_result_writer.h",
  ]
  deps = [
    "../api:array_view",
    "../api/numerics",
    "../rtc_base:checks",
    "../rtc_base:criticalsection",
    "../rtc_base:logging",
    "../rtc_base:rtc_numerics",
    "../rtc_base:stringutils",
    "../rtc_base/synchronization:mutex",
    "../test:fileutils",
    "//third_party/abseil-cpp/absl/strings:string_view",
  ]
  if (rtc_enable_protobuf) {
    sources += [ "testsupport/perf_test_histogram_writer.cc" ]
    deps += [
      "//third_party/catapult/tracing/tracing:histogram",
      "//third_party/catapult/tracing/tracing:reserved_infos",
    ]
  } else {
    sources += [ "testsupport/perf_test_histogram_writer_no_protobuf.cc" ]
  }
}

if (is_ios) {
  rtc_library("test_support_objc") {
    testonly = true
    visibility = [
      ":google_test_runner_objc",
      ":test_support",
    ]
    sources = [
      "ios/coverage_util_ios.h",
      "ios/coverage_util_ios.mm",
      "ios/test_support.h",
      "ios/test_support.mm",
    ]
    deps = [
      ":google_test_runner_delegate",
      ":perf_test",
      "../api/test/metrics:chrome_perf_dashboard_metrics_exporter",
      "../api/test/metrics:global_metrics_logger_and_exporter",
      "../api/test/metrics:metrics_exporter",
      "../api/test/metrics:metrics_set_proto_file_exporter",
      "../api/test/metrics:print_result_proxy_metrics_exporter",
      "../api/test/metrics:stdout_metrics_exporter",
      "../sdk:helpers_objc",
    ]
    configs += [ ":test_support_objc_config" ]
  }

  rtc_library("google_test_runner_delegate") {
    sources = [ "ios/google_test_runner_delegate.h" ]
  }

  rtc_library("google_test_runner_objc") {
    testonly = true
    visibility = [ "*" ]
    sources = [ "ios/google_test_runner.mm" ]
    configs += [ "//build/config/ios:xctest_config" ]
    frameworks = [ "UIKit.framework" ]
    deps = [ ":google_test_runner_delegate" ]
  }

  config("test_support_objc_config") {
    defines = []

    if (use_clang_coverage) {
      defines += [ "WEBRTC_IOS_ENABLE_COVERAGE" ]
    }
  }
}

config("suppress_warning_4373") {
  if (is_win) {
    cflags = [
      # MSVC has a bug which generates this warning when using mocks; see the
      # section on warning 4373 in he googlemock FAQ. This warning isn't the
      # least relevant for us, anyway.
      "/wd4373",
    ]
  }
}

config("test_main_direct_config") {
  visibility = [ ":*" ]
  defines = [ "WEBRTC_UNIT_TEST" ]
}
rtc_source_set("test_support") {
  visibility = [ "*" ]
  testonly = true

  all_dependent_configs = [
    ":suppress_warning_4373",
    "//third_party/googletest:gmock_config",
    "//third_party/googletest:gtest_config",
  ]

  sources = [
    "gmock.h",
    "gtest.h",
  ]

  if (is_ios) {
    public_deps +=  # no-presubmit-check TODO(webrtc:8603)
        [ ":test_support_objc" ]
  }

  public_configs = [ ":test_main_direct_config" ]
  deps = [
    "../rtc_base:ignore_wundef",
    "//testing/gmock",
    "//testing/gtest",
  ]
}

rtc_library("fixed_fps_video_frame_writer_adapter") {
  visibility = [ "*" ]
  sources = [
    "testsupport/fixed_fps_video_frame_writer_adapter.cc",
    "testsupport/fixed_fps_video_frame_writer_adapter.h",
  ]
  deps = [
    ":video_frame_writer",
    "../api/test/video:video_frame_writer",
    "../api/units:time_delta",
    "../api/video:video_frame",
    "../rtc_base:checks",
    "../system_wrappers",
  ]
}

rtc_library("video_frame_writer") {
  sources = [
    "testsupport/frame_writer.h",
    "testsupport/video_frame_writer.cc",
    "testsupport/video_frame_writer.h",
    "testsupport/y4m_frame_writer.cc",
    "testsupport/yuv_frame_writer.cc",
  ]

  deps = [
    "../api:scoped_refptr",
    "../api/test/video:video_frame_writer",
    "../api/video:video_frame",
    "../common_video",
    "../rtc_base:buffer",
    "../rtc_base:checks",
    "../rtc_base:logging",
  ]

  if (!is_ios) {
    deps += [ "//third_party:jpeg" ]
    sources += [ "testsupport/jpeg_frame_writer.cc" ]
  } else {
    sources += [ "testsupport/jpeg_frame_writer_ios.cc" ]
  }
}

rtc_library("video_test_support") {
  testonly = true

  sources = [
    "testsupport/frame_reader.h",
    "testsupport/mock/mock_frame_reader.h",
    "testsupport/y4m_frame_reader.cc",
    "testsupport/yuv_frame_reader.cc",
  ]

  deps = [
    ":fileutils",
    ":frame_utils",
    ":test_support",
    ":video_test_common",
    "../api:scoped_refptr",
    "../api:sequence_checker",
    "../api/test/video:video_frame_writer",
    "../api/video:encoded_image",
    "../api/video:resolution",
    "../api/video:video_frame",
    "../api/video_codecs:video_codecs_api",
    "../common_video",
    "../modules/video_coding:video_codec_interface",
    "../modules/video_coding:video_coding_utility",
    "../modules/video_coding:webrtc_h264",
    "../modules/video_coding:webrtc_vp8",
    "../modules/video_coding:webrtc_vp9",
    "../rtc_base:buffer",
    "../rtc_base:checks",
    "../rtc_base:criticalsection",
    "../rtc_base:logging",
    "../rtc_base:rtc_event",
    "../rtc_base:stringutils",
    "../rtc_base/system:file_wrapper",
  ]
}

if (rtc_include_tests) {
  if (rtc_enable_google_benchmarks) {
    rtc_library("benchmark_main") {
      testonly = true
      sources = [ "benchmark_main.cc" ]

      deps = [ "//third_party/google_benchmark" ]
    }
  }

  if (!build_with_chromium) {
    rtc_library("resources_dir_flag") {
      testonly = true
      visibility = [ "*" ]
      sources = [
        "testsupport/resources_dir_flag.cc",
        "testsupport/resources_dir_flag.h",
      ]
      deps = [ "//third_party/abseil-cpp/absl/flags:flag" ]
    }

    rtc_library("test_main_lib") {
      visibility = [ "*" ]
      testonly = true
      sources = [
        "test_main_lib.cc",
        "test_main_lib.h",
      ]

      deps = [
        ":field_trial",
        ":perf_test",
        ":resources_dir_flag",
        ":test_flags",
        ":test_support",
        "../api/test/metrics:chrome_perf_dashboard_metrics_exporter",
        "../api/test/metrics:global_metrics_logger_and_exporter",
        "../api/test/metrics:metrics_exporter",
        "../api/test/metrics:metrics_set_proto_file_exporter",
        "../api/test/metrics:print_result_proxy_metrics_exporter",
        "../api/test/metrics:stdout_metrics_exporter",
        "../rtc_base:checks",
        "../rtc_base:event_tracer",
        "../rtc_base:logging",
        "../rtc_base:ssl_adapter",
        "../rtc_base:threading",
        "../system_wrappers:field_trial",
        "../system_wrappers:metrics",
        "//third_party/abseil-cpp/absl/flags:flag",
        "//third_party/abseil-cpp/absl/memory",
        "//third_party/abseil-cpp/absl/strings",
        "//third_party/abseil-cpp/absl/strings:string_view",
        "//third_party/perfetto/include/perfetto/tracing",
      ]

      if (is_win) {
        deps += [ "../rtc_base:win32_socket_init" ]
      }
      if (rtc_use_perfetto) {
        deps += [ "//third_party/perfetto/src/tracing:client_api" ]
      }
    }

    rtc_library("test_main") {
      visibility = [ "*" ]
      testonly = true
      sources = [ "test_main.cc" ]

      deps = [
        ":test_main_lib",
        ":test_support",
        "//third_party/abseil-cpp/absl/debugging:failure_signal_handler",
        "//third_party/abseil-cpp/absl/debugging:symbolize",
        "//third_party/abseil-cpp/absl/flags:parse",
      ]
    }

    rtc_library("test_support_test_artifacts") {
      testonly = true
      sources = [
        "testsupport/test_artifacts.cc",
        "testsupport/test_artifacts.h",
      ]
      deps = [
        ":fileutils",
        "../rtc_base:logging",
        "../rtc_base/system:file_wrapper",
        "//third_party/abseil-cpp/absl/flags:flag",
        "//third_party/abseil-cpp/absl/flags:parse",
      ]
    }

    test_support_unittests_resources = [
      "../resources/foreman_cif_short.yuv",
      "../resources/video_coding/frame-ethernet-ii.pcap",
      "../resources/video_coding/frame-loopback.pcap",
      "../resources/video_coding/pltype103.rtp",
      "../resources/video_coding/pltype103_header_only.rtp",
      "../resources/video_coding/ssrcs-2.pcap",
      "../resources/video_coding/ssrcs-3.pcap",
    ]

    if (is_ios) {
      bundle_data("test_support_unittests_bundle_data") {
        testonly = true
        sources = test_support_unittests_resources
        outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
      }
    }

    rtc_library("fixed_fps_video_frame_writer_adapter_test") {
      testonly = true
      sources = [ "testsupport/fixed_fps_video_frame_writer_adapter_test.cc" ]
      deps = [
        ":fixed_fps_video_frame_writer_adapter",
        ":test_support",
        ":video_frame_writer",
        "../api/units:time_delta",
        "../api/units:timestamp",
        "../api/video:video_frame",
        "../rtc_base/synchronization:mutex",
        "time_controller",
      ]
    }

    rtc_test("test_support_unittests") {
      deps = [
        ":call_config_utils",
        ":copy_to_file_audio_capturer_unittest",
        ":create_frame_generator_capturer",
        ":direct_transport",
        ":fake_video_codecs",
        ":fileutils",
        ":fileutils_unittests",
        ":fixed_fps_video_frame_writer_adapter_test",
        ":frame_generator_capturer",
        ":frame_generator_impl",
        ":perf_test",
        ":rtc_expect_death",
        ":rtp_test_utils",
        ":run_loop",
        ":scoped_key_value_config",
        ":test_main",
        ":test_support",
        ":test_support_test_artifacts",
        ":video_codec_tester",
        ":video_frame_writer",
        ":video_test_common",
        ":video_test_support",
        ":y4m_frame_generator",
        "../api:array_view",
        "../api:create_frame_generator",
        "../api:create_simulcast_test_fixture_api",
        "../api:frame_generator_api",
        "../api:mock_video_codec_factory",
        "../api:mock_video_decoder",
        "../api:mock_video_encoder",
        "../api:scoped_refptr",
        "../api:simulcast_test_fixture_api",
        "../api/environment",
        "../api/environment:environment_factory",
        "../api/task_queue",
        "../api/task_queue:task_queue_test",
        "../api/test/video:function_video_factory",
        "../api/test/video:video_frame_writer",
        "../api/units:data_rate",
        "../api/units:data_size",
        "../api/units:frequency",
        "../api/units:time_delta",
        "../api/video:encoded_image",
        "../api/video:video_frame",
        "../api/video_codecs:builtin_video_decoder_factory",
        "../api/video_codecs:builtin_video_encoder_factory",
        "../api/video_codecs:scalability_mode",
        "../api/video_codecs:video_codecs_api",
        "../call:video_stream_api",
        "../common_video",
        "../media:codec",
        "../media:media_constants",
        "../modules/rtp_rtcp:rtp_rtcp_format",
        "../modules/video_coding:simulcast_test_fixture_impl",
        "../modules/video_coding:video_codec_interface",
        "../modules/video_coding:video_coding_utility",
        "../modules/video_coding:webrtc_h264",
        "../modules/video_coding:webrtc_vp8",
        "../modules/video_coding:webrtc_vp9",
        "../modules/video_coding/svc:scalability_mode_util",
        "../rtc_base:criticalsection",
        "../rtc_base:rtc_event",
        "../rtc_base/synchronization:mutex",
        "../rtc_base/system:file_wrapper",
        "jitter:jitter_unittests",
        "pc/e2e:e2e_unittests",
        "pc/e2e/analyzer/video:video_analyzer_unittests",
        "pc/e2e/analyzer/video/dvqa:dvqa_unittests",
        "peer_scenario/tests",
        "scenario:scenario_unittests",
        "time_controller:time_controller",
        "time_controller:time_controller_unittests",
        "//third_party/abseil-cpp/absl/flags:flag",
        "//third_party/abseil-cpp/absl/strings:string_view",
        "//third_party/libyuv",
      ]
      sources = [
        "call_config_utils_unittest.cc",
        "direct_transport_unittest.cc",
        "fake_vp8_encoder_unittest.cc",
        "frame_generator_capturer_unittest.cc",
        "frame_generator_unittest.cc",
        "rtp_file_reader_unittest.cc",
        "rtp_file_writer_unittest.cc",
        "run_loop_unittest.cc",
        "testsupport/ivf_video_frame_generator_unittest.cc",
        "testsupport/perf_test_unittest.cc",
        "testsupport/test_artifacts_unittest.cc",
        "testsupport/video_frame_writer_unittest.cc",
        "testsupport/y4m_frame_generator_test.cc",
        "testsupport/y4m_frame_reader_unittest.cc",
        "testsupport/y4m_frame_writer_unittest.cc",
        "testsupport/yuv_frame_reader_unittest.cc",
        "testsupport/yuv_frame_writer_unittest.cc",
        "video_codec_tester_unittest.cc",
      ]

      if (rtc_enable_protobuf) {
        sources += [ "testsupport/perf_test_histogram_writer_unittest.cc" ]
        deps += [ "//third_party/catapult/tracing/tracing:histogram" ]
      }

      data = test_support_unittests_resources
      if (is_android) {
        deps += [ "//testing/android/native_test:native_test_support" ]
        shard_timeout = 900
      }

      if (is_ios) {
        deps += [ ":test_support_unittests_bundle_data" ]
      }

      if (!is_android) {
        # This is needed in order to avoid:
        # undefined symbol: webrtc::videocapturemodule::VideoCaptureImpl::Create
        deps += [ "../modules/video_capture:video_capture_internal_impl" ]
      }
    }
  }
}

if (is_ios) {
  rtc_library("fileutils_ios_objc") {
    visibility = [
      ":fileutils",
      ":fileutils_override_impl",
    ]
    sources = [
      "testsupport/ios_file_utils.h",
      "testsupport/ios_file_utils.mm",
    ]
    deps = [
      "../rtc_base:checks",
      "../sdk:helpers_objc",
      "//third_party/abseil-cpp/absl/strings:string_view",
    ]
  }
}

if (is_mac) {
  rtc_library("fileutils_mac_objc") {
    visibility = [
      ":fileutils",
      ":fileutils_override_impl",
    ]
    sources = [
      "testsupport/mac_file_utils.h",
      "testsupport/mac_file_utils.mm",
    ]
    deps = [ "../rtc_base:checks" ]
  }
}

rtc_library("fileutils") {
  testonly = true
  visibility = [ "*" ]
  sources = [
    "testsupport/file_utils.cc",
    "testsupport/file_utils.h",
  ]
  deps = [
    ":fileutils_override_api",
    ":fileutils_override_impl",
    "../rtc_base:checks",
    "../rtc_base:crypto_random",
    "../rtc_base:stringutils",
    "//third_party/abseil-cpp/absl/base:core_headers",
    "//third_party/abseil-cpp/absl/strings:string_view",
  ]
  if (is_ios) {
    deps += [ ":fileutils_ios_objc" ]
  }
  if (is_mac) {
    deps += [ ":fileutils_mac_objc" ]
  }
  if (is_win) {
    deps += [ "../rtc_base:win32" ]
  }
}

# We separate header into own target to make it possible for downstream
# projects to override implementation.
rtc_source_set("fileutils_override_api") {
  testonly = true
  sources = [ "testsupport/file_utils_override.h" ]
  deps = [ "//third_party/abseil-cpp/absl/strings:string_view" ]
}

rtc_library("fileutils_override_impl") {
  testonly = true
  visibility = [ ":fileutils" ]
  sources = [ "testsupport/file_utils_override.cc" ]
  deps = [
    ":fileutils_override_api",
    "../rtc_base:checks",
    "../rtc_base:macromagic",
    "../rtc_base:stringutils",
    "//third_party/abseil-cpp/absl/strings:string_view",
  ]
  if (is_ios) {
    deps += [ ":fileutils_ios_objc" ]
  }
  if (is_mac) {
    deps += [ ":fileutils_mac_objc" ]
  }
  if (is_win) {
    deps += [ "../rtc_base:win32" ]
  }
}

rtc_source_set("run_test") {
  testonly = true
  if (is_mac) {
    public_deps += [ ":run_test_objc" ]  # no-presubmit-check TODO(webrtc:8603)
  } else {
    public_deps +=  # no-presubmit-check TODO(webrtc:8603)
        [ ":run_test_generic" ]
  }
}

rtc_source_set("run_test_interface") {
  sources = [ "run_test.h" ]
}

if (is_mac) {
  rtc_library("run_test_objc") {
    testonly = true
    visibility = [ ":run_test" ]
    sources = [ "mac/run_test.mm" ]
    deps = [ ":run_test_interface" ]
  }
}

rtc_library("run_test_generic") {
  testonly = true
  visibility = [ ":run_test" ]
  sources = [ "run_test.cc" ]
  deps = [ ":run_test_interface" ]
}

rtc_library("fileutils_unittests") {
  testonly = true
  visibility = [ ":*" ]  # Only targets in this file can depend on this.
  sources = [ "testsupport/file_utils_unittest.cc" ]
  deps = [
    ":fileutils",
    ":test_support",
    "../rtc_base:checks",
    "../rtc_base:crypto_random",
    "//third_party/abseil-cpp/absl/strings:string_view",
  ]
}

rtc_library("direct_transport") {
  visibility = [ "*" ]
  testonly = true
  sources = [
    "direct_transport.cc",
    "direct_transport.h",
  ]
  deps = [
    "../api:rtp_parameters",
    "../api:sequence_checker",
    "../api:simulated_network_api",
    "../api:transport_api",
    "../api/task_queue",
    "../api/units:time_delta",
    "../call:call_interfaces",
    "../call:simulated_packet_receiver",
    "../modules/rtp_rtcp:rtp_rtcp_format",
    "../rtc_base:checks",
    "../rtc_base:macromagic",
    "../rtc_base:timeutils",
    "../rtc_base/synchronization:mutex",
    "../rtc_base/task_utils:repeating_task",
  ]
  public_deps +=  # no-presubmit-check TODO(webrtc:8603)
      [ "../call:fake_network" ]
}

rtc_library("fake_video_codecs") {
  allow_poison = [ "software_video_codecs" ]
  visibility = [ "*" ]
  sources = [
    "configurable_frame_size_encoder.cc",
    "configurable_frame_size_encoder.h",
    "fake_decoder.cc",
    "fake_decoder.h",
    "fake_encoder.cc",
    "fake_encoder.h",
    "fake_vp8_decoder.cc",
    "fake_vp8_decoder.h",
    "fake_vp8_encoder.cc",
    "fake_vp8_encoder.h",
  ]
  deps = [
    "../api:fec_controller_api",
    "../api:scoped_refptr",
    "../api:sequence_checker",
    "../api/environment",
    "../api/task_queue",
    "../api/video:encoded_image",
    "../api/video:video_bitrate_allocation",
    "../api/video:video_frame",
    "../api/video:video_rtp_headers",
    "../api/video_codecs:video_codecs_api",
    "../api/video_codecs:vp8_temporal_layers_factory",
    "../modules/video_coding:codec_globals_headers",
    "../modules/video_coding:video_codec_interface",
    "../modules/video_coding:video_coding_utility",
    "../rtc_base:checks",
    "../rtc_base:criticalsection",
    "../rtc_base:macromagic",
    "../rtc_base:timeutils",
    "../rtc_base/synchronization:mutex",
    "../system_wrappers",
    "//third_party/abseil-cpp/absl/strings:string_view",
  ]
}

rtc_library("null_transport") {
  testonly = true
  sources = [
    "null_transport.cc",
    "null_transport.h",
  ]
  deps = [ "../api:transport_api" ]
}

rtc_library("encoder_settings") {
  testonly = true
  sources = [
    "encoder_settings.cc",
    "encoder_settings.h",
  ]
  deps = [
    "../api:scoped_refptr",
    "../api/video_codecs:video_codecs_api",
    "../call:rtp_interfaces",
    "../call:video_stream_api",
    "../rtc_base:checks",
    "../rtc_base:refcount",
    "../video/config:encoder_config",
  ]
}

rtc_library("rtc_expect_death") {
  testonly = true
  sources = [ "testsupport/rtc_expect_death.h" ]
  deps = [ ":test_support" ]
}

rtc_library("run_loop") {
  testonly = true
  sources = [
    "run_loop.cc",
    "run_loop.h",
  ]
  deps = [
    "../api/task_queue",
    "../rtc_base:threading",
    "../rtc_base:timeutils",
    "//third_party/abseil-cpp/absl/functional:any_invocable",
  ]
}

rtc_library("video_test_constants") {
  testonly = true
  sources = [ "video_test_constants.h" ]
  deps = [ "../api/units:time_delta" ]
}

rtc_library("mock_transport") {
  testonly = true
  sources = [
    "mock_transport.cc",
    "mock_transport.h",
  ]
  deps = [
    ":test_support",
    "../api:transport_api",
  ]
}

rtc_source_set("test_renderer") {
  public_deps +=  # no-presubmit-check TODO(webrtc:8603)
      [ ":test_renderer_generic" ]
  testonly = true
  if (is_mac) {
    public_deps +=  # no-presubmit-check TODO(webrtc:8603)
        [ ":test_renderer_objc" ]
  }
}

if (is_mac) {
  rtc_library("test_renderer_objc") {
    testonly = true
    visibility = [ ":test_renderer" ]
    sources = [
      "mac/video_renderer_mac.h",
      "mac/video_renderer_mac.mm",
    ]
    deps = [ ":test_renderer_generic" ]
    frameworks = [
      "Cocoa.framework",
      "OpenGL.framework",
      "CoreVideo.framework",
    ]
    defines = [ "GL_SILENCE_DEPRECATION" ]
  }
}

rtc_library("test_renderer_generic") {
  testonly = true
  visibility = [
    ":test_renderer",
    ":test_renderer_objc",
  ]
  libs = []
  sources = [
    "video_renderer.cc",
    "video_renderer.h",
  ]
  deps = [
    "../api/video:video_frame",
    "../common_video",
    "../rtc_base:checks",
  ]
  if (is_win) {
    sources += [
      "win/d3d_renderer.cc",
      "win/d3d_renderer.h",
    ]
    deps += [ "../api:scoped_refptr" ]
  }
  if (!((is_linux || is_chromeos) && rtc_use_x11) && !is_mac && !is_win) {
    sources += [ "null_platform_renderer.cc" ]
  }
  if (((is_linux || is_chromeos) && rtc_use_x11) || is_mac) {
    sources += [
      "gl/gl_renderer.cc",
      "gl/gl_renderer.h",
    ]
  }
  if (is_mac) {
    defines = [ "GL_SILENCE_DEPRECATION" ]
  }

  if ((is_linux || is_chromeos) && rtc_use_x11) {
    sources += [
      "linux/glx_renderer.cc",
      "linux/glx_renderer.h",
      "linux/video_renderer_linux.cc",
    ]
    libs += [
      "Xext",
      "X11",
      "GL",
    ]
  }
  if (is_android) {
    libs += [
      "GLESv2",
      "log",
    ]
  }
}

rtc_library("audio_codec_mocks") {
  testonly = true
  sources = [
    "mock_audio_decoder.cc",
    "mock_audio_decoder.h",
    "mock_audio_decoder_factory.h",
    "mock_audio_encoder.cc",
    "mock_audio_encoder.h",
    "mock_audio_encoder_factory.h",
  ]

  deps = [
    ":test_support",
    "../api:array_view",
    "../api:make_ref_counted",
    "../api:scoped_refptr",
    "../api/audio_codecs:audio_codecs_api",
    "../api/audio_codecs:builtin_audio_decoder_factory",
    "../api/environment",
  ]
}

if (!build_with_chromium) {
  rtc_library("copy_to_file_audio_capturer") {
    testonly = true
    sources = [
      "testsupport/copy_to_file_audio_capturer.cc",
      "testsupport/copy_to_file_audio_capturer.h",
    ]
    deps = [
      "../api:array_view",
      "../common_audio",
      "../modules/audio_device:test_audio_device_module",
      "../rtc_base:buffer",
    ]
  }

  rtc_library("copy_to_file_audio_capturer_unittest") {
    testonly = true
    sources = [ "testsupport/copy_to_file_audio_capturer_unittest.cc" ]
    deps = [
      ":copy_to_file_audio_capturer",
      ":fileutils",
      ":test_support",
      "../modules/audio_device:test_audio_device_module",
    ]
  }

  rtc_library("test_flags") {
    testonly = true
    sources = [
      "test_flags.cc",
      "test_flags.h",
    ]
    deps = [ "//third_party/abseil-cpp/absl/flags:flag" ]
  }

  rtc_library("test_common") {
    testonly = true
    sources = [
      "call_test.cc",
      "call_test.h",
      "drifting_clock.cc",
      "drifting_clock.h",
      "layer_filtering_transport.cc",
      "layer_filtering_transport.h",
      "rtp_rtcp_observer.h",
    ]

    deps = [
      ":direct_transport",
      ":encoder_settings",
      ":fake_video_codecs",
      ":fileutils",
      ":frame_generator_capturer",
      ":mock_transport",
      ":run_loop",
      ":scoped_key_value_config",
      ":test_flags",
      ":test_support",
      ":test_video_capturer",
      ":video_test_common",
      ":video_test_constants",
      "..//test/network:simulated_network",
      "../api:array_view",
      "../api:create_frame_generator",
      "../api:frame_generator_api",
      "../api:rtp_headers",
      "../api:rtp_parameters",
      "../api:simulated_network_api",
      "../api:transport_api",
      "../api/audio:audio_device",
      "../api/audio_codecs:builtin_audio_decoder_factory",
      "../api/audio_codecs:builtin_audio_encoder_factory",
      "../api/environment",
      "../api/environment:environment_factory",
      "../api/rtc_event_log",
      "../api/task_queue",
      "../api/test/video:function_video_factory",
      "../api/transport:field_trial_based_config",
      "../api/units:time_delta",
      "../api/video:builtin_video_bitrate_allocator_factory",
      "../api/video:video_bitrate_allocator_factory",
      "../api/video:video_frame",
      "../api/video_codecs:video_codecs_api",
      "../call",
      "../call:call_interfaces",
      "../call:fake_network",
      "../call:simulated_packet_receiver",
      "../call:video_stream_api",
      "../modules/audio_device:test_audio_device_module",
      "../modules/audio_mixer:audio_mixer_impl",
      "../modules/rtp_rtcp",
      "../modules/rtp_rtcp:rtp_rtcp_format",
      "../modules/rtp_rtcp:rtp_video_header",
      "../modules/video_coding:codec_globals_headers",
      "../rtc_base:checks",
      "../rtc_base:criticalsection",
      "../rtc_base:rtc_event",
      "../rtc_base:task_queue_for_test",
      "../rtc_base:threading",
      "../rtc_base:timeutils",
      "../system_wrappers",
      "../system_wrappers:field_trial",
      "../video/config:encoder_config",
      "//third_party/abseil-cpp/absl/flags:flag",
    ]
    if (!is_android && !build_with_chromium) {
      deps += [ "../modules/video_capture:video_capture_internal_impl" ]
    }
  }
}

if (!build_with_chromium && is_android) {
  rtc_android_library("native_test_java") {
    testonly = true
    sources = [
      "android/org/webrtc/native_test/RTCNativeUnitTest.java",
      "android/org/webrtc/native_test/RTCNativeUnitTestActivity.java",
    ]
    deps = [
      "../rtc_base:base_java",
      "//testing/android/native_test:native_test_java",
    ]
  }
}

rtc_library("call_config_utils") {
  testonly = true

  # TODO(bugs.webrtc.org/10814): Remove rtc_json_suppressions as soon as it
  # gets removed upstream.
  public_configs = [ "../rtc_base:rtc_json_suppressions" ]
  sources = [
    "call_config_utils.cc",
    "call_config_utils.h",
  ]
  deps = [
    "../call:video_stream_api",
    "../rtc_base:rtc_json",
  ]
}

rtc_library("fake_encoded_frame") {
  testonly = true
  sources = [
    "fake_encoded_frame.cc",
    "fake_encoded_frame.h",
  ]
  deps = [
    ":test_support",
    "../api:rtp_packet_info",
    "../api/video:encoded_frame",
    "../api/video:encoded_image",
    "../api/video:video_frame_type",
    "../api/video:video_rtp_headers",
  ]
}

rtc_library("video_codec_tester") {
  testonly = true
  sources = [
    "video_codec_tester.cc",
    "video_codec_tester.h",
  ]
  deps = [
    ":video_frame_writer",
    ":video_test_support",
    "../api:array_view",
    "../api:create_frame_generator",
    "../api:frame_generator_api",
    "../api/environment",
    "../api/environment:environment_factory",
    "../api/numerics:numerics",
    "../api/test/metrics:metric",
    "../api/test/metrics:metrics_logger",
    "../api/units:data_rate",
    "../api/units:data_size",
    "../api/units:frequency",
    "../api/units:time_delta",
    "../api/units:timestamp",
    "../api/video:builtin_video_bitrate_allocator_factory",
    "../api/video:encoded_image",
    "../api/video:resolution",
    "../api/video:video_bitrate_allocator",
    "../api/video:video_frame",
    "../api/video_codecs:video_codecs_api",
    "../media:media_constants",
    "../modules/video_coding:video_codec_interface",
    "../modules/video_coding:video_coding_utility",
    "../modules/video_coding:webrtc_h264",
    "../modules/video_coding:webrtc_vp9_helpers",
    "../modules/video_coding/codecs/av1:av1_svc_config",
    "../modules/video_coding/svc:scalability_mode_util",
    "../rtc_base:checks",
    "../rtc_base:logging",
    "../rtc_base:rtc_event",
    "../rtc_base:stringutils",
    "../rtc_base:task_queue_for_test",
    "../rtc_base:timeutils",
    "../rtc_base/synchronization:mutex",
    "../system_wrappers",
    "../test:fileutils",
    "../video/config:streams_config",
    "//third_party/abseil-cpp/absl/strings",
    "//third_party/libyuv",
  ]
}
