1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
|
# Copyright 2015 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/config/android/rules.gni")
import("//testing/test.gni")
# Mark all targets as test only.
testonly = true
group("test") {
deps = [
":android_webview_test_apk",
":android_webview_unittests",
]
}
# GYP: //android_webview/android_webview_tests.gypi:android_webview_apk
android_apk("android_webview_apk") {
deps = [
":android_webview_apk_assets",
":android_webview_apk_resources",
":libdrawgl",
":libstandalonelibwebviewchromium",
"//android_webview:android_webview_java",
"//base:base_java",
"//base:base_java_test_support",
"//components/policy/android:policy_java_test_support",
"//content/public/android:content_java",
"//ui/android:ui_java",
]
apk_name = "AndroidWebView"
android_manifest = "shell/AndroidManifest.xml"
java_files = [
"shell/src/org/chromium/android_webview/shell/AwShellActivity.java",
"shell/src/org/chromium/android_webview/shell/AwShellApplication.java",
"shell/src/org/chromium/android_webview/shell/AwShellResourceProvider.java",
"shell/src/org/chromium/android_webview/shell/AwShellSwitches.java",
"shell/src/org/chromium/android_webview/shell/DrawGL.java",
"shell/src/org/chromium/android_webview/test/AwInstrumentationTestRunner.java",
"shell/src/org/chromium/android_webview/test/AwTestContainerView.java",
"shell/src/org/chromium/android_webview/test/AwTestRunnerActivity.java",
"shell/src/org/chromium/android_webview/test/NullContentsClient.java",
"shell/src/org/chromium/android_webview/test/SecondBrowserProcess.java",
"shell/src/org/chromium/android_webview/test/TestContentProvider.java",
]
native_libs = [
"libdrawgl.so",
"libstandalonelibwebviewchromium.so",
]
native_lib_version_rule = "//build/util:chrome_version_json"
_native_lib_file =
rebase_path("$root_gen_dir/CHROME_VERSION.json", root_build_dir)
native_lib_version_arg = "@FileArg($_native_lib_file:full-quoted)"
extensions_to_not_compress = ".dat,.bin,.pak,.lpak"
}
android_resources("android_webview_apk_resources") {
resource_dirs = [ "shell/res" ]
custom_package = "org.chromium.android_webview.shell"
}
android_assets("android_webview_apk_assets") {
deps = [
"//android_webview:pak_file_assets",
"//third_party/icu:icu_assets",
"//v8:v8_external_startup_data_assets",
]
sources = [
"shell/assets/asset_file.html",
"shell/assets/asset_icon.png",
"shell/assets/cookie_test.html",
"shell/assets/full_screen_video.js",
"shell/assets/full_screen_video_inside_div_test.html",
"shell/assets/full_screen_video_test.html",
"shell/assets/multiple_videos_test.html",
"shell/assets/video.webm",
"shell/assets/visual_state_during_fullscreen_test.html",
"shell/assets/visual_state_on_page_commit_visible_test.html",
"shell/assets/visual_state_waits_for_js_detached_test.html",
"shell/assets/visual_state_waits_for_js_test.html",
]
}
# GYP: //android_webview/android_webview_tests.gypi:libstandalonelibwebviewchromium
shared_library("libstandalonelibwebviewchromium") {
sources = [
"../lib/main/webview_entry_point.cc",
]
ldflags = [ "-Wl,-shared,-Bsymbolic" ]
deps = [
"//android_webview:common",
]
configs -= [ "//build/config/android:hide_native_jni_exports" ]
}
# GYP: //android_webview/android_webview_tests.gypi:android_webview_test_apk
instrumentation_test_apk("android_webview_test_apk") {
apk_name = "AndroidWebViewTest"
apk_under_test = ":android_webview_apk"
android_manifest = "../javatests/AndroidManifest.xml"
deps = [
"//android_webview:android_webview_java",
"//base:base_java",
"//base:base_java_test_support",
"//components/external_video_surface:java",
"//components/policy/android:policy_java",
"//components/policy/android:policy_java_test_support",
"//components/web_contents_delegate_android:web_contents_delegate_android_java",
"//content/public/android:content_java",
"//content/public/test/android:content_java_test_support",
"//net/android:net_java",
"//net/android:net_java_test_support",
"//third_party/android_tools:legacy_http_javalib",
"//ui/android:ui_java",
]
java_files = [
"../javatests/src/org/chromium/android_webview/test/AcceptLanguageTest.java",
"../javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java",
"../javatests/src/org/chromium/android_webview/test/AndroidViewIntegrationTest.java",
"../javatests/src/org/chromium/android_webview/test/ArchiveTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsClientAutoLoginTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsClientCallbackHelperTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsClientFaviconTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsClientGetDefaultVideoPosterTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsClientGetVideoLoadingProgressViewTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsClientOnFormResubmissionTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsClientOnScaleChangedTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsClientShouldInterceptRequestTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsClientShouldOverrideUrlLoadingTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsClientVisitedHistoryTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsGarbageCollectionTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsLifecycleNotifierTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsRenderTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsStaticsTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsTest.java",
"../javatests/src/org/chromium/android_webview/test/AwDebugTest.java",
"../javatests/src/org/chromium/android_webview/test/AwImeTest.java",
"../javatests/src/org/chromium/android_webview/test/AwJavaBridgeTest.java",
"../javatests/src/org/chromium/android_webview/test/AwLayoutSizerTest.java",
"../javatests/src/org/chromium/android_webview/test/AwLegacyQuirksTest.java",
"../javatests/src/org/chromium/android_webview/test/AwPermissionManagerTest.java",
"../javatests/src/org/chromium/android_webview/test/AwQuotaManagerBridgeTest.java",
"../javatests/src/org/chromium/android_webview/test/AwScrollOffsetManagerTest.java",
"../javatests/src/org/chromium/android_webview/test/AwSecondBrowserProcessTest.java",
"../javatests/src/org/chromium/android_webview/test/AwServiceWorkerClientTest.java",
"../javatests/src/org/chromium/android_webview/test/AwSettingsTest.java",
"../javatests/src/org/chromium/android_webview/test/AwTestBase.java",
"../javatests/src/org/chromium/android_webview/test/AwWebContentsObserverTest.java",
"../javatests/src/org/chromium/android_webview/test/AwZoomTest.java",
"../javatests/src/org/chromium/android_webview/test/ClearHistoryTest.java",
"../javatests/src/org/chromium/android_webview/test/ClientAddMessageToConsoleTest.java",
"../javatests/src/org/chromium/android_webview/test/ClientOnPageFinishedTest.java",
"../javatests/src/org/chromium/android_webview/test/ClientOnPageStartedTest.java",
"../javatests/src/org/chromium/android_webview/test/ClientOnReceivedError2Test.java",
"../javatests/src/org/chromium/android_webview/test/ClientOnReceivedErrorTest.java",
"../javatests/src/org/chromium/android_webview/test/ClientOnReceivedHttpErrorTest.java",
"../javatests/src/org/chromium/android_webview/test/ConsoleMessagesForBlockedLoadsTest.java",
"../javatests/src/org/chromium/android_webview/test/ContentViewMiscTest.java",
"../javatests/src/org/chromium/android_webview/test/CookieManagerStartupTest.java",
"../javatests/src/org/chromium/android_webview/test/CookieManagerTest.java",
"../javatests/src/org/chromium/android_webview/test/DisableHardwareAccelerationForTest.java",
"../javatests/src/org/chromium/android_webview/test/ExternalVideoSurfaceContainerTest.java",
"../javatests/src/org/chromium/android_webview/test/FullScreenVideoTestAwContentsClient.java",
"../javatests/src/org/chromium/android_webview/test/GeolocationTest.java",
"../javatests/src/org/chromium/android_webview/test/GetTitleTest.java",
"../javatests/src/org/chromium/android_webview/test/HttpAuthDatabaseTest.java",
"../javatests/src/org/chromium/android_webview/test/HttpCacheTest.java",
"../javatests/src/org/chromium/android_webview/test/KeySystemTest.java",
"../javatests/src/org/chromium/android_webview/test/LoadDataWithBaseUrlTest.java",
"../javatests/src/org/chromium/android_webview/test/LoadUrlTest.java",
"../javatests/src/org/chromium/android_webview/test/MediaAccessPermissionRequestTest.java",
"../javatests/src/org/chromium/android_webview/test/MultipleVideosTest.java",
"../javatests/src/org/chromium/android_webview/test/NavigationHistoryTest.java",
"../javatests/src/org/chromium/android_webview/test/PolicyUrlFilteringTest.java",
"../javatests/src/org/chromium/android_webview/test/PopupWindowTest.java",
"../javatests/src/org/chromium/android_webview/test/PostMessageTest.java",
"../javatests/src/org/chromium/android_webview/test/SaveRestoreStateTest.java",
"../javatests/src/org/chromium/android_webview/test/StandaloneAwQuotaManagerBridgeTest.java",
"../javatests/src/org/chromium/android_webview/test/TestAwContentsClient.java",
"../javatests/src/org/chromium/android_webview/test/TestAwServiceWorkerClient.java",
"../javatests/src/org/chromium/android_webview/test/UserAgentTest.java",
"../javatests/src/org/chromium/android_webview/test/VisualStateTest.java",
"../javatests/src/org/chromium/android_webview/test/WebKitHitTestTest.java",
"../javatests/src/org/chromium/android_webview/test/WebViewAsynchronousFindApisTest.java",
"../javatests/src/org/chromium/android_webview/test/WebViewFindApisTestBase.java",
"../javatests/src/org/chromium/android_webview/test/WebViewModalDialogOverrideTest.java",
"../javatests/src/org/chromium/android_webview/test/util/AwQuotaManagerBridgeTestUtil.java",
"../javatests/src/org/chromium/android_webview/test/util/AwTestTouchUtils.java",
"../javatests/src/org/chromium/android_webview/test/util/CommonResources.java",
"../javatests/src/org/chromium/android_webview/test/util/CookieUtils.java",
"../javatests/src/org/chromium/android_webview/test/util/GraphicsTestUtils.java",
"../javatests/src/org/chromium/android_webview/test/util/ImagePageGenerator.java",
"../javatests/src/org/chromium/android_webview/test/util/JSUtils.java",
"../javatests/src/org/chromium/android_webview/test/util/JavascriptEventObserver.java",
"../javatests/src/org/chromium/android_webview/test/util/VideoSurfaceViewUtils.java",
"../javatests/src/org/chromium/android_webview/test/util/VideoTestUtil.java",
"../javatests/src/org/chromium/android_webview/test/util/VideoTestWebServer.java",
]
isolate_file = "../android_webview_test_apk.isolate"
}
# GYP: //android_webview/android_webview_tests.gypi:android_webview_unittests
test("android_webview_unittests") {
deps = [
":android_webview_unittests_assets",
":android_webview_unittests_java",
":android_webview_unittests_jni",
"//android_webview:common",
"//base/test:test_support",
"//content/test:test_support",
"//net:test_support",
"//ui/base:ui_base_jni_headers",
"//ui/gl",
"//ui/gl:test_support",
]
sources = [
"../browser/aw_form_database_service_unittest.cc",
"../browser/aw_static_cookie_policy_unittest.cc",
"../browser/browser_view_renderer_unittest.cc",
"../browser/net/android_stream_reader_url_request_job_unittest.cc",
"../browser/net/aw_cookie_store_wrapper_unittest.cc",
"../browser/net/input_stream_reader_unittest.cc",
"../browser/test/fake_window.cc",
"../browser/test/fake_window.h",
"../browser/test/rendering_test.cc",
"../browser/test/rendering_test.h",
"../lib/main/webview_tests.cc",
"../native/aw_contents_client_bridge_unittest.cc",
"../native/aw_media_url_interceptor_unittest.cc",
"../native/input_stream_unittest.cc",
"../native/permission/media_access_permission_request_unittest.cc",
"../native/permission/permission_request_handler_unittest.cc",
"../native/state_serializer_unittest.cc",
]
}
android_assets("android_webview_unittests_assets") {
sources = [
"unittest/assets/asset_file.ogg",
]
}
# GYP: //android_webview/android_webview_tests.gypi:android_webview_unittests_java
android_library("android_webview_unittests_java") {
deps = [
"//android_webview:android_webview_java",
"//base:base_java",
"//base:base_java_test_support",
"//content/public/test/android:content_java_test_support",
]
java_files = [
"../unittestjava/src/org/chromium/android_webview/unittest/InputStreamUnittest.java",
"../unittestjava/src/org/chromium/android_webview/unittest/MockAwContentsClientBridge.java",
]
}
# GYP: //android_webview/android_webview_tests.gypi:android_webview_unittests_jni
generate_jni("android_webview_unittests_jni") {
jni_package = "android_webview_unittests"
sources = [
"../unittestjava/src/org/chromium/android_webview/unittest/InputStreamUnittest.java",
"../unittestjava/src/org/chromium/android_webview/unittest/MockAwContentsClientBridge.java",
]
}
# GYP: //android_webview/android_webview_tests.gypi:libdrawgl
shared_library("libdrawgl") {
sources = [
"shell/src/draw_gl/draw_gl.cc",
]
configs -= [ "//build/config/android:hide_native_jni_exports" ]
}
|