android_webview.md (2283B)
Android WebView
To run WPT on WebView on an Android device, some additional set-up is required.
Currently, Android WebView support is experimental.
Prerequisites
Please check Chrome for Android for the common instructions for Android support first.
Ensure you have a userdebug or eng Android build installed on the device.
Install an up-to-date version of system webview shell:
- [Open PRs with label
docs(excluding vendor exports)](https://github.com/web-platform-tests/wpt/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+label%3Adocs+-label%3A%22mozilla%3Agecko-sync%22+-label%3A%22chromium-export%22+-label%3A%22webkit-export%22+-label%3A%22servo-export%22+-label%3Avendor-importà - [Open PRs with label
docs(excluding vendor exports)](https://github.com/web-platform-tests/wpt/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+label%3Adocs+-label%3A%22mozilla%3Agecko-sync%22+-label%3A%22chromium-export%22+-label%3A%22webkit-export%22+-label%3A%22servo-export%22+-label%3Avendor-importà
in the "Commit Position" column of row "LAST_CHANGE" (at bottom of page).
- [Open PRs with label
docs(excluding vendor exports)](https://github.com/web-platform-tests/wpt/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+label%3Adocs+-label%3A%22mozilla%3Agecko-sync%22+-label%3A%22chromium-export%22+-label%3A%22webkit-export%22+-label%3A%22servo-export%22+-label%3Avendor-importà - [Open PRs with label
docs(excluding vendor exports)](https://github.com/web-platform-tests/wpt/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+label%3Adocs+-label%3A%22mozilla%3Agecko-sync%22+-label%3A%22chromium-export%22+-label%3A%22webkit-export%22+-label%3A%22servo-export%22+-label%3Avendor-importà - [Open PRs with label
docs(excluding vendor exports)](https://github.com/web-platform-tests/wpt/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+label%3Adocs+-label%3A%22mozilla%3Agecko-sync%22+-label%3A%22chromium-export%22+-label%3A%22webkit-export%22+-label%3A%22servo-export%22+-label%3Avendor-importà
* Choose a userdebug build. * Run an emulator with writable system partition from command line
If you have an issue with ChromeDriver version mismatch, try one of the following:
* Try removing _venv/bin/chromedriver such that wpt runner can install a matching version
automatically. Failing that, please check your environment path and make
sure that no other ChromeDriver is used.
* Download the ChromeDriver binary matching your WebView's major version and specify it on the command line
`
./wpt run --webdriver-binary <binary path> ...
`
Configure host remap rules in the webview commandline file:
adb shell "echo '_ --host-resolver-rules=\"MAP nonexistent.*.test ^NOTFOUND, MAP *.test 127.0.0.1\"' > /data/local/tmp/webview-command-line"
Ensure that adb can be found on your system's PATH.
Running Tests
Example command line:
./wpt run --test-type=testharness android_webview <TESTS>
- Note that there is no support for channel or automatic installation. The test
will be run against the current WebView version installed on the device.
- Reftests are not supported at the moment.