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_common',
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_status_monitor.h',
30 'host/fake_mouse_cursor_monitor.cc',
31 'host/fake_mouse_cursor_monitor.h',
32 'protocol/fake_authenticator.cc',
33 'protocol/fake_authenticator.h',
34 'protocol/fake_connection_to_host.cc',
35 'protocol/fake_connection_to_host.h',
36 'protocol/fake_datagram_socket.cc',
37 'protocol/fake_datagram_socket.h',
38 'protocol/fake_session.cc',
39 'protocol/fake_session.h',
40 'protocol/fake_stream_socket.cc',
41 'protocol/fake_stream_socket.h',
42 'protocol/protocol_mock_objects.cc',
43 'protocol/protocol_mock_objects.h',
44 'protocol/test_event_matchers.h',
45 'signaling/fake_signal_strategy.cc',
46 'signaling/fake_signal_strategy.h',
47 'signaling/mock_signal_strategy.cc',
48 'signaling/mock_signal_strategy.h',
49 'test/access_token_fetcher.cc',
50 'test/access_token_fetcher.h',
51 'test/app_remoting_report_issue_request.cc',
52 'test/app_remoting_report_issue_request.h',
53 'test/app_remoting_service_urls.cc',
54 'test/app_remoting_service_urls.h',
55 'test/app_remoting_test_driver_environment.cc',
56 'test/app_remoting_test_driver_environment_app_details.cc',
57 'test/app_remoting_test_driver_environment.h',
60 'test/host_list_fetcher.cc',
61 'test/host_list_fetcher.h',
62 'test/fake_access_token_fetcher.cc',
63 'test/fake_access_token_fetcher.h',
64 'test/fake_app_remoting_report_issue_request.cc',
65 'test/fake_app_remoting_report_issue_request.h',
66 'test/fake_network_dispatcher.cc',
67 'test/fake_network_dispatcher.h',
68 'test/fake_network_manager.cc',
69 'test/fake_network_manager.h',
70 'test/fake_port_allocator.cc',
71 'test/fake_port_allocator.h',
72 'test/fake_remote_host_info_fetcher.cc',
73 'test/fake_remote_host_info_fetcher.h',
74 'test/fake_socket_factory.cc',
75 'test/fake_socket_factory.h',
76 'test/leaky_bucket.cc',
77 'test/leaky_bucket.h',
78 'test/mock_access_token_fetcher.cc',
79 'test/mock_access_token_fetcher.h',
80 'test/refresh_token_store.cc',
81 'test/refresh_token_store.h',
82 'test/remote_application_details.h',
83 'test/remote_connection_observer.h',
84 'test/remote_host_info.cc',
85 'test/remote_host_info.h',
86 'test/remote_host_info_fetcher.cc',
87 'test/remote_host_info_fetcher.h',
88 'test/test_chromoting_client.cc',
89 'test/test_chromoting_client.h',
90 'test/test_video_renderer.cc',
91 'test/test_video_renderer.h',
94 ['enable_remoting_host == 0', {
99 ['exclude', '^host/'],
105 'target_name': 'remoting_test_driver_common',
106 'type': 'static_library',
108 '../base/base.gyp:base',
109 '../base/base.gyp:test_support_base',
110 '../google_apis/google_apis.gyp:google_apis',
111 '../net/net.gyp:net',
112 '../remoting/remoting.gyp:remoting_base',
113 '../remoting/remoting.gyp:remoting_client',
114 '../remoting/remoting.gyp:remoting_protocol',
115 '../testing/gtest.gyp:gtest',
118 'VERSION=<(version_full)',
121 'test/access_token_fetcher.cc',
122 'test/access_token_fetcher.h',
123 'test/refresh_token_store.cc',
124 'test/refresh_token_store.h',
125 'test/remote_connection_observer.h',
126 'test/test_chromoting_client.cc',
127 'test/test_chromoting_client.h',
128 'test/test_video_renderer.cc',
129 'test/test_video_renderer.h',
131 }, # end of target 'remoting_test_driver_common'
133 # A chromoting version of remoting_test_driver_common
134 'target_name': 'chromoting_test_driver',
135 'type': '<(gtest_target_type)',
137 'remoting_test_driver_common',
140 'VERSION=<(version_full)',
145 'test/host_list_fetcher.cc',
146 'test/host_list_fetcher.h',
147 'test/chromoting_test_driver.cc',
150 '../testing/gtest/include',
152 }, # end of target 'chromoting_test_driver'
154 'target_name': 'ar_test_driver_common',
155 'type': 'static_library',
157 '../remoting/proto/chromotocol.gyp:chromotocol_proto_lib',
158 '<(DEPTH)/third_party/webrtc/modules/modules.gyp:desktop_capture',
159 'remoting_test_driver_common',
162 'VERSION=<(version_full)',
165 'test/app_remoting_connected_client_fixture.cc',
166 'test/app_remoting_connected_client_fixture.h',
167 'test/app_remoting_connection_helper.cc',
168 'test/app_remoting_connection_helper.h',
169 'test/app_remoting_latency_test_fixture.cc',
170 'test/app_remoting_latency_test_fixture.h',
171 'test/app_remoting_report_issue_request.cc',
172 'test/app_remoting_report_issue_request.h',
173 'test/app_remoting_service_urls.cc',
174 'test/app_remoting_service_urls.h',
175 'test/app_remoting_test_driver_environment.cc',
176 'test/app_remoting_test_driver_environment.h',
177 'test/remote_application_details.h',
178 'test/remote_host_info.cc',
179 'test/remote_host_info.h',
180 'test/remote_host_info_fetcher.cc',
181 'test/remote_host_info_fetcher.h',
184 '../testing/gtest/include',
186 }, # end of target 'ar_test_driver_common'
188 # An external version of the test driver tool which includes minimal tests
189 'target_name': 'ar_sample_test_driver',
190 'type': '<(gtest_target_type)',
192 'ar_test_driver_common',
195 'VERSION=<(version_full)',
198 'test/app_remoting_test_driver.cc',
199 'test/app_remoting_test_driver_environment_app_details.cc',
202 '../testing/gtest/include',
204 }, # end of target 'ar_sample_test_driver'
206 # Remoting unit tests
208 # GN version: //remoting:remoting_unittests
209 # Note that many of the sources are broken out into subdir-specific unit
210 # test source set targets that then GN version then brings together.
211 'target_name': 'remoting_unittests',
212 'type': '<(gtest_target_type)',
214 '../base/base.gyp:base',
215 '../base/base.gyp:base_i18n',
216 '../base/base.gyp:test_support_base',
217 '../components/components.gyp:policy',
218 '../ipc/ipc.gyp:ipc',
219 '../net/net.gyp:net_test_support',
220 '../ppapi/ppapi.gyp:ppapi_cpp',
221 '../testing/gmock.gyp:gmock',
222 '../testing/gtest.gyp:gtest',
223 '../third_party/libyuv/libyuv.gyp:libyuv',
224 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
225 '../ui/base/ui_base.gyp:ui_base',
226 '../ui/gfx/gfx.gyp:gfx',
227 '../ui/gfx/gfx.gyp:gfx_geometry',
231 'remoting_client_plugin',
233 'remoting_host_setup_base',
234 'remoting_it2me_host_static',
235 'remoting_native_messaging_base',
237 'remoting_resources',
238 'remoting_test_common',
241 'VERSION=<(version_full)',
244 '../testing/gmock/include',
247 # Note: sources list duplicated in GN build.
248 'base/auto_thread_task_runner_unittest.cc',
249 'base/auto_thread_unittest.cc',
250 'base/breakpad_win_unittest.cc',
251 'base/buffered_socket_writer_unittest.cc',
252 'base/capabilities_unittest.cc',
253 'base/compound_buffer_unittest.cc',
254 'base/rate_counter_unittest.cc',
255 'base/resources_unittest.cc',
256 'base/rsa_key_pair_unittest.cc',
257 'base/run_all_unittests.cc',
258 'base/running_average_unittest.cc',
259 'base/test_rsa_key_pair.h',
260 'base/typed_buffer_unittest.cc',
261 'base/util_unittest.cc',
262 'client/audio_player_unittest.cc',
263 'client/client_status_logger_unittest.cc',
264 'client/key_event_mapper_unittest.cc',
265 'client/plugin/empty_cursor_filter_unittest.cc',
266 'client/plugin/normalizing_input_filter_cros_unittest.cc',
267 'client/plugin/normalizing_input_filter_mac_unittest.cc',
268 'client/plugin/touch_input_scaler_unittest.cc',
269 'client/server_log_entry_client_unittest.cc',
270 'codec/audio_encoder_opus_unittest.cc',
271 'codec/codec_test.cc',
272 'codec/codec_test.h',
273 'codec/video_decoder_vpx_unittest.cc',
274 'codec/video_encoder_helper_unittest.cc',
275 'codec/video_encoder_verbatim_unittest.cc',
276 'codec/video_encoder_vpx_unittest.cc',
277 'host/audio_pump_unittest.cc',
278 'host/audio_silence_detector_unittest.cc',
279 'host/backoff_timer_unittest.cc',
282 'host/capture_scheduler_unittest.cc',
283 'host/chromeos/aura_desktop_capturer_unittest.cc',
284 'host/chromeos/clipboard_aura_unittest.cc',
285 'host/chromoting_host_context_unittest.cc',
286 'host/chromoting_host_unittest.cc',
287 'host/client_session_unittest.cc',
288 'host/config_file_watcher_unittest.cc',
289 'host/daemon_process_unittest.cc',
290 'host/desktop_process_unittest.cc',
291 'host/desktop_shape_tracker_unittest.cc',
292 'host/fake_desktop_capturer.cc',
293 'host/fake_desktop_capturer.h',
294 'host/fake_host_extension.cc',
295 'host/fake_host_extension.h',
296 'host/fake_host_status_monitor.h',
297 'host/fake_oauth_token_getter.cc',
298 'host/fake_oauth_token_getter.h',
299 'host/gcd_rest_client_unittest.cc',
300 'host/gcd_state_updater_unittest.cc',
301 'host/gnubby_auth_handler_posix_unittest.cc',
302 'host/heartbeat_sender_unittest.cc',
303 'host/host_change_notification_listener_unittest.cc',
304 'host/host_config_unittest.cc',
305 'host/host_extension_session_manager_unittest.cc',
306 'host/host_mock_objects.cc',
307 'host/host_status_logger_unittest.cc',
308 'host/ipc_desktop_environment_unittest.cc',
309 'host/it2me/it2me_confirmation_dialog_proxy_unittest.cc',
310 'host/it2me/it2me_native_messaging_host_unittest.cc',
311 'host/linux/audio_pipe_reader_unittest.cc',
312 'host/linux/unicode_to_keysym_unittest.cc',
313 'host/linux/x_server_clipboard_unittest.cc',
314 'host/local_input_monitor_unittest.cc',
315 'host/mouse_shape_pump_unittest.cc',
316 'host/native_messaging/native_messaging_reader_unittest.cc',
317 'host/native_messaging/native_messaging_writer_unittest.cc',
318 'host/pairing_registry_delegate_linux_unittest.cc',
319 'host/pairing_registry_delegate_win_unittest.cc',
320 'host/pin_hash_unittest.cc',
321 'host/policy_watcher_unittest.cc',
322 'host/register_support_host_request_unittest.cc',
323 'host/remote_input_filter_unittest.cc',
324 'host/resizing_host_observer_unittest.cc',
325 'host/screen_resolution_unittest.cc',
326 'host/server_log_entry_host_unittest.cc',
327 'host/setup/mock_oauth_client.cc',
328 'host/setup/mock_oauth_client.h',
329 'host/setup/me2me_native_messaging_host.cc',
330 'host/setup/me2me_native_messaging_host.h',
331 'host/setup/me2me_native_messaging_host_unittest.cc',
332 'host/setup/mock_oauth_client.cc',
333 'host/setup/mock_oauth_client.h',
334 'host/setup/oauth_helper_unittest.cc',
335 'host/setup/pin_validator_unittest.cc',
336 'host/shaped_desktop_capturer_unittest.cc',
337 'host/third_party_auth_config_unittest.cc',
338 'host/token_validator_factory_impl_unittest.cc',
339 'host/touch_injector_win_unittest.cc',
340 'host/video_frame_pump_unittest.cc',
341 'host/video_frame_recorder_unittest.cc',
342 'host/win/rdp_client_unittest.cc',
343 'host/win/worker_process_launcher.cc',
344 'host/win/worker_process_launcher.h',
345 'host/win/worker_process_launcher_unittest.cc',
346 'protocol/authenticator_test_base.cc',
347 'protocol/authenticator_test_base.h',
348 'protocol/channel_multiplexer_unittest.cc',
349 'protocol/channel_socket_adapter_unittest.cc',
350 'protocol/chromium_socket_factory_unittest.cc',
351 'protocol/client_video_dispatcher_unittest.cc',
352 'protocol/clipboard_echo_filter_unittest.cc',
353 'protocol/clipboard_filter_unittest.cc',
354 'protocol/connection_tester.cc',
355 'protocol/connection_tester.h',
356 'protocol/connection_to_client_unittest.cc',
357 'protocol/content_description_unittest.cc',
358 'protocol/input_event_tracker_unittest.cc',
359 'protocol/input_filter_unittest.cc',
360 'protocol/jingle_messages_unittest.cc',
361 'protocol/jingle_session_unittest.cc',
362 'protocol/message_decoder_unittest.cc',
363 'protocol/message_reader_unittest.cc',
364 'protocol/monitored_video_stub_unittest.cc',
365 'protocol/mouse_input_filter_unittest.cc',
366 'protocol/negotiating_authenticator_unittest.cc',
367 'protocol/pairing_registry_unittest.cc',
368 'protocol/port_range_unittest.cc',
369 'protocol/ppapi_module_stub.cc',
370 'protocol/pseudotcp_adapter_unittest.cc',
371 'protocol/ssl_hmac_channel_authenticator_unittest.cc',
372 'protocol/third_party_authenticator_unittest.cc',
373 'protocol/v2_authenticator_unittest.cc',
374 'signaling/iq_sender_unittest.cc',
375 'signaling/jid_util_unittest.cc',
376 'signaling/log_to_server_unittest.cc',
377 'signaling/push_notification_subscriber_unittest.cc',
378 'signaling/server_log_entry_unittest.cc',
379 'signaling/server_log_entry_unittest.h',
380 'signaling/xmpp_login_handler_unittest.cc',
381 'signaling/xmpp_stream_parser_unittest.cc',
382 'signaling/xmpp_signal_strategy_unittest.cc',
383 'test/access_token_fetcher_unittest.cc',
384 'test/app_remoting_report_issue_request_unittest.cc',
385 'test/app_remoting_test_driver_environment_unittest.cc',
386 'test/host_list_fetcher_unittest.cc',
387 'test/remote_host_info_fetcher_unittest.cc',
388 'test/test_chromoting_client_unittest.cc',
389 'test/test_video_renderer_unittest.cc',
394 '_ATL_NO_EXCEPTIONS',
408 'remoting_client_plugin',
411 ['exclude', '^client/plugin/'],
416 '../testing/android/native_test.gyp:native_test_native_code',
421 'client/plugin/normalizing_input_filter_cros_unittest.cc',
422 'host/chromeos/aura_desktop_capturer_unittest.cc',
423 'host/clipboard_aura_unittest.cc',
427 'host/linux/x_server_clipboard_unittest.cc',
428 'host/local_input_monitor_unittest.cc',
433 'host/local_input_monitor_unittest.cc',
436 ['enable_remoting_host == 0', {
439 'remoting_host_setup_base',
440 'remoting_it2me_host_static',
441 'remoting_native_messaging_base',
444 ['exclude', '^codec/'],
445 ['exclude', '^host/'],
446 ['exclude', '^base/resources_unittest\\.cc$'],
449 [ 'OS == "linux" and use_allocator!="none"', {
451 '../base/allocator/allocator.gyp:allocator',
454 ], # end of 'conditions'
455 }, # end of target 'remoting_unittests'
457 'target_name': 'remoting_browser_test_resources',
461 'destination': '<(PRODUCT_DIR)/remoting/browser_test_resources',
463 '<@(remoting_webapp_browsertest_main_html_extra_files)',
467 }, # end of target 'remoting_browser_test_resources'
469 'target_name': 'remoting_webapp_browser_test_main_html',
473 'action_name': 'Build Remoting Webapp Browser test main.html',
475 'webapp/build-html.py',
476 '<(remoting_webapp_template_main)',
477 '<@(remoting_webapp_template_files)',
478 '<@(remoting_webapp_crd_main_html_all_js_files)',
479 '<@(remoting_webapp_browsertest_main_html_extra_files)',
482 '<(SHARED_INTERMEDIATE_DIR)/browser_test/main.html',
485 'python', 'webapp/build-html.py',
486 '<(SHARED_INTERMEDIATE_DIR)/browser_test/main.html',
487 '<(remoting_webapp_template_main)',
488 '--template-dir', '<(DEPTH)/remoting',
489 '--templates', '<@(remoting_webapp_template_files)',
491 '<@(remoting_webapp_crd_main_html_all_js_files)',
492 '<@(remoting_webapp_browsertest_main_html_extra_files)',
496 }, # end of target 'remoting_webapp_browser_test_html'
498 'target_name': 'remoting_webapp_unittests',
501 'output_dir': '<(PRODUCT_DIR)/remoting/unittests',
503 '<@(remoting_webapp_unittest_html_all_js_files)',
504 '<@(remoting_webapp_wcs_sandbox_html_js_files)',
505 '<@(remoting_webapp_background_html_js_files)',
510 'destination': '<(output_dir)/qunit',
512 '../third_party/qunit/src/browser_test_harness.js',
513 '../third_party/qunit/src/qunit.css',
514 '../third_party/qunit/src/qunit.js',
518 'destination': '<(output_dir)/blanketjs',
520 '../third_party/blanketjs/src/blanket.js',
521 '../third_party/blanketjs/src/qunit_adapter.js',
525 'destination': '<(output_dir)/sinonjs',
527 '../third_party/sinonjs/src/sinon.js',
528 '../third_party/sinonjs/src/sinon-qunit.js',
532 'destination': '<(output_dir)',
534 '<@(webapp_js_files)',
535 '<@(remoting_webapp_unittests_all_files)',
541 'action_name': 'Build Remoting Webapp unittests.html',
543 'webapp/build-html.py',
544 '<(remoting_webapp_unittests_template_main)',
545 '<@(webapp_js_files)',
546 '<@(remoting_webapp_unittests_all_js_files)'
549 '<(output_dir)/unittests.html',
552 'python', 'webapp/build-html.py',
554 '<(remoting_webapp_unittests_template_main)',
555 # GYP automatically removes subsequent duplicated command line
556 # arguments. Therefore, the excludejs flag must be set before the
557 # instrumentedjs flag or else GYP will ignore the files in the
559 '--exclude-js', '<@(remoting_webapp_unittests_exclude_js_files)',
560 '--js', '<@(remoting_webapp_unittests_all_js_files)',
561 '--instrument-js', '<@(webapp_js_files)',
565 }, # end of target 'remoting_webapp_unittest'
569 ['enable_remoting_host==1', {
571 # Remoting performance tests
573 'target_name': 'remoting_perftests',
574 'type': '<(gtest_target_type)',
576 '../base/base.gyp:base',
577 '../base/base.gyp:test_support_base',
578 '../testing/gtest.gyp:gtest',
579 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
580 '../third_party/libjingle/libjingle.gyp:libjingle',
582 'remoting_test_common',
585 'VERSION=<(version_full)',
588 '../testing/gmock/include',
591 'base/run_all_unittests.cc',
592 'codec/codec_test.cc',
593 'codec/codec_test.h',
594 'codec/video_encoder_vpx_perftest.cc',
595 'test/protocol_perftest.cc',
598 [ 'OS=="mac" or (OS=="linux" and chromeos==0)', {
599 # RunAllTests calls chrome::RegisterPathProvider() under Mac and
600 # Linux, so we need the chrome_common.gypi dependency.
602 '../chrome/common_constants.gyp:common_constants',
607 '../testing/android/native_test.gyp:native_test_native_code',
610 [ 'OS == "linux" and use_allocator!="none"', {
612 '../base/allocator/allocator.gyp:allocator',
615 ], # end of 'conditions'
616 }, # end of target 'remoting_perftests'
618 }], # end of 'enable_remoting_host'
619 ['disable_nacl==0 and disable_nacl_untrusted==0', {
622 'target_name': 'remoting_webapp_browser_test',
625 'output_dir': '<(PRODUCT_DIR)/remoting/remoting.webapp.browsertest.v2',
626 'zip_path': '<(PRODUCT_DIR)/remoting-webapp.browsertest.v2.zip',
627 'webapp_type': 'v2_pnacl',
628 'main_html_file': '<(SHARED_INTERMEDIATE_DIR)/browser_test/main.html',
630 'webapp/crd/remoting_client_pnacl.nmf.jinja2',
631 '<(PRODUCT_DIR)/remoting_client_plugin_newlib.pexe',
632 '<@(remoting_webapp_browsertest_main_html_extra_files)',
636 'remoting_nacl.gyp:remoting_client_plugin_nacl',
637 'remoting_webapp_browser_test_main_html',
639 'includes': [ 'remoting_webapp.gypi', ],
640 }, # end of target 'remoting_webapp_browser_test'
643 ['test_isolation_mode != "noop"', {
646 'target_name': 'remoting_unittests_run',
649 'remoting_unittests',
652 '../build/isolate.gypi',
655 'remoting_unittests.isolate',
660 ] # end of 'conditions'