blob: 6a18ef534582084473c90359cf866b399645f0b3 [file] [log] [blame]
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/buildflag_header.gni")
import("//build/config/features.gni")
import("//build/config/jumbo.gni")
import("//components/sync/protocol/protocol_sources.gni")
import("//testing/test.gni")
# TODO(crbug.com/947443): This target should be split up into "engine", "model",
# "syncable" etc, but currently they all depend on each other.
jumbo_static_library("rest_of_sync") {
sources = [
"engine/commit_queue.cc",
"engine/commit_queue.h",
"engine/configure_reason.h",
"engine/cycle/commit_counters.cc",
"engine/cycle/commit_counters.h",
"engine/cycle/model_neutral_state.cc",
"engine/cycle/model_neutral_state.h",
"engine/cycle/status_counters.cc",
"engine/cycle/status_counters.h",
"engine/cycle/sync_cycle_snapshot.cc",
"engine/cycle/sync_cycle_snapshot.h",
"engine/cycle/type_debug_info_observer.cc",
"engine/cycle/type_debug_info_observer.h",
"engine/cycle/update_counters.cc",
"engine/cycle/update_counters.h",
"engine/data_type_activation_response.cc",
"engine/data_type_activation_response.h",
"engine/data_type_association_stats.cc",
"engine/data_type_association_stats.h",
"engine/data_type_debug_info_listener.cc",
"engine/data_type_debug_info_listener.h",
"engine/engine_components_factory.h",
"engine/engine_components_factory_impl.cc",
"engine/engine_components_factory_impl.h",
"engine/engine_util.cc",
"engine/engine_util.h",
"engine/events/protocol_event.cc",
"engine/events/protocol_event.h",
"engine/events/protocol_event_observer.cc",
"engine/events/protocol_event_observer.h",
"engine/model_safe_worker.cc",
"engine/model_safe_worker.h",
"engine/model_type_configurer.cc",
"engine/model_type_configurer.h",
"engine/model_type_connector.cc",
"engine/model_type_connector.h",
"engine/model_type_processor.cc",
"engine/model_type_processor.h",
"engine/model_type_processor_proxy.cc",
"engine/model_type_processor_proxy.h",
"engine/net/http_bridge.cc",
"engine/net/http_bridge.h",
"engine/net/http_bridge_network_resources.cc",
"engine/net/http_bridge_network_resources.h",
"engine/net/http_post_provider_factory.h",
"engine/net/http_post_provider_interface.h",
"engine/net/network_resources.h",
"engine/non_blocking_sync_common.cc",
"engine/non_blocking_sync_common.h",
"engine/passive_model_worker.cc",
"engine/passive_model_worker.h",
"engine/polling_constants.cc",
"engine/polling_constants.h",
"engine/sequenced_model_worker.cc",
"engine/sequenced_model_worker.h",
"engine/shutdown_reason.cc",
"engine/shutdown_reason.h",
"engine/sync_auth_provider.h",
"engine/sync_backend_registrar.cc",
"engine/sync_backend_registrar.h",
"engine/sync_credentials.cc",
"engine/sync_credentials.h",
"engine/sync_encryption_handler.cc",
"engine/sync_encryption_handler.h",
"engine/sync_engine.cc",
"engine/sync_engine.h",
"engine/sync_engine_host.cc",
"engine/sync_engine_host.h",
"engine/sync_engine_switches.cc",
"engine/sync_engine_switches.h",
"engine/sync_manager.cc",
"engine/sync_manager.h",
"engine/sync_manager_factory.cc",
"engine/sync_manager_factory.h",
"engine/sync_status.cc",
"engine/sync_status.h",
"engine/sync_string_conversions.cc",
"engine/sync_string_conversions.h",
"engine/ui_model_worker.cc",
"engine/ui_model_worker.h",
"engine_impl/all_status.cc",
"engine_impl/all_status.h",
"engine_impl/apply_control_data_updates.cc",
"engine_impl/apply_control_data_updates.h",
"engine_impl/backoff_delay_provider.cc",
"engine_impl/backoff_delay_provider.h",
"engine_impl/commit.cc",
"engine_impl/commit.h",
"engine_impl/commit_contribution.cc",
"engine_impl/commit_contribution.h",
"engine_impl/commit_contributor.cc",
"engine_impl/commit_contributor.h",
"engine_impl/commit_processor.cc",
"engine_impl/commit_processor.h",
"engine_impl/commit_util.cc",
"engine_impl/commit_util.h",
"engine_impl/conflict_resolver.cc",
"engine_impl/conflict_resolver.h",
"engine_impl/conflict_util.cc",
"engine_impl/conflict_util.h",
"engine_impl/cycle/data_type_debug_info_emitter.cc",
"engine_impl/cycle/data_type_debug_info_emitter.h",
"engine_impl/cycle/data_type_tracker.cc",
"engine_impl/cycle/data_type_tracker.h",
"engine_impl/cycle/debug_info_getter.h",
"engine_impl/cycle/directory_type_debug_info_emitter.cc",
"engine_impl/cycle/directory_type_debug_info_emitter.h",
"engine_impl/cycle/non_blocking_type_debug_info_emitter.cc",
"engine_impl/cycle/non_blocking_type_debug_info_emitter.h",
"engine_impl/cycle/nudge_tracker.cc",
"engine_impl/cycle/nudge_tracker.h",
"engine_impl/cycle/status_controller.cc",
"engine_impl/cycle/status_controller.h",
"engine_impl/cycle/sync_cycle.cc",
"engine_impl/cycle/sync_cycle.h",
"engine_impl/cycle/sync_cycle_context.cc",
"engine_impl/cycle/sync_cycle_context.h",
"engine_impl/debug_info_event_listener.cc",
"engine_impl/debug_info_event_listener.h",
"engine_impl/directory_commit_contribution.cc",
"engine_impl/directory_commit_contribution.h",
"engine_impl/directory_commit_contributor.cc",
"engine_impl/directory_commit_contributor.h",
"engine_impl/directory_update_handler.cc",
"engine_impl/directory_update_handler.h",
"engine_impl/events/commit_request_event.cc",
"engine_impl/events/commit_request_event.h",
"engine_impl/events/commit_response_event.cc",
"engine_impl/events/commit_response_event.h",
"engine_impl/events/configure_get_updates_request_event.cc",
"engine_impl/events/configure_get_updates_request_event.h",
"engine_impl/events/get_updates_response_event.cc",
"engine_impl/events/get_updates_response_event.h",
"engine_impl/events/normal_get_updates_request_event.cc",
"engine_impl/events/normal_get_updates_request_event.h",
"engine_impl/events/poll_get_updates_request_event.cc",
"engine_impl/events/poll_get_updates_request_event.h",
"engine_impl/events/protocol_event_buffer.cc",
"engine_impl/events/protocol_event_buffer.h",
"engine_impl/get_commit_ids.cc",
"engine_impl/get_commit_ids.h",
"engine_impl/get_updates_delegate.cc",
"engine_impl/get_updates_delegate.h",
"engine_impl/get_updates_processor.cc",
"engine_impl/get_updates_processor.h",
"engine_impl/js_mutation_event_observer.cc",
"engine_impl/js_mutation_event_observer.h",
"engine_impl/js_sync_encryption_handler_observer.cc",
"engine_impl/js_sync_encryption_handler_observer.h",
"engine_impl/js_sync_manager_observer.cc",
"engine_impl/js_sync_manager_observer.h",
"engine_impl/loopback_server/loopback_connection_manager.cc",
"engine_impl/loopback_server/loopback_connection_manager.h",
"engine_impl/loopback_server/loopback_server.cc",
"engine_impl/loopback_server/loopback_server.h",
"engine_impl/loopback_server/loopback_server_entity.cc",
"engine_impl/loopback_server/loopback_server_entity.h",
"engine_impl/loopback_server/persistent_bookmark_entity.cc",
"engine_impl/loopback_server/persistent_bookmark_entity.h",
"engine_impl/loopback_server/persistent_permanent_entity.cc",
"engine_impl/loopback_server/persistent_permanent_entity.h",
"engine_impl/loopback_server/persistent_tombstone_entity.cc",
"engine_impl/loopback_server/persistent_tombstone_entity.h",
"engine_impl/loopback_server/persistent_unique_client_entity.cc",
"engine_impl/loopback_server/persistent_unique_client_entity.h",
"engine_impl/model_type_connector_proxy.cc",
"engine_impl/model_type_connector_proxy.h",
"engine_impl/model_type_registry.cc",
"engine_impl/model_type_registry.h",
"engine_impl/model_type_worker.cc",
"engine_impl/model_type_worker.h",
"engine_impl/net/server_connection_manager.cc",
"engine_impl/net/server_connection_manager.h",
"engine_impl/net/sync_server_connection_manager.cc",
"engine_impl/net/sync_server_connection_manager.h",
"engine_impl/net/url_translator.cc",
"engine_impl/net/url_translator.h",
"engine_impl/non_blocking_type_commit_contribution.cc",
"engine_impl/non_blocking_type_commit_contribution.h",
"engine_impl/nudge_handler.cc",
"engine_impl/nudge_handler.h",
"engine_impl/nudge_source.cc",
"engine_impl/nudge_source.h",
"engine_impl/process_updates_util.cc",
"engine_impl/process_updates_util.h",
"engine_impl/sync_cycle_event.cc",
"engine_impl/sync_cycle_event.h",
"engine_impl/sync_encryption_handler_impl.cc",
"engine_impl/sync_encryption_handler_impl.h",
"engine_impl/sync_engine_event_listener.cc",
"engine_impl/sync_engine_event_listener.h",
"engine_impl/sync_manager_impl.cc",
"engine_impl/sync_manager_impl.h",
"engine_impl/sync_scheduler.cc",
"engine_impl/sync_scheduler.h",
"engine_impl/sync_scheduler_impl.cc",
"engine_impl/sync_scheduler_impl.h",
"engine_impl/syncer.cc",
"engine_impl/syncer.h",
"engine_impl/syncer_proto_util.cc",
"engine_impl/syncer_proto_util.h",
"engine_impl/syncer_types.h",
"engine_impl/syncer_util.cc",
"engine_impl/syncer_util.h",
"engine_impl/traffic_logger.cc",
"engine_impl/traffic_logger.h",
"engine_impl/update_applicator.cc",
"engine_impl/update_applicator.h",
"engine_impl/update_handler.cc",
"engine_impl/update_handler.h",
"engine_impl/uss_migrator.cc",
"engine_impl/uss_migrator.h",
"model/blocking_model_type_store.h",
"model/change_processor.cc",
"model/change_processor.h",
"model/conflict_resolution.cc",
"model/conflict_resolution.h",
"model/data_batch.h",
"model/data_type_activation_request.cc",
"model/data_type_activation_request.h",
"model/data_type_error_handler.h",
"model/data_type_error_handler_impl.cc",
"model/data_type_error_handler_impl.h",
"model/entity_change.cc",
"model/entity_change.h",
"model/entity_data.cc",
"model/entity_data.h",
"model/local_change_observer.h",
"model/metadata_batch.cc",
"model/metadata_batch.h",
"model/metadata_change_list.h",
"model/model_error.cc",
"model/model_error.h",
"model/model_type_change_processor.cc",
"model/model_type_change_processor.h",
"model/model_type_store.h",
"model/model_type_store_base.cc",
"model/model_type_store_base.h",
"model/model_type_store_service.h",
"model/model_type_sync_bridge.cc",
"model/model_type_sync_bridge.h",
"model/mutable_data_batch.cc",
"model/mutable_data_batch.h",
"model/string_ordinal.h",
"model/sync_change.cc",
"model/sync_change.h",
"model/sync_change_processor.cc",
"model/sync_change_processor.h",
"model/sync_data.cc",
"model/sync_data.h",
"model/sync_error.cc",
"model/sync_error.h",
"model/sync_error_factory.cc",
"model/sync_error_factory.h",
"model/sync_merge_result.cc",
"model/sync_merge_result.h",
"model/sync_metadata_store.h",
"model/syncable_service.h",
"model/time.h",
"model_impl/blocking_model_type_store_impl.cc",
"model_impl/blocking_model_type_store_impl.h",
"model_impl/client_tag_based_model_type_processor.cc",
"model_impl/client_tag_based_model_type_processor.h",
"model_impl/forwarding_model_type_controller_delegate.cc",
"model_impl/forwarding_model_type_controller_delegate.h",
"model_impl/in_memory_metadata_change_list.cc",
"model_impl/in_memory_metadata_change_list.h",
"model_impl/model_type_store_backend.cc",
"model_impl/model_type_store_backend.h",
"model_impl/model_type_store_impl.cc",
"model_impl/model_type_store_impl.h",
"model_impl/model_type_store_service_impl.cc",
"model_impl/model_type_store_service_impl.h",
"model_impl/processor_entity.cc",
"model_impl/processor_entity.h",
"model_impl/proxy_model_type_controller_delegate.cc",
"model_impl/proxy_model_type_controller_delegate.h",
"model_impl/sync_metadata_store_change_list.cc",
"model_impl/sync_metadata_store_change_list.h",
"model_impl/syncable_service_based_bridge.cc",
"model_impl/syncable_service_based_bridge.h",
"nigori/keystore_keys_handler.h",
"nigori/nigori_local_change_processor.cc",
"nigori/nigori_local_change_processor.h",
"nigori/nigori_model_type_processor.cc",
"nigori/nigori_model_type_processor.h",
"nigori/nigori_sync_bridge.h",
"nigori/nigori_sync_bridge_impl.cc",
"nigori/nigori_sync_bridge_impl.h",
"syncable/base_node.cc",
"syncable/base_node.h",
"syncable/base_transaction.cc",
"syncable/base_transaction.h",
"syncable/change_record.cc",
"syncable/change_record.h",
"syncable/change_reorder_buffer.cc",
"syncable/change_reorder_buffer.h",
"syncable/delete_journal.cc",
"syncable/delete_journal.h",
"syncable/dir_open_result.h",
"syncable/directory.cc",
"syncable/directory.h",
"syncable/directory_backing_store.cc",
"syncable/directory_backing_store.h",
"syncable/directory_change_delegate.h",
"syncable/entry.cc",
"syncable/entry.h",
"syncable/entry_kernel.cc",
"syncable/entry_kernel.h",
"syncable/in_memory_directory_backing_store.cc",
"syncable/in_memory_directory_backing_store.h",
"syncable/invalid_directory_backing_store.cc",
"syncable/invalid_directory_backing_store.h",
"syncable/metahandle_set.h",
"syncable/model_neutral_mutable_entry.cc",
"syncable/model_neutral_mutable_entry.h",
"syncable/mutable_entry.cc",
"syncable/mutable_entry.h",
"syncable/nigori_handler.cc",
"syncable/nigori_handler.h",
"syncable/nigori_util.cc",
"syncable/nigori_util.h",
"syncable/on_disk_directory_backing_store.cc",
"syncable/on_disk_directory_backing_store.h",
"syncable/parent_child_index.cc",
"syncable/parent_child_index.h",
"syncable/read_node.cc",
"syncable/read_node.h",
"syncable/read_transaction.cc",
"syncable/read_transaction.h",
"syncable/scoped_kernel_lock.cc",
"syncable/scoped_kernel_lock.h",
"syncable/scoped_parent_child_index_updater.cc",
"syncable/scoped_parent_child_index_updater.h",
"syncable/syncable_base_transaction.cc",
"syncable/syncable_base_transaction.h",
"syncable/syncable_base_write_transaction.cc",
"syncable/syncable_base_write_transaction.h",
"syncable/syncable_changes_version.h",
"syncable/syncable_columns.h",
"syncable/syncable_delete_journal.cc",
"syncable/syncable_delete_journal.h",
"syncable/syncable_enum_conversions.cc",
"syncable/syncable_enum_conversions.h",
"syncable/syncable_id.cc",
"syncable/syncable_id.h",
"syncable/syncable_model_neutral_write_transaction.cc",
"syncable/syncable_model_neutral_write_transaction.h",
"syncable/syncable_proto_util.cc",
"syncable/syncable_proto_util.h",
"syncable/syncable_read_transaction.cc",
"syncable/syncable_read_transaction.h",
"syncable/syncable_util.cc",
"syncable/syncable_util.h",
"syncable/syncable_write_transaction.cc",
"syncable/syncable_write_transaction.h",
"syncable/transaction_observer.h",
"syncable/user_share.cc",
"syncable/user_share.h",
"syncable/write_node.cc",
"syncable/write_node.h",
"syncable/write_transaction.cc",
"syncable/write_transaction.h",
"syncable/write_transaction_info.cc",
"syncable/write_transaction_info.h",
]
configs += [ "//build/config:precompiled_headers" ]
public_deps = [
"//base",
"//components/sync/base",
"//components/sync/js",
"//components/sync/protocol",
"//components/sync/protocol:util",
"//net",
"//third_party/leveldatabase",
"//url",
]
deps = [
"//base:i18n",
"//components/keyed_service/core",
"//services/network/public/cpp",
"//sql",
"//third_party/cacheinvalidation",
"//third_party/crc32c",
"//third_party/zlib/google:compression_utils",
"//ui/base",
]
if (is_android) {
deps += [ "//components/sync/android:jni_headers" ]
sources += [ "android/model_type_helper.cc" ]
}
configs += [ "//build/config/compiler:wexit_time_destructors" ]
}
group("sync") {
public_deps = [
":rest_of_sync",
"//components/sync/driver",
]
}
static_library("test_support_user_events") {
testonly = true
sources = [
"user_events/fake_user_event_service.cc",
"user_events/fake_user_event_service.h",
]
public_deps = [
":test_support_base",
]
deps = [
":sync",
":test_support_model",
"//components/sync/user_events",
]
}
static_library("test_support_base") {
testonly = true
sources = [
"base/fake_encryptor.cc",
"base/fake_encryptor.h",
"base/mock_unrecoverable_error_handler.cc",
"base/mock_unrecoverable_error_handler.h",
"base/model_type_test_util.cc",
"base/model_type_test_util.h",
"base/test_unrecoverable_error_handler.cc",
"base/test_unrecoverable_error_handler.h",
"js/js_test_util.cc",
"js/js_test_util.h",
"test/callback_counter.h",
"test/mock_invalidation.cc",
"test/mock_invalidation.h",
"test/mock_invalidation_tracker.cc",
"test/mock_invalidation_tracker.h",
"test/test_matchers.h",
"test/trackable_mock_invalidation.cc",
"test/trackable_mock_invalidation.h",
]
public_deps = [
"//base",
"//testing/gmock",
"//testing/gtest",
]
deps = [
":sync",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
}
static_library("test_support_engine") {
testonly = true
sources = [
"engine/fake_model_type_connector.cc",
"engine/fake_model_type_connector.h",
"engine/fake_model_type_processor.cc",
"engine/fake_model_type_processor.h",
"engine/fake_sync_manager.cc",
"engine/fake_sync_manager.h",
"engine/sync_engine_host_stub.cc",
"engine/sync_engine_host_stub.h",
"engine/sync_manager_factory_for_profile_sync_test.cc",
"engine/sync_manager_factory_for_profile_sync_test.h",
"engine/test_engine_components_factory.cc",
"engine/test_engine_components_factory.h",
"engine_impl/cycle/mock_debug_info_getter.cc",
"engine_impl/cycle/mock_debug_info_getter.h",
"engine_impl/cycle/test_util.cc",
"engine_impl/cycle/test_util.h",
"engine_impl/sync_manager_for_profile_sync_test.cc",
"engine_impl/sync_manager_for_profile_sync_test.h",
"engine_impl/test_entry_factory.cc",
"engine_impl/test_entry_factory.h",
"syncable/test_user_share.cc",
"syncable/test_user_share.h",
"test/engine/fake_model_worker.cc",
"test/engine/fake_model_worker.h",
"test/engine/fake_sync_scheduler.cc",
"test/engine/fake_sync_scheduler.h",
"test/engine/mock_connection_manager.cc",
"test/engine/mock_connection_manager.h",
"test/engine/mock_model_type_processor.cc",
"test/engine/mock_model_type_processor.h",
"test/engine/mock_model_type_worker.cc",
"test/engine/mock_model_type_worker.h",
"test/engine/mock_nudge_handler.cc",
"test/engine/mock_nudge_handler.h",
"test/engine/mock_update_handler.cc",
"test/engine/mock_update_handler.h",
"test/engine/single_type_mock_server.cc",
"test/engine/single_type_mock_server.h",
"test/engine/test_directory_setter_upper.cc",
"test/engine/test_directory_setter_upper.h",
"test/engine/test_id_factory.h",
"test/engine/test_syncable_utils.cc",
"test/engine/test_syncable_utils.h",
"test/fake_sync_encryption_handler.cc",
"test/fake_sync_encryption_handler.h",
"test/null_directory_change_delegate.cc",
"test/null_directory_change_delegate.h",
"test/null_transaction_observer.cc",
"test/null_transaction_observer.h",
"test/test_directory_backing_store.cc",
"test/test_directory_backing_store.h",
"test/test_transaction_observer.cc",
"test/test_transaction_observer.h",
]
public_deps = [
":test_support_base",
]
deps = [
":sync",
"//services/network:test_support",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
}
static_library("test_support_model") {
testonly = true
sources = [
"model/data_type_error_handler_mock.cc",
"model/data_type_error_handler_mock.h",
"model/fake_model_type_change_processor.cc",
"model/fake_model_type_change_processor.h",
"model/fake_model_type_controller_delegate.cc",
"model/fake_model_type_controller_delegate.h",
"model/fake_model_type_sync_bridge.cc",
"model/fake_model_type_sync_bridge.h",
"model/fake_sync_change_processor.cc",
"model/fake_sync_change_processor.h",
"model/fake_syncable_service.cc",
"model/fake_syncable_service.h",
"model/mock_model_type_change_processor.cc",
"model/mock_model_type_change_processor.h",
"model/model_type_store_test_util.cc",
"model/model_type_store_test_util.h",
"model/recording_model_type_change_processor.cc",
"model/recording_model_type_change_processor.h",
"model/stub_model_type_sync_bridge.cc",
"model/stub_model_type_sync_bridge.h",
"model/sync_change_processor_wrapper_for_test.cc",
"model/sync_change_processor_wrapper_for_test.h",
"model/sync_error_factory_mock.cc",
"model/sync_error_factory_mock.h",
"model/test_model_type_store_service.cc",
"model/test_model_type_store_service.h",
]
public_deps = [
":test_support_base",
]
deps = [
":sync",
]
}
static_library("test_support_driver") {
testonly = true
sources = [
"driver/async_directory_type_controller_mock.cc",
"driver/async_directory_type_controller_mock.h",
"driver/data_type_controller_mock.cc",
"driver/data_type_controller_mock.h",
"driver/data_type_manager_mock.cc",
"driver/data_type_manager_mock.h",
"driver/fake_data_type_controller.cc",
"driver/fake_data_type_controller.h",
"driver/fake_generic_change_processor.cc",
"driver/fake_generic_change_processor.h",
"driver/fake_sync_service.cc",
"driver/fake_sync_service.h",
"driver/frontend_data_type_controller_mock.cc",
"driver/frontend_data_type_controller_mock.h",
"driver/mock_sync_service.cc",
"driver/mock_sync_service.h",
"driver/model_associator_mock.cc",
"driver/model_associator_mock.h",
"driver/profile_sync_service_bundle.cc",
"driver/profile_sync_service_bundle.h",
"driver/sync_api_component_factory_mock.cc",
"driver/sync_api_component_factory_mock.h",
"driver/sync_client_mock.cc",
"driver/sync_client_mock.h",
"driver/sync_user_settings_mock.cc",
"driver/sync_user_settings_mock.h",
"driver/test_profile_sync_service.cc",
"driver/test_profile_sync_service.h",
"driver/test_sync_service.cc",
"driver/test_sync_service.h",
"driver/test_sync_user_settings.cc",
"driver/test_sync_user_settings.h",
"engine/fake_sync_engine.cc",
"engine/fake_sync_engine.h",
"engine/mock_sync_engine.cc",
"engine/mock_sync_engine.h",
"model/change_processor_mock.cc",
"model/change_processor_mock.h",
]
public_deps = [
":test_support_base",
]
deps = [
":sync",
":test_support_engine",
":test_support_model",
"//components/invalidation/impl:test_support",
"//components/pref_registry",
"//components/signin/core/browser:shared",
"//components/sync/driver",
"//components/sync_preferences:test_support",
"//components/version_info",
"//components/version_info:generate_version_info",
"//google_apis",
"//services/identity/public/cpp:test_support",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"base/bind_to_task_runner_unittest.cc",
"base/cancelation_signal_unittest.cc",
"base/cryptographer_unittest.cc",
"base/data_type_histogram_unittest.cc",
"base/enum_set_unittest.cc",
"base/get_session_name_unittest.cc",
"base/hash_util_unittest.cc",
"base/immutable_unittest.cc",
"base/model_type_unittest.cc",
"base/nigori_unittest.cc",
"base/node_ordinal_unittest.cc",
"base/ordinal_unittest.cc",
"base/proto_value_ptr_unittest.cc",
"base/protobuf_unittest.cc",
"base/sync_prefs_unittest.cc",
"base/system_encryptor_unittest.cc",
"base/unique_position_unittest.cc",
"base/weak_handle_unittest.cc",
"device_info/device_count_metrics_provider_unittest.cc",
"device_info/device_info_sync_bridge_unittest.cc",
"device_info/device_info_util_unittest.cc",
"device_info/local_device_info_provider_impl_unittest.cc",
"driver/about_sync_util_unittest.cc",
"driver/async_directory_type_controller_unittest.cc",
"driver/backend_migrator_unittest.cc",
"driver/data_type_manager_impl_unittest.cc",
"driver/frontend_data_type_controller_unittest.cc",
"driver/generic_change_processor_unittest.cc",
"driver/glue/sync_engine_impl_unittest.cc",
"driver/model_association_manager_unittest.cc",
"driver/model_type_controller_unittest.cc",
"driver/profile_sync_service_startup_unittest.cc",
"driver/profile_sync_service_unittest.cc",
"driver/shared_change_processor_unittest.cc",
"driver/startup_controller_unittest.cc",
"driver/sync_auth_manager_unittest.cc",
"driver/sync_service_utils_unittest.cc",
"driver/sync_session_durations_metrics_recorder_unittest.cc",
"driver/sync_stopped_reporter_unittest.cc",
"driver/sync_user_settings_unittest.cc",
"driver/sync_util_unittest.cc",
"engine/cycle/sync_cycle_snapshot_unittest.cc",
"engine/model_safe_worker_unittest.cc",
"engine/net/http_bridge_unittest.cc",
"engine/sequenced_model_worker_unittest.cc",
"engine/sync_backend_registrar_unittest.cc",
"engine/ui_model_worker_unittest.cc",
"engine_impl/apply_control_data_updates_unittest.cc",
"engine_impl/backoff_delay_provider_unittest.cc",
"engine_impl/cycle/data_type_debug_info_emitter_unittest.cc",
"engine_impl/cycle/nudge_tracker_unittest.cc",
"engine_impl/cycle/status_controller_unittest.cc",
"engine_impl/debug_info_event_listener_unittest.cc",
"engine_impl/directory_commit_contribution_unittest.cc",
"engine_impl/directory_update_handler_unittest.cc",
"engine_impl/events/protocol_event_buffer_unittest.cc",
"engine_impl/get_updates_processor_unittest.cc",
"engine_impl/js_mutation_event_observer_unittest.cc",
"engine_impl/js_sync_encryption_handler_observer_unittest.cc",
"engine_impl/js_sync_manager_observer_unittest.cc",
"engine_impl/loopback_server/loopback_server_unittest.cc",
"engine_impl/loopback_server/persistent_bookmark_entity_unittest.cc",
"engine_impl/loopback_server/persistent_permanent_entity_unittest.cc",
"engine_impl/loopback_server/persistent_tombstone_entity_unittest.cc",
"engine_impl/loopback_server/persistent_unique_client_entity_unittest.cc",
"engine_impl/model_type_registry_unittest.cc",
"engine_impl/model_type_worker_unittest.cc",
"engine_impl/net/sync_server_connection_manager_unittest.cc",
"engine_impl/non_blocking_type_commit_contribution_unittest.cc",
"engine_impl/sync_encryption_handler_impl_unittest.cc",
"engine_impl/sync_manager_impl_unittest.cc",
"engine_impl/sync_scheduler_impl_unittest.cc",
"engine_impl/syncer_proto_util_unittest.cc",
"engine_impl/syncer_unittest.cc",
"engine_impl/syncer_util_unittest.cc",
"engine_impl/uss_migrator_unittest.cc",
"js/js_event_details_unittest.cc",
"js/sync_js_controller_unittest.cc",
"model/entity_data_unittest.cc",
"model/model_type_sync_bridge_unittest.cc",
"model/mutable_data_batch_unittest.cc",
"model/sync_change_unittest.cc",
"model/sync_data_unittest.cc",
"model/sync_error_unittest.cc",
"model/sync_merge_result_unittest.cc",
"model_impl/client_tag_based_model_type_processor_unittest.cc",
"model_impl/in_memory_metadata_change_list_unittest.cc",
"model_impl/model_type_store_backend_unittest.cc",
"model_impl/model_type_store_impl_unittest.cc",
"model_impl/processor_entity_unittest.cc",
"model_impl/syncable_service_based_bridge_unittest.cc",
"nigori/nigori_model_type_processor_unittest.cc",
"protocol/proto_enum_conversions_unittest.cc",
"protocol/proto_value_conversions_unittest.cc",
"syncable/change_record_unittest.cc",
"syncable/directory_backing_store_unittest.cc",
"syncable/directory_unittest.cc",
"syncable/directory_unittest.h",
"syncable/entry_kernel_unittest.cc",
"syncable/nigori_util_unittest.cc",
"syncable/parent_child_index_unittest.cc",
"syncable/syncable_delete_journal_unittest.cc",
"syncable/syncable_enum_conversions_unittest.cc",
"syncable/syncable_id_unittest.cc",
"syncable/syncable_unittest.cc",
"user_events/user_event_service_impl_unittest.cc",
"user_events/user_event_sync_bridge_unittest.cc",
]
configs += [ "//build/config:precompiled_headers" ]
data = [
"//chrome/test/data/sync/",
"//net/tools/testserver/",
"//third_party/pyftpdlib/",
"//third_party/pywebsocket/src/mod_pywebsocket/",
"//third_party/tlslite/",
]
deps = [
":sync",
":test_support_base",
":test_support_driver",
":test_support_engine",
":test_support_model",
":test_support_user_events",
"//base",
"//base/test:test_support",
"//components/invalidation/impl",
"//components/os_crypt:test_support",
"//components/prefs:test_support",
"//components/signin/core/browser:internals_test_support",
"//components/sync/device_info",
"//components/sync/driver",
"//components/sync/user_events",
"//components/sync_preferences",
"//components/sync_preferences:test_support",
"//components/version_info",
"//components/version_info:generate_version_info",
"//components/version_info:version_string",
"//google_apis",
"//google_apis:test_support",
"//net",
"//net:test_support",
"//services/identity/public/cpp:test_support",
"//services/network:test_support",
"//services/network/public/cpp",
"//sql",
"//sql:test_support",
"//testing/gmock",
"//testing/gtest",
"//third_party/crc32c",
"//third_party/leveldatabase",
"//third_party/protobuf:protobuf_lite",
"//third_party/zlib/google:compression_utils",
"//url",
]
if (is_chromeos) {
# Required by get_session_name_unittest.cc on Chrome OS.
deps += [ "//chromeos/constants" ]
}
if (is_ios) {
sources -= [ "engine/net/http_bridge_unittest.cc" ]
}
if (!is_ios) {
sources += [ "driver/sync_policy_handler_unittest.cc" ]
deps += [
"//components/policy:generated",
"//components/policy/core/browser",
]
}
}
static_library("test_support_fake_server") {
testonly = true
sources = [
"test/fake_server/bookmark_entity_builder.cc",
"test/fake_server/bookmark_entity_builder.h",
"test/fake_server/entity_builder_factory.cc",
"test/fake_server/entity_builder_factory.h",
"test/fake_server/fake_server.cc",
"test/fake_server/fake_server.h",
"test/fake_server/fake_server_http_post_provider.cc",
"test/fake_server/fake_server_http_post_provider.h",
"test/fake_server/fake_server_network_resources.cc",
"test/fake_server/fake_server_network_resources.h",
"test/fake_server/fake_server_verifier.cc",
"test/fake_server/fake_server_verifier.h",
"test/fake_server/sessions_hierarchy.cc",
"test/fake_server/sessions_hierarchy.h",
]
deps = [
":sync",
"//base",
"//net",
"//services/network/public/cpp:cpp",
"//testing/gtest",
"//url",
]
public_deps = [
"//third_party/protobuf:protobuf_lite",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
}
if (is_android) {
import("//build/config/android/rules.gni")
generate_jni("fake_server_jni") {
testonly = true
jni_package = "sync/test/fake_server"
sources = [
"//chrome/android/javatests/src/org/chromium/chrome/browser/sync/FakeServerHelper.java",
]
}
_test_support_prepared_protos_dir =
"$root_gen_dir/test_support_proto_java_prepare/"
action("test_support_proto_java_prepare") {
script = "//components/sync/protocol/prepare_protos_for_java_tests.py"
inputs = sync_protocol_sources
outputs = process_file_template(
sync_protocol_sources,
[ "$_test_support_prepared_protos_dir/{{source_file_part}}" ])
args = [
"--output_dir",
rebase_path(_test_support_prepared_protos_dir, root_build_dir),
]
args += rebase_path(sync_protocol_sources, root_build_dir)
}
proto_java_library("test_support_proto_java") {
proto_path = _test_support_prepared_protos_dir
sources = get_target_outputs(":test_support_proto_java_prepare")
deps = [
":test_support_proto_java_prepare",
]
}
android_library("sync_java_test_support") {
testonly = true
deps = [
"android:sync_java",
"//base:base_java",
"//third_party/junit",
]
java_files = [ "test/android/javatests/src/org/chromium/components/sync/test/util/MockSyncContentResolverDelegate.java" ]
}
static_library("test_support_fake_server_android") {
testonly = true
sources = [
"test/fake_server/android/fake_server_helper_android.cc",
"test/fake_server/android/fake_server_helper_android.h",
]
deps = [
":fake_server_jni",
":sync",
":test_support_fake_server",
"//base",
"//testing/gtest",
"//url:url",
]
}
}