BUILD.gn 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. # Copyright 2015 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. import("//build/config/chromeos/ui_mode.gni")
  5. import("//remoting/remoting_options.gni")
  6. static_library("test_support") {
  7. testonly = true
  8. sources = [
  9. "cli_util.cc",
  10. "cli_util.h",
  11. "cyclic_frame_generator.cc",
  12. "cyclic_frame_generator.h",
  13. "fake_ice_connection.cc",
  14. "fake_ice_connection.h",
  15. "fake_network_dispatcher.cc",
  16. "fake_network_dispatcher.h",
  17. "fake_network_manager.cc",
  18. "fake_network_manager.h",
  19. "fake_port_allocator.cc",
  20. "fake_port_allocator.h",
  21. "fake_socket_factory.cc",
  22. "fake_socket_factory.h",
  23. "fake_test_token_storage.cc",
  24. "fake_test_token_storage.h",
  25. "fake_webrtc_connection.cc",
  26. "fake_webrtc_connection.h",
  27. "frame_generator_util.cc",
  28. "frame_generator_util.h",
  29. "remote_connection_observer.h",
  30. "rgb_value.cc",
  31. "rgb_value.h",
  32. "scroll_frame_generator.cc",
  33. "scroll_frame_generator.h",
  34. "test_device_id_provider.cc",
  35. "test_device_id_provider.h",
  36. "test_oauth_token_getter.cc",
  37. "test_oauth_token_getter.h",
  38. "test_token_storage.cc",
  39. "test_token_storage.h",
  40. "video_frame_writer.cc",
  41. "video_frame_writer.h",
  42. ]
  43. public_deps = [
  44. "//base",
  45. "//mojo/core/embedder",
  46. "//net",
  47. "//remoting/base",
  48. "//remoting/base:logging",
  49. "//remoting/client",
  50. "//remoting/client/audio",
  51. "//remoting/codec:decoder",
  52. "//remoting/codec:encoder",
  53. "//remoting/protocol",
  54. "//remoting/signaling",
  55. "//services/network:test_support",
  56. "//third_party/webrtc_overrides:webrtc_component",
  57. "//ui/gfx",
  58. ]
  59. deps = [
  60. "//components/webrtc:net_address_utils",
  61. "//components/webrtc:thread_wrapper",
  62. "//google_apis",
  63. "//remoting/base:authorization",
  64. "//remoting/base:test_support",
  65. "//services/network:network_service",
  66. "//services/network/public/mojom",
  67. "//skia",
  68. "//testing/gmock",
  69. "//testing/gtest",
  70. "//third_party/abseil-cpp:absl",
  71. ]
  72. }
  73. if (enable_remoting_host && !is_android && !is_chromeos_ash &&
  74. !is_chromeos_lacros) {
  75. static_library("fake_connection_event_logger") {
  76. testonly = true
  77. sources = [
  78. "fake_connection_event_logger.cc",
  79. "fake_connection_event_logger.h",
  80. ]
  81. deps = [
  82. "//remoting/host:common",
  83. "//remoting/protocol:test_support",
  84. ]
  85. }
  86. if (!is_win) {
  87. # A binary for starting an IT2ME host from command line.
  88. executable("it2me_cli_host") {
  89. testonly = true
  90. sources = [
  91. "it2me_cli_host.cc",
  92. "it2me_cli_host.h",
  93. "it2me_cli_host_main.cc",
  94. ]
  95. deps = [
  96. ":test_support",
  97. "//extensions/browser/api/messaging:native_messaging",
  98. "//mojo/core/embedder",
  99. "//remoting/base",
  100. "//remoting/base:authorization",
  101. "//remoting/base:logging",
  102. "//remoting/host",
  103. "//remoting/host:resources",
  104. "//remoting/host/it2me:common",
  105. "//remoting/host/native_messaging",
  106. ]
  107. }
  108. }
  109. static_library("it2me_standalone_host") {
  110. testonly = true
  111. sources = [
  112. "it2me_standalone_host.cc",
  113. "it2me_standalone_host.h",
  114. ]
  115. deps = [
  116. ":fake_connection_event_logger",
  117. "//base/test:test_support",
  118. "//remoting/protocol:protocol",
  119. "//remoting/protocol:test_support",
  120. "//third_party/webrtc_overrides:webrtc_component",
  121. ]
  122. public_deps = [
  123. "//remoting/host:test_support",
  124. "//testing/gmock",
  125. ]
  126. }
  127. executable("it2me_standalone_host_main") {
  128. testonly = true
  129. defines = []
  130. libs = []
  131. sources = [ "it2me_standalone_host_main.cc" ]
  132. deps = [
  133. ":it2me_standalone_host",
  134. "//remoting/host:resources",
  135. ]
  136. if ((is_linux || is_chromeos_lacros) && remoting_use_x11) {
  137. deps += [
  138. "//build/config/linux/gtk",
  139. "//ui/events/platform/x11:x11",
  140. ]
  141. }
  142. if (is_win) {
  143. defines += [ "_ALT_NO_EXCEPTIONS" ]
  144. deps += [ "//remoting/host/win:dpi_aware_exe_manifest" ]
  145. libs += [
  146. "rpcrt4.lib",
  147. "wtsapi32.lib",
  148. ]
  149. }
  150. }
  151. # A binary with a specific version of EvaluateCapabilityLocally() for test
  152. # purpose only.
  153. executable("capability_test_stub") {
  154. testonly = true
  155. sources = [ "capability_test_stub_main.cc" ]
  156. deps = [
  157. "//base",
  158. "//remoting/host/base",
  159. ]
  160. }
  161. }
  162. # A binary for testing and fiddling FTL services.
  163. executable("ftl_services_playground") {
  164. testonly = true
  165. sources = [
  166. "ftl_services_playground.cc",
  167. "ftl_services_playground.h",
  168. "ftl_services_playground_main.cc",
  169. ]
  170. deps = [
  171. ":test_support",
  172. "//mojo/core/embedder",
  173. "//remoting/base",
  174. "//remoting/base:authorization",
  175. "//remoting/base:logging",
  176. "//remoting/proto/ftl/v1:ftl_messages",
  177. "//remoting/signaling",
  178. "//services/network:network_service",
  179. ]
  180. }
  181. # A binary for testing and fiddling the FTL signaling process.
  182. executable("ftl_signaling_playground") {
  183. testonly = true
  184. sources = [
  185. "ftl_signaling_playground.cc",
  186. "ftl_signaling_playground.h",
  187. "ftl_signaling_playground_main.cc",
  188. ]
  189. deps = [
  190. ":test_support",
  191. "//components/webrtc:thread_wrapper",
  192. "//mojo/core/embedder",
  193. "//remoting/base",
  194. "//remoting/base:authorization",
  195. "//remoting/base:logging",
  196. "//remoting/signaling",
  197. "//services/network:network_service",
  198. ]
  199. }