Listen for key events in SetupXI2ForXWindow()
[chromium-blink-merge.git] / remoting / remoting_test.gypi
blobc365d6a942ba76e17cbbddba79c6f97e3063cc3f
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       'target_name': 'remoting_test_common',
9       'type': 'static_library',
10       'dependencies': [
11         '../base/base.gyp:base',
12         '../net/net.gyp:net_test_support',
13         '../testing/gmock.gyp:gmock',
14         '../testing/gtest.gyp:gtest',
15         'remoting_base',
16         'remoting_client',
17         'remoting_host',
18         'remoting_protocol',
19         'remoting_resources',
20       ],
21       'sources': [
22         'host/fake_desktop_environment.cc',
23         'host/fake_desktop_environment.h',
24         'host/fake_host_status_monitor.h',
25         'host/fake_screen_capturer.cc',
26         'host/fake_screen_capturer.h',
27         'host/policy_hack/fake_policy_watcher.cc',
28         'host/policy_hack/fake_policy_watcher.h',
29         'host/policy_hack/mock_policy_callback.cc',
30         'host/policy_hack/mock_policy_callback.h',
31         'protocol/fake_authenticator.cc',
32         'protocol/fake_authenticator.h',
33         'protocol/fake_session.cc',
34         'protocol/fake_session.h',
35         'protocol/protocol_mock_objects.cc',
36         'protocol/protocol_mock_objects.h',
37         'signaling/fake_signal_strategy.cc',
38         'signaling/fake_signal_strategy.h',
39         'signaling/mock_signal_strategy.cc',
40         'signaling/mock_signal_strategy.h',
41       ],
42       'conditions': [
43         ['enable_remoting_host == 0', {
44           'dependencies!': [
45             'remoting_host',
46           ],
47           'sources/': [
48             ['exclude', '^host/'],
49           ]
50         }],
51       ],
52     },
54     # Remoting unit tests
55     {
56       'target_name': 'remoting_unittests',
57       'type': '<(gtest_target_type)',
58       'dependencies': [
59         '../base/base.gyp:base',
60         '../base/base.gyp:base_i18n',
61         '../base/base.gyp:test_support_base',
62         '../ipc/ipc.gyp:ipc',
63         '../net/net.gyp:net_test_support',
64         '../ppapi/ppapi.gyp:ppapi_cpp',
65         '../testing/gmock.gyp:gmock',
66         '../testing/gtest.gyp:gtest',
67         '../third_party/libyuv/libyuv.gyp:libyuv',
68         '../third_party/webrtc/modules/modules.gyp:desktop_capture',
69         '../ui/base/ui_base.gyp:ui_base',
70         '../ui/gfx/gfx.gyp:gfx',
71         '../ui/gfx/gfx.gyp:gfx_geometry',
72         'remoting_base',
73         'remoting_breakpad',
74         'remoting_client',
75         'remoting_client_plugin',
76         'remoting_host',
77         'remoting_host_setup_base',
78         'remoting_it2me_host_static',
79         'remoting_native_messaging_base',
80         'remoting_protocol',
81         'remoting_resources',
82         'remoting_test_common',
83       ],
84       'defines': [
85         'VERSION=<(version_full)',
86       ],
87       'include_dirs': [
88         '../testing/gmock/include',
89       ],
90       'sources': [
91         'base/auth_token_util_unittest.cc',
92         'base/auto_thread_task_runner_unittest.cc',
93         'base/auto_thread_unittest.cc',
94         'base/breakpad_win_unittest.cc',
95         'base/capabilities_unittest.cc',
96         'base/compound_buffer_unittest.cc',
97         'base/rate_counter_unittest.cc',
98         'base/resources_unittest.cc',
99         'base/rsa_key_pair_unittest.cc',
100         'base/run_all_unittests.cc',
101         'base/running_average_unittest.cc',
102         'base/test_rsa_key_pair.h',
103         'base/typed_buffer_unittest.cc',
104         'base/util_unittest.cc',
105         'client/audio_player_unittest.cc',
106         'client/client_status_logger_unittest.cc',
107         'client/key_event_mapper_unittest.cc',
108         'client/plugin/normalizing_input_filter_cros_unittest.cc',
109         'client/plugin/normalizing_input_filter_mac_unittest.cc',
110         'client/server_log_entry_client_unittest.cc',
111         'codec/audio_encoder_opus_unittest.cc',
112         'codec/codec_test.cc',
113         'codec/codec_test.h',
114         'codec/video_decoder_vpx_unittest.cc',
115         'codec/video_encoder_verbatim_unittest.cc',
116         'codec/video_encoder_vpx_unittest.cc',
117         'host/audio_silence_detector_unittest.cc',
118         'host/branding.cc',
119         'host/branding.h',
120         'host/capture_scheduler_unittest.cc',
121         'host/chromoting_host_context_unittest.cc',
122         'host/chromoting_host_unittest.cc',
123         'host/client_session_unittest.cc',
124         'host/config_file_watcher_unittest.cc',
125         'host/daemon_process_unittest.cc',
126         'host/desktop_process_unittest.cc',
127         'host/desktop_shape_tracker_unittest.cc',
128         'host/fake_host_extension.cc',
129         'host/fake_host_extension.h',
130         'host/fake_host_status_monitor.h',
131         'host/fake_screen_capturer.cc',
132         'host/fake_screen_capturer.h',
133         'host/gnubby_auth_handler_posix_unittest.cc',
134         'host/heartbeat_sender_unittest.cc',
135         'host/host_change_notification_listener_unittest.cc',
136         'host/host_extension_session_manager_unittest.cc',
137         'host/host_mock_objects.cc',
138         'host/host_status_logger_unittest.cc',
139         'host/host_status_sender_unittest.cc',
140         'host/ipc_desktop_environment_unittest.cc',
141         'host/it2me/it2me_native_messaging_host_unittest.cc',
142         'host/json_host_config_unittest.cc',
143         'host/linux/audio_pipe_reader_unittest.cc',
144         'host/linux/unicode_to_keysym_unittest.cc',
145         'host/linux/x_server_clipboard_unittest.cc',
146         'host/local_input_monitor_unittest.cc',
147         'host/native_messaging/native_messaging_reader_unittest.cc',
148         'host/native_messaging/native_messaging_writer_unittest.cc',
149         'host/pairing_registry_delegate_linux_unittest.cc',
150         'host/pairing_registry_delegate_win_unittest.cc',
151         'host/pin_hash_unittest.cc',
152         'host/policy_hack/policy_watcher_unittest.cc',
153         'host/register_support_host_request_unittest.cc',
154         'host/remote_input_filter_unittest.cc',
155         'host/resizing_host_observer_unittest.cc',
156         'host/screen_resolution_unittest.cc',
157         'host/server_log_entry_host_unittest.cc',
158         'host/setup/me2me_native_messaging_host.cc',
159         'host/setup/me2me_native_messaging_host.h',
160         'host/setup/me2me_native_messaging_host_unittest.cc',
161         'host/setup/oauth_helper_unittest.cc',
162         'host/setup/pin_validator_unittest.cc',
163         'host/shaped_screen_capturer_unittest.cc',
164         'host/token_validator_factory_impl_unittest.cc',
165         'host/video_frame_recorder_unittest.cc',
166         'host/video_scheduler_unittest.cc',
167         'host/win/rdp_client_unittest.cc',
168         'host/win/worker_process_launcher.cc',
169         'host/win/worker_process_launcher.h',
170         'host/win/worker_process_launcher_unittest.cc',
171         'protocol/authenticator_test_base.cc',
172         'protocol/authenticator_test_base.h',
173         'protocol/buffered_socket_writer_unittest.cc',
174         'protocol/channel_multiplexer_unittest.cc',
175         'protocol/chromium_socket_factory_unittest.cc',
176         'protocol/clipboard_echo_filter_unittest.cc',
177         'protocol/clipboard_filter_unittest.cc',
178         'protocol/connection_tester.cc',
179         'protocol/connection_tester.h',
180         'protocol/connection_to_client_unittest.cc',
181         'protocol/content_description_unittest.cc',
182         'protocol/input_event_tracker_unittest.cc',
183         'protocol/input_filter_unittest.cc',
184         'protocol/jingle_messages_unittest.cc',
185         'protocol/jingle_session_unittest.cc',
186         'protocol/message_decoder_unittest.cc',
187         'protocol/message_reader_unittest.cc',
188         'protocol/monitored_video_stub_unittest.cc',
189         'protocol/mouse_input_filter_unittest.cc',
190         'protocol/negotiating_authenticator_unittest.cc',
191         'protocol/network_settings_unittest.cc',
192         'protocol/pairing_registry_unittest.cc',
193         'protocol/ppapi_module_stub.cc',
194         'protocol/ssl_hmac_channel_authenticator_unittest.cc',
195         'protocol/third_party_authenticator_unittest.cc',
196         'protocol/v2_authenticator_unittest.cc',
197         'signaling/fake_signal_strategy.cc',
198         'signaling/fake_signal_strategy.h',
199         'signaling/iq_sender_unittest.cc',
200         'signaling/log_to_server_unittest.cc',
201         'signaling/server_log_entry_unittest.cc',
202         'signaling/server_log_entry_unittest.h',
203       ],
204       'conditions': [
205         [ 'OS=="win"', {
206           'defines': [
207             '_ATL_NO_EXCEPTIONS',
208           ],
209           'include_dirs': [
210             '../breakpad/src',
211           ],
212           'link_settings': {
213             'libraries': [
214               '-lrpcrt4.lib',
215               '-lwtsapi32.lib',
216             ],
217           },
218         }],
219         [ 'OS=="android"', {
220           'dependencies!': [
221             'remoting_client_plugin',
222           ],
223         }],
224         [ 'OS=="android"', {
225           'dependencies': [
226             '../testing/android/native_test.gyp:native_test_native_code',
227           ],
228         }],
229         [ 'chromeos==0', {
230           'sources!': [
231             'client/plugin/normalizing_input_filter_cros_unittest.cc',
232           ],
233         }],
234         ['enable_remoting_host == 0', {
235           'dependencies!': [
236             'remoting_host',
237             'remoting_host_setup_base',
238             'remoting_it2me_host_static',
239             'remoting_native_messaging_base',
240           ],
241           'sources/': [
242             ['exclude', '^codec/'],
243             ['exclude', '^host/'],
244             ['exclude', '^base/resources_unittest\\.cc$'],
245           ]
246         }],
247         [ 'OS == "linux" and use_allocator!="none"', {
248           'dependencies': [
249             '../base/allocator/allocator.gyp:allocator',
250           ],
251         }],
252       ],  # end of 'conditions'
253     },  # end of target 'remoting_unittests'
254     {
255       'target_name': 'remoting_browser_test_resources',
256       'type': 'none',
257       'variables': {
258         'zip_script': '../build/android/gyp/zip.py',
259       },
260       'copies': [
261         {
262           'destination': '<(PRODUCT_DIR)',
263             'files': [
264               '<@(remoting_webapp_js_browser_test_files)',
265             ],
266         },
267       ], #end of copies
268       'actions': [
269         {
270           # Store the browser test resources into a zip file so there is a
271           # consistent filename to reference for build archiving (i.e. in
272           # FILES.cfg).
273           'action_name': 'zip browser test resources',
274           'inputs': [
275             '<(zip_script)',
276             '<@(remoting_webapp_js_browser_test_files)'
277           ],
278           'outputs': [
279             '<(PRODUCT_DIR)/remoting-browser-tests.zip',
280           ],
281           'action': [
282             'python',
283             '<(zip_script)',
284             '--input-dir', 'webapp/browser_test',
285             '--output', '<@(_outputs)',
286            ],
287         },
288       ], # end of actions
289     },  # end of target 'remoting_browser_test_resources'
290     {
291       'target_name': 'remoting_webapp_unittest',
292       'type': 'none',
293       'variables': {
294         'output_dir': '<(PRODUCT_DIR)/remoting/unittests',
295         'webapp_js_files': [
296           '<@(remoting_webapp_main_html_js_files)',
297           '<@(remoting_webapp_js_wcs_sandbox_files)',
298         ]
299       },
300       'copies': [
301         {
302           'destination': '<(output_dir)/qunit',
303           'files': [
304             '../third_party/qunit/src/browser_test_harness.js',
305             '../third_party/qunit/src/qunit.css',
306             '../third_party/qunit/src/qunit.js',
307           ],
308         },
309         {
310           'destination': '<(output_dir)/blanketjs',
311           'files': [
312             '../third_party/blanketjs/src/blanket.js',
313             '../third_party/blanketjs/src/qunit_adapter.js',
314           ],
315         },
316         {
317           'destination': '<(output_dir)/sinonjs',
318           'files': [
319             '../third_party/sinonjs/src/sinon.js',
320             '../third_party/sinonjs/src/sinon-qunit.js',
321           ],
322         },
323         {
324           'destination': '<(output_dir)',
325           'files': [
326             '<@(webapp_js_files)',
327             '<@(remoting_webapp_unittest_cases)',
328             '<@(remoting_webapp_unittest_additional_files)'
329           ],
330         },
331       ],
332       'actions': [
333         {
334           'action_name': 'Build Remoting Webapp unittest.html',
335           'inputs': [
336             'webapp/build-html.py',
337             '<(remoting_webapp_unittest_template_main)',
338             '<@(webapp_js_files)',
339             '<@(remoting_webapp_unittest_cases)'
340           ],
341           'outputs': [
342             '<(output_dir)/unittest.html',
343           ],
344           'action': [
345             'python', 'webapp/build-html.py',
346             '<@(_outputs)',
347             '<(remoting_webapp_unittest_template_main)',
348             # GYP automatically removes subsequent duplicated command line
349             # arguments.  Therefore, the excludejs flag must be set before the
350             # instrumentedjs flag or else GYP will ignore the files in the
351             # exclude list.
352             '--exclude-js', '<@(remoting_webapp_unittest_exclude_files)',
353             '--js', '<@(remoting_webapp_unittest_cases)',
354             '--instrument-js', '<@(webapp_js_files)',
355            ],
356         },
357       ],
358     },  # end of target 'remoting_webapp_js_unittest'
359   ],  # end of targets
361   'conditions': [
362     ['enable_remoting_host==1', {
363       'targets': [
364         # Remoting performance tests
365         {
366           'target_name': 'remoting_perftests',
367           'type': '<(gtest_target_type)',
368           'dependencies': [
369             '../base/base.gyp:base',
370             '../base/base.gyp:test_support_base',
371             '../testing/gtest.gyp:gtest',
372             '../third_party/webrtc/modules/modules.gyp:desktop_capture',
373             '../third_party/libjingle/libjingle.gyp:libjingle',
374             'remoting_base',
375             'remoting_test_common',
376           ],
377           'defines': [
378             'VERSION=<(version_full)',
379           ],
380           'include_dirs': [
381             '../testing/gmock/include',
382           ],
383           'sources': [
384             'base/run_all_unittests.cc',
385             'codec/codec_test.cc',
386             'codec/codec_test.h',
387             'codec/video_encoder_vpx_perftest.cc',
388             'test/protocol_perftest.cc',
389           ],
390           'conditions': [
391             [ 'OS=="mac" or (OS=="linux" and chromeos==0)', {
392               # RunAllTests calls chrome::RegisterPathProvider() under Mac and
393               # Linux, so we need the chrome_common.gypi dependency.
394               'dependencies': [
395                 '../chrome/common_constants.gyp:common_constants',
396               ],
397             }],
398             [ 'OS=="android"', {
399               'dependencies': [
400                 '../testing/android/native_test.gyp:native_test_native_code',
401               ],
402             }],
403             [ 'OS == "linux" and use_allocator!="none"', {
404               'dependencies': [
405                 '../base/allocator/allocator.gyp:allocator',
406               ],
407             }],
408           ],  # end of 'conditions'
409         },  # end of target 'remoting_perftests'
410       ]
411     }]
412   ]