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