In general the Android WebView test code and infrastructure is similar to what the rest of the project uses. Here we will only deal with details specific to the WebView.
Most of the Android WebView test code will be found under android_webview/javatests. There are two categories of tests here:
The slightly misleadingly named folder android_webview/unittestjava/ contains Java code used by native (C++) tests which happen to be testing C++ code containing JNI calls.
The android_webview_apk target produces a standalone application containing the C++ and Java code required in order to instantiate and use an AwContents instance. If launched directly from launcher the test shell presents a very simple UI which can be used to load pages into the single AwContents instance on screen. The environment the shell creates is not identical to the production environment (that is, when this code is actually powering the Android system WebView). Here are the notable differences:
The android_webview_test_apk target contains the test cases from the android_webview/javatests folder. It is important to remember that this package does not contain any of the remaining Java or C++ code. This means that when making any changes to the implementation it is necessary to rebuild and reinstall AndroidWebView.apk (which is the result of building the android_webview_apk ninja target).
The Android platform contains tests which exercise the WebView API in a production environment. More information on these tests can be found here.
The frameworks/webview project within the Android source tree contains a WebViewShell package. This should not be confused with the android_webview_apk shell. It's primary use is for performance testing since it uses the WebView in a production environment. The WebViewShell application is a very simple Android application which uses the system WebView. This means that in order to make changes to the WebView implementation used by the WebViewShell one has to update the Android system image on which the WebViewShell is running.