url_request_unittest: Enable AIA tests on android.

On android, adb is used to forward connections from the device to the
host, but there isn't a way to reserve the source port before deciding
which destination port on the host to forward it to. Change
RemoteTestServer reserve a port for AIA & OCSP, and forward it to another
port, like it already does on Fuchsia. Unlike Fuchsia, the second adb
forwarding step is still required to forward the connection from device to
host.

Change-Id: I739543fd0036f189928b5c7ce31c4d9a520e1cf0
Reviewed-on: https://chromium-review.googlesource.com/887171
Reviewed-by: Scott Graham <scottmg@chromium.org>
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Eric Roman <eroman@chromium.org>
Commit-Queue: Matt Mueller <mattm@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#532946}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fb27199b5bbf8706ca90fc0c6a6d42c21092f686
This commit is contained in:
Matt Mueller 2018-01-30 18:10:48 +00:00 коммит произвёл Commit Bot
Родитель 0396574168
Коммит ab65e52827
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -257,7 +257,7 @@ class TestServerThread(threading.Thread):
if self.is_ready:
port_map = [(0, self.host_port)]
if self.host_ocsp_port:
port_map.append([(0, self.host_ocsp_port)])
port_map.extend([(0, self.host_ocsp_port)])
self.port_forwarder.Map(port_map)
self.forwarder_device_port = \