Roll src/third_party/WebKit 081cc5a:34b5ac1 (svn 194996:194999)
[chromium-blink-merge.git] / android_webview / android_webview_tests.gypi
blob9e4c3d0374b5719ca016aab147aad79a92bb3e09
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         'libstandalonelibwebviewchromium',
11         'android_webview_java',
12         'android_webview_pak',
13         'libdrawgl',
14       ],
15       'variables': {
16         'apk_name': 'AndroidWebView',
17         'java_in_dir': 'test/shell',
18         'native_lib_target': 'libstandalonelibwebviewchromium',
19         'resource_dir': 'test/shell/res',
20         'extensions_to_not_compress': 'pak,dat,bin',
21         'asset_location': '<(PRODUCT_DIR)/android_webview_apk/assets',
22         'extra_native_libs': ['<(SHARED_LIB_DIR)/libdrawgl.>(android_product_extension)'],
23         'snapshot_copy_files': '<(snapshot_copy_files)',
24         'additional_input_paths': [
25           '<(asset_location)/webviewchromium.pak',
26           '<(asset_location)/en-US.pak',
27           '<(asset_location)/asset_file.html',
28           '<(asset_location)/cookie_test.html',
29           '<(asset_location)/asset_icon.png',
30           '<(asset_location)/full_screen_video.js',
31           '<(asset_location)/full_screen_video_test.html',
32           '<(asset_location)/full_screen_video_inside_div_test.html',
33           '<(asset_location)/multiple_videos_test.html',
34           '<(asset_location)/video.mp4',
35           '<(asset_location)/visual_state_during_fullscreen_test.html',
36           '<(asset_location)/visual_state_waits_for_js_test.html',
37           '<(asset_location)/visual_state_on_page_commit_visible_test.html',
38           '<@(snapshot_additional_input_paths)',
39         ],
40         'conditions': [
41           ['icu_use_data_file_flag==1', {
42             'additional_input_paths': [
43               '<(asset_location)/icudtl.dat',
44             ],
45           }],
46         ],
47         'includes': [ 'snapshot_copying.gypi' ],
48       },
49       'copies': [
50         {
51           'destination': '<(asset_location)',
52           'files': [
53             '<(PRODUCT_DIR)/android_webview_assets/webviewchromium.pak',
54             '<(PRODUCT_DIR)/android_webview_assets/locales/en-US.pak',
55             '<(java_in_dir)/assets/asset_file.html',
56             '<(java_in_dir)/assets/asset_icon.png',
57             '<(java_in_dir)/assets/cookie_test.html',
58             '<(java_in_dir)/assets/full_screen_video.js',
59             '<(java_in_dir)/assets/full_screen_video_test.html',
60             '<(java_in_dir)/assets/full_screen_video_inside_div_test.html',
61             '<(java_in_dir)/assets/multiple_videos_test.html',
62             '<(java_in_dir)/assets/video.mp4',
63             '<(java_in_dir)/assets/visual_state_during_fullscreen_test.html',
64             '<(java_in_dir)/assets/visual_state_waits_for_js_test.html',
65             '<(java_in_dir)/assets/visual_state_on_page_commit_visible_test.html',
66             '<@(snapshot_copy_files)',
67           ],
68           'conditions': [
69             ['icu_use_data_file_flag==1', {
70               'files': [
71                 '<(PRODUCT_DIR)/icudtl.dat',
72               ],
73             }],
74           ],
75         },
76       ],
77       'includes': [ '../build/java_apk.gypi' ],
78     },
79     {
80       # android_webview_apk creates a .jar as a side effect. Any java
81       # targets that need that .jar in their classpath should depend on this
82       # target. For more details see the chrome_shell_apk_java target.
83       'target_name': 'android_webview_apk_java',
84       'type': 'none',
85       'dependencies': [
86         'android_webview_apk',
87       ],
88       'includes': [ '../build/apk_fake_jar.gypi' ],
89     },
90     {
91       'target_name': 'android_webview_test_apk',
92       'type': 'none',
93       'dependencies': [
94         '../base/base.gyp:base_java_test_support',
95         '../content/content_shell_and_tests.gyp:content_java_test_support',
96         '../net/net.gyp:net_java_test_support',
97         '../testing/android/on_device_instrumentation.gyp:broker_java',
98         '../testing/android/on_device_instrumentation.gyp:require_driver_apk',
99         'android_webview_apk_java',
100       ],
101       'variables': {
102         'apk_name': 'AndroidWebViewTest',
103         'java_in_dir': '../android_webview/javatests',
104         'is_test_apk': 1,
105       },
106       'includes': [ '../build/java_apk.gypi' ],
107     },
108     {
109       'target_name': 'android_webview_unittests',
110       'type': '<(gtest_target_type)',
111       'dependencies': [
112         '../base/base.gyp:test_support_base',
113         '../content/content_shell_and_tests.gyp:test_support_content',
114         '../net/net.gyp:net_test_support',
115         '../testing/android/native_test.gyp:native_test_native_code',
116         '../testing/gmock.gyp:gmock',
117         '../testing/gtest.gyp:gtest',
118         '../ui/base/ui_base.gyp:ui_base_jni_headers',
119         '../ui/gl/gl.gyp:gl',
120         'android_webview_common',
121         'android_webview_unittests_jni',
122       ],
123       'include_dirs': [
124         '..',
125         '../skia/config',
126         '<(SHARED_INTERMEDIATE_DIR)/android_webview_unittests',
127       ],
128       'sources': [
129         'browser/aw_static_cookie_policy_unittest.cc',
130         'browser/aw_form_database_service_unittest.cc',
131         'browser/browser_view_renderer_unittest.cc',
132         'browser/net/android_stream_reader_url_request_job_unittest.cc',
133         'browser/net/input_stream_reader_unittest.cc',
134         'browser/test/fake_window.cc',
135         'browser/test/fake_window.h',
136         'browser/test/rendering_test.cc',
137         'browser/test/rendering_test.h',
138         'lib/main/webview_tests.cc',
139         'native/aw_contents_client_bridge_unittest.cc',
140         'native/aw_media_url_interceptor_unittest.cc',
141         'native/input_stream_unittest.cc',
142         'native/permission/media_access_permission_request_unittest.cc',
143         'native/permission/permission_request_handler_unittest.cc',
144         'native/state_serializer_unittest.cc',
145       ],
146     },
147     {
148       'target_name': 'android_webview_unittest_java',
149       'type': 'none',
150       'dependencies': [
151         '../base/base.gyp:base_java_test_support',
152         '../content/content_shell_and_tests.gyp:content_java_test_support',
153         'android_webview_java',
154       ],
155       'variables': {
156         'java_in_dir': '../android_webview/unittestjava',
157       },
158       'includes': [ '../build/java.gypi' ],
159     },
160     {
161       'target_name': 'android_webview_unittests_jni',
162       'type': 'none',
163       'sources': [
164           '../android_webview/unittestjava/src/org/chromium/android_webview/unittest/InputStreamUnittest.java',
165           '../android_webview/unittestjava/src/org/chromium/android_webview/unittest/MockAwContentsClientBridge.java',
166       ],
167       'variables': {
168         'jni_gen_package': 'android_webview_unittests',
169       },
170       'includes': [ '../build/jni_generator.gypi' ],
171     },
172     {
173       'target_name': 'android_webview_unittests_apk',
174       'type': 'none',
175       'dependencies': [
176         'android_webview_unittest_java',
177         'android_webview_unittests',
178       ],
179       'variables': {
180         'test_suite_name': 'android_webview_unittests',
181         'additional_input_paths': [
182           '<(PRODUCT_DIR)/android_webview_unittests_apk/assets/asset_file.ogg',
183         ],
184       },
185       'copies': [
186         {
187           'destination': '<(PRODUCT_DIR)/android_webview_unittests_apk/assets',
188           'files': [
189             'test/unittest/assets/asset_file.ogg',
190           ],
191         },
192       ],
193       'includes': [ '../build/apk_test.gypi' ],
194     },
195     {
196       'target_name': 'libdrawgl',
197       'type': 'shared_library',
198       # Do not depend on any other component here, since this target
199       # builds a separate shared library!
200       'include_dirs': [
201         '..',
202       ],
203       'variables': {
204         # This library uses native JNI exports; tell gyp so that the required
205         # symbols will be kept.
206         'use_native_jni_exports': 1,
207       },
208       'sources': [
209           '../android_webview/test/shell/src/draw_gl/draw_gl.cc',
210       ],
211     },
212     {
213       'target_name': 'libstandalonelibwebviewchromium',
214       'includes': [
215         'libwebviewchromium.gypi',
216       ],
217     },
218   ],