- add third_party src.
[platform/framework/web/crosswalk.git] / src / xwalk / xwalk_android_tests.gypi
1 {
2   'targets': [
3     {
4       'target_name': 'xwalk_test_util_java',
5       'type': 'none',
6       'dependencies': [
7         '../content/content_shell_and_tests.gyp:content_java_test_support',
8       ],
9       'variables': {
10         'java_in_dir': 'test/android/util',
11       },
12       'includes': ['../build/java.gypi'],
13     },
14     {
15       # Java utils for runtime client related tests.
16       'target_name': 'xwalk_runtime_client_test_utils_java',
17       'type': 'none',
18       'dependencies': [
19         'xwalk_test_util_java',
20         'xwalk_app_runtime_client_java',
21         'xwalk_app_runtime_activity_java',
22       ],
23       'variables': {
24         'java_in_dir': 'test/android/util/runtime_client',
25       },
26       'includes': [ '../build/java.gypi' ],
27     },
28     {
29       'target_name': 'xwalk_core_shell_apk',
30       'type': 'none',
31       'dependencies': [
32         'libxwalkcore',
33         'xwalk_core_extensions_java',
34         'xwalk_core_java',
35         'xwalk_core_shell_apk_pak',
36       ],
37       'variables': {
38         'apk_name': 'XWalkCoreShell',
39         'java_in_dir': 'runtime/android/core_shell',
40         'resource_dir': 'runtime/android/core_shell/res',
41         'native_lib_target': 'libxwalkcore',
42         'additional_input_paths': [
43           '<(PRODUCT_DIR)/xwalk_xwview/assets/www/index.html',
44           '<(PRODUCT_DIR)/xwalk_xwview/assets/xwalk.pak',
45         ],
46         'asset_location': '<(ant_build_out)/xwalk_xwview/assets',
47       },
48       'copies': [
49         {
50           'destination': '<(PRODUCT_DIR)/xwalk_xwview/assets/www',
51           'files': [
52             'test/android/data/index.html',
53           ],
54         }
55       ],
56       'includes': [ '../build/java_apk.gypi' ],
57     },
58     {
59       'target_name': 'xwalk_core_shell_apk_pak',
60       'type': 'none',
61       'dependencies': [
62         'xwalk_pak',
63       ],
64       'copies': [
65         {
66           'destination': '<(PRODUCT_DIR)/xwalk_xwview/assets',
67           'files': [
68             '<(PRODUCT_DIR)/xwalk.pak',
69           ],
70         },
71       ],
72     },
73     {
74       'target_name': 'xwalk_core_shell_apk_java',
75       'type': 'none',
76       'dependencies': [
77         'xwalk_core_shell_apk',
78       ],
79       'includes': [ '../build/apk_fake_jar.gypi' ],
80     },
81     {
82       'target_name': 'xwalk_core_test_apk',
83       'type': 'none',
84       'dependencies': [
85         '../base/base.gyp:base_java_test_support',
86         '../content/content_shell_and_tests.gyp:content_java_test_support',
87         '../net/net.gyp:net_java_test_support',
88         'xwalk_core_shell_apk_java',
89         '../tools/android/md5sum/md5sum.gyp:md5sum',
90         '../tools/android/forwarder2/forwarder.gyp:forwarder2',
91       ],
92       'variables': {
93         'apk_name': 'XWalkCoreTest',
94         'java_in_dir': 'test/android/core/javatests',
95         'is_test_apk': 1,
96         'additional_input_paths': [
97           '<(PRODUCT_DIR)/xwalk_xwview_test/assets/broadcast.html',
98           '<(PRODUCT_DIR)/xwalk_xwview_test/assets/echo.html',
99           '<(PRODUCT_DIR)/xwalk_xwview_test/assets/echoSync.html',
100           '<(PRODUCT_DIR)/xwalk_xwview_test/assets/framesEcho.html',
101           '<(PRODUCT_DIR)/xwalk_xwview_test/assets/geolocation.html',
102           '<(PRODUCT_DIR)/xwalk_xwview_test/assets/index.html',
103           '<(PRODUCT_DIR)/xwalk_xwview_test/assets/navigator.online.html',
104           '<(PRODUCT_DIR)/xwalk_xwview_test/assets/renderHung.html',
105         ],
106         'asset_location': '<(ant_build_out)/xwalk_xwview_test/assets',
107       },
108       'copies': [
109         {
110           'destination': '<(PRODUCT_DIR)/xwalk_xwview_test/assets',
111           'files': [
112             'test/android/data/broadcast.html',
113             'test/android/data/echo.html',
114             'test/android/data/echoSync.html',
115             'test/android/data/framesEcho.html',
116             'test/android/data/geolocation.html',
117             'test/android/data/index.html',
118             'test/android/data/navigator.online.html',
119             'test/android/data/renderHung.html',
120           ],
121         },
122       ],
123       'includes': [ '../build/java_apk.gypi' ],
124     },
125     {
126       'target_name': 'xwalk_core_unittests',
127       'type': '<(gtest_target_type)',
128       'dependencies': [
129         '../base/base.gyp:test_support_base',
130         '../net/net.gyp:net_test_support',
131         '../testing/android/native_test.gyp:native_test_native_code',
132         '../testing/gmock.gyp:gmock',
133         '../testing/gtest.gyp:gtest',
134       ],
135       'include_dirs': [
136         '..',
137       ],
138       'sources': [
139         'runtime/common/android/xwalk_core_tests.cc',
140       ],
141     },
142     {
143       'target_name': 'xwalk_core_unittests_java',
144       'type': 'none',
145       'dependencies': [
146       ],
147       'variables': {
148         'java_in_dir': 'test/android/unittestjava',
149       },
150       # TODO: supress gyp error: "'find ../cameo_webview/unittestjava  -name "*.java"' returned exit status 1"
151       # 'includes': [ '../build/java.gypi' ],
152     },
153     {
154       'target_name': 'xwalk_core_unittests_jni',
155       'type': 'none',
156       'sources': [
157       ],
158       'variables': {
159         'jni_gen_package': 'xwalk_core_unittests',
160       },
161       'includes': [ '../build/jni_generator.gypi' ],
162     },
163     {
164       'target_name': 'xwalk_core_unittests_apk',
165       'type': 'none',
166       'dependencies': [
167         'xwalk_core_unittests',
168         'xwalk_core_unittests_java',
169         'xwalk_core_unittests_jni',
170       ],
171       'variables': {
172         'test_suite_name': 'xwalk_core_unittests',
173         'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)xwalk_core_unittests<(SHARED_LIB_SUFFIX)',
174       },
175       'includes': [ '../build/apk_test.gypi' ],
176     },
177     {
178       'target_name': 'xwalk_runtime_shell_apk',
179       'type': 'none',
180       'dependencies': [
181         'libxwalkcore',
182         'xwalk_core_extensions_java',
183         # Runtime code is also built by this target.
184         'xwalk_core_java',
185         'xwalk_runtime_shell_apk_pak',
186       ],
187       'variables': {
188         'apk_name': 'XWalkRuntimeShell',
189         'java_in_dir': 'runtime/android/runtime_shell',
190         'resource_dir': 'runtime/android/runtime_shell/res',
191         'native_lib_target': 'libxwalkcore',
192         'additional_input_paths': [
193           '<(PRODUCT_DIR)/xwalk_runtime/assets/xwalk.pak',
194         ],
195         'asset_location': '<(ant_build_out)/xwalk_runtime/assets',
196       },
197       'includes': [ '../build/java_apk.gypi' ],
198     },
199     {
200       'target_name': 'xwalk_runtime_shell_apk_pak',
201       'type': 'none',
202       'dependencies': [
203         'xwalk_pak',
204       ],
205       'copies': [
206         {
207           'destination': '<(PRODUCT_DIR)/xwalk_runtime/assets',
208           'files': [
209             '<(PRODUCT_DIR)/xwalk.pak',
210           ],
211         },
212       ],
213     },
214     {
215       'target_name': 'xwalk_runtime_shell_apk_java',
216       'type': 'none',
217       'dependencies': [
218         'xwalk_runtime_shell_apk',
219       ],
220       'includes': [ '../build/apk_fake_jar.gypi' ],
221     },
222     {
223       'target_name': 'xwalk_runtime_client_shell_apk',
224       'type': 'none',
225       'dependencies': [
226         'xwalk_app_runtime_client_java',
227         'xwalk_app_runtime_activity_java',
228         'xwalk_runtime_client_test_utils_java',
229       ],
230       'variables': {
231         'apk_name': 'XWalkRuntimeClientShell',
232         'java_in_dir': 'app/android/runtime_client_shell',
233         'resource_dir': 'app/android/runtime_client_shell/res',
234         'additional_input_paths': [
235           '<(PRODUCT_DIR)/runtime_client_shell/assets/extensions-config.json',
236           '<(PRODUCT_DIR)/runtime_client_shell/assets/index.html',
237           '<(PRODUCT_DIR)/runtime_client_shell/assets/manifest.json',
238           '<(PRODUCT_DIR)/runtime_client_shell/assets/myextension/myextension.js',
239           '<(PRODUCT_DIR)/runtime_client_shell/assets/sampapp-icon-helloworld.png',
240         ],
241         'asset_location': '<(ant_build_out)/runtime_client_shell/assets',
242       },
243       'copies': [
244         {
245           'destination': '<(PRODUCT_DIR)/runtime_client_shell/assets',
246           'files': [
247             'test/android/data/manifest.json',
248             'test/android/data/extensions-config.json',
249             'test/android/data/index.html',
250             'test/android/data/sampapp-icon-helloworld.png',
251           ],
252         },
253         {
254           'destination': '<(PRODUCT_DIR)/runtime_client_shell/assets/myextension',
255           'files': ['test/android/data/myextension/myextension.js'],
256         },
257       ],
258       'includes': [ '../build/java_apk.gypi' ],
259     },
260     {
261       'target_name': 'xwalk_runtime_client_shell_apk_java',
262       'type': 'none',
263       'dependencies': [
264         'xwalk_runtime_client_shell_apk',
265       ],
266       'includes': [ '../build/apk_fake_jar.gypi' ],
267     },
268     {
269       'target_name': 'xwalk_runtime_client_embedded_shell_apk',
270       'type': 'none',
271       'dependencies': [
272         'libxwalkcore',
273         'xwalk_app_runtime_client_java',
274         'xwalk_app_runtime_activity_java',
275         'xwalk_core_java',
276         'xwalk_runtime_client_embedded_shell_apk_pak',
277         'xwalk_runtime_client_test_utils_java',
278       ],
279       'variables': {
280         'apk_name': 'XWalkRuntimeClientEmbeddedShell',
281         'java_in_dir': 'app/android/runtime_client_embedded_shell',
282         'resource_dir': 'app/android/runtime_client_embedded_shell/res',
283         'native_lib_target': 'libxwalkcore',
284         'additional_input_paths': [
285           '<(PRODUCT_DIR)/runtime_client_embedded_shell/assets/extensions-config.json',
286           '<(PRODUCT_DIR)/runtime_client_embedded_shell/assets/index.html',
287           '<(PRODUCT_DIR)/runtime_client_embedded_shell/assets/jsapi/device_capabilities_api.js',
288           '<(PRODUCT_DIR)/runtime_client_embedded_shell/assets/jsapi/presentation_api.js',
289           '<(PRODUCT_DIR)/runtime_client_embedded_shell/assets/jsapi/screen_orientation_api.js',
290           '<(PRODUCT_DIR)/runtime_client_embedded_shell/assets/manifest.json',
291           '<(PRODUCT_DIR)/runtime_client_embedded_shell/assets/myextension/myextension.js',
292           '<(PRODUCT_DIR)/runtime_client_embedded_shell/assets/sampapp-icon-helloworld.png',
293           '<(PRODUCT_DIR)/runtime_client_embedded_shell/assets/xwalk.pak',
294         ],
295         'asset_location': '<(ant_build_out)/runtime_client_embedded_shell/assets',
296       },
297       'copies': [
298         {
299           'destination': '<(PRODUCT_DIR)/runtime_client_embedded_shell/assets',
300           'files': [
301             'test/android/data/manifest.json',
302             'test/android/data/extensions-config.json',
303             'test/android/data/index.html',
304             'test/android/data/sampapp-icon-helloworld.png',
305           ],
306         },
307         {
308           'destination': '<(PRODUCT_DIR)/runtime_client_embedded_shell/assets/myextension',
309           'files': ['test/android/data/myextension/myextension.js'],
310         },
311         {
312           'destination': '<(PRODUCT_DIR)/runtime_client_embedded_shell/assets/jsapi',
313           'files': [
314             'experimental/presentation/presentation_api.js',
315             'sysapps/device_capabilities/device_capabilities_api.js',
316             'runtime/extension/screen_orientation_api.js',
317           ],
318         },
319       ],
320       'includes': [ '../build/java_apk.gypi' ],
321     },
322     {
323       'target_name': 'xwalk_runtime_client_embedded_shell_apk_pak',
324       'type': 'none',
325       'dependencies': [
326         'xwalk_pak',
327       ],
328       'copies': [
329         {
330           'destination': '<(PRODUCT_DIR)/runtime_client_embedded_shell/assets',
331           'files': [
332             '<(PRODUCT_DIR)/xwalk.pak',
333           ],
334         },
335       ],
336     },
337     {
338       'target_name': 'xwalk_runtime_test_apk',
339       'type': 'none',
340       'dependencies': [
341         '../base/base.gyp:base_java_test_support',
342         '../content/content_shell_and_tests.gyp:content_java_test_support',
343         '../net/net.gyp:net_java_test_support',
344         '../tools/android/forwarder2/forwarder.gyp:forwarder2',
345         '../tools/android/md5sum/md5sum.gyp:md5sum',
346         'xwalk_runtime_shell_apk_java',
347       ],
348       'variables': {
349         'apk_name': 'XWalkRuntimeTest',
350         'java_in_dir': 'test/android/runtime/javatests',
351         'is_test_apk': 1,
352       },
353       'includes': [ '../build/java_apk.gypi' ],
354     },
355     {
356       'target_name': 'xwalk_runtime_client_test_apk',
357       'type': 'none',
358       'dependencies': [
359         '../base/base.gyp:base_java_test_support',
360         '../content/content_shell_and_tests.gyp:content_java_test_support',
361         '../net/net.gyp:net_java_test_support',
362         '../tools/android/forwarder2/forwarder.gyp:forwarder2',
363         '../tools/android/md5sum/md5sum.gyp:md5sum',
364         'xwalk_runtime_client_shell_apk_java',
365         'xwalk_test_util_java',
366       ],
367       'variables': {
368         'apk_name': 'XWalkRuntimeClientTest',
369         'java_in_dir': 'test/android/runtime_client/javatests',
370         'is_test_apk': 1,
371         'additional_input_paths': [
372           '<(PRODUCT_DIR)/runtime_client_test/assets/contacts.html',
373           '<(PRODUCT_DIR)/runtime_client_test/assets/device_capabilities.html',
374           '<(PRODUCT_DIR)/runtime_client_test/assets/displayAvailableTest.html',
375           '<(PRODUCT_DIR)/runtime_client_test/assets/echo.html',
376           '<(PRODUCT_DIR)/runtime_client_test/assets/echoSync.html',
377           '<(PRODUCT_DIR)/runtime_client_test/assets/messaging_mini.html',
378           '<(PRODUCT_DIR)/runtime_client_test/assets/screen_orientation.html',
379           '<(PRODUCT_DIR)/runtime_client_test/assets/timer.html',
380         ],
381         'asset_location': '<(ant_build_out)/runtime_client_test/assets',
382       },
383       'copies': [
384         {
385           'destination': '<(PRODUCT_DIR)/runtime_client_test/assets',
386           'files': [
387             'test/android/data/contacts.html',
388             'test/android/data/device_capabilities.html',
389             'test/android/data/displayAvailableTest.html',
390             'test/android/data/echo.html',
391             'test/android/data/echoSync.html',
392             'test/android/data/screen_orientation.html',
393             'test/android/data/sysapps/messaging/messaging_mini.html',
394             'test/android/data/timer.html',
395           ],
396         },
397       ],
398       'includes': [ '../build/java_apk.gypi' ],
399     },
400     {
401       'target_name': 'xwalk_runtime_client_embedded_shell_apk_java',
402       'type': 'none',
403       'dependencies': [
404         'xwalk_runtime_client_embedded_shell_apk',
405       ],
406       'includes': [ '../build/apk_fake_jar.gypi' ],
407     },
408     {
409       'target_name': 'xwalk_runtime_client_embedded_test_apk',
410       'type': 'none',
411       'dependencies': [
412         '../base/base.gyp:base_java_test_support',
413         '../content/content_shell_and_tests.gyp:content_java_test_support',
414         '../net/net.gyp:net_java_test_support',
415         '../tools/android/forwarder2/forwarder.gyp:forwarder2',
416         '../tools/android/md5sum/md5sum.gyp:md5sum',
417         'xwalk_runtime_client_embedded_shell_apk_java',
418         'xwalk_test_util_java',
419       ],
420       'variables': {
421         'apk_name': 'XWalkRuntimeClientEmbeddedTest',
422         'java_in_dir': 'test/android/runtime_client_embedded/javatests',
423         'is_test_apk': 1,
424         'additional_input_paths': [
425           '<(PRODUCT_DIR)/runtime_client_embedded_test/assets/contacts.html',
426           '<(PRODUCT_DIR)/runtime_client_embedded_test/assets/device_capabilities.html',
427           '<(PRODUCT_DIR)/runtime_client_embedded_test/assets/displayAvailableTest.html',
428           '<(PRODUCT_DIR)/runtime_client_embedded_test/assets/echo.html',
429           '<(PRODUCT_DIR)/runtime_client_embedded_test/assets/echoSync.html',
430           '<(PRODUCT_DIR)/runtime_client_embedded_test/assets/messaging_mini.html',
431           '<(PRODUCT_DIR)/runtime_client_embedded_test/assets/screen_orientation.html',
432           '<(PRODUCT_DIR)/runtime_client_embedded_test/assets/timer.html',
433         ],
434         'asset_location': '<(ant_build_out)/runtime_client_embedded_test/assets',
435       },
436       'copies': [
437         {
438           'destination': '<(PRODUCT_DIR)/runtime_client_embedded_test/assets',
439           'files': [
440             'test/android/data/contacts.html',
441             'test/android/data/device_capabilities.html',
442             'test/android/data/displayAvailableTest.html',
443             'test/android/data/echo.html',
444             'test/android/data/echoSync.html',
445             'test/android/data/screen_orientation.html',
446             'test/android/data/sysapps/messaging/messaging_mini.html',
447             'test/android/data/timer.html',
448           ],
449         },
450       ],
451       'includes': [ '../build/java_apk.gypi' ],
452     },
453   ],
454 }