Ozone: Temporarily remove DCHECK in BufferFactory.
[chromium-blink-merge.git] / sync / BUILD.gn
blob65af3de406064b1718f4553ba868047e45f90964
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.
5 import("//build/config/features.gni")
7 component("sync") {
8   public_deps = [
9     ":sync_core",
10     "//sync/protocol",
11   ]
14 # GYP version: sync/sync.gyp:sync_core
15 source_set("sync_core") {
16   sources = [
17     "api/attachments/attachment.cc",
18     "api/attachments/attachment.h",
19     "api/attachments/attachment_id.cc",
20     "api/attachments/attachment_id.h",
21     "api/attachments/attachment_metadata.cc",
22     "api/attachments/attachment_metadata.h",
23     "api/attachments/attachment_store.cc",
24     "api/attachments/attachment_store.h",
25     "api/string_ordinal.h",
26     "api/syncable_service.cc",
27     "api/syncable_service.h",
28     "api/sync_change.cc",
29     "api/sync_change.h",
30     "api/sync_change_processor.cc",
31     "api/sync_change_processor.h",
32     "api/sync_data.cc",
33     "api/sync_data.h",
34     "api/sync_error.cc",
35     "api/sync_error_factory.cc",
36     "api/sync_error_factory.h",
37     "api/sync_error.h",
38     "api/sync_merge_result.cc",
39     "api/sync_merge_result.h",
40     "api/time.h",
41     "base/sync_export.h",
42     "engine/all_status.cc",
43     "engine/all_status.h",
44     "engine/apply_control_data_updates.cc",
45     "engine/apply_control_data_updates.h",
46     "engine/backoff_delay_provider.cc",
47     "engine/backoff_delay_provider.h",
48     "engine/commit.cc",
49     "engine/commit_contribution.cc",
50     "engine/commit_contribution.h",
51     "engine/commit_contributor.cc",
52     "engine/commit_contributor.h",
53     "engine/commit.h",
54     "engine/commit_processor.cc",
55     "engine/commit_processor.h",
56     "engine/commit_util.cc",
57     "engine/commit_util.h",
58     "engine/conflict_resolver.cc",
59     "engine/conflict_resolver.h",
60     "engine/conflict_util.cc",
61     "engine/conflict_util.h",
62     "engine/directory_commit_contribution.cc",
63     "engine/directory_commit_contribution.h",
64     "engine/directory_commit_contributor.cc",
65     "engine/directory_commit_contributor.h",
66     "engine/directory_update_handler.cc",
67     "engine/directory_update_handler.h",
68     "engine/entity_tracker.cc",
69     "engine/entity_tracker.h",
70     "engine/get_commit_ids.cc",
71     "engine/get_commit_ids.h",
72     "engine/get_updates_delegate.cc",
73     "engine/get_updates_delegate.h",
74     "engine/get_updates_processor.cc",
75     "engine/get_updates_processor.h",
76     "engine/model_type_entity.cc",
77     "engine/model_type_entity.h",
78     "engine/model_type_sync_proxy.cc",
79     "engine/model_type_sync_proxy.h",
80     "engine/model_type_sync_proxy_impl.cc",
81     "engine/model_type_sync_proxy_impl.h",
82     "engine/model_type_sync_worker.cc",
83     "engine/model_type_sync_worker.h",
84     "engine/model_type_sync_worker_impl.cc",
85     "engine/model_type_sync_worker_impl.h",
86     "engine/net/server_connection_manager.cc",
87     "engine/net/server_connection_manager.h",
88     "engine/net/url_translator.cc",
89     "engine/net/url_translator.h",
90     "engine/non_blocking_type_commit_contribution.cc",
91     "engine/non_blocking_type_commit_contribution.h",
92     "engine/nudge_handler.cc",
93     "engine/nudge_handler.h",
94     "engine/nudge_source.cc",
95     "engine/nudge_source.h",
96     "engine/process_updates_util.cc",
97     "engine/process_updates_util.h",
98     "engine/sync_cycle_event.cc",
99     "engine/sync_cycle_event.h",
100     "engine/sync_engine_event_listener.cc",
101     "engine/sync_engine_event_listener.h",
102     "engine/syncer.cc",
103     "engine/syncer.h",
104     "engine/syncer_proto_util.cc",
105     "engine/syncer_proto_util.h",
106     "engine/syncer_types.h",
107     "engine/syncer_util.cc",
108     "engine/syncer_util.h",
109     "engine/sync_scheduler.cc",
110     "engine/sync_scheduler.h",
111     "engine/sync_scheduler_impl.cc",
112     "engine/sync_scheduler_impl.h",
113     "engine/traffic_logger.cc",
114     "engine/traffic_logger.h",
115     "engine/update_applicator.cc",
116     "engine/update_applicator.h",
117     "engine/update_handler.cc",
118     "engine/update_handler.h",
119     "internal_api/attachments/attachment_downloader.cc",
120     "internal_api/attachments/attachment_downloader_impl.cc",
121     "internal_api/attachments/attachment_service.cc",
122     "internal_api/attachments/attachment_service_impl.cc",
123     "internal_api/attachments/attachment_service_proxy.cc",
124     "internal_api/attachments/attachment_service_proxy_for_test.cc",
125     "internal_api/attachments/attachment_store_handle.cc",
126     "internal_api/attachments/attachment_uploader.cc",
127     "internal_api/attachments/attachment_uploader_impl.cc",
128     "internal_api/attachments/attachment_util.cc",
129     "internal_api/attachments/fake_attachment_downloader.cc",
130     "internal_api/attachments/fake_attachment_uploader.cc",
131     "internal_api/attachments/in_memory_attachment_store.cc",
132     "internal_api/attachments/on_disk_attachment_store.cc",
133     "internal_api/base_node.cc",
134     "internal_api/base_transaction.cc",
135     "internal_api/change_record.cc",
136     "internal_api/change_reorder_buffer.cc",
137     "internal_api/change_reorder_buffer.h",
138     "internal_api/debug_info_event_listener.cc",
139     "internal_api/debug_info_event_listener.h",
140     "internal_api/delete_journal.cc",
141     "internal_api/events/commit_request_event.cc",
142     "internal_api/events/commit_response_event.cc",
143     "internal_api/events/configure_get_updates_request_event.cc",
144     "internal_api/events/get_updates_response_event.cc",
145     "internal_api/events/normal_get_updates_request_event.cc",
146     "internal_api/events/poll_get_updates_request_event.cc",
147     "internal_api/events/protocol_event.cc",
148     "internal_api/http_bridge.cc",
149     "internal_api/http_bridge_network_resources.cc",
150     "internal_api/internal_components_factory_impl.cc",
151     "internal_api/js_mutation_event_observer.cc",
152     "internal_api/js_mutation_event_observer.h",
153     "internal_api/js_sync_encryption_handler_observer.cc",
154     "internal_api/js_sync_encryption_handler_observer.h",
155     "internal_api/js_sync_manager_observer.cc",
156     "internal_api/js_sync_manager_observer.h",
157     "internal_api/protocol_event_buffer.cc",
158     "internal_api/protocol_event_buffer.h",
159     "internal_api/public/attachments/attachment_downloader.h",
160     "internal_api/public/attachments/attachment_downloader_impl.h",
161     "internal_api/public/attachments/attachment_service.h",
162     "internal_api/public/attachments/attachment_service_impl.h",
163     "internal_api/public/attachments/attachment_service_proxy.h",
164     "internal_api/public/attachments/attachment_service_proxy_for_test.h",
165     "internal_api/public/attachments/attachment_store_handle.h",
166     "internal_api/public/attachments/attachment_uploader.h",
167     "internal_api/public/attachments/attachment_uploader_impl.h",
168     "internal_api/public/attachments/attachment_util.h",
169     "internal_api/public/attachments/fake_attachment_downloader.h",
170     "internal_api/public/attachments/fake_attachment_uploader.h",
171     "internal_api/public/attachments/in_memory_attachment_store.h",
172     "internal_api/public/attachments/on_disk_attachment_store.h",
173     "internal_api/public/base/attachment_id_proto.cc",
174     "internal_api/public/base/attachment_id_proto.h",
175     "internal_api/public/base/cancelation_observer.cc",
176     "internal_api/public/base/cancelation_observer.h",
177     "internal_api/public/base/cancelation_signal.cc",
178     "internal_api/public/base/cancelation_signal.h",
179     "internal_api/public/base/enum_set.h",
180     "internal_api/public/base/invalidation_interface.cc",
181     "internal_api/public/base/invalidation_interface.h",
182     "internal_api/public/base/model_type.h",
183     "internal_api/public/base_node.h",
184     "internal_api/public/base/node_ordinal.cc",
185     "internal_api/public/base/node_ordinal.h",
186     "internal_api/public/base/ordinal.h",
187     "internal_api/public/base/progress_marker_map.cc",
188     "internal_api/public/base/progress_marker_map.h",
189     "internal_api/public/base_transaction.h",
190     "internal_api/public/base/unique_position.cc",
191     "internal_api/public/base/unique_position.h",
192     "internal_api/public/change_record.h",
193     "internal_api/public/configure_reason.h",
194     "internal_api/public/data_type_association_stats.cc",
195     "internal_api/public/data_type_association_stats.h",
196     "internal_api/public/data_type_debug_info_listener.cc",
197     "internal_api/public/data_type_debug_info_listener.h",
198     "internal_api/public/delete_journal.h",
199     "internal_api/public/engine/model_safe_worker.cc",
200     "internal_api/public/engine/model_safe_worker.h",
201     "internal_api/public/engine/passive_model_worker.cc",
202     "internal_api/public/engine/passive_model_worker.h",
203     "internal_api/public/engine/polling_constants.cc",
204     "internal_api/public/engine/polling_constants.h",
205     "internal_api/public/engine/sync_status.cc",
206     "internal_api/public/engine/sync_status.h",
207     "internal_api/public/events/commit_request_event.h",
208     "internal_api/public/events/commit_response_event.h",
209     "internal_api/public/events/configure_get_updates_request_event.h",
210     "internal_api/public/events/get_updates_response_event.h",
211     "internal_api/public/events/normal_get_updates_request_event.h",
212     "internal_api/public/events/poll_get_updates_request_event.h",
213     "internal_api/public/events/protocol_event.h",
214     "internal_api/public/http_bridge.h",
215     "internal_api/public/http_bridge_network_resources.h",
216     "internal_api/public/http_post_provider_factory.h",
217     "internal_api/public/http_post_provider_interface.h",
218     "internal_api/public/internal_components_factory.h",
219     "internal_api/public/internal_components_factory_impl.h",
220     "internal_api/public/network_resources.h",
221     "internal_api/public/non_blocking_sync_common.cc",
222     "internal_api/public/non_blocking_sync_common.h",
223     "internal_api/public/read_node.h",
224     "internal_api/public/read_transaction.h",
225     "internal_api/public/sessions/commit_counters.cc",
226     "internal_api/public/sessions/commit_counters.h",
227     "internal_api/public/sessions/model_neutral_state.cc",
228     "internal_api/public/sessions/model_neutral_state.h",
229     "internal_api/public/sessions/status_counters.cc",
230     "internal_api/public/sessions/status_counters.h",
231     "internal_api/public/sessions/sync_session_snapshot.cc",
232     "internal_api/public/sessions/sync_session_snapshot.h",
233     "internal_api/public/sessions/type_debug_info_observer.cc",
234     "internal_api/public/sessions/type_debug_info_observer.h",
235     "internal_api/public/sessions/update_counters.cc",
236     "internal_api/public/sessions/update_counters.h",
237     "internal_api/public/shutdown_reason.h",
238     "internal_api/public/sync_auth_provider.h",
239     "internal_api/public/sync_context.h",
240     "internal_api/public/sync_context_proxy.h",
241     "internal_api/public/sync_encryption_handler.cc",
242     "internal_api/public/sync_encryption_handler.h",
243     "internal_api/public/sync_manager.cc",
244     "internal_api/public/sync_manager_factory.h",
245     "internal_api/public/sync_manager.h",
246     "internal_api/public/user_share.h",
247     "internal_api/public/util/experiments.h",
248     "internal_api/public/util/immutable.h",
249     "internal_api/public/util/report_unrecoverable_error_function.h",
250     "internal_api/public/util/sync_db_util.h",
251     "internal_api/public/util/syncer_error.cc",
252     "internal_api/public/util/syncer_error.h",
253     "internal_api/public/util/sync_string_conversions.cc",
254     "internal_api/public/util/sync_string_conversions.h",
255     "internal_api/public/util/unrecoverable_error_handler.h",
256     "internal_api/public/util/unrecoverable_error_info.cc",
257     "internal_api/public/util/unrecoverable_error_info.h",
258     "internal_api/public/util/weak_handle.cc",
259     "internal_api/public/util/weak_handle.h",
260     "internal_api/public/write_node.h",
261     "internal_api/public/write_transaction.h",
262     "internal_api/read_node.cc",
263     "internal_api/read_transaction.cc",
264     "internal_api/syncapi_internal.cc",
265     "internal_api/syncapi_internal.h",
266     "internal_api/syncapi_server_connection_manager.cc",
267     "internal_api/syncapi_server_connection_manager.h",
268     "internal_api/sync_backup_manager.cc",
269     "internal_api/sync_backup_manager.h",
270     "internal_api/sync_context.cc",
271     "internal_api/sync_context_proxy.cc",
272     "internal_api/sync_context_proxy_impl.cc",
273     "internal_api/sync_context_proxy_impl.h",
274     "internal_api/sync_db_util.cc",
275     "internal_api/sync_encryption_handler_impl.cc",
276     "internal_api/sync_encryption_handler_impl.h",
277     "internal_api/sync_manager_factory.cc",
278     "internal_api/sync_manager_impl.cc",
279     "internal_api/sync_manager_impl.h",
280     "internal_api/sync_rollback_manager_base.cc",
281     "internal_api/sync_rollback_manager_base.h",
282     "internal_api/sync_rollback_manager.cc",
283     "internal_api/sync_rollback_manager.h",
284     "internal_api/user_share.cc",
285     "internal_api/write_node.cc",
286     "internal_api/write_transaction.cc",
287     "js/js_backend.h",
288     "js/js_controller.h",
289     "js/js_event_details.cc",
290     "js/js_event_details.h",
291     "js/js_event_handler.h",
292     "js/sync_js_controller.cc",
293     "js/sync_js_controller.h",
294     "protocol/proto_enum_conversions.cc",
295     "protocol/proto_enum_conversions.h",
296     "protocol/proto_value_conversions.cc",
297     "protocol/proto_value_conversions.h",
298     "protocol/sync_protocol_error.cc",
299     "protocol/sync_protocol_error.h",
300     "sessions/data_type_tracker.cc",
301     "sessions/data_type_tracker.h",
302     "sessions/debug_info_getter.h",
303     "sessions/directory_type_debug_info_emitter.cc",
304     "sessions/directory_type_debug_info_emitter.h",
305     "sessions/model_type_registry.cc",
306     "sessions/model_type_registry.h",
307     "sessions/nudge_tracker.cc",
308     "sessions/nudge_tracker.h",
309     "sessions/status_controller.cc",
310     "sessions/status_controller.h",
311     "sessions/sync_session.cc",
312     "sessions/sync_session_context.cc",
313     "sessions/sync_session_context.h",
314     "sessions/sync_session.h",
315     "syncable/blob.h",
316     "syncable/deferred_on_disk_directory_backing_store.cc",
317     "syncable/deferred_on_disk_directory_backing_store.h",
318     "syncable/directory_backing_store.cc",
319     "syncable/directory_backing_store.h",
320     "syncable/directory.cc",
321     "syncable/directory_change_delegate.h",
322     "syncable/directory.h",
323     "syncable/dir_open_result.h",
324     "syncable/entry.cc",
325     "syncable/entry.h",
326     "syncable/entry_kernel.cc",
327     "syncable/entry_kernel.h",
328     "syncable/in_memory_directory_backing_store.cc",
329     "syncable/in_memory_directory_backing_store.h",
330     "syncable/invalid_directory_backing_store.cc",
331     "syncable/invalid_directory_backing_store.h",
332     "syncable/metahandle_set.h",
333     "syncable/model_neutral_mutable_entry.cc",
334     "syncable/model_neutral_mutable_entry.h",
335     "syncable/model_type.cc",
336     "syncable/mutable_entry.cc",
337     "syncable/mutable_entry.h",
338     "syncable/nigori_handler.cc",
339     "syncable/nigori_handler.h",
340     "syncable/nigori_util.cc",
341     "syncable/nigori_util.h",
342     "syncable/on_disk_directory_backing_store.cc",
343     "syncable/on_disk_directory_backing_store.h",
344     "syncable/parent_child_index.cc",
345     "syncable/parent_child_index.h",
346     "syncable/scoped_kernel_lock.cc",
347     "syncable/scoped_kernel_lock.h",
348     "syncable/scoped_parent_child_index_updater.cc",
349     "syncable/scoped_parent_child_index_updater.h",
350     "syncable/syncable_base_transaction.cc",
351     "syncable/syncable_base_transaction.h",
352     "syncable/syncable_base_write_transaction.cc",
353     "syncable/syncable_base_write_transaction.h",
354     "syncable/syncable_changes_version.h",
355     "syncable/syncable_columns.h",
356     "syncable/syncable_delete_journal.cc",
357     "syncable/syncable_delete_journal.h",
358     "syncable/syncable_enum_conversions.cc",
359     "syncable/syncable_enum_conversions.h",
360     "syncable/syncable_id.cc",
361     "syncable/syncable_id.h",
362     "syncable/syncable-inl.h",
363     "syncable/syncable_model_neutral_write_transaction.cc",
364     "syncable/syncable_model_neutral_write_transaction.h",
365     "syncable/syncable_proto_util.cc",
366     "syncable/syncable_proto_util.h",
367     "syncable/syncable_read_transaction.cc",
368     "syncable/syncable_read_transaction.h",
369     "syncable/syncable_util.cc",
370     "syncable/syncable_util.h",
371     "syncable/syncable_write_transaction.cc",
372     "syncable/syncable_write_transaction.h",
373     "syncable/transaction_observer.h",
374     "syncable/write_transaction_info.cc",
375     "syncable/write_transaction_info.h",
376     "util/cryptographer.cc",
377     "util/cryptographer.h",
378     "util/data_type_histogram.h",
379     "util/encryptor.h",
380     "util/extensions_activity.cc",
381     "util/extensions_activity.h",
382     "util/get_session_name.cc",
383     "util/get_session_name.h",
384     "util/get_session_name_ios.h",
385     "util/get_session_name_ios.mm",
386     "util/get_session_name_linux.cc",
387     "util/get_session_name_linux.h",
388     "util/get_session_name_mac.h",
389     "util/get_session_name_mac.mm",
390     "util/get_session_name_win.cc",
391     "util/get_session_name_win.h",
392     "util/logging.cc",
393     "util/logging.h",
394     "util/nigori.cc",
395     "util/nigori.h",
396     "util/time.cc",
397     "util/time.h",
398   ]
400   deps = [
401     "//base",
402     "//base:i18n",
403     "//base/third_party/dynamic_annotations",
404     "//crypto",
405     "//google_apis",
406     "//net",
407     "//sql",
408     "//third_party/leveldatabase",
409     "//third_party/zlib",
410     "//url",
411     "//sync/internal_api/attachments/proto",
412     "//sync/protocol",
413   ]
415   if (is_chromeos) {
416     # Required by get_session_name.cc on Chrome OS.
417     deps += [ "//chromeos" ]
418   }
420   defines = [ "SYNC_IMPLEMENTATION" ]
421   configs += [ "//build/config/compiler:wexit_time_destructors" ]
424 # GYP version: sync/sync_tests.gypi:test_support_sync_core
425 static_library("test_support_sync_core") {
426   testonly = true
427   sources = [
428     "internal_api/public/base/model_type_test_util.cc",
429     "internal_api/public/base/model_type_test_util.h",
430     "js/js_test_util.cc",
431     "js/js_test_util.h",
432     "sessions/test_util.cc",
433     "sessions/test_util.h",
434     "test/callback_counter.h",
435     "test/engine/fake_model_worker.cc",
436     "test/engine/fake_model_worker.h",
437     "test/engine/fake_sync_scheduler.cc",
438     "test/engine/fake_sync_scheduler.h",
439     "test/engine/injectable_sync_context_proxy.cc",
440     "test/engine/injectable_sync_context_proxy.h",
441     "test/engine/mock_connection_manager.cc",
442     "test/engine/mock_connection_manager.h",
443     "test/engine/mock_model_type_sync_proxy.cc",
444     "test/engine/mock_model_type_sync_proxy.h",
445     "test/engine/mock_model_type_sync_worker.cc",
446     "test/engine/mock_model_type_sync_worker.h",
447     "test/engine/mock_nudge_handler.cc",
448     "test/engine/mock_nudge_handler.h",
449     "test/engine/mock_update_handler.cc",
450     "test/engine/mock_update_handler.h",
451     "test/engine/single_type_mock_server.cc",
452     "test/engine/single_type_mock_server.h",
453     "test/engine/test_directory_setter_upper.cc",
454     "test/engine/test_directory_setter_upper.h",
455     "test/engine/test_id_factory.h",
456     "test/engine/test_syncable_utils.cc",
457     "test/engine/test_syncable_utils.h",
458     "test/fake_encryptor.cc",
459     "test/fake_encryptor.h",
460     "test/fake_sync_encryption_handler.cc",
461     "test/fake_sync_encryption_handler.h",
462     "test/mock_invalidation.cc",
463     "test/mock_invalidation.h",
464     "test/mock_invalidation_tracker.cc",
465     "test/mock_invalidation_tracker.h",
466     "test/trackable_mock_invalidation.cc",
467     "test/trackable_mock_invalidation.h",
468     "test/null_directory_change_delegate.cc",
469     "test/null_directory_change_delegate.h",
470     "test/null_transaction_observer.cc",
471     "test/null_transaction_observer.h",
472     "test/sessions/test_scoped_session_event_listener.h",
473     "test/sessions/mock_debug_info_getter.h",
474     "test/sessions/mock_debug_info_getter.cc",
475     "test/test_directory_backing_store.cc",
476     "test/test_directory_backing_store.h",
477     "test/test_transaction_observer.cc",
478     "test/test_transaction_observer.h",
479     "util/test_unrecoverable_error_handler.cc",
480     "util/test_unrecoverable_error_handler.h",
481   ]
483   public_deps = [
484     "//base",
485     "//testing/gmock",
486     "//testing/gtest",
487     "//sync",
488   ]
490   defines = [ "SYNC_TEST" ]
491   configs += [ "//build/config/compiler:wexit_time_destructors" ]
494 # GYP version: sync/sync_tests.gypi:test_support_sync_internal_api
495 static_library("test_support_sync_internal_api") {
496   testonly = true
497   sources = [
498     "internal_api/public/test/fake_sync_manager.h",
499     "internal_api/public/test/null_sync_context_proxy.h",
500     "internal_api/public/test/sync_manager_factory_for_profile_sync_test.h",
501     "internal_api/public/test/test_entry_factory.h",
502     "internal_api/public/test/test_internal_components_factory.h",
503     "internal_api/public/test/test_user_share.h",
504     "internal_api/test/fake_sync_manager.cc",
505     "internal_api/test/null_sync_context_proxy.cc",
506     "internal_api/test/sync_manager_factory_for_profile_sync_test.cc",
507     "internal_api/test/sync_manager_for_profile_sync_test.cc",
508     "internal_api/test/sync_manager_for_profile_sync_test.h",
509     "internal_api/test/test_entry_factory.cc",
510     "internal_api/test/test_internal_components_factory.cc",
511     "internal_api/test/test_user_share.cc",
512   ]
514   public_deps = [
515     "//base",
516     "//testing/gtest",
517     "//sync",
518     ":test_support_sync_core",
519   ]
521   defines = [ "SYNC_TEST" ]
522   configs += [ "//build/config/compiler:wexit_time_destructors" ]
525 # GYP version: sync/sync_tests.gypi:test_support_sync_api
526 static_library("test_support_sync_api") {
527   testonly = true
528   sources = [
529     "api/fake_syncable_service.cc",
530     "api/fake_syncable_service.h",
531     "api/fake_sync_change_processor.cc",
532     "api/fake_sync_change_processor.h",
533     "api/sync_change_processor_wrapper_for_test.cc",
534     "api/sync_change_processor_wrapper_for_test.h",
535     "api/sync_error_factory_mock.cc",
536     "api/sync_error_factory_mock.h",
537   ]
539   defines = [ "SYNC_TEST" ]
541   public_deps = [
542     "//testing/gmock",
543     "//sync",
544   ]
547 # GYP version: sync/sync_tests.gypi:sync_unit_tests
548 test("sync_unit_tests") {
549   sources = [
550     "api/attachments/attachment_id_unittest.cc",
551     "api/attachments/attachment_metadata_unittest.cc",
552     "api/attachments/attachment_unittest.cc",
553     "api/sync_change_unittest.cc",
554     "api/sync_data_unittest.cc",
555     "api/sync_error_unittest.cc",
556     "api/sync_merge_result_unittest.cc",
557     "engine/apply_control_data_updates_unittest.cc",
558     "engine/backoff_delay_provider_unittest.cc",
559     "engine/directory_commit_contribution_unittest.cc",
560     "engine/directory_update_handler_unittest.cc",
561     "engine/entity_tracker_unittest.cc",
562     "engine/get_updates_processor_unittest.cc",
563     "engine/model_type_entity_unittest.cc",
564     "engine/model_type_sync_proxy_impl_unittest.cc",
565     "engine/model_type_sync_worker_impl_unittest.cc",
566     "engine/sync_scheduler_unittest.cc",
567     "engine/syncer_proto_util_unittest.cc",
568     "engine/syncer_unittest.cc",
569     "engine/syncer_util_unittest.cc",
570     "internal_api/attachments/attachment_downloader_impl_unittest.cc",
571     "internal_api/attachments/attachment_service_impl_unittest.cc",
572     "internal_api/attachments/attachment_service_proxy_unittest.cc",
573     "internal_api/attachments/attachment_store_handle_unittest.cc",
574     "internal_api/attachments/attachment_store_test_template.h",
575     "internal_api/attachments/attachment_uploader_impl_unittest.cc",
576     "internal_api/attachments/fake_attachment_downloader_unittest.cc",
577     "internal_api/attachments/fake_attachment_uploader_unittest.cc",
578     "internal_api/attachments/in_memory_attachment_store_unittest.cc",
579     "internal_api/attachments/on_disk_attachment_store_unittest.cc",
580     "internal_api/debug_info_event_listener_unittest.cc",
581     "internal_api/http_bridge_unittest.cc",
582     "internal_api/js_mutation_event_observer_unittest.cc",
583     "internal_api/js_sync_encryption_handler_observer_unittest.cc",
584     "internal_api/js_sync_manager_observer_unittest.cc",
585     "internal_api/protocol_event_buffer_unittest.cc",
586     "internal_api/public/base/attachment_id_proto_unittest.cc",
587     "internal_api/public/base/cancelation_signal_unittest.cc",
588     "internal_api/public/base/enum_set_unittest.cc",
589     "internal_api/public/base/node_ordinal_unittest.cc",
590     "internal_api/public/base/ordinal_unittest.cc",
591     "internal_api/public/base/unique_position_unittest.cc",
592     "internal_api/public/change_record_unittest.cc",
593     "internal_api/public/engine/model_safe_worker_unittest.cc",
594     "internal_api/public/sessions/sync_session_snapshot_unittest.cc",
595     "internal_api/public/util/immutable_unittest.cc",
596     "internal_api/public/util/weak_handle_unittest.cc",
597     "internal_api/sync_backup_manager_unittest.cc",
598     "internal_api/sync_context_proxy_impl_unittest.cc",
599     "internal_api/sync_encryption_handler_impl_unittest.cc",
600     "internal_api/sync_manager_impl_unittest.cc",
601     "internal_api/sync_rollback_manager_base_unittest.cc",
602     "internal_api/sync_rollback_manager_unittest.cc",
603     "internal_api/syncapi_server_connection_manager_unittest.cc",
604     "js/js_event_details_unittest.cc",
605     "js/sync_js_controller_unittest.cc",
606     "protocol/proto_enum_conversions_unittest.cc",
607     "protocol/proto_value_conversions_unittest.cc",
608     "sessions/model_type_registry_unittest.cc",
609     "sessions/nudge_tracker_unittest.cc",
610     "sessions/status_controller_unittest.cc",
611     "syncable/deferred_on_disk_directory_backing_store_unittest.cc",
612     "syncable/directory_backing_store_unittest.cc",
613     "syncable/directory_unittest.cc",
614     "syncable/directory_unittest.h",
615     "syncable/entry_kernel_unittest.cc",
616     "syncable/model_type_unittest.cc",
617     "syncable/nigori_util_unittest.cc",
618     "syncable/parent_child_index_unittest.cc",
619     "syncable/syncable_enum_conversions_unittest.cc",
620     "syncable/syncable_id_unittest.cc",
621     "syncable/syncable_unittest.cc",
622     "syncable/syncable_util_unittest.cc",
623     "util/cryptographer_unittest.cc",
624     "util/data_type_histogram_unittest.cc",
625     "util/get_session_name_unittest.cc",
626     "util/nigori_unittest.cc",
627     "util/protobuf_unittest.cc",
628   ]
630   deps = [
631     "//base",
632     "//base/allocator",
633     "//base/test:run_all_unittests",
634     "//google_apis",
635     "//google_apis:test_support",
636     "//net",
637     "//net:test_support",
638     "//sql",
639     "//sync",
640     "//testing/gmock",
641     "//testing/gtest",
642     "//third_party/leveldatabase",
643     "//third_party/protobuf:protobuf_lite",
644     ":test_support_sync_core",
645     ":test_support_sync_internal_api",
646   ]
648   # TODO(GYP)
649   #   ['OS == "android"', {
650   #     'dependencies': [
651   #       '../testing/android/native_test.gyp:native_test_native_code',
652   #     ],
653   #   }],
655   if (is_chromeos) {
656     # Required by get_session_name_unittest.cc on Chrome OS.
657     deps += [ "//chromeos" ]
658   }
660   if (is_ios) {
661     sources -= [ "internal_api/http_bridge_unittest.cc" ]
662   }
664   defines = [ "SYNC_TEST" ]
667 # GYP version: sync/sync_tests.gypi:test_support_sync_fake_server
668 static_library("test_support_sync_fake_server") {
669   testonly = true
670   sources = [
671     "test/fake_server/bookmark_entity.cc",
672     "test/fake_server/bookmark_entity.h",
673     "test/fake_server/bookmark_entity_builder.cc",
674     "test/fake_server/bookmark_entity_builder.h",
675     "test/fake_server/entity_builder.cc",
676     "test/fake_server/entity_builder.h",
677     "test/fake_server/entity_builder_factory.cc",
678     "test/fake_server/entity_builder_factory.h",
679     "test/fake_server/fake_server.cc",
680     "test/fake_server/fake_server.h",
681     "test/fake_server/fake_server_entity.cc",
682     "test/fake_server/fake_server_entity.h",
683     "test/fake_server/fake_server_http_post_provider.cc",
684     "test/fake_server/fake_server_http_post_provider.h",
685     "test/fake_server/fake_server_network_resources.cc",
686     "test/fake_server/fake_server_network_resources.h",
687     "test/fake_server/fake_server_verifier.cc",
688     "test/fake_server/fake_server_verifier.h",
689     "test/fake_server/permanent_entity.cc",
690     "test/fake_server/permanent_entity.h",
691     "test/fake_server/tombstone_entity.cc",
692     "test/fake_server/tombstone_entity.h",
693     "test/fake_server/unique_client_entity.cc",
694     "test/fake_server/unique_client_entity.h",
695   ]
697   deps = [
698     "//base",
699     "//net",
700     "//testing/gtest",
701     "//third_party/protobuf:protobuf_lite",
702     "//sync",
703   ]
705   forward_dependent_configs_from = [ "//third_party/protobuf:protobuf_lite" ]
707   configs += [ "//build/config/compiler:wexit_time_destructors" ]
710 # GYP version: sync/sync_tests.gypi:test_support_sync_testserver
711 static_library("test_support_sync_testserver") {
712   testonly = true
713   sources = [
714     "test/local_sync_test_server.cc",
715     "test/local_sync_test_server.h",
716   ]
718   configs += [ "//build/config/compiler:wexit_time_destructors" ]
720   public_deps = [
721     "//base",
722     "//net:test_support",
723   ]
724   deps = [
725     ":sync",
726     # The sync test server uses Python modules generated by the sync protos.
727     #  '../third_party/protobuf/protobuf.gyp:py_proto',  # TODO(GYP)
728   ]
731 # GYP version: sync/sync_tests.gypi:test_support_accounts_client
732 static_library("test_support_accounts_client") {
733   testonly = true
734   sources = [
735     "test/accounts_client/test_accounts_client.cc",
736     "test/accounts_client/test_accounts_client.h",
737     "test/accounts_client/url_request_context_getter.cc",
738     "test/accounts_client/url_request_context_getter.h",
739   ]
740   deps = [
741     "//base",
742     "//net",
743   ]
746 # GYP version: sync/sync_tests.gypi:sync_endtoend_tests
747 test("sync_endtoend_tests") {
748   sources = [
749     "test/accounts_client/test_accounts_client_unittest.cc",
750   ]
751   deps = [
752     "//base/test:run_all_unittests",
753     "//testing/gmock",
754     "//testing/gtest",
755     "//url",
756     ":test_support_accounts_client",
757   ]
760 if (!is_ios) {
761   # GYP version: sync/sync_tests.gypi:run_sync_testserver
762   executable("run_sync_testserver") {
763     testonly = true
764     sources = [
765       "tools/testserver/run_sync_testserver.cc",
766     ]
768     deps = [
769       "//base",
770       "//base/test:test_support",
771       "//net:test_support",
772       "//testing/gtest",
773       ":test_support_sync_testserver",
774     ]
775   }
778 if (is_android) {
779   import("//build/config/android/rules.gni")
781   # GYP: //sync/sync_tests.gypi:fake_server_jni
782   generate_jni("fake_server_jni") {
783     testonly = true
784     jni_package = "sync/test/fake_server"
785     sources = [
786       "//chrome/android/sync_shell/javatests/src/chromium/chrome/browser/sync/FakeServerHelper.java",
787     ]
788   }
790   # GYP: //sync/sync_tests.gypi:sync_java_test_support
791   android_library("sync_java_test_support") {
792     testonly = true
793     deps = [
794       "android:sync_java",
795       "//base:base_java",
796       "//base:base_java_test_support",
797       "//third_party/jsr-305:jsr_305_javalib",
798     ]
799     DEPRECATED_java_in_dir = "test/android/javatests/src"
800   }
802   # GYP: //sync/sync_tests.gypi:test_support_sync_fake_server_android
803   static_library("test_support_sync_fake_server_android") {
804     testonly = true
805     sources = [
806       "test/fake_server/android/fake_server_helper_android.cc",
807       "test/fake_server/android/fake_server_helper_android.h",
808     ]
809     deps = [
810       ":fake_server_jni",
811       ":test_support_sync_fake_server",
812       "//base",
813     ]
814   }
816   # GYP: //sync/sync_tests.gypi:sync_unit_tests_apk
817   unittest_apk("sync_unit_tests_apk") {
818     unittests_dep = ":sync_unit_tests"
819     deps = [
820       ":sync_unit_tests",
821     ]
822   }