summaryrefslogtreecommitdiffstats
path: root/sync/sync_tests.gypi
diff options
context:
space:
mode:
authorpvalenzuela <pvalenzuela@chromium.org>2015-04-09 18:12:25 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-10 01:13:27 +0000
commitcc3d8cbe481e8f21341d8006a8f62a8915343ae6 (patch)
treeccdc7a515bea562af9769f78ef92a54d49a4531b /sync/sync_tests.gypi
parent5d6b8901b921b70dccd445ba5cabfaf99c3f6414 (diff)
downloadchromium_src-cc3d8cbe481e8f21341d8006a8f62a8915343ae6.zip
chromium_src-cc3d8cbe481e8f21341d8006a8f62a8915343ae6.tar.gz
chromium_src-cc3d8cbe481e8f21341d8006a8f62a8915343ae6.tar.bz2
Sync: Generalize entity injection in Android tests
This CL introduces build infrastructure to generate Java objects from sync protobufs. This allows Java tests to create the EntitySpecifics of entities that they would like to inject. As of this CL, only entities with unique client tags (e.g., preferences, typed URLs) are supported for injection. BUG=365774 Review URL: https://codereview.chromium.org/998373004 Cr-Commit-Position: refs/heads/master@{#324558}
Diffstat (limited to 'sync/sync_tests.gypi')
-rw-r--r--sync/sync_tests.gypi37
1 files changed, 37 insertions, 0 deletions
diff --git a/sync/sync_tests.gypi b/sync/sync_tests.gypi
index 8f2b35b..3ea5b23 100644
--- a/sync/sync_tests.gypi
+++ b/sync/sync_tests.gypi
@@ -469,6 +469,43 @@
'includes': [ '../build/jni_generator.gypi' ],
},
{
+ # TODO(pvalenzuela): Create GN version of this target.
+ # http://crbug.com/475612
+ 'target_name': 'test_support_sync_proto_java',
+ 'type': 'none',
+ 'variables': {
+ 'proto_in_dir': '<(INTERMEDIATE_DIR)/sync_protos',
+ # Set this variable so that sync_proto_source_paths refers to the
+ # temporary proto definitions created here.
+ 'sync_proto_sources_dir': '<(INTERMEDIATE_DIR)/sync_protos',
+ },
+ 'actions': [
+ {
+ 'action_name': 'run_script',
+ 'inputs': [
+ 'protocol/prepare_protos_for_java_tests.py',
+ # Use the original list of proto files (defined in sync.gyp).
+ '<@(sync_proto_sources)',
+ ],
+ 'outputs': [
+ '<@(sync_proto_source_paths)',
+ ],
+ 'action': [
+ 'python',
+ 'protocol/prepare_protos_for_java_tests.py',
+ '--output_dir',
+ '<(INTERMEDIATE_DIR)/sync_protos',
+ # Use the original list of proto files (defined in sync.gyp).
+ '<@(sync_proto_sources)'
+ ],
+ },
+ ],
+ 'sources': [
+ '<@(sync_proto_source_paths)',
+ ],
+ 'includes': ['protocol/protocol.gypi', '../build/protoc_java.gypi'],
+ },
+ {
# GN: //sync:test_support_sync_fake_server_android
'target_name': 'test_support_sync_fake_server_android',
'type': 'static_library',