Use extensions_path.h instead of chrome_path.h from extension_icon_image_unittest.cc
[chromium-blink-merge.git] / sync / sync_tests.gypi
blobb7b68c32192714664cc8e543571209d266b32f87
1 # Copyright 2013 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     # Test support files for the 'sync_core' target.
8     # GN version: //sync:test_support_sync_core
9     {
10       'target_name': 'test_support_sync_core',
11       'type': 'static_library',
12       'variables': { 'enable_wexit_time_destructors': 1, },
13       'include_dirs': [
14         '..',
15       ],
16       'defines': [
17         'SYNC_TEST'
18       ],
19       'dependencies': [
20         '../base/base.gyp:base',
21         '../testing/gmock.gyp:gmock',
22         '../testing/gtest.gyp:gtest',
23         'sync',
24       ],
25       'export_dependent_settings': [
26         '../testing/gmock.gyp:gmock',
27         '../testing/gtest.gyp:gtest',
28         'sync',
29       ],
30       'sources': [
31         'internal_api/public/base/model_type_test_util.cc',
32         'internal_api/public/base/model_type_test_util.h',
33         'js/js_test_util.cc',
34         'js/js_test_util.h',
35         'sessions/test_util.cc',
36         'sessions/test_util.h',
37         'test/callback_counter.h',
38         'test/engine/fake_model_worker.cc',
39         'test/engine/fake_model_worker.h',
40         'test/engine/fake_sync_scheduler.cc',
41         'test/engine/fake_sync_scheduler.h',
42         'test/engine/injectable_sync_context_proxy.cc',
43         'test/engine/injectable_sync_context_proxy.h',
44         'test/engine/mock_connection_manager.cc',
45         'test/engine/mock_connection_manager.h',
46         'test/engine/mock_model_type_sync_proxy.cc',
47         'test/engine/mock_model_type_sync_proxy.h',
48         'test/engine/mock_model_type_sync_worker.cc',
49         'test/engine/mock_model_type_sync_worker.h',
50         'test/engine/mock_nudge_handler.cc',
51         'test/engine/mock_nudge_handler.h',
52         'test/engine/mock_update_handler.cc',
53         'test/engine/mock_update_handler.h',
54         'test/engine/simple_cryptographer_provider.cc',
55         'test/engine/simple_cryptographer_provider.h',
56         'test/engine/single_type_mock_server.cc',
57         'test/engine/single_type_mock_server.h',
58         'test/engine/test_directory_setter_upper.cc',
59         'test/engine/test_directory_setter_upper.h',
60         'test/engine/test_id_factory.h',
61         'test/engine/test_syncable_utils.cc',
62         'test/engine/test_syncable_utils.h',
63         'test/fake_encryptor.cc',
64         'test/fake_encryptor.h',
65         'test/fake_sync_encryption_handler.cc',
66         'test/fake_sync_encryption_handler.h',
67         'test/mock_invalidation.cc',
68         'test/mock_invalidation.h',
69         'test/mock_invalidation_tracker.cc',
70         'test/mock_invalidation_tracker.h',
71         'test/trackable_mock_invalidation.cc',
72         'test/trackable_mock_invalidation.h',
73         'test/null_directory_change_delegate.cc',
74         'test/null_directory_change_delegate.h',
75         'test/null_transaction_observer.cc',
76         'test/null_transaction_observer.h',
77         'test/sessions/test_scoped_session_event_listener.h',
78         'test/sessions/mock_debug_info_getter.h',
79         'test/sessions/mock_debug_info_getter.cc',
80         'test/test_directory_backing_store.cc',
81         'test/test_directory_backing_store.h',
82         'test/test_transaction_observer.cc',
83         'test/test_transaction_observer.h',
84         'util/test_unrecoverable_error_handler.cc',
85         'util/test_unrecoverable_error_handler.h',
86       ],
87     },
89     # Test support files for the python sync test server.
90     # GN version: //sync:test_support_sync_testserver
91     {
92       'target_name': 'test_support_sync_testserver',
93       'type': 'static_library',
94       'variables': { 'enable_wexit_time_destructors': 1, },
95       'include_dirs': [
96         '..',
97       ],
98       'dependencies': [
99         '../base/base.gyp:base',
100         '../net/net.gyp:net_test_support',
101         # The sync test server uses Python modules generated by the sync protos.
102         '../third_party/protobuf/protobuf.gyp:py_proto',
103         'sync',
104       ],
105       'export_dependent_settings': [
106         '../base/base.gyp:base',
107         '../net/net.gyp:net_test_support',
108       ],
109       'sources': [
110         'test/local_sync_test_server.cc',
111         'test/local_sync_test_server.h',
112       ],
113     },
115     # Test support files for the fake sync server.
116     # GN version: //sync:test_support_sync_fake_server
117     {
118       'target_name': 'test_support_sync_fake_server',
119       'type': 'static_library',
120       'variables': { 'enable_wexit_time_destructors': 1, },
121       'include_dirs': [
122         '..',
123       ],
124       'dependencies': [
125         '../base/base.gyp:base',
126         '../net/net.gyp:net',
127         '../testing/gtest.gyp:gtest',
128         '../third_party/protobuf/protobuf.gyp:protobuf_lite',
129         'sync',
130       ],
131       'export_dependent_settings': [
132         'sync',
133       ],
134       'sources': [
135         'test/fake_server/bookmark_entity.cc',
136         'test/fake_server/bookmark_entity.h',
137         'test/fake_server/bookmark_entity_builder.cc',
138         'test/fake_server/bookmark_entity_builder.h',
139         'test/fake_server/entity_builder.cc',
140         'test/fake_server/entity_builder.h',
141         'test/fake_server/entity_builder_factory.cc',
142         'test/fake_server/entity_builder_factory.h',
143         'test/fake_server/fake_server.cc',
144         'test/fake_server/fake_server.h',
145         'test/fake_server/fake_server_entity.cc',
146         'test/fake_server/fake_server_entity.h',
147         'test/fake_server/fake_server_http_post_provider.cc',
148         'test/fake_server/fake_server_http_post_provider.h',
149         'test/fake_server/fake_server_network_resources.cc',
150         'test/fake_server/fake_server_network_resources.h',
151         'test/fake_server/fake_server_verifier.cc',
152         'test/fake_server/fake_server_verifier.h',
153         'test/fake_server/permanent_entity.cc',
154         'test/fake_server/permanent_entity.h',
155         'test/fake_server/tombstone_entity.cc',
156         'test/fake_server/tombstone_entity.h',
157         'test/fake_server/unique_client_entity.cc',
158         'test/fake_server/unique_client_entity.h',
159       ],
160     },
162     # Test support files for the 'sync_internal_api' target.
163     # GN version: //sync:test_support_sync_internal_api
164     {
165       'target_name': 'test_support_sync_internal_api',
166       'type': 'static_library',
167       'variables': { 'enable_wexit_time_destructors': 1, },
168       'include_dirs': [
169         '..',
170       ],
171       'defines': [
172         'SYNC_TEST'
173       ],
174       'dependencies': [
175         '../base/base.gyp:base',
176         '../testing/gtest.gyp:gtest',
177         'sync',
178         'test_support_sync_core',
179       ],
180       'export_dependent_settings': [
181         '../testing/gtest.gyp:gtest',
182         'sync',
183         'test_support_sync_core',
184       ],
185       'sources': [
186         'internal_api/public/test/fake_sync_manager.h',
187         'internal_api/public/test/null_sync_context_proxy.h',
188         'internal_api/public/test/sync_manager_factory_for_profile_sync_test.h',
189         'internal_api/public/test/test_entry_factory.h',
190         'internal_api/public/test/test_internal_components_factory.h',
191         'internal_api/public/test/test_user_share.h',
192         'internal_api/test/fake_sync_manager.cc',
193         'internal_api/test/null_sync_context_proxy.cc',
194         'internal_api/test/sync_manager_factory_for_profile_sync_test.cc',
195         'internal_api/test/sync_manager_for_profile_sync_test.cc',
196         'internal_api/test/sync_manager_for_profile_sync_test.h',
197         'internal_api/test/test_entry_factory.cc',
198         'internal_api/test/test_internal_components_factory.cc',
199         'internal_api/test/test_user_share.cc',
200       ],
201     },
203     # Test support files for the 'sync_api' target.
204     # GN version: //sync:test_support_sync_api
205     {
206       'target_name': 'test_support_sync_api',
207       'type': 'static_library',
208       'include_dirs': [
209         '..',
210       ],
211       'defines': [
212         'SYNC_TEST'
213       ],
214       'dependencies': [
215         '../testing/gmock.gyp:gmock',
216         'sync',
217       ],
218       'export_dependent_settings': [
219         '../testing/gmock.gyp:gmock',
220         'sync',
221       ],
222       'sources': [
223         'api/fake_syncable_service.cc',
224         'api/fake_syncable_service.h',
225         'api/fake_sync_change_processor.cc',
226         'api/fake_sync_change_processor.h',
227         'api/sync_change_processor_wrapper_for_test.cc',
228         'api/sync_change_processor_wrapper_for_test.h',
229         'api/sync_error_factory_mock.cc',
230         'api/sync_error_factory_mock.h',
231       ],
232     },
234     # The unit test executable for sync tests.
235     # GN version: //sync:sync_unit_tests
236     {
237       'target_name': 'sync_unit_tests',
238       'type': '<(gtest_target_type)',
239       # Typed-parametrized tests generate exit-time destructors.
240       'variables': { 'enable_wexit_time_destructors': 0, },
241       'defines': [
242         'SYNC_TEST',
243       ],
244       'dependencies': [
245         '../base/base.gyp:base',
246         '../base/base.gyp:run_all_unittests',
247         '../google_apis/google_apis.gyp:google_apis',
248         '../google_apis/google_apis.gyp:google_apis_test_support',
249         '../net/net.gyp:net',
250         '../net/net.gyp:net_test_support',
251         '../sql/sql.gyp:sql',
252         '../testing/gmock.gyp:gmock',
253         '../testing/gtest.gyp:gtest',
254         '../third_party/protobuf/protobuf.gyp:protobuf_lite',
255         'sync',
256         'test_support_sync_core',
257         'test_support_sync_internal_api',
258       ],
259       'include_dirs': [
260         '..',
261       ],
262       'sources': [
263         'api/attachments/attachment_id_unittest.cc',
264         'api/attachments/attachment_unittest.cc',
265         'api/attachments/fake_attachment_store_unittest.cc',
266         'api/sync_change_unittest.cc',
267         'api/sync_data_unittest.cc',
268         'api/sync_error_unittest.cc',
269         'api/sync_merge_result_unittest.cc',
270         'engine/apply_control_data_updates_unittest.cc',
271         'engine/backoff_delay_provider_unittest.cc',
272         'engine/directory_commit_contribution_unittest.cc',
273         'engine/directory_update_handler_unittest.cc',
274         'engine/entity_tracker_unittest.cc',
275         'engine/get_updates_processor_unittest.cc',
276         'engine/model_type_entity_unittest.cc',
277         'engine/model_type_sync_proxy_impl_unittest.cc',
278         'engine/model_type_sync_worker_impl_unittest.cc',
279         'engine/sync_scheduler_unittest.cc',
280         'engine/syncer_proto_util_unittest.cc',
281         'engine/syncer_unittest.cc',
282         'engine/syncer_util_unittest.cc',
283         'internal_api/attachments/attachment_downloader_impl_unittest.cc',
284         'internal_api/attachments/attachment_service_impl_unittest.cc',
285         'internal_api/attachments/attachment_service_proxy_unittest.cc',
286         'internal_api/attachments/attachment_uploader_impl_unittest.cc',
287         'internal_api/attachments/fake_attachment_downloader_unittest.cc',
288         'internal_api/attachments/fake_attachment_uploader_unittest.cc',
289         'internal_api/debug_info_event_listener_unittest.cc',
290         'internal_api/http_bridge_unittest.cc',
291         'internal_api/js_mutation_event_observer_unittest.cc',
292         'internal_api/js_sync_encryption_handler_observer_unittest.cc',
293         'internal_api/js_sync_manager_observer_unittest.cc',
294         'internal_api/protocol_event_buffer_unittest.cc',
295         'internal_api/public/base/attachment_id_proto_unittest.cc',
296         'internal_api/public/base/cancelation_signal_unittest.cc',
297         'internal_api/public/base/enum_set_unittest.cc',
298         'internal_api/public/base/node_ordinal_unittest.cc',
299         'internal_api/public/base/ordinal_unittest.cc',
300         'internal_api/public/base/unique_position_unittest.cc',
301         'internal_api/public/change_record_unittest.cc',
302         'internal_api/public/engine/model_safe_worker_unittest.cc',
303         'internal_api/public/sessions/sync_session_snapshot_unittest.cc',
304         'internal_api/public/util/immutable_unittest.cc',
305         'internal_api/public/util/weak_handle_unittest.cc',
306         'internal_api/sync_backup_manager_unittest.cc',
307         'internal_api/sync_context_proxy_impl_unittest.cc',
308         'internal_api/sync_encryption_handler_impl_unittest.cc',
309         'internal_api/sync_manager_impl_unittest.cc',
310         'internal_api/sync_rollback_manager_base_unittest.cc',
311         'internal_api/sync_rollback_manager_unittest.cc',
312         'internal_api/syncapi_server_connection_manager_unittest.cc',
313         'js/js_event_details_unittest.cc',
314         'js/sync_js_controller_unittest.cc',
315         'protocol/proto_enum_conversions_unittest.cc',
316         'protocol/proto_value_conversions_unittest.cc',
317         'sessions/model_type_registry_unittest.cc',
318         'sessions/nudge_tracker_unittest.cc',
319         'sessions/status_controller_unittest.cc',
320         'syncable/directory_backing_store_unittest.cc',
321         'syncable/directory_unittest.cc',
322         'syncable/directory_unittest.h',
323         'syncable/entry_kernel_unittest.cc',
324         'syncable/model_type_unittest.cc',
325         'syncable/nigori_util_unittest.cc',
326         'syncable/parent_child_index_unittest.cc',
327         'syncable/syncable_enum_conversions_unittest.cc',
328         'syncable/syncable_id_unittest.cc',
329         'syncable/syncable_unittest.cc',
330         'syncable/syncable_util_unittest.cc',
331         'util/cryptographer_unittest.cc',
332         'util/data_type_histogram_unittest.cc',
333         'util/get_session_name_unittest.cc',
334         'util/nigori_unittest.cc',
335         'util/protobuf_unittest.cc',
336       ],
337       'conditions': [
338         # TODO(akalin): This is needed because histogram.cc uses
339         # leak_annotations.h, which pulls this in.  Make 'base'
340         # propagate this dependency.
341         ['OS=="linux" and use_allocator!="none"', {
342           'dependencies': [
343             '../base/allocator/allocator.gyp:allocator',
344           ],
345         }],
346         ['OS == "android"', {
347           'dependencies': [
348             '../testing/android/native_test.gyp:native_test_native_code',
349           ],
350         }],
351         ['OS=="linux" and chromeos==1', {
352           # Required by get_session_name_unittest.cc on Chrome OS.
353           'dependencies': [
354             '../chromeos/chromeos.gyp:chromeos',
355           ],
356         }],
357         ['OS == "ios"', {
358           'sources!': [
359             'internal_api/http_bridge_unittest.cc',
360           ],
361         }],
362       ],
363     },
365     # Test support files for using the Test Accounts service.
366     # GN version: //sync:test_support_accounts_client
367     {
368       'target_name': 'test_support_accounts_client',
369       'type': 'static_library',
370       'direct_dependent_settings': {
371         'include_dirs': [
372           '..',
373         ],
374       },
375       'dependencies': [
376         '../base/base.gyp:base',
377         '../net/net.gyp:net',
378       ],
379       'sources': [
380         'test/accounts_client/test_accounts_client.cc',
381         'test/accounts_client/test_accounts_client.h',
382         'test/accounts_client/url_request_context_getter.cc',
383         'test/accounts_client/url_request_context_getter.h',
384       ],
385     },
387     # The Sync end-to-end (and associated infrastructure) tests.
388     # GN version: //sync:sync_endtoend_tests
389     {
390       'target_name': 'sync_endtoend_tests',
391       'type': '<(gtest_target_type)',
392       'dependencies': [
393         '../base/base.gyp:run_all_unittests',
394         '../testing/gmock.gyp:gmock',
395         '../testing/gtest.gyp:gtest',
396         '../url/url.gyp:url_lib',
397         'test_support_accounts_client',
398       ],
399       'sources': [
400         'test/accounts_client/test_accounts_client_unittest.cc',
401       ],
402     },
404   ],
405   'conditions': [
406     ['OS != "ios"', {
407       'targets': [
408         # A tool that can be used to launch a python sync server instance.
409         {
410           'target_name': 'run_sync_testserver',
411           'type': 'executable',
412           'dependencies': [
413             '../base/base.gyp:base',
414             '../base/base.gyp:test_support_base',
415             '../net/net.gyp:net_test_support',
416             '../testing/gtest.gyp:gtest',
417             'test_support_sync_testserver',
418           ],
419           'sources': [
420             'tools/testserver/run_sync_testserver.cc',
421           ],
422         },
423       ],
424     }],
425     ['OS == "android"', {
426       'targets': [
427         {
428           'target_name': 'sync_javatests',
429           'type': 'none',
430           'variables': {
431             'java_in_dir': '../sync/android/javatests',
432           },
433           'dependencies': [
434             'sync_java',
435             'sync_java_test_support',
436             '../base/base.gyp:base_java_test_support',
437           ],
438           'includes': [ '../build/java.gypi' ],
439         },
440         {
441           'target_name': 'sync_java_test_support',
442           'type': 'none',
443           'variables': {
444             'package_name': 'sync_java_test_support',
445             'java_in_dir': '../sync/test/android/javatests',
446           },
447           'dependencies': [
448             'sync_java',
449           ],
450           'includes': [ '../build/java.gypi' ],
451         },
452       ],
453     }],
454     ['OS == "android"', {
455       'targets': [
456         {
457           'target_name': 'sync_unit_tests_apk',
458           'type': 'none',
459           'dependencies': [
460             'sync_unit_tests',
461           ],
462           'variables': {
463             'test_suite_name': 'sync_unit_tests',
464           },
465           'includes': [ '../build/apk_test.gypi' ],
466         },
467       ],
468     }],
469   ],