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
3 # found in the LICENSE file.
8 # GN version: //remoting:test_support
9 'target_name': 'remoting_test_support',
10 'type': 'static_library',
12 '../base/base.gyp:base',
13 '../components/components.gyp:policy_component_test_support',
14 '../net/net.gyp:net_test_support',
15 '../testing/gmock.gyp:gmock',
16 '../testing/gtest.gyp:gtest',
24 # Note: sources list duplicated in GN build.
25 'host/fake_desktop_capturer.cc',
26 'host/fake_desktop_capturer.h',
27 'host/fake_desktop_environment.cc',
28 'host/fake_desktop_environment.h',
29 'host/fake_host_extension.cc',
30 'host/fake_host_extension.h',
31 'host/fake_host_status_monitor.h',
32 'host/fake_mouse_cursor_monitor.cc',
33 'host/fake_mouse_cursor_monitor.h',
34 'host/fake_oauth_token_getter.cc',
35 'host/fake_oauth_token_getter.h',
36 'protocol/fake_authenticator.cc',
37 'protocol/fake_authenticator.h',
38 'protocol/fake_connection_to_host.cc',
39 'protocol/fake_connection_to_host.h',
40 'protocol/fake_datagram_socket.cc',
41 'protocol/fake_datagram_socket.h',
42 'protocol/fake_session.cc',
43 'protocol/fake_session.h',
44 'protocol/fake_stream_socket.cc',
45 'protocol/fake_stream_socket.h',
46 'protocol/protocol_mock_objects.cc',
47 'protocol/protocol_mock_objects.h',
48 'protocol/test_event_matchers.h',
49 'signaling/fake_signal_strategy.cc',
50 'signaling/fake_signal_strategy.h',
51 'signaling/mock_signal_strategy.cc',
52 'signaling/mock_signal_strategy.h',
53 'test/access_token_fetcher.cc',
54 'test/access_token_fetcher.h',
55 'test/app_remoting_report_issue_request.cc',
56 'test/app_remoting_report_issue_request.h',
57 'test/app_remoting_service_urls.cc',
58 'test/app_remoting_service_urls.h',
59 'test/chromoting_test_driver_environment.cc',
60 'test/chromoting_test_driver_environment.h',
61 'test/connection_setup_info.cc',
62 'test/connection_setup_info.h',
63 'test/connection_time_observer.cc',
64 'test/connection_time_observer.h',
65 'test/fake_access_token_fetcher.cc',
66 'test/fake_access_token_fetcher.h',
67 'test/fake_app_remoting_report_issue_request.cc',
68 'test/fake_app_remoting_report_issue_request.h',
69 'test/fake_host_list_fetcher.cc',
70 'test/fake_host_list_fetcher.h',
71 'test/fake_network_dispatcher.cc',
72 'test/fake_network_dispatcher.h',
73 'test/fake_network_manager.cc',
74 'test/fake_network_manager.h',
75 'test/fake_port_allocator.cc',
76 'test/fake_port_allocator.h',
77 'test/fake_refresh_token_store.cc',
78 'test/fake_refresh_token_store.h',
79 'test/fake_remote_host_info_fetcher.cc',
80 'test/fake_remote_host_info_fetcher.h',
81 'test/fake_socket_factory.cc',
82 'test/fake_socket_factory.h',
85 'test/host_list_fetcher.cc',
86 'test/host_list_fetcher.h',
87 'test/leaky_bucket.cc',
88 'test/leaky_bucket.h',
89 'test/mock_access_token_fetcher.cc',
90 'test/mock_access_token_fetcher.h',
91 'test/refresh_token_store.cc',
92 'test/refresh_token_store.h',
93 'test/remote_application_details.h',
94 'test/remote_connection_observer.h',
95 'test/remote_host_info.cc',
96 'test/remote_host_info.h',
97 'test/remote_host_info_fetcher.cc',
98 'test/remote_host_info_fetcher.h',
101 'test/test_chromoting_client.cc',
102 'test/test_chromoting_client.h',
103 'test/test_video_renderer.cc',
104 'test/test_video_renderer.h',
105 'test/video_frame_writer.cc',
106 'test/video_frame_writer.h',
109 ['enable_remoting_host == 0', {
114 ['exclude', '^host/'],
120 'target_name': 'chromoting_test_driver',
121 'type': '<(gtest_target_type)',
123 '../remoting/proto/chromotocol.gyp:chromotocol_proto_lib',
124 '../testing/gtest.gyp:gtest',
125 'remoting_test_support',
128 'test/chromoting_test_driver.cc',
129 'test/chromoting_test_driver_tests.cc',
130 'test/chromoting_test_fixture.cc',
131 'test/chromoting_test_fixture.h',
133 }, # end of target 'chromoting_test_driver'
135 'target_name': 'ar_test_driver_common',
136 'type': 'static_library',
138 '../remoting/proto/chromotocol.gyp:chromotocol_proto_lib',
139 '../testing/gtest.gyp:gtest',
140 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
141 'remoting_test_support',
144 'test/app_remoting_connected_client_fixture.cc',
145 'test/app_remoting_connected_client_fixture.h',
146 'test/app_remoting_connection_helper.cc',
147 'test/app_remoting_connection_helper.h',
148 'test/app_remoting_latency_test_fixture.cc',
149 'test/app_remoting_latency_test_fixture.h',
150 'test/app_remoting_test_driver_environment.cc',
151 'test/app_remoting_test_driver_environment.h',
153 }, # end of target 'ar_test_driver_common'
155 # An external version of the test driver tool which includes minimal tests
156 'target_name': 'ar_sample_test_driver',
157 'type': '<(gtest_target_type)',
159 'ar_test_driver_common',
160 '../testing/gtest.gyp:gtest',
163 'test/app_remoting_test_driver.cc',
164 'test/app_remoting_sample_test_driver_environment.cc',
166 }, # end of target 'ar_sample_test_driver'
168 # Remoting unit tests
170 # GN version: //remoting:remoting_unittests
171 # Note that many of the sources are broken out into subdir-specific unit
172 # test source set targets that then GN version then brings together.
173 'target_name': 'remoting_unittests',
174 'type': '<(gtest_target_type)',
176 '../base/base.gyp:base',
177 '../base/base.gyp:base_i18n',
178 '../base/base.gyp:test_support_base',
179 '../components/components.gyp:policy',
180 '../ipc/ipc.gyp:ipc',
181 '../net/net.gyp:net_test_support',
182 '../ppapi/ppapi.gyp:ppapi_cpp',
183 '../testing/gmock.gyp:gmock',
184 '../testing/gtest.gyp:gtest',
185 '../third_party/libyuv/libyuv.gyp:libyuv',
186 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
187 '../ui/base/ui_base.gyp:ui_base',
188 '../ui/gfx/gfx.gyp:gfx',
189 '../ui/gfx/gfx.gyp:gfx_geometry',
190 'ar_test_driver_common',
195 'remoting_host_setup_base',
196 'remoting_it2me_host_static',
197 'remoting_native_messaging_base',
199 'remoting_resources',
200 'remoting_test_support',
203 'VERSION=<(version_full)',
206 '../testing/gmock/include',
209 # Note: sources list duplicated in GN build.
210 'base/auto_thread_task_runner_unittest.cc',
211 'base/auto_thread_unittest.cc',
212 'base/breakpad_win_unittest.cc',
213 'base/buffered_socket_writer_unittest.cc',
214 'base/capabilities_unittest.cc',
215 'base/compound_buffer_unittest.cc',
216 'base/rate_counter_unittest.cc',
217 'base/rsa_key_pair_unittest.cc',
218 'base/run_all_unittests.cc',
219 'base/running_average_unittest.cc',
220 'base/test_rsa_key_pair.h',
221 'base/typed_buffer_unittest.cc',
222 'base/util_unittest.cc',
223 'client/audio_player_unittest.cc',
224 'client/client_status_logger_unittest.cc',
225 'client/empty_cursor_filter_unittest.cc',
226 'client/key_event_mapper_unittest.cc',
227 'client/normalizing_input_filter_cros_unittest.cc',
228 'client/normalizing_input_filter_mac_unittest.cc',
229 'client/server_log_entry_client_unittest.cc',
230 'client/software_video_renderer_unittest.cc',
231 'client/touch_input_scaler_unittest.cc',
232 'codec/audio_encoder_opus_unittest.cc',
233 'codec/codec_test.cc',
234 'codec/codec_test.h',
235 'codec/video_decoder_vpx_unittest.cc',
236 'codec/video_encoder_helper_unittest.cc',
237 'codec/video_encoder_verbatim_unittest.cc',
238 'codec/video_encoder_vpx_unittest.cc',
239 'host/audio_pump_unittest.cc',
240 'host/audio_silence_detector_unittest.cc',
241 'host/backoff_timer_unittest.cc',
244 'host/capture_scheduler_unittest.cc',
245 'host/chromeos/aura_desktop_capturer_unittest.cc',
246 'host/chromeos/clipboard_aura_unittest.cc',
247 'host/chromoting_host_context_unittest.cc',
248 'host/chromoting_host_unittest.cc',
249 'host/client_session_unittest.cc',
250 'host/config_file_watcher_unittest.cc',
251 'host/daemon_process_unittest.cc',
252 'host/desktop_process_unittest.cc',
253 'host/desktop_shape_tracker_unittest.cc',
254 'host/gcd_rest_client_unittest.cc',
255 'host/gcd_state_updater_unittest.cc',
256 'host/gnubby_auth_handler_posix_unittest.cc',
257 'host/heartbeat_sender_unittest.cc',
258 'host/host_change_notification_listener_unittest.cc',
259 'host/host_config_unittest.cc',
260 'host/host_extension_session_manager_unittest.cc',
261 'host/host_mock_objects.cc',
262 'host/host_status_logger_unittest.cc',
263 'host/ipc_desktop_environment_unittest.cc',
264 'host/it2me/it2me_confirmation_dialog_proxy_unittest.cc',
265 'host/it2me/it2me_native_messaging_host_unittest.cc',
266 'host/linux/audio_pipe_reader_unittest.cc',
267 'host/linux/unicode_to_keysym_unittest.cc',
268 'host/linux/x_server_clipboard_unittest.cc',
269 'host/local_input_monitor_unittest.cc',
270 'host/mouse_shape_pump_unittest.cc',
271 'host/native_messaging/native_messaging_reader_unittest.cc',
272 'host/native_messaging/native_messaging_writer_unittest.cc',
273 'host/pairing_registry_delegate_linux_unittest.cc',
274 'host/pairing_registry_delegate_win_unittest.cc',
275 'host/pin_hash_unittest.cc',
276 'host/policy_watcher_unittest.cc',
277 'host/register_support_host_request_unittest.cc',
278 'host/remote_input_filter_unittest.cc',
279 'host/resizing_host_observer_unittest.cc',
280 'host/resources_unittest.cc',
281 'host/screen_resolution_unittest.cc',
282 'host/server_log_entry_host_unittest.cc',
283 'host/setup/me2me_native_messaging_host.cc',
284 'host/setup/me2me_native_messaging_host.h',
285 'host/setup/me2me_native_messaging_host_unittest.cc',
286 'host/setup/mock_oauth_client.cc',
287 'host/setup/mock_oauth_client.h',
288 'host/setup/oauth_helper_unittest.cc',
289 'host/setup/pin_validator_unittest.cc',
290 'host/shaped_desktop_capturer_unittest.cc',
291 'host/third_party_auth_config_unittest.cc',
292 'host/token_validator_factory_impl_unittest.cc',
293 'host/touch_injector_win_unittest.cc',
294 'host/video_frame_pump_unittest.cc',
295 'host/video_frame_recorder_unittest.cc',
296 'host/win/rdp_client_unittest.cc',
297 'host/win/worker_process_launcher.cc',
298 'host/win/worker_process_launcher.h',
299 'host/win/worker_process_launcher_unittest.cc',
300 'protocol/authenticator_test_base.cc',
301 'protocol/authenticator_test_base.h',
302 'protocol/channel_multiplexer_unittest.cc',
303 'protocol/channel_socket_adapter_unittest.cc',
304 'protocol/chromium_socket_factory_unittest.cc',
305 'protocol/client_video_dispatcher_unittest.cc',
306 'protocol/clipboard_echo_filter_unittest.cc',
307 'protocol/clipboard_filter_unittest.cc',
308 'protocol/connection_tester.cc',
309 'protocol/connection_tester.h',
310 'protocol/connection_to_client_unittest.cc',
311 'protocol/content_description_unittest.cc',
312 'protocol/input_event_tracker_unittest.cc',
313 'protocol/input_filter_unittest.cc',
314 'protocol/jingle_messages_unittest.cc',
315 'protocol/jingle_session_unittest.cc',
316 'protocol/message_decoder_unittest.cc',
317 'protocol/message_reader_unittest.cc',
318 'protocol/monitored_video_stub_unittest.cc',
319 'protocol/mouse_input_filter_unittest.cc',
320 'protocol/quic_channel_factory_unittest.cc',
321 'protocol/negotiating_authenticator_unittest.cc',
322 'protocol/pairing_registry_unittest.cc',
323 'protocol/port_range_unittest.cc',
324 'protocol/ppapi_module_stub.cc',
325 'protocol/pseudotcp_adapter_unittest.cc',
326 'protocol/ssl_hmac_channel_authenticator_unittest.cc',
327 'protocol/third_party_authenticator_unittest.cc',
328 'protocol/v2_authenticator_unittest.cc',
329 'signaling/iq_sender_unittest.cc',
330 'signaling/jid_util_unittest.cc',
331 'signaling/log_to_server_unittest.cc',
332 'signaling/push_notification_subscriber_unittest.cc',
333 'signaling/server_log_entry_unittest.cc',
334 'signaling/server_log_entry_unittest.h',
335 'signaling/xmpp_login_handler_unittest.cc',
336 'signaling/xmpp_stream_parser_unittest.cc',
337 'signaling/xmpp_signal_strategy_unittest.cc',
338 'test/access_token_fetcher_unittest.cc',
339 'test/app_remoting_report_issue_request_unittest.cc',
340 'test/app_remoting_test_driver_environment_unittest.cc',
341 'test/chromoting_test_driver_environment_unittest.cc',
342 'test/connection_time_observer_unittest.cc',
343 'test/host_list_fetcher_unittest.cc',
344 'test/remote_host_info_fetcher_unittest.cc',
345 'test/test_chromoting_client_unittest.cc',
346 'test/test_video_renderer_unittest.cc',
351 '_ATL_NO_EXCEPTIONS',
365 '../testing/android/native_test.gyp:native_test_native_code',
370 'host/chromeos/aura_desktop_capturer_unittest.cc',
371 'host/clipboard_aura_unittest.cc',
375 'host/linux/x_server_clipboard_unittest.cc',
376 'host/local_input_monitor_unittest.cc',
381 'host/local_input_monitor_unittest.cc',
384 ['enable_remoting_host == 0', {
387 'remoting_host_setup_base',
388 'remoting_it2me_host_static',
389 'remoting_native_messaging_base',
392 ['exclude', '^codec/'],
393 ['exclude', '^host/'],
396 [ 'OS == "linux" and use_allocator!="none"', {
398 '../base/allocator/allocator.gyp:allocator',
401 ], # end of 'conditions'
402 }, # end of target 'remoting_unittests'
404 # GN version: //remoting/webapp:browser_test_resources
405 'target_name': 'remoting_browser_test_resources',
409 'destination': '<(PRODUCT_DIR)/remoting/browser_test_resources',
411 '<@(remoting_webapp_browsertest_main_html_extra_files)',
415 }, # end of target 'remoting_browser_test_resources'
417 'target_name': 'remoting_webapp_browser_test_main_html',
421 'action_name': 'Build Remoting Webapp Browser test main.html',
423 'webapp/build-html.py',
424 '<(remoting_webapp_template_main)',
425 '<@(remoting_webapp_template_files)',
426 '<@(remoting_webapp_crd_main_html_all_js_files)',
427 '<@(remoting_webapp_browsertest_main_html_extra_files)',
430 '<(SHARED_INTERMEDIATE_DIR)/browser_test/main.html',
433 'python', 'webapp/build-html.py',
434 '<(SHARED_INTERMEDIATE_DIR)/browser_test/main.html',
435 '<(remoting_webapp_template_main)',
436 '--template-dir', '<(DEPTH)/remoting',
437 '--templates', '<@(remoting_webapp_template_files)',
439 '<@(remoting_webapp_crd_main_html_all_js_files)',
440 '<@(remoting_webapp_browsertest_main_html_extra_files)',
444 }, # end of target 'remoting_webapp_browser_test_html'
446 # GN version: //remoting/webapp:unit_tests
447 'target_name': 'remoting_webapp_unittests',
450 'output_dir': '<(PRODUCT_DIR)/remoting/unittests',
452 '<@(remoting_webapp_unittest_html_all_js_files)',
453 '<@(remoting_webapp_wcs_sandbox_html_js_files)',
454 '<@(remoting_webapp_background_html_js_files)',
459 # GN version: //remoting/webapp:qunit
460 'destination': '<(output_dir)/qunit',
462 '../third_party/qunit/src/browser_test_harness.js',
463 '../third_party/qunit/src/qunit.css',
464 '../third_party/qunit/src/qunit.js',
468 # GN version: //remoting/webapp:blanketjs
469 'destination': '<(output_dir)/blanketjs',
471 '../third_party/blanketjs/src/blanket.js',
472 '../third_party/blanketjs/src/qunit_adapter.js',
476 # GN version: //remoting/webapp:sinonjs
477 'destination': '<(output_dir)/sinonjs',
479 '../third_party/sinonjs/src/sinon.js',
480 '../third_party/sinonjs/src/sinon-qunit.js',
484 # GN version: //remoting/webapp:js_files
485 'destination': '<(output_dir)',
487 '<@(webapp_js_files)',
488 '<@(remoting_webapp_unittests_all_files)',
494 'action_name': 'Build Remoting Webapp unittests.html',
496 'webapp/build-html.py',
497 '<(remoting_webapp_unittests_template_main)',
498 '<@(webapp_js_files)',
499 '<@(remoting_webapp_unittests_all_js_files)'
502 '<(output_dir)/unittests.html',
505 'python', 'webapp/build-html.py',
507 '<(remoting_webapp_unittests_template_main)',
508 # GYP automatically removes subsequent duplicated command line
509 # arguments. Therefore, the excludejs flag must be set before the
510 # instrumentedjs flag or else GYP will ignore the files in the
512 '--exclude-js', '<@(remoting_webapp_unittests_exclude_js_files)',
513 '--js', '<@(remoting_webapp_unittests_all_js_files)',
514 '--instrument-js', '<@(webapp_js_files)',
518 }, # end of target 'remoting_webapp_unittest'
522 ['enable_remoting_host==1', {
524 # Remoting performance tests
526 'target_name': 'remoting_perftests',
527 'type': '<(gtest_target_type)',
529 '../base/base.gyp:base',
530 '../base/base.gyp:test_support_base',
531 '../testing/gtest.gyp:gtest',
532 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
533 '../third_party/libjingle/libjingle.gyp:libjingle',
535 'remoting_test_support',
538 'VERSION=<(version_full)',
541 '../testing/gmock/include',
544 'base/run_all_unittests.cc',
545 'codec/codec_test.cc',
546 'codec/codec_test.h',
547 'codec/video_encoder_vpx_perftest.cc',
548 'test/protocol_perftest.cc',
551 [ 'OS=="mac" or (OS=="linux" and chromeos==0)', {
552 # RunAllTests calls chrome::RegisterPathProvider() under Mac and
553 # Linux, so we need the chrome_common.gypi dependency.
555 '../chrome/common_constants.gyp:common_constants',
560 '../testing/android/native_test.gyp:native_test_native_code',
563 [ 'OS == "linux" and use_allocator!="none"', {
565 '../base/allocator/allocator.gyp:allocator',
568 ], # end of 'conditions'
569 }, # end of target 'remoting_perftests'
571 }], # end of 'enable_remoting_host'
572 ['disable_nacl==0 and disable_nacl_untrusted==0', {
575 'target_name': 'remoting_webapp_browser_test',
578 'output_dir': '<(PRODUCT_DIR)/remoting/remoting.webapp.browsertest.v2',
579 'zip_path': '<(PRODUCT_DIR)/remoting-webapp.browsertest.v2.zip',
581 'main_html_file': '<(SHARED_INTERMEDIATE_DIR)/browser_test/main.html',
583 'webapp/crd/remoting_client_pnacl.nmf.jinja2',
584 '<(PRODUCT_DIR)/remoting_client_plugin_newlib.pexe',
585 '<@(remoting_webapp_browsertest_main_html_extra_files)',
589 'remoting_nacl.gyp:remoting_client_plugin_nacl',
590 'remoting_webapp_browser_test_main_html',
592 'includes': [ 'remoting_webapp.gypi', ],
593 }, # end of target 'remoting_webapp_browser_test'
596 ['test_isolation_mode != "noop"', {
599 'target_name': 'remoting_unittests_run',
602 'remoting_unittests',
605 '../build/isolate.gypi',
608 'remoting_unittests.isolate',
613 ] # end of 'conditions'