Fix race condition in gyp/ninja builds.
[chromium-blink-merge.git] / android_webview / android_webview_tests.gypi
blob390732ad202fd026f7580857a68509b98eec679f
1 # Copyright (c) 2012 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   'targets': [
6     {
7       'target_name': 'android_webview_apk',
8       'type': 'none',
9       'dependencies': [
10         'libwebviewchromium',
11         'android_webview_java',
12         'android_webview_pak',
13       ],
14       'variables': {
15         'apk_name': 'AndroidWebView',
16         'java_in_dir': 'test/shell',
17         'native_lib_target': 'libstandalonelibwebviewchromium',
18         'resource_dir': 'test/shell/res',
19         'additional_input_paths': [
20           '<(PRODUCT_DIR)/android_webview_apk/assets/webviewchromium.pak',
21           '<(PRODUCT_DIR)/android_webview_apk/assets/asset_file.html',
22           '<(PRODUCT_DIR)/android_webview_apk/assets/cookie_test.html',
23           '<(PRODUCT_DIR)/android_webview_apk/assets/asset_icon.png',
24           '<(PRODUCT_DIR)/android_webview_apk/assets/full_screen_video_test.html',
25         ],
26         'conditions': [
27           ['icu_use_data_file_flag==1', {
28             'additional_input_paths': [
29               '<(PRODUCT_DIR)/icudtl.dat',
30             ],
31           }],
32         ],
33       },
34       'copies': [
35         {
36           'destination': '<(PRODUCT_DIR)/android_webview_apk/assets',
37           'files': [
38             '<(java_in_dir)/assets/asset_file.html',
39             '<(java_in_dir)/assets/asset_icon.png',
40             '<(java_in_dir)/assets/cookie_test.html',
41             '<(java_in_dir)/assets/full_screen_video_test.html',
42           ],
43           'conditions': [
44             ['icu_use_data_file_flag==1', {
45               'files': [
46                 '<(PRODUCT_DIR)/icudtl.dat',
47               ],
48             }],
49           ],
50         },
51       ],
52       'includes': [ '../build/java_apk.gypi' ],
53     },
54     {
55       # android_webview_apk creates a .jar as a side effect. Any java
56       # targets that need that .jar in their classpath should depend on this
57       # target. For more details see the chrome_shell_apk_java target.
58       'target_name': 'android_webview_apk_java',
59       'type': 'none',
60       'dependencies': [
61         'android_webview_apk',
62       ],
63       'includes': [ '../build/apk_fake_jar.gypi' ],
64     },
65     {
66       'target_name': 'android_webview_test_apk',
67       'type': 'none',
68       'dependencies': [
69         '../base/base.gyp:base_java_test_support',
70         '../content/content_shell_and_tests.gyp:content_java_test_support',
71         '../net/net.gyp:net_java_test_support',
72         'android_webview_apk_java',
73       ],
74       'variables': {
75         'apk_name': 'AndroidWebViewTest',
76         'java_in_dir': '../android_webview/javatests',
77         'is_test_apk': 1,
78       },
79       'includes': [ '../build/java_apk.gypi' ],
80     },
81     {
82       'target_name': 'android_webview_unittests',
83       'type': '<(gtest_target_type)',
84       'dependencies': [
85         '../base/base.gyp:test_support_base',
86         '../content/content_shell_and_tests.gyp:test_support_content',
87         '../net/net.gyp:net_test_support',
88         '../testing/android/native_test.gyp:native_test_native_code',
89         '../testing/gmock.gyp:gmock',
90         '../testing/gtest.gyp:gtest',
91         '../ui/base/ui_base.gyp:ui_base_jni_headers',
92         'android_webview_common',
93         'android_webview_unittests_jni',
94       ],
95       'include_dirs': [
96         '..',
97         '../skia/config',
98         '<(SHARED_INTERMEDIATE_DIR)/android_webview_unittests',
99       ],
100       'sources': [
101         'browser/aw_static_cookie_policy_unittest.cc',
102         'browser/aw_form_database_service_unittest.cc',
103         'browser/global_tile_manager_unittest.cc',
104         'browser/net/android_stream_reader_url_request_job_unittest.cc',
105         'browser/net/input_stream_reader_unittest.cc',
106         'lib/main/webview_tests.cc',
107         'native/aw_contents_client_bridge_unittest.cc',
108         'native/input_stream_unittest.cc',
109         'native/permission/media_access_permission_request_unittest.cc',
110         'native/permission/permission_request_handler_unittest.cc',
111         'native/state_serializer_unittest.cc',
112       ],
113     },
114     {
115       'target_name': 'android_webview_unittest_java',
116       'type': 'none',
117       'dependencies': [
118         '../base/base.gyp:base_java_test_support',
119         '../content/content_shell_and_tests.gyp:content_java_test_support',
120         'android_webview_java',
121       ],
122       'variables': {
123         'java_in_dir': '../android_webview/unittestjava',
124       },
125       'includes': [ '../build/java.gypi' ],
126     },
127     {
128       'target_name': 'android_webview_unittests_jni',
129       'type': 'none',
130       'sources': [
131           '../android_webview/unittestjava/src/org/chromium/android_webview/unittest/InputStreamUnittest.java',
132           '../android_webview/unittestjava/src/org/chromium/android_webview/unittest/MockAwContentsClientBridge.java',
133       ],
134       'variables': {
135         'jni_gen_package': 'android_webview_unittests',
136       },
137       'includes': [ '../build/jni_generator.gypi' ],
138     },
139     {
140       'target_name': 'android_webview_unittests_apk',
141       'type': 'none',
142       'dependencies': [
143         'android_webview_unittest_java',
144         'android_webview_unittests',
145       ],
146       'variables': {
147         'test_suite_name': 'android_webview_unittests',
148       },
149       'includes': [ '../build/apk_test.gypi' ],
150     },
151   ],