| # Copyright 2015 The Chromium Authors | 
 | # Use of this source code is governed by a BSD-style license that can be | 
 | # found in the LICENSE file. | 
 |  | 
 | import("//remoting/remoting_options.gni") | 
 |  | 
 | static_library("test_support") { | 
 |   testonly = true | 
 |  | 
 |   sources = [ | 
 |     "cli_util.cc", | 
 |     "cli_util.h", | 
 |     "cyclic_frame_generator.cc", | 
 |     "cyclic_frame_generator.h", | 
 |     "fake_ice_connection.cc", | 
 |     "fake_ice_connection.h", | 
 |     "fake_network_dispatcher.cc", | 
 |     "fake_network_dispatcher.h", | 
 |     "fake_network_manager.cc", | 
 |     "fake_network_manager.h", | 
 |     "fake_port_allocator.cc", | 
 |     "fake_port_allocator.h", | 
 |     "fake_socket_factory.cc", | 
 |     "fake_socket_factory.h", | 
 |     "fake_test_token_storage.cc", | 
 |     "fake_test_token_storage.h", | 
 |     "fake_webrtc_connection.cc", | 
 |     "fake_webrtc_connection.h", | 
 |     "frame_generator_util.cc", | 
 |     "frame_generator_util.h", | 
 |     "remote_connection_observer.h", | 
 |     "rgb_value.cc", | 
 |     "rgb_value.h", | 
 |     "scroll_frame_generator.cc", | 
 |     "scroll_frame_generator.h", | 
 |     "test_device_id_provider.cc", | 
 |     "test_device_id_provider.h", | 
 |     "test_oauth_token_getter.cc", | 
 |     "test_oauth_token_getter.h", | 
 |     "test_token_storage.cc", | 
 |     "test_token_storage.h", | 
 |     "video_frame_writer.cc", | 
 |     "video_frame_writer.h", | 
 |   ] | 
 |  | 
 |   public_deps = [ | 
 |     "//base", | 
 |     "//mojo/core/embedder", | 
 |     "//net", | 
 |     "//remoting/base", | 
 |     "//remoting/base:logging", | 
 |     "//remoting/codec:decoder", | 
 |     "//remoting/codec:encoder", | 
 |     "//remoting/protocol", | 
 |     "//remoting/signaling", | 
 |     "//services/network:test_support", | 
 |     "//third_party/webrtc_overrides:webrtc_component", | 
 |     "//ui/gfx", | 
 |   ] | 
 |  | 
 |   deps = [ | 
 |     "//components/webrtc:net_address_utils", | 
 |     "//components/webrtc:thread_wrapper", | 
 |     "//google_apis", | 
 |     "//remoting/base:authorization", | 
 |     "//remoting/base:errors", | 
 |     "//remoting/base:test_support", | 
 |     "//services/network:network_service", | 
 |     "//services/network/public/mojom", | 
 |     "//skia", | 
 |     "//testing/gmock", | 
 |     "//testing/gtest", | 
 |     "//third_party/abseil-cpp:absl", | 
 |   ] | 
 |  | 
 |   # TODO(crbug.com/40031409): Fix code that adds exit-time destructors and | 
 |   # enable the diagnostic by removing this line. | 
 |   configs += [ "//build/config/compiler:no_exit_time_destructors" ] | 
 | } | 
 |  | 
 | if (enable_remoting_host && !is_android && !is_chromeos) { | 
 |   static_library("fake_connection_event_logger") { | 
 |     testonly = true | 
 |  | 
 |     sources = [ | 
 |       "fake_connection_event_logger.cc", | 
 |       "fake_connection_event_logger.h", | 
 |     ] | 
 |  | 
 |     deps = [ | 
 |       "//remoting/host:common", | 
 |       "//remoting/protocol:test_support", | 
 |     ] | 
 |   } | 
 |  | 
 |   if (!is_win) { | 
 |     # A binary for starting an IT2ME host from command line. | 
 |     executable("it2me_cli_host") { | 
 |       testonly = true | 
 |       sources = [ | 
 |         "it2me_cli_host.cc", | 
 |         "it2me_cli_host.h", | 
 |         "it2me_cli_host_main.cc", | 
 |       ] | 
 |       deps = [ | 
 |         ":test_support", | 
 |         "//extensions/browser/api/messaging:native_messaging", | 
 |         "//mojo/core/embedder", | 
 |         "//remoting/base", | 
 |         "//remoting/base:authorization", | 
 |         "//remoting/base:logging", | 
 |         "//remoting/host", | 
 |         "//remoting/host:resources", | 
 |         "//remoting/host/it2me:common", | 
 |         "//remoting/host/native_messaging", | 
 |       ] | 
 |     } | 
 |   } | 
 |  | 
 |   static_library("it2me_standalone_host") { | 
 |     testonly = true | 
 |  | 
 |     sources = [ | 
 |       "it2me_standalone_host.cc", | 
 |       "it2me_standalone_host.h", | 
 |     ] | 
 |  | 
 |     deps = [ | 
 |       ":fake_connection_event_logger", | 
 |       "//base/test:test_support", | 
 |       "//remoting/base:session_policies", | 
 |       "//remoting/protocol", | 
 |       "//remoting/protocol:test_support", | 
 |       "//third_party/webrtc_overrides:webrtc_component", | 
 |     ] | 
 |  | 
 |     public_deps = [ | 
 |       "//remoting/host:test_support", | 
 |       "//testing/gmock", | 
 |     ] | 
 |   } | 
 |  | 
 |   executable("it2me_standalone_host_main") { | 
 |     testonly = true | 
 |     defines = [] | 
 |     libs = [] | 
 |  | 
 |     sources = [ "it2me_standalone_host_main.cc" ] | 
 |  | 
 |     deps = [ | 
 |       ":it2me_standalone_host", | 
 |       "//remoting/host:resources", | 
 |     ] | 
 |  | 
 |     if (is_linux && remoting_use_x11) { | 
 |       deps += [ | 
 |         "//build/config/linux/gtk", | 
 |         "//ui/events/platform/x11", | 
 |       ] | 
 |     } | 
 |  | 
 |     if (is_win) { | 
 |       defines += [ "_ALT_NO_EXCEPTIONS" ] | 
 |       deps += [ "//remoting/host/win:dpi_aware_exe_manifest" ] | 
 |       libs += [ | 
 |         "rpcrt4.lib", | 
 |         "wtsapi32.lib", | 
 |       ] | 
 |     } | 
 |   } | 
 |  | 
 |   # A binary with a specific version of EvaluateCapabilityLocally() for test | 
 |   # purpose only. | 
 |   executable("capability_test_stub") { | 
 |     testonly = true | 
 |     sources = [ "capability_test_stub_main.cc" ] | 
 |  | 
 |     deps = [ | 
 |       "//base", | 
 |       "//remoting/host/base", | 
 |     ] | 
 |   } | 
 | } | 
 |  | 
 | if (enable_me2me_host && is_linux) { | 
 |   # A binary for testing and fiddling the SessionAuthz service. | 
 |   executable("session_authz_playground") { | 
 |     testonly = true | 
 |     sources = [ | 
 |       "session_authz_playground.cc", | 
 |       "session_authz_playground.h", | 
 |       "session_authz_playground_main.cc", | 
 |     ] | 
 |     deps = [ | 
 |       ":test_support", | 
 |       "//mojo/core/embedder", | 
 |       "//remoting/base", | 
 |       "//remoting/base:authorization", | 
 |       "//remoting/base:logging", | 
 |       "//remoting/host", | 
 |       "//remoting/proto:internal_structs", | 
 |       "//services/network:network_service", | 
 |     ] | 
 |   } | 
 |  | 
 |   # A binary for testing the Corp messaging service. | 
 |   executable("corp_messaging_playground") { | 
 |     testonly = true | 
 |     sources = [ | 
 |       "corp_messaging_playground.cc", | 
 |       "corp_messaging_playground.h", | 
 |       "corp_messaging_playground_main.cc", | 
 |       "ping_pong_helper.cc", | 
 |       "ping_pong_helper.h", | 
 |     ] | 
 |     deps = [ | 
 |       "//mojo/core/embedder", | 
 |       "//net", | 
 |       "//remoting/base", | 
 |       "//remoting/signaling", | 
 |       "//services/network:network_service", | 
 |       "//services/network/public/cpp", | 
 |     ] | 
 |   } | 
 | } |