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