blob: 340b05eeff13aee92df39102d977bc594ed21abd [file] [log] [blame]
# 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("//android_webview/variables.gni")
import("//build/config/android/rules.gni")
import("//build/config/python.gni")
import("//device/vr/buildflags/buildflags.gni")
import("//testing/test.gni")
import("//tools/v8_context_snapshot/v8_context_snapshot.gni")
# Mark all targets as test only.
testonly = true
group("test") {
deps = [
":android_webview_junit_tests",
":android_webview_unittests",
":webview_instrumentation_test_apk",
]
}
python_library("webview_cts_tests") {
pydeps_file = "//android_webview/tools/run_cts.pydeps"
deps = [ "//android_webview:system_webview_apk" ]
data_deps = [ "//build/android:test_runner_py" ]
data = [ "//android_webview/tools/cts_config/" ]
}
script_test("system_webview_wpt") {
script = "//testing/scripts/run_android_wpt.py"
args = [
"--product=android_webview",
"--webview-provider=apks/SystemWebView.apk",
"--system-webview-shell=apks/SystemWebViewShell.apk",
"--webdriver-binary=clang_x64/chromedriver",
"-v",
]
data_deps = [
"//android_webview:system_webview_apk",
"//android_webview/tools/system_webview_shell:system_webview_shell_layout_test_apk",
"//chrome/test/chromedriver:chromedriver($host_toolchain)",
"//third_party/blink/tools:wpt_tests_android_isolate",
]
}
android_apk("webview_instrumentation_apk") {
# TODO(crbug.com/1099536): Fix tests that break when this is increased.
target_sdk_version = 24
deps = [
":webview_instrumentation_apk_assets",
":webview_instrumentation_apk_resources",
":webview_instrumentation_test_mock_services_java",
":webview_instrumentation_test_utils_java",
"//android_webview:android_webview_java",
"//android_webview:android_webview_product_config_java",
"//android_webview:common_java",
"//android_webview:locale_pak_assets",
"//android_webview:platform_service_bridge_upstream_implementation_java",
"//base:base_java",
"//base:base_java_test_support",
"//components/android_autofill/browser/test_support:component_autofill_provider_java_test_support",
"//components/embedder_support/android:util_java",
"//components/heap_profiling/multi_process:heap_profiling_java_test_support",
"//components/policy/android:policy_java_test_support",
"//content/public/android:content_java",
"//third_party/android_support_test_runner:runner_java",
"//third_party/androidx:androidx_annotation_annotation_java",
"//third_party/junit",
"//ui/android:ui_java",
"//url:gurl_java",
]
apk_name = "WebViewInstrumentation"
android_manifest = "shell/AndroidManifest.xml"
sources = [
"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/ContextManager.java",
"shell/src/org/chromium/android_webview/test/AwJUnit4ClassRunner.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/OnlyRunIn.java",
"shell/src/org/chromium/android_webview/test/SecondBrowserProcess.java",
"shell/src/org/chromium/android_webview/test/TestContentProvider.java",
]
product_config_java_packages = [ webview_product_config_java_package ]
shared_libraries = [ ":libstandalonelibwebviewchromium" ]
command_line_flags_file = "android-webview-command-line"
}
android_resources("webview_instrumentation_apk_resources") {
sources = [
"shell/res/layout/testshell_activity.xml",
"shell/res/raw/resource_file.html",
"shell/res/raw/resource_icon.png",
"shell/res/values/config.xml",
]
}
android_assets("webview_instrumentation_apk_assets") {
deps = [
"//android_webview:pak_file_assets",
"//third_party/icu:icu_assets",
]
sources = [
"shell/assets/asset_file.html",
"shell/assets/asset_icon.png",
"shell/assets/autofill.html",
"shell/assets/cookie_test.html",
"shell/assets/cors.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/full_screen_video_test_not_preloaded.html",
"shell/assets/key-system-test.html",
"shell/assets/star.svg",
"shell/assets/star.svgz",
"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",
]
if (use_v8_context_snapshot) {
deps += [ "//tools/v8_context_snapshot:v8_context_snapshot_assets" ]
} else {
deps += [ "//v8:v8_external_startup_data_assets" ]
}
}
generate_jni("draw_fn_impl_jni_headers") {
sources =
[ "shell/src/org/chromium/android_webview/shell/ContextManager.java" ]
}
shared_library("libstandalonelibwebviewchromium") {
testonly = true
sources = [
"shell/src/draw_fn/allocator.cc",
"shell/src/draw_fn/allocator.h",
"shell/src/draw_fn/context_manager.cc",
"shell/src/draw_fn/context_manager.h",
"shell/src/draw_fn/overlays_manager.cc",
"shell/src/draw_fn/overlays_manager.h",
]
ldflags = [ "-Wl,-shared,-Bsymbolic" ]
deps = [
":draw_fn_impl_jni_headers",
":webview_instrumentation_test_native_jni_impl",
"//android_webview/browser/gfx",
"//android_webview/lib",
"//android_webview/lib:webview_entry_point",
"//android_webview/nonembedded",
"//android_webview/public",
"//base",
"//components/android_autofill/browser/test_support:component_autofill_provider_native_test_support",
"//components/heap_profiling/multi_process:test_support",
"//content/public/test/android:content_native_test_support",
"//gpu/vulkan",
"//gpu/vulkan/init",
"//gpu/vulkan/init:skia",
]
libs = [ "android" ]
configs -= [ "//build/config/android:hide_all_but_jni_onload" ]
configs += [ "//build/config/android:hide_all_but_jni" ]
}
instrumentation_test_apk("webview_instrumentation_test_apk") {
apk_name = "WebViewInstrumentationTest"
apk_under_test = ":webview_instrumentation_apk"
android_manifest = "../javatests/AndroidManifest.xml"
min_sdk_version = 21
deps = [
":webview_instrumentation_test_mock_services_java",
":webview_instrumentation_test_utils_java",
"//android_webview:android_webview_java",
"//android_webview:common_aidl_java",
"//android_webview:common_crash_java",
"//android_webview:common_platform_services_java",
"//android_webview:common_variations_java",
"//android_webview/nonembedded:devui_java",
"//android_webview/nonembedded:services_java",
"//android_webview/proto:aw_variations_seed_proto_java",
"//android_webview/proto:metrics_bridge_records_proto_java",
"//android_webview/test/embedded_test_server:aw_net_java_test_support",
"//base:base_java",
"//base:base_java_test_support",
"//components/android_autofill/browser:java",
"//components/android_autofill/browser/test_support:component_autofill_provider_java_test_support",
"//components/autofill/android:autofill_java",
"//components/autofill/core/common/mojom:mojo_types_java",
"//components/background_task_scheduler:background_task_scheduler_task_ids_java",
"//components/component_updater/android:component_provider_service_aidl_java",
"//components/component_updater/android:embedded_component_loader_java",
"//components/content_capture/android:java",
"//components/embedder_support/android:util_java",
"//components/embedder_support/android:web_contents_delegate_java",
"//components/heap_profiling/multi_process:heap_profiling_java_test_support",
"//components/metrics:metrics_java",
"//components/minidump_uploader:minidump_uploader_java",
"//components/minidump_uploader:minidump_uploader_javatests",
"//components/policy/android:policy_java",
"//components/policy/android:policy_java_test_support",
"//components/safe_browsing/android:safe_browsing_java",
"//components/variations/android:variations_java",
"//components/variations/proto:proto_java",
"//components/version_info/android:version_constants_java",
"//components/viz:viz_java",
"//content/public/android:content_java",
"//content/public/test/android:content_java_test_support",
"//mojo/public/java:bindings_java",
"//net/android:net_java",
"//net/android:net_java_test_support",
"//net/android:net_javatests",
"//services/device/public/java:geolocation_java",
"//services/device/public/java:geolocation_java_test_support",
"//third_party/android_deps:com_google_code_findbugs_jsr305_java",
"//third_party/android_deps:com_google_guava_failureaccess_java",
"//third_party/android_deps:espresso_java",
"//third_party/android_deps:guava_android_java",
"//third_party/android_deps:protobuf_lite_runtime_java",
"//third_party/android_support_test_runner:rules_java",
"//third_party/android_support_test_runner:runner_java",
"//third_party/androidx:androidx_activity_activity_java",
"//third_party/androidx:androidx_annotation_annotation_java",
"//third_party/androidx:androidx_core_core_java",
"//third_party/androidx:androidx_fragment_fragment_java",
"//third_party/androidx:androidx_test_core_java",
"//third_party/androidx:androidx_test_rules_java",
"//third_party/androidx:androidx_test_runner_java",
"//third_party/blink/public/mojom:web_feature_mojo_bindings_java",
"//third_party/hamcrest:hamcrest_java",
"//third_party/junit",
"//third_party/metrics_proto:metrics_proto_java",
"//third_party/mockito:mockito_java",
"//ui/android:ui_java",
"//ui/android:ui_java_test_support",
"//url:gurl_java",
]
sources = [
"../javatests/src/org/chromium/android_webview/test/AcceptLanguageTest.java",
"../javatests/src/org/chromium/android_webview/test/AndroidProtocolHandlerTest.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/AwActivityTestRule.java",
"../javatests/src/org/chromium/android_webview/test/AwAutofillTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentCaptureTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsAnchorViewTest.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/AwContentsClientOnFormResubmissionTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsClientOnRenderProcessGoneTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsClientOnRendererUnresponsiveTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsClientOnScaleChangedTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsClientOnUnhandledKeyEventTest.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/AwContentsContainerViewTest.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/AwDisplayCutoutTest.java",
"../javatests/src/org/chromium/android_webview/test/AwFormDatabaseTest.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/AwLegacyQuirksTest.java",
"../javatests/src/org/chromium/android_webview/test/AwMetricsIntegrationTest.java",
"../javatests/src/org/chromium/android_webview/test/AwNetworkConfigurationTest.java",
"../javatests/src/org/chromium/android_webview/test/AwPacProcessorTest.java",
"../javatests/src/org/chromium/android_webview/test/AwPageLoadMetricsTest.java",
"../javatests/src/org/chromium/android_webview/test/AwPermissionManagerTest.java",
"../javatests/src/org/chromium/android_webview/test/AwProxyControllerTest.java",
"../javatests/src/org/chromium/android_webview/test/AwQuotaManagerBridgeTest.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/AwUncaughtExceptionTest.java",
"../javatests/src/org/chromium/android_webview/test/AwVariationsSeedFetcherTest.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/CleanupReferenceTest.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/DarkModeTest.java",
"../javatests/src/org/chromium/android_webview/test/DisableHardwareAccelerationForTest.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/HeapProfilingTest.java",
"../javatests/src/org/chromium/android_webview/test/HttpAuthDatabaseTest.java",
"../javatests/src/org/chromium/android_webview/test/JsJavaInteractionTest.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/MemoryMetricsLoggerTest.java",
"../javatests/src/org/chromium/android_webview/test/NavigationHistoryTest.java",
"../javatests/src/org/chromium/android_webview/test/OnDiskFileTest.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/RenderProcessGoneHelper.java",
"../javatests/src/org/chromium/android_webview/test/RendererProcessMetricsProviderTest.java",
"../javatests/src/org/chromium/android_webview/test/SafeBrowsingTest.java",
"../javatests/src/org/chromium/android_webview/test/SafeModeTest.java",
"../javatests/src/org/chromium/android_webview/test/SaveRestoreStateTest.java",
"../javatests/src/org/chromium/android_webview/test/SslPreferencesTest.java",
"../javatests/src/org/chromium/android_webview/test/StandaloneAwQuotaManagerBridgeTest.java",
"../javatests/src/org/chromium/android_webview/test/TestAwContents.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/VariationsSeedHolderTest.java",
"../javatests/src/org/chromium/android_webview/test/VariationsSeedLoaderTest.java",
"../javatests/src/org/chromium/android_webview/test/VariationsTest.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/WebViewFindApisTestRule.java",
"../javatests/src/org/chromium/android_webview/test/WebViewModalDialogOverrideTest.java",
"../javatests/src/org/chromium/android_webview/test/common/crash/CrashInfoEqualityMatcher.java",
"../javatests/src/org/chromium/android_webview/test/common/crash/CrashInfoTest.java",
"../javatests/src/org/chromium/android_webview/test/common/variations/VariationsUtilsTest.java",
"../javatests/src/org/chromium/android_webview/test/component_updater/EmbeddedComponentLoaderTest.java",
"../javatests/src/org/chromium/android_webview/test/devui/AwNonembeddedUmaRecorderTest.java",
"../javatests/src/org/chromium/android_webview/test/devui/CrashesListFragmentTest.java",
"../javatests/src/org/chromium/android_webview/test/devui/DeveloperUiTest.java",
"../javatests/src/org/chromium/android_webview/test/devui/DeveloperUiTestUtils.java",
"../javatests/src/org/chromium/android_webview/test/devui/FlagsFragmentTest.java",
"../javatests/src/org/chromium/android_webview/test/devui/HomeFragmentTest.java",
"../javatests/src/org/chromium/android_webview/test/devui/util/CrashBugUrlFactoryTest.java",
"../javatests/src/org/chromium/android_webview/test/devui/util/UnuploadedFilesStateLoaderTest.java",
"../javatests/src/org/chromium/android_webview/test/devui/util/UploadedCrashesInfoLoaderTest.java",
"../javatests/src/org/chromium/android_webview/test/devui/util/WebViewCrashInfoCollectorTest.java",
"../javatests/src/org/chromium/android_webview/test/devui/util/WebViewCrashLogParserTest.java",
"../javatests/src/org/chromium/android_webview/test/services/ComponentsProviderServiceTest.java",
"../javatests/src/org/chromium/android_webview/test/services/CrashReceiverServiceTest.java",
"../javatests/src/org/chromium/android_webview/test/services/MetricsBridgeServiceTest.java",
"../javatests/src/org/chromium/android_webview/test/services/MetricsBridgeServiceUnitTest.java",
"../javatests/src/org/chromium/android_webview/test/services/MinidumpUploadJobTest.java",
"../javatests/src/org/chromium/android_webview/test/services/ServiceConnectionHelper.java",
"../javatests/src/org/chromium/android_webview/test/services/VariationsSeedServerTest.java",
"../javatests/src/org/chromium/android_webview/test/services/VisualStateCallbackTest.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",
]
if (!use_jacoco_coverage) {
# Jacoco requires strict mode to be turned off since it writes coverage data to files.
sources += [ "../javatests/src/org/chromium/android_webview/test/AwStrictModeTest.java" ]
}
data = [ "data/" ]
data_deps =
[ "//testing/buildbot/filters:webview_instrumentation_test_apk_filters" ]
if (enable_chrome_android_internal) {
data_deps +=
[ "//clank/build/bot/filters:webview_instrumentation_test_apk_filters" ]
}
# We only want to bother including these on bots set up for VR testing
if (include_vr_data) {
data += [
"//chrome/android/shared_preference_files/test/",
"//third_party/gvr-android-sdk/test-apks/vr_services/vr_services_current.apk",
]
}
additional_apks = [
"//android_webview/test/embedded_test_server:aw_net_test_support_apk",
"//net/android:net_test_support_apk",
]
}
android_library("webview_instrumentation_test_mock_services_java") {
testonly = true
sources = [
"../javatests/src/org/chromium/android_webview/test/component_updater/MockComponentsProviderService.java",
"../javatests/src/org/chromium/android_webview/test/services/MockMetricsBridgeService.java",
"../javatests/src/org/chromium/android_webview/test/services/MockVariationsSeedServer.java",
]
deps = [
"//android_webview:common_aidl_java",
"//android_webview/nonembedded:services_java",
"//base:base_java",
"//base:base_java_test_support",
"//components/component_updater/android:component_provider_service_aidl_java",
"//third_party/junit",
]
}
android_library("webview_instrumentation_test_utils_java") {
testonly = true
sources = [
"../javatests/src/org/chromium/android_webview/test/util/EmbeddedComponentLoaderFactory.java",
"../javatests/src/org/chromium/android_webview/test/util/RendererProcessMetricsProviderUtils.java",
"../javatests/src/org/chromium/android_webview/test/util/VariationsTestUtils.java",
"shell/src/org/chromium/android_webview/test/util/MemoryMetricsLoggerUtils.java",
]
deps = [
"//android_webview:common_variations_java",
"//base:base_java",
"//components/component_updater/android:embedded_component_loader_java",
"//components/variations/android:variations_java",
"//third_party/junit",
]
annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ]
}
generate_jni("webview_instrumentation_test_native_jni") {
testonly = true
sources = [
"../javatests/src/org/chromium/android_webview/test/component_updater/EmbeddedComponentLoaderTest.java",
"../javatests/src/org/chromium/android_webview/test/util/EmbeddedComponentLoaderFactory.java",
"../javatests/src/org/chromium/android_webview/test/util/RendererProcessMetricsProviderUtils.java",
"../javatests/src/org/chromium/android_webview/test/util/VariationsTestUtils.java",
"shell/src/org/chromium/android_webview/test/util/MemoryMetricsLoggerUtils.java",
]
}
source_set("webview_instrumentation_test_native_jni_impl") {
sources = [
"browser/embedded_component_loader_test_helper.cc",
"browser/renderer_process_metrics_provider_utils.cc",
"browser/variations_test_utils.cc",
"shell/memory_metrics_logger_utils.cc",
]
deps = [
":webview_instrumentation_test_native_jni",
"//android_webview/browser",
"//android_webview/browser/metrics",
"//base",
"//base/test:test_support",
"//components/component_updater/android:embedded_component_loader",
"//components/component_updater/android:embedded_component_loader_jni_headers",
"//components/embedder_support/android/metrics",
"//third_party/protobuf:protobuf_lite",
]
}
test("android_webview_unittests") {
deps = [
":android_webview_unittests_assets",
":android_webview_unittests_java",
":android_webview_unittests_jni",
"//android_webview/browser",
"//android_webview/browser/gfx",
"//android_webview/browser/lifecycle",
"//android_webview/browser/metrics",
"//android_webview/common",
"//android_webview/nonembedded",
"//base/test:test_support",
"//components/autofill/core/browser",
"//components/component_updater",
"//components/embedder_support/android:util",
"//components/metrics",
"//components/prefs:prefs",
"//components/prefs:test_support",
"//components/update_client",
"//content:content",
"//content/test:test_support",
"//mojo/core/embedder",
"//net:net",
"//net:test_support",
"//services/cert_verifier/public/mojom",
"//services/network:test_support",
"//ui/base:ui_base_jni_headers",
"//ui/gl",
"//ui/gl:test_support",
]
data = [ "data/" ]
sources = [
"../browser/aw_browser_context_unittest.cc",
"../browser/aw_content_browser_client_unittest.cc",
"../browser/aw_contents_client_bridge_unittest.cc",
"../browser/aw_form_database_service_unittest.cc",
"../browser/aw_media_url_interceptor_unittest.cc",
"../browser/aw_pac_processor_unittest.cc",
"../browser/aw_permission_manager_unittest.cc",
"../browser/gfx/begin_frame_source_webview_unittest.cc",
"../browser/gfx/browser_view_renderer_unittest.cc",
"../browser/gfx/test/fake_window.cc",
"../browser/gfx/test/fake_window.h",
"../browser/gfx/test/rendering_test.cc",
"../browser/gfx/test/rendering_test.h",
"../browser/lifecycle/aw_contents_lifecycle_notifier_unittest.cc",
"../browser/metrics/aw_stability_metrics_provider_unittest.cc",
"../browser/metrics/visibility_metrics_logger_unittest.cc",
"../browser/permission/media_access_permission_request_unittest.cc",
"../browser/permission/permission_request_handler_unittest.cc",
"../browser/renderer_host/auto_login_parser_unittest.cc",
"../browser/safe_browsing/aw_safe_browsing_allowlist_manager_unittest.cc",
"../browser/scoped_add_feature_flags_unittests.cc",
"../browser/state_serializer_unittest.cc",
"../lib/webview_tests.cc",
"../nonembedded/component_updater/aw_component_installer_policy_delegate_unittest.cc",
"../nonembedded/component_updater/aw_component_update_service_test.cc",
"../nonembedded/component_updater/aw_component_updater_configurator_unittest.cc",
"../nonembedded/component_updater/installer_policies/aw_package_names_allowlist_component_installer_policy_unittest.cc",
]
deps += [ "//v8:v8_external_startup_data_assets" ]
}
android_assets("android_webview_unittests_assets") {
sources = [ "unittest/assets/asset_file.ogg" ]
}
android_library("android_webview_unittests_java") {
testonly = true
deps = [
"//android_webview:android_webview_java",
"//base:base_java",
"//content/public/test/android:content_java_test_support",
]
sources = [ "../unittestjava/src/org/chromium/android_webview/unittest/MockAwContentsClientBridge.java" ]
}
generate_jni("android_webview_unittests_jni") {
testonly = true
sources = [ "../unittestjava/src/org/chromium/android_webview/unittest/MockAwContentsClientBridge.java" ]
}
# robolectric tests
junit_binary("android_webview_junit_tests") {
sources = [
"../junit/src/org/chromium/android_webview/robolectric/AwDisplayCutoutControllerTest.java",
"../junit/src/org/chromium/android_webview/robolectric/AwDisplayModeControllerTest.java",
"../junit/src/org/chromium/android_webview/robolectric/AwLayoutSizerTest.java",
"../junit/src/org/chromium/android_webview/robolectric/AwScrollOffsetManagerTest.java",
"../junit/src/org/chromium/android_webview/robolectric/FindAddressTest.java",
"../junit/src/org/chromium/android_webview/robolectric/RectUtilsTest.java",
"../junit/src/org/chromium/android_webview/robolectric/common/FlagOverrideHelperTest.java",
"../junit/src/org/chromium/android_webview/robolectric/common/services/ServiceNamesTest.java",
"../junit/src/org/chromium/android_webview/robolectric/metrics/AwNonembeddedUmaReplayerTest.java",
"../nonembedded/java/src/org/chromium/android_webview/nonembedded/NetworkFetcherTaskTest.java",
]
deps = [
"//android_webview:android_webview_java",
"//android_webview/nonembedded:services_java",
"//android_webview/proto:metrics_bridge_records_proto_java",
"//base:base_java",
"//base:base_java_test_support",
"//base:base_junit_test_support",
"//content/public/test/android:content_java_test_support",
"//third_party/android_deps:protobuf_lite_runtime_java",
"//third_party/android_support_test_runner:runner_java",
"//third_party/androidx:androidx_test_runner_java",
"//third_party/blink/public/mojom:mojom_platform_java",
"//url:gurl_java",
]
package_name = "org.chromium.android_webview.robolectric"
}