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/fake_access_token_fetcher.cc',
64 'test/fake_access_token_fetcher.h',
65 'test/fake_app_remoting_report_issue_request.cc',
66 'test/fake_app_remoting_report_issue_request.h',
67 'test/fake_host_list_fetcher.cc',
68 'test/fake_host_list_fetcher.h',
69 'test/fake_network_dispatcher.cc',
70 'test/fake_network_dispatcher.h',
71 'test/fake_network_manager.cc',
72 'test/fake_network_manager.h',
73 'test/fake_port_allocator.cc',
74 'test/fake_port_allocator.h',
75 'test/fake_refresh_token_store.cc',
76 'test/fake_refresh_token_store.h',
77 'test/fake_remote_host_info_fetcher.cc',
78 'test/fake_remote_host_info_fetcher.h',
79 'test/fake_socket_factory.cc',
80 'test/fake_socket_factory.h',
83 'test/host_list_fetcher.cc',
84 'test/host_list_fetcher.h',
85 'test/leaky_bucket.cc',
86 'test/leaky_bucket.h',
87 'test/mock_access_token_fetcher.cc',
88 'test/mock_access_token_fetcher.h',
89 'test/refresh_token_store.cc',
90 'test/refresh_token_store.h',
91 'test/remote_application_details.h',
92 'test/remote_connection_observer.h',
93 'test/remote_host_info.cc',
94 'test/remote_host_info.h',
95 'test/remote_host_info_fetcher.cc',
96 'test/remote_host_info_fetcher.h',
97 'test/test_chromoting_client.cc',
98 'test/test_chromoting_client.h',
99 'test/test_video_renderer.cc',
100 'test/test_video_renderer.h',
103 ['enable_remoting_host == 0', {
108 ['exclude', '^host/'],
114 'target_name': 'chromoting_test_driver',
115 'type': '<(gtest_target_type)',
117 '../remoting/proto/chromotocol.gyp:chromotocol_proto_lib',
118 '../testing/gtest.gyp:gtest',
119 'remoting_test_support',
122 'test/chromoting_test_driver.cc',
124 }, # end of target 'chromoting_test_driver'
126 'target_name': 'ar_test_driver_common',
127 'type': 'static_library',
129 '../remoting/proto/chromotocol.gyp:chromotocol_proto_lib',
130 '../testing/gtest.gyp:gtest',
131 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
132 'remoting_test_support',
135 'test/app_remoting_connected_client_fixture.cc',
136 'test/app_remoting_connected_client_fixture.h',
137 'test/app_remoting_connection_helper.cc',
138 'test/app_remoting_connection_helper.h',
139 'test/app_remoting_latency_test_fixture.cc',
140 'test/app_remoting_latency_test_fixture.h',
141 'test/app_remoting_test_driver_environment.cc',
142 'test/app_remoting_test_driver_environment.h',
144 }, # end of target 'ar_test_driver_common'
146 # An external version of the test driver tool which includes minimal tests
147 'target_name': 'ar_sample_test_driver',
148 'type': '<(gtest_target_type)',
150 'ar_test_driver_common',
151 '../testing/gtest.gyp:gtest',
154 'test/app_remoting_test_driver.cc',
155 'test/app_remoting_test_driver_environment_app_details.cc',
157 }, # end of target 'ar_sample_test_driver'
159 # Remoting unit tests
161 # GN version: //remoting:remoting_unittests
162 # Note that many of the sources are broken out into subdir-specific unit
163 # test source set targets that then GN version then brings together.
164 'target_name': 'remoting_unittests',
165 'type': '<(gtest_target_type)',
167 '../base/base.gyp:base',
168 '../base/base.gyp:base_i18n',
169 '../base/base.gyp:test_support_base',
170 '../components/components.gyp:policy',
171 '../ipc/ipc.gyp:ipc',
172 '../net/net.gyp:net_test_support',
173 '../ppapi/ppapi.gyp:ppapi_cpp',
174 '../testing/gmock.gyp:gmock',
175 '../testing/gtest.gyp:gtest',
176 '../third_party/libyuv/libyuv.gyp:libyuv',
177 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
178 '../ui/base/ui_base.gyp:ui_base',
179 '../ui/gfx/gfx.gyp:gfx',
180 '../ui/gfx/gfx.gyp:gfx_geometry',
181 'ar_test_driver_common',
185 'remoting_client_plugin',
187 'remoting_host_setup_base',
188 'remoting_it2me_host_static',
189 'remoting_native_messaging_base',
191 'remoting_resources',
192 'remoting_test_support',
195 'VERSION=<(version_full)',
198 '../testing/gmock/include',
201 # Note: sources list duplicated in GN build.
202 'base/auto_thread_task_runner_unittest.cc',
203 'base/auto_thread_unittest.cc',
204 'base/breakpad_win_unittest.cc',
205 'base/buffered_socket_writer_unittest.cc',
206 'base/capabilities_unittest.cc',
207 'base/compound_buffer_unittest.cc',
208 'base/rate_counter_unittest.cc',
209 'base/resources_unittest.cc',
210 'base/rsa_key_pair_unittest.cc',
211 'base/run_all_unittests.cc',
212 'base/running_average_unittest.cc',
213 'base/test_rsa_key_pair.h',
214 'base/typed_buffer_unittest.cc',
215 'base/util_unittest.cc',
216 'client/audio_player_unittest.cc',
217 'client/client_status_logger_unittest.cc',
218 'client/empty_cursor_filter_unittest.cc',
219 'client/key_event_mapper_unittest.cc',
220 'client/normalizing_input_filter_cros_unittest.cc',
221 'client/normalizing_input_filter_mac_unittest.cc',
222 'client/server_log_entry_client_unittest.cc',
223 'client/touch_input_scaler_unittest.cc',
224 'codec/audio_encoder_opus_unittest.cc',
225 'codec/codec_test.cc',
226 'codec/codec_test.h',
227 'codec/video_decoder_vpx_unittest.cc',
228 'codec/video_encoder_helper_unittest.cc',
229 'codec/video_encoder_verbatim_unittest.cc',
230 'codec/video_encoder_vpx_unittest.cc',
231 'host/audio_pump_unittest.cc',
232 'host/audio_silence_detector_unittest.cc',
233 'host/backoff_timer_unittest.cc',
236 'host/capture_scheduler_unittest.cc',
237 'host/chromeos/aura_desktop_capturer_unittest.cc',
238 'host/chromeos/clipboard_aura_unittest.cc',
239 'host/chromoting_host_context_unittest.cc',
240 'host/chromoting_host_unittest.cc',
241 'host/client_session_unittest.cc',
242 'host/config_file_watcher_unittest.cc',
243 'host/daemon_process_unittest.cc',
244 'host/desktop_process_unittest.cc',
245 'host/desktop_shape_tracker_unittest.cc',
246 'host/gcd_rest_client_unittest.cc',
247 'host/gcd_state_updater_unittest.cc',
248 'host/gnubby_auth_handler_posix_unittest.cc',
249 'host/heartbeat_sender_unittest.cc',
250 'host/host_change_notification_listener_unittest.cc',
251 'host/host_config_unittest.cc',
252 'host/host_extension_session_manager_unittest.cc',
253 'host/host_mock_objects.cc',
254 'host/host_status_logger_unittest.cc',
255 'host/ipc_desktop_environment_unittest.cc',
256 'host/it2me/it2me_confirmation_dialog_proxy_unittest.cc',
257 'host/it2me/it2me_native_messaging_host_unittest.cc',
258 'host/linux/audio_pipe_reader_unittest.cc',
259 'host/linux/unicode_to_keysym_unittest.cc',
260 'host/linux/x_server_clipboard_unittest.cc',
261 'host/local_input_monitor_unittest.cc',
262 'host/mouse_shape_pump_unittest.cc',
263 'host/native_messaging/native_messaging_reader_unittest.cc',
264 'host/native_messaging/native_messaging_writer_unittest.cc',
265 'host/pairing_registry_delegate_linux_unittest.cc',
266 'host/pairing_registry_delegate_win_unittest.cc',
267 'host/pin_hash_unittest.cc',
268 'host/policy_watcher_unittest.cc',
269 'host/register_support_host_request_unittest.cc',
270 'host/remote_input_filter_unittest.cc',
271 'host/resizing_host_observer_unittest.cc',
272 'host/screen_resolution_unittest.cc',
273 'host/server_log_entry_host_unittest.cc',
274 'host/setup/me2me_native_messaging_host.cc',
275 'host/setup/me2me_native_messaging_host.h',
276 'host/setup/me2me_native_messaging_host_unittest.cc',
277 'host/setup/mock_oauth_client.cc',
278 'host/setup/mock_oauth_client.h',
279 'host/setup/oauth_helper_unittest.cc',
280 'host/setup/pin_validator_unittest.cc',
281 'host/shaped_desktop_capturer_unittest.cc',
282 'host/third_party_auth_config_unittest.cc',
283 'host/token_validator_factory_impl_unittest.cc',
284 'host/touch_injector_win_unittest.cc',
285 'host/video_frame_pump_unittest.cc',
286 'host/video_frame_recorder_unittest.cc',
287 'host/win/rdp_client_unittest.cc',
288 'host/win/worker_process_launcher.cc',
289 'host/win/worker_process_launcher.h',
290 'host/win/worker_process_launcher_unittest.cc',
291 'protocol/authenticator_test_base.cc',
292 'protocol/authenticator_test_base.h',
293 'protocol/channel_multiplexer_unittest.cc',
294 'protocol/channel_socket_adapter_unittest.cc',
295 'protocol/chromium_socket_factory_unittest.cc',
296 'protocol/client_video_dispatcher_unittest.cc',
297 'protocol/clipboard_echo_filter_unittest.cc',
298 'protocol/clipboard_filter_unittest.cc',
299 'protocol/connection_tester.cc',
300 'protocol/connection_tester.h',
301 'protocol/connection_to_client_unittest.cc',
302 'protocol/content_description_unittest.cc',
303 'protocol/input_event_tracker_unittest.cc',
304 'protocol/input_filter_unittest.cc',
305 'protocol/jingle_messages_unittest.cc',
306 'protocol/jingle_session_unittest.cc',
307 'protocol/message_decoder_unittest.cc',
308 'protocol/message_reader_unittest.cc',
309 'protocol/monitored_video_stub_unittest.cc',
310 'protocol/mouse_input_filter_unittest.cc',
311 'protocol/negotiating_authenticator_unittest.cc',
312 'protocol/pairing_registry_unittest.cc',
313 'protocol/port_range_unittest.cc',
314 'protocol/ppapi_module_stub.cc',
315 'protocol/pseudotcp_adapter_unittest.cc',
316 'protocol/ssl_hmac_channel_authenticator_unittest.cc',
317 'protocol/third_party_authenticator_unittest.cc',
318 'protocol/v2_authenticator_unittest.cc',
319 'signaling/iq_sender_unittest.cc',
320 'signaling/jid_util_unittest.cc',
321 'signaling/log_to_server_unittest.cc',
322 'signaling/push_notification_subscriber_unittest.cc',
323 'signaling/server_log_entry_unittest.cc',
324 'signaling/server_log_entry_unittest.h',
325 'signaling/xmpp_login_handler_unittest.cc',
326 'signaling/xmpp_stream_parser_unittest.cc',
327 'signaling/xmpp_signal_strategy_unittest.cc',
328 'test/access_token_fetcher_unittest.cc',
329 'test/app_remoting_report_issue_request_unittest.cc',
330 'test/chromoting_test_driver_environment_unittest.cc',
331 'test/host_list_fetcher_unittest.cc',
332 'test/remote_host_info_fetcher_unittest.cc',
333 'test/test_chromoting_client_unittest.cc',
334 'test/test_video_renderer_unittest.cc',
336 # TODO(sergeyu): app_remoting_test_driver_environment_unittest.cc
337 # depends on ar_test_driver_common target and that target implicitly
338 # depends on app_remoting_test_driver_environment_app_details.cc to
339 # allow some parameters to be overridden (i.e. *app_details.cc file can
340 # be replace with a different one). This means that app_deails.cc file
341 # has to be included here explicitly. Fix
342 # app_remoting_test_driver_environment.cc to avoid this implicit
343 # dependency on *app_details.cc .
344 # http://crbug.com/510887
345 'test/app_remoting_test_driver_environment_app_details.cc',
346 'test/app_remoting_test_driver_environment_unittest.cc',
351 '_ATL_NO_EXCEPTIONS',
365 'remoting_client_plugin',
370 '../testing/android/native_test.gyp:native_test_native_code',
375 'host/chromeos/aura_desktop_capturer_unittest.cc',
376 'host/clipboard_aura_unittest.cc',
380 'host/linux/x_server_clipboard_unittest.cc',
381 'host/local_input_monitor_unittest.cc',
386 'host/local_input_monitor_unittest.cc',
389 ['enable_remoting_host == 0', {
392 'remoting_host_setup_base',
393 'remoting_it2me_host_static',
394 'remoting_native_messaging_base',
397 ['exclude', '^codec/'],
398 ['exclude', '^host/'],
399 ['exclude', '^base/resources_unittest\\.cc$'],
402 [ 'OS == "linux" and use_allocator!="none"', {
404 '../base/allocator/allocator.gyp:allocator',
407 ], # end of 'conditions'
408 }, # end of target 'remoting_unittests'
410 # GN version: //remoting/webapp:browser_test_resources
411 'target_name': 'remoting_browser_test_resources',
415 'destination': '<(PRODUCT_DIR)/remoting/browser_test_resources',
417 '<@(remoting_webapp_browsertest_main_html_extra_files)',
421 }, # end of target 'remoting_browser_test_resources'
423 'target_name': 'remoting_webapp_browser_test_main_html',
427 'action_name': 'Build Remoting Webapp Browser test main.html',
429 'webapp/build-html.py',
430 '<(remoting_webapp_template_main)',
431 '<@(remoting_webapp_template_files)',
432 '<@(remoting_webapp_crd_main_html_all_js_files)',
433 '<@(remoting_webapp_browsertest_main_html_extra_files)',
436 '<(SHARED_INTERMEDIATE_DIR)/browser_test/main.html',
439 'python', 'webapp/build-html.py',
440 '<(SHARED_INTERMEDIATE_DIR)/browser_test/main.html',
441 '<(remoting_webapp_template_main)',
442 '--template-dir', '<(DEPTH)/remoting',
443 '--templates', '<@(remoting_webapp_template_files)',
445 '<@(remoting_webapp_crd_main_html_all_js_files)',
446 '<@(remoting_webapp_browsertest_main_html_extra_files)',
450 }, # end of target 'remoting_webapp_browser_test_html'
452 # GN version: //remoting/webapp:unit_tests
453 'target_name': 'remoting_webapp_unittests',
456 'output_dir': '<(PRODUCT_DIR)/remoting/unittests',
458 '<@(remoting_webapp_unittest_html_all_js_files)',
459 '<@(remoting_webapp_wcs_sandbox_html_js_files)',
460 '<@(remoting_webapp_background_html_js_files)',
465 # GN version: //remoting/webapp:qunit
466 'destination': '<(output_dir)/qunit',
468 '../third_party/qunit/src/browser_test_harness.js',
469 '../third_party/qunit/src/qunit.css',
470 '../third_party/qunit/src/qunit.js',
474 # GN version: //remoting/webapp:blanketjs
475 'destination': '<(output_dir)/blanketjs',
477 '../third_party/blanketjs/src/blanket.js',
478 '../third_party/blanketjs/src/qunit_adapter.js',
482 # GN version: //remoting/webapp:sinonjs
483 'destination': '<(output_dir)/sinonjs',
485 '../third_party/sinonjs/src/sinon.js',
486 '../third_party/sinonjs/src/sinon-qunit.js',
490 # GN version: //remoting/webapp:js_files
491 'destination': '<(output_dir)',
493 '<@(webapp_js_files)',
494 '<@(remoting_webapp_unittests_all_files)',
500 'action_name': 'Build Remoting Webapp unittests.html',
502 'webapp/build-html.py',
503 '<(remoting_webapp_unittests_template_main)',
504 '<@(webapp_js_files)',
505 '<@(remoting_webapp_unittests_all_js_files)'
508 '<(output_dir)/unittests.html',
511 'python', 'webapp/build-html.py',
513 '<(remoting_webapp_unittests_template_main)',
514 # GYP automatically removes subsequent duplicated command line
515 # arguments. Therefore, the excludejs flag must be set before the
516 # instrumentedjs flag or else GYP will ignore the files in the
518 '--exclude-js', '<@(remoting_webapp_unittests_exclude_js_files)',
519 '--js', '<@(remoting_webapp_unittests_all_js_files)',
520 '--instrument-js', '<@(webapp_js_files)',
524 }, # end of target 'remoting_webapp_unittest'
528 ['enable_remoting_host==1', {
530 # Remoting performance tests
532 'target_name': 'remoting_perftests',
533 'type': '<(gtest_target_type)',
535 '../base/base.gyp:base',
536 '../base/base.gyp:test_support_base',
537 '../testing/gtest.gyp:gtest',
538 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
539 '../third_party/libjingle/libjingle.gyp:libjingle',
541 'remoting_test_support',
544 'VERSION=<(version_full)',
547 '../testing/gmock/include',
550 'base/run_all_unittests.cc',
551 'codec/codec_test.cc',
552 'codec/codec_test.h',
553 'codec/video_encoder_vpx_perftest.cc',
554 'test/protocol_perftest.cc',
557 [ 'OS=="mac" or (OS=="linux" and chromeos==0)', {
558 # RunAllTests calls chrome::RegisterPathProvider() under Mac and
559 # Linux, so we need the chrome_common.gypi dependency.
561 '../chrome/common_constants.gyp:common_constants',
566 '../testing/android/native_test.gyp:native_test_native_code',
569 [ 'OS == "linux" and use_allocator!="none"', {
571 '../base/allocator/allocator.gyp:allocator',
574 ], # end of 'conditions'
575 }, # end of target 'remoting_perftests'
577 }], # end of 'enable_remoting_host'
578 ['disable_nacl==0 and disable_nacl_untrusted==0', {
581 'target_name': 'remoting_webapp_browser_test',
584 'output_dir': '<(PRODUCT_DIR)/remoting/remoting.webapp.browsertest.v2',
585 'zip_path': '<(PRODUCT_DIR)/remoting-webapp.browsertest.v2.zip',
586 'webapp_type': 'v2_pnacl',
587 'main_html_file': '<(SHARED_INTERMEDIATE_DIR)/browser_test/main.html',
589 'webapp/crd/remoting_client_pnacl.nmf.jinja2',
590 '<(PRODUCT_DIR)/remoting_client_plugin_newlib.pexe',
591 '<@(remoting_webapp_browsertest_main_html_extra_files)',
595 'remoting_nacl.gyp:remoting_client_plugin_nacl',
596 'remoting_webapp_browser_test_main_html',
598 'includes': [ 'remoting_webapp.gypi', ],
599 }, # end of target 'remoting_webapp_browser_test'
602 ['test_isolation_mode != "noop"', {
605 'target_name': 'remoting_unittests_run',
608 'remoting_unittests',
611 '../build/isolate.gypi',
614 'remoting_unittests.isolate',
619 ] # end of 'conditions'