Passing Android device serial to chromedriver.

The Android device serial number, specified by the --device-serial
command-line option, was never passed to the chromedriver server.
This resulted in chromedriver always using the first device or
emulator.

Bug: None
Change-Id: I1a4cb1c45739f24da5ea0f6cfb3726c84ff68fa1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1848264
Commit-Queue: Chris Mumford <cmumford@google.com>
Reviewed-by: Robert Ma <robertma@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704795}
diff --git a/tools/wptrunner/wptrunner/browsers/android_webview.py b/tools/wptrunner/wptrunner/browsers/android_webview.py
index b7b08bb..fdf53f7 100644
--- a/tools/wptrunner/wptrunner/browsers/android_webview.py
+++ b/tools/wptrunner/wptrunner/browsers/android_webview.py
@@ -54,6 +54,8 @@
     capabilities["goog:chromeOptions"]["androidPackage"] = \
         "org.chromium.webview_shell"
     capabilities["goog:chromeOptions"]["androidActivity"] = ".WebPlatformTestsActivity"
+    if 'device_serial' in kwargs:
+        capabilities["goog:chromeOptions"]["androidDeviceSerial"] = kwargs['device_serial']
 
     # Workaround: driver.quit() cannot quit SystemWebViewShell.
     executor_kwargs["pause_after_test"] = False