extensionview: Update loadNextSrc comments.
[chromium-blink-merge.git] / remoting / remoting_test.gypi
blobca854fd7bfc1727f611925af5930a8855de81d7d
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.
6   'targets': [
7     {
8       # GN version: //remoting:test_support
9       'target_name': 'remoting_test_support',
10       'type': 'static_library',
11       'dependencies': [
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',
17         'remoting_base',
18         'remoting_client',
19         'remoting_host',
20         'remoting_protocol',
21         'remoting_resources',
22       ],
23       'sources': [
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/connection_setup_info.cc',
60         'test/connection_setup_info.h',
61         'test/fake_access_token_fetcher.cc',
62         'test/fake_access_token_fetcher.h',
63         'test/fake_app_remoting_report_issue_request.cc',
64         'test/fake_app_remoting_report_issue_request.h',
65         'test/fake_network_dispatcher.cc',
66         'test/fake_network_dispatcher.h',
67         'test/fake_network_manager.cc',
68         'test/fake_network_manager.h',
69         'test/fake_port_allocator.cc',
70         'test/fake_port_allocator.h',
71         'test/fake_remote_host_info_fetcher.cc',
72         'test/fake_remote_host_info_fetcher.h',
73         'test/fake_socket_factory.cc',
74         'test/fake_socket_factory.h',
75         'test/host_info.cc',
76         'test/host_info.h',
77         'test/host_list_fetcher.cc',
78         'test/host_list_fetcher.h',
79         'test/leaky_bucket.cc',
80         'test/leaky_bucket.h',
81         'test/mock_access_token_fetcher.cc',
82         'test/mock_access_token_fetcher.h',
83         'test/refresh_token_store.cc',
84         'test/refresh_token_store.h',
85         'test/remote_application_details.h',
86         'test/remote_connection_observer.h',
87         'test/remote_host_info.cc',
88         'test/remote_host_info.h',
89         'test/remote_host_info_fetcher.cc',
90         'test/remote_host_info_fetcher.h',
91         'test/test_chromoting_client.cc',
92         'test/test_chromoting_client.h',
93         'test/test_video_renderer.cc',
94         'test/test_video_renderer.h',
95       ],
96       'conditions': [
97         ['enable_remoting_host == 0', {
98           'dependencies!': [
99             'remoting_host',
100           ],
101           'sources/': [
102             ['exclude', '^host/'],
103           ]
104         }],
105       ],
106     },
107     {
108       'target_name': 'chromoting_test_driver',
109       'type': '<(gtest_target_type)',
110       'dependencies': [
111         '../remoting/proto/chromotocol.gyp:chromotocol_proto_lib',
112         '../testing/gtest.gyp:gtest',
113         'remoting_test_support',
114       ],
115       'sources': [
116         'test/chromoting_test_driver.cc',
117       ],
118     }, # end of target 'chromoting_test_driver'
119     {
120       'target_name': 'ar_test_driver_common',
121       'type': 'static_library',
122       'dependencies': [
123         '../remoting/proto/chromotocol.gyp:chromotocol_proto_lib',
124         '../testing/gtest.gyp:gtest',
125         '../third_party/webrtc/modules/modules.gyp:desktop_capture',
126         'remoting_test_support',
127       ],
128       'sources': [
129         'test/app_remoting_connected_client_fixture.cc',
130         'test/app_remoting_connected_client_fixture.h',
131         'test/app_remoting_connection_helper.cc',
132         'test/app_remoting_connection_helper.h',
133         'test/app_remoting_latency_test_fixture.cc',
134         'test/app_remoting_latency_test_fixture.h',
135         'test/app_remoting_test_driver_environment.cc',
136         'test/app_remoting_test_driver_environment.h',
137       ],
138     },  # end of target 'ar_test_driver_common'
139     {
140       # An external version of the test driver tool which includes minimal tests
141       'target_name': 'ar_sample_test_driver',
142       'type': '<(gtest_target_type)',
143       'dependencies': [
144         'ar_test_driver_common',
145         '../testing/gtest.gyp:gtest',
146       ],
147       'sources': [
148         'test/app_remoting_test_driver.cc',
149         'test/app_remoting_test_driver_environment_app_details.cc',
150       ],
151     },  # end of target 'ar_sample_test_driver'
153     # Remoting unit tests
154     {
155       # GN version: //remoting:remoting_unittests
156       # Note that many of the sources are broken out into subdir-specific unit
157       # test source set targets that then GN version then brings together.
158       'target_name': 'remoting_unittests',
159       'type': '<(gtest_target_type)',
160       'dependencies': [
161         '../base/base.gyp:base',
162         '../base/base.gyp:base_i18n',
163         '../base/base.gyp:test_support_base',
164         '../components/components.gyp:policy',
165         '../ipc/ipc.gyp:ipc',
166         '../net/net.gyp:net_test_support',
167         '../ppapi/ppapi.gyp:ppapi_cpp',
168         '../testing/gmock.gyp:gmock',
169         '../testing/gtest.gyp:gtest',
170         '../third_party/libyuv/libyuv.gyp:libyuv',
171         '../third_party/webrtc/modules/modules.gyp:desktop_capture',
172         '../ui/base/ui_base.gyp:ui_base',
173         '../ui/gfx/gfx.gyp:gfx',
174         '../ui/gfx/gfx.gyp:gfx_geometry',
175         'ar_test_driver_common',
176         'remoting_base',
177         'remoting_breakpad',
178         'remoting_client',
179         'remoting_client_plugin',
180         'remoting_host',
181         'remoting_host_setup_base',
182         'remoting_it2me_host_static',
183         'remoting_native_messaging_base',
184         'remoting_protocol',
185         'remoting_resources',
186         'remoting_test_support',
187       ],
188       'defines': [
189         'VERSION=<(version_full)',
190       ],
191       'include_dirs': [
192         '../testing/gmock/include',
193       ],
194       'sources': [
195         # Note: sources list duplicated in GN build.
196         'base/auto_thread_task_runner_unittest.cc',
197         'base/auto_thread_unittest.cc',
198         'base/breakpad_win_unittest.cc',
199         'base/buffered_socket_writer_unittest.cc',
200         'base/capabilities_unittest.cc',
201         'base/compound_buffer_unittest.cc',
202         'base/rate_counter_unittest.cc',
203         'base/resources_unittest.cc',
204         'base/rsa_key_pair_unittest.cc',
205         'base/run_all_unittests.cc',
206         'base/running_average_unittest.cc',
207         'base/test_rsa_key_pair.h',
208         'base/typed_buffer_unittest.cc',
209         'base/util_unittest.cc',
210         'client/audio_player_unittest.cc',
211         'client/client_status_logger_unittest.cc',
212         'client/empty_cursor_filter_unittest.cc',
213         'client/key_event_mapper_unittest.cc',
214         'client/normalizing_input_filter_cros_unittest.cc',
215         'client/normalizing_input_filter_mac_unittest.cc',
216         'client/server_log_entry_client_unittest.cc',
217         'client/touch_input_scaler_unittest.cc',
218         'codec/audio_encoder_opus_unittest.cc',
219         'codec/codec_test.cc',
220         'codec/codec_test.h',
221         'codec/video_decoder_vpx_unittest.cc',
222         'codec/video_encoder_helper_unittest.cc',
223         'codec/video_encoder_verbatim_unittest.cc',
224         'codec/video_encoder_vpx_unittest.cc',
225         'host/audio_pump_unittest.cc',
226         'host/audio_silence_detector_unittest.cc',
227         'host/backoff_timer_unittest.cc',
228         'host/branding.cc',
229         'host/branding.h',
230         'host/capture_scheduler_unittest.cc',
231         'host/chromeos/aura_desktop_capturer_unittest.cc',
232         'host/chromeos/clipboard_aura_unittest.cc',
233         'host/chromoting_host_context_unittest.cc',
234         'host/chromoting_host_unittest.cc',
235         'host/client_session_unittest.cc',
236         'host/config_file_watcher_unittest.cc',
237         'host/daemon_process_unittest.cc',
238         'host/desktop_process_unittest.cc',
239         'host/desktop_shape_tracker_unittest.cc',
240         'host/gcd_rest_client_unittest.cc',
241         'host/gcd_state_updater_unittest.cc',
242         'host/gnubby_auth_handler_posix_unittest.cc',
243         'host/heartbeat_sender_unittest.cc',
244         'host/host_change_notification_listener_unittest.cc',
245         'host/host_config_unittest.cc',
246         'host/host_extension_session_manager_unittest.cc',
247         'host/host_mock_objects.cc',
248         'host/host_status_logger_unittest.cc',
249         'host/ipc_desktop_environment_unittest.cc',
250         'host/it2me/it2me_confirmation_dialog_proxy_unittest.cc',
251         'host/it2me/it2me_native_messaging_host_unittest.cc',
252         'host/linux/audio_pipe_reader_unittest.cc',
253         'host/linux/unicode_to_keysym_unittest.cc',
254         'host/linux/x_server_clipboard_unittest.cc',
255         'host/local_input_monitor_unittest.cc',
256         'host/mouse_shape_pump_unittest.cc',
257         'host/native_messaging/native_messaging_reader_unittest.cc',
258         'host/native_messaging/native_messaging_writer_unittest.cc',
259         'host/pairing_registry_delegate_linux_unittest.cc',
260         'host/pairing_registry_delegate_win_unittest.cc',
261         'host/pin_hash_unittest.cc',
262         'host/policy_watcher_unittest.cc',
263         'host/register_support_host_request_unittest.cc',
264         'host/remote_input_filter_unittest.cc',
265         'host/resizing_host_observer_unittest.cc',
266         'host/screen_resolution_unittest.cc',
267         'host/server_log_entry_host_unittest.cc',
268         'host/setup/me2me_native_messaging_host.cc',
269         'host/setup/me2me_native_messaging_host.h',
270         'host/setup/me2me_native_messaging_host_unittest.cc',
271         'host/setup/mock_oauth_client.cc',
272         'host/setup/mock_oauth_client.h',
273         'host/setup/oauth_helper_unittest.cc',
274         'host/setup/pin_validator_unittest.cc',
275         'host/shaped_desktop_capturer_unittest.cc',
276         'host/third_party_auth_config_unittest.cc',
277         'host/token_validator_factory_impl_unittest.cc',
278         'host/touch_injector_win_unittest.cc',
279         'host/video_frame_pump_unittest.cc',
280         'host/video_frame_recorder_unittest.cc',
281         'host/win/rdp_client_unittest.cc',
282         'host/win/worker_process_launcher.cc',
283         'host/win/worker_process_launcher.h',
284         'host/win/worker_process_launcher_unittest.cc',
285         'protocol/authenticator_test_base.cc',
286         'protocol/authenticator_test_base.h',
287         'protocol/channel_multiplexer_unittest.cc',
288         'protocol/channel_socket_adapter_unittest.cc',
289         'protocol/chromium_socket_factory_unittest.cc',
290         'protocol/client_video_dispatcher_unittest.cc',
291         'protocol/clipboard_echo_filter_unittest.cc',
292         'protocol/clipboard_filter_unittest.cc',
293         'protocol/connection_tester.cc',
294         'protocol/connection_tester.h',
295         'protocol/connection_to_client_unittest.cc',
296         'protocol/content_description_unittest.cc',
297         'protocol/input_event_tracker_unittest.cc',
298         'protocol/input_filter_unittest.cc',
299         'protocol/jingle_messages_unittest.cc',
300         'protocol/jingle_session_unittest.cc',
301         'protocol/message_decoder_unittest.cc',
302         'protocol/message_reader_unittest.cc',
303         'protocol/monitored_video_stub_unittest.cc',
304         'protocol/mouse_input_filter_unittest.cc',
305         'protocol/negotiating_authenticator_unittest.cc',
306         'protocol/pairing_registry_unittest.cc',
307         'protocol/port_range_unittest.cc',
308         'protocol/ppapi_module_stub.cc',
309         'protocol/pseudotcp_adapter_unittest.cc',
310         'protocol/ssl_hmac_channel_authenticator_unittest.cc',
311         'protocol/third_party_authenticator_unittest.cc',
312         'protocol/v2_authenticator_unittest.cc',
313         'signaling/iq_sender_unittest.cc',
314         'signaling/jid_util_unittest.cc',
315         'signaling/log_to_server_unittest.cc',
316         'signaling/push_notification_subscriber_unittest.cc',
317         'signaling/server_log_entry_unittest.cc',
318         'signaling/server_log_entry_unittest.h',
319         'signaling/xmpp_login_handler_unittest.cc',
320         'signaling/xmpp_stream_parser_unittest.cc',
321         'signaling/xmpp_signal_strategy_unittest.cc',
322         'test/access_token_fetcher_unittest.cc',
323         'test/app_remoting_report_issue_request_unittest.cc',
324         'test/host_list_fetcher_unittest.cc',
325         'test/remote_host_info_fetcher_unittest.cc',
326         'test/test_chromoting_client_unittest.cc',
327         'test/test_video_renderer_unittest.cc',
329         # TODO(sergeyu): app_remoting_test_driver_environment_unittest.cc
330         # depends on ar_test_driver_common target and that target implicitly
331         # depends on app_remoting_test_driver_environment_app_details.cc to
332         # allow some parameters to be overridden (i.e. *app_details.cc file can
333         # be replace with a different one). This means that app_deails.cc file
334         # has to be included here explicitly. Fix
335         # app_remoting_test_driver_environment.cc to avoid this implicit
336         # dependency on *app_details.cc .
337         # http://crbug.com/510887
338         'test/app_remoting_test_driver_environment_app_details.cc',
339         'test/app_remoting_test_driver_environment_unittest.cc',
340       ],
341       'conditions': [
342         [ 'OS=="win"', {
343           'defines': [
344             '_ATL_NO_EXCEPTIONS',
345           ],
346           'include_dirs': [
347             '../breakpad/src',
348           ],
349           'link_settings': {
350             'libraries': [
351               '-lrpcrt4.lib',
352               '-lwtsapi32.lib',
353             ],
354           },
355         }],
356         [ 'OS=="android"', {
357           'dependencies!': [
358             'remoting_client_plugin',
359           ],
360         }],
361         [ 'OS=="android"', {
362           'dependencies': [
363             '../testing/android/native_test.gyp:native_test_native_code',
364           ],
365         }],
366         [ 'chromeos==0', {
367           'sources!': [
368             'host/chromeos/aura_desktop_capturer_unittest.cc',
369             'host/clipboard_aura_unittest.cc',
370           ],
371         }, { # chromeos==1
372           'sources!': [
373             'host/linux/x_server_clipboard_unittest.cc',
374             'host/local_input_monitor_unittest.cc',
375           ],
376         }],
377         [ 'use_ozone==1', {
378           'sources!': [
379             'host/local_input_monitor_unittest.cc',
380           ],
381         }],
382         ['enable_remoting_host == 0', {
383           'dependencies!': [
384             'remoting_host',
385             'remoting_host_setup_base',
386             'remoting_it2me_host_static',
387             'remoting_native_messaging_base',
388           ],
389           'sources/': [
390             ['exclude', '^codec/'],
391             ['exclude', '^host/'],
392             ['exclude', '^base/resources_unittest\\.cc$'],
393           ]
394         }],
395         [ 'OS == "linux" and use_allocator!="none"', {
396           'dependencies': [
397             '../base/allocator/allocator.gyp:allocator',
398           ],
399         }],
400       ],  # end of 'conditions'
401     },  # end of target 'remoting_unittests'
402     {
403       'target_name': 'remoting_browser_test_resources',
404       'type': 'none',
405       'copies': [
406         {
407           'destination': '<(PRODUCT_DIR)/remoting/browser_test_resources',
408             'files': [
409               '<@(remoting_webapp_browsertest_main_html_extra_files)',
410             ],
411         },
412       ], # end of copies
413     },  # end of target 'remoting_browser_test_resources'
414     {
415       'target_name': 'remoting_webapp_browser_test_main_html',
416       'type': 'none',
417       'actions': [
418         {
419           'action_name': 'Build Remoting Webapp Browser test main.html',
420           'inputs': [
421             'webapp/build-html.py',
422             '<(remoting_webapp_template_main)',
423             '<@(remoting_webapp_template_files)',
424             '<@(remoting_webapp_crd_main_html_all_js_files)',
425             '<@(remoting_webapp_browsertest_main_html_extra_files)',
426           ],
427           'outputs': [
428             '<(SHARED_INTERMEDIATE_DIR)/browser_test/main.html',
429           ],
430           'action': [
431             'python', 'webapp/build-html.py',
432             '<(SHARED_INTERMEDIATE_DIR)/browser_test/main.html',
433             '<(remoting_webapp_template_main)',
434             '--template-dir', '<(DEPTH)/remoting',
435             '--templates', '<@(remoting_webapp_template_files)',
436             '--js',
437             '<@(remoting_webapp_crd_main_html_all_js_files)',
438             '<@(remoting_webapp_browsertest_main_html_extra_files)',
439           ],
440         },
441       ],  # end of actions
442     },  # end of target 'remoting_webapp_browser_test_html'
443     {
444       'target_name': 'remoting_webapp_unittests',
445       'type': 'none',
446       'variables': {
447         'output_dir': '<(PRODUCT_DIR)/remoting/unittests',
448         'webapp_js_files': [
449           '<@(remoting_webapp_unittest_html_all_js_files)',
450           '<@(remoting_webapp_wcs_sandbox_html_js_files)',
451           '<@(remoting_webapp_background_html_js_files)',
452         ]
453       },
454       'copies': [
455         {
456           'destination': '<(output_dir)/qunit',
457           'files': [
458             '../third_party/qunit/src/browser_test_harness.js',
459             '../third_party/qunit/src/qunit.css',
460             '../third_party/qunit/src/qunit.js',
461           ],
462         },
463         {
464           'destination': '<(output_dir)/blanketjs',
465           'files': [
466             '../third_party/blanketjs/src/blanket.js',
467             '../third_party/blanketjs/src/qunit_adapter.js',
468           ],
469         },
470         {
471           'destination': '<(output_dir)/sinonjs',
472           'files': [
473             '../third_party/sinonjs/src/sinon.js',
474             '../third_party/sinonjs/src/sinon-qunit.js',
475           ],
476         },
477         {
478           'destination': '<(output_dir)',
479           'files': [
480             '<@(webapp_js_files)',
481             '<@(remoting_webapp_unittests_all_files)',
482           ],
483         },
484       ],
485       'actions': [
486         {
487           'action_name': 'Build Remoting Webapp unittests.html',
488           'inputs': [
489             'webapp/build-html.py',
490             '<(remoting_webapp_unittests_template_main)',
491             '<@(webapp_js_files)',
492             '<@(remoting_webapp_unittests_all_js_files)'
493           ],
494           'outputs': [
495             '<(output_dir)/unittests.html',
496           ],
497           'action': [
498             'python', 'webapp/build-html.py',
499             '<@(_outputs)',
500             '<(remoting_webapp_unittests_template_main)',
501             # GYP automatically removes subsequent duplicated command line
502             # arguments.  Therefore, the excludejs flag must be set before the
503             # instrumentedjs flag or else GYP will ignore the files in the
504             # exclude list.
505             '--exclude-js', '<@(remoting_webapp_unittests_exclude_js_files)',
506             '--js', '<@(remoting_webapp_unittests_all_js_files)',
507             '--instrument-js', '<@(webapp_js_files)',
508            ],
509         },
510       ],
511     },  # end of target 'remoting_webapp_unittest'
512   ],  # end of targets
514   'conditions': [
515     ['enable_remoting_host==1', {
516       'targets': [
517         # Remoting performance tests
518         {
519           'target_name': 'remoting_perftests',
520           'type': '<(gtest_target_type)',
521           'dependencies': [
522             '../base/base.gyp:base',
523             '../base/base.gyp:test_support_base',
524             '../testing/gtest.gyp:gtest',
525             '../third_party/webrtc/modules/modules.gyp:desktop_capture',
526             '../third_party/libjingle/libjingle.gyp:libjingle',
527             'remoting_base',
528             'remoting_test_support',
529           ],
530           'defines': [
531             'VERSION=<(version_full)',
532           ],
533           'include_dirs': [
534             '../testing/gmock/include',
535           ],
536           'sources': [
537             'base/run_all_unittests.cc',
538             'codec/codec_test.cc',
539             'codec/codec_test.h',
540             'codec/video_encoder_vpx_perftest.cc',
541             'test/protocol_perftest.cc',
542           ],
543           'conditions': [
544             [ 'OS=="mac" or (OS=="linux" and chromeos==0)', {
545               # RunAllTests calls chrome::RegisterPathProvider() under Mac and
546               # Linux, so we need the chrome_common.gypi dependency.
547               'dependencies': [
548                 '../chrome/common_constants.gyp:common_constants',
549               ],
550             }],
551             [ 'OS=="android"', {
552               'dependencies': [
553                 '../testing/android/native_test.gyp:native_test_native_code',
554               ],
555             }],
556             [ 'OS == "linux" and use_allocator!="none"', {
557               'dependencies': [
558                 '../base/allocator/allocator.gyp:allocator',
559               ],
560             }],
561           ],  # end of 'conditions'
562         },  # end of target 'remoting_perftests'
563       ]
564     }],  # end of 'enable_remoting_host'
565     ['disable_nacl==0 and disable_nacl_untrusted==0', {
566       'targets': [
567         {
568           'target_name': 'remoting_webapp_browser_test',
569           'type': 'none',
570           'variables': {
571             'output_dir': '<(PRODUCT_DIR)/remoting/remoting.webapp.browsertest.v2',
572             'zip_path': '<(PRODUCT_DIR)/remoting-webapp.browsertest.v2.zip',
573             'webapp_type': 'v2_pnacl',
574             'main_html_file': '<(SHARED_INTERMEDIATE_DIR)/browser_test/main.html',
575             'extra_files': [
576               'webapp/crd/remoting_client_pnacl.nmf.jinja2',
577               '<(PRODUCT_DIR)/remoting_client_plugin_newlib.pexe',
578               '<@(remoting_webapp_browsertest_main_html_extra_files)',
579             ],
580           },
581           'dependencies': [
582             'remoting_nacl.gyp:remoting_client_plugin_nacl',
583             'remoting_webapp_browser_test_main_html',
584           ],
585           'includes': [ 'remoting_webapp.gypi', ],
586         },  # end of target 'remoting_webapp_browser_test'
587       ]
588     }],
589     ['test_isolation_mode != "noop"', {
590       'targets': [
591         {
592           'target_name': 'remoting_unittests_run',
593           'type': 'none',
594           'dependencies': [
595             'remoting_unittests',
596           ],
597           'includes': [
598             '../build/isolate.gypi',
599           ],
600           'sources': [
601             'remoting_unittests.isolate',
602           ],
603         },
604       ],
605     }],
606   ] # end of 'conditions'