1# Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. 2# 3# Use of this source code is governed by a BSD-style license 4# that can be found in the LICENSE file in the root of the source 5# tree. An additional intellectual property rights grant can be found 6# in the file PATENTS. All contributing project authors may 7# be found in the AUTHORS file in the root of the source tree. 8 9import("../../webrtc.gni") 10 11rtc_library("emulated_network") { 12 visibility = [ 13 "../../api:create_network_emulation_manager", 14 ":*", 15 ] 16 if (rtc_include_tests) { 17 visibility += [ 18 "../scenario:*", 19 "../peer_scenario:*", 20 ] 21 } 22 testonly = true 23 sources = [ 24 "cross_traffic.cc", 25 "cross_traffic.h", 26 "emulated_network_manager.cc", 27 "emulated_network_manager.h", 28 "fake_network_socket_server.cc", 29 "fake_network_socket_server.h", 30 "network_emulation.cc", 31 "network_emulation.h", 32 "network_emulation_manager.cc", 33 "network_emulation_manager.h", 34 "traffic_route.cc", 35 "traffic_route.h", 36 ] 37 deps = [ 38 "../../api:network_emulation_manager_api", 39 "../../api:simulated_network_api", 40 "../../api:time_controller", 41 "../../api/units:data_rate", 42 "../../api/units:data_size", 43 "../../api/units:time_delta", 44 "../../api/units:timestamp", 45 "../../call:simulated_network", 46 "../../rtc_base", 47 "../../rtc_base:rtc_base_tests_utils", 48 "../../rtc_base:rtc_task_queue", 49 "../../rtc_base:safe_minmax", 50 "../../rtc_base:task_queue_for_test", 51 "../../rtc_base/synchronization:mutex", 52 "../../rtc_base/synchronization:sequence_checker", 53 "../../rtc_base/task_utils:repeating_task", 54 "../../rtc_base/third_party/sigslot", 55 "../../system_wrappers", 56 "../scenario:column_printer", 57 "../time_controller", 58 ] 59 absl_deps = [ 60 "//third_party/abseil-cpp/absl/algorithm:container", 61 "//third_party/abseil-cpp/absl/memory", 62 "//third_party/abseil-cpp/absl/types:optional", 63 ] 64} 65 66rtc_library("network_emulation_unittest") { 67 testonly = true 68 sources = [ "network_emulation_unittest.cc" ] 69 deps = [ 70 ":emulated_network", 71 "../:test_support", 72 "../../api:simulated_network_api", 73 "../../api/units:time_delta", 74 "../../call:simulated_network", 75 "../../rtc_base:gunit_helpers", 76 "../../rtc_base:logging", 77 "../../rtc_base:rtc_event", 78 "../../rtc_base/synchronization:mutex", 79 "../../system_wrappers:system_wrappers", 80 ] 81} 82 83rtc_library("network_emulation_pc_unittest") { 84 testonly = true 85 sources = [ "network_emulation_pc_unittest.cc" ] 86 deps = [ 87 ":emulated_network", 88 "../:test_support", 89 "../../api:callfactory_api", 90 "../../api:libjingle_peerconnection_api", 91 "../../api:scoped_refptr", 92 "../../api:simulated_network_api", 93 "../../api/rtc_event_log:rtc_event_log_factory", 94 "../../api/task_queue:default_task_queue_factory", 95 "../../call:simulated_network", 96 "../../media:rtc_audio_video", 97 "../../media:rtc_media_engine_defaults", 98 "../../modules/audio_device:audio_device_impl", 99 "../../p2p:rtc_p2p", 100 "../../pc:pc_test_utils", 101 "../../pc:peerconnection_wrapper", 102 "../../rtc_base", 103 "../../rtc_base:gunit_helpers", 104 "../../rtc_base:logging", 105 "../../rtc_base:rtc_event", 106 ] 107} 108 109rtc_library("cross_traffic_unittest") { 110 testonly = true 111 sources = [ "cross_traffic_unittest.cc" ] 112 deps = [ 113 ":emulated_network", 114 "../:test_support", 115 "../../api:simulated_network_api", 116 "../../call:simulated_network", 117 "../../rtc_base", 118 "../../rtc_base:logging", 119 "../../rtc_base:rtc_event", 120 "//test/time_controller:time_controller", 121 ] 122 absl_deps = [ "//third_party/abseil-cpp/absl/memory" ] 123} 124 125rtc_library("feedback_generator") { 126 testonly = true 127 sources = [ 128 "feedback_generator.cc", 129 "feedback_generator.h", 130 ] 131 deps = [ 132 ":emulated_network", 133 "../../api/transport:test_feedback_generator_interface", 134 "../../call:simulated_network", 135 "../../rtc_base:checks", 136 "../time_controller", 137 ] 138 absl_deps = [ "//third_party/abseil-cpp/absl/memory" ] 139} 140 141rtc_library("feedback_generator_unittest") { 142 testonly = true 143 sources = [ "feedback_generator_unittest.cc" ] 144 deps = [ 145 "../:test_support", 146 "../../api/transport:test_feedback_generator", 147 ] 148} 149 150rtc_library("network_emulation_unittests") { 151 testonly = true 152 deps = [ 153 ":cross_traffic_unittest", 154 ":feedback_generator_unittest", 155 ":network_emulation_pc_unittest", 156 ":network_emulation_unittest", 157 ] 158} 159