Implementation of DevTools socket tunneling service for remote debugging.
Test APK in addition to instrumentation tests contains launching activity and foreground service what let duplicate ChromeShell debug socket to a differently named socket. If a device with running ChromeShell and DevToolsBridgeTest's service connect to a Desktop chrome (with USB debugging enabled) then chrome://inspect#devices will show 2 ChromeChell items. Both are debuggable (
https://codereview.chromium.org/521573002/ should be applied to Desktop chrome to make the process less surprising). It's suitable for manual tests.
This CL doesn't care of a few known issues:
1. Data channel buffer overflow. Data channel automatically closed in this case.
2. Uncontrolled number of pending sockets. DevTools throttles opening sockets and and keeps sockets that exceeds a threshold hanging.
3. Uncontrolled number of threads (it's actually not a problem if #2 solved, thanks to DevTools throttling).
To keep this CL reasonably simple this issues will be addressed later.
TEST=org.chromium.components.devtools_bridge.SocketTunnelServerTest, see description fro manual testing.
BUG=
383418
Committed:
https://crrev.com/15044609893faf9b2c2a533aa9a136f288ea20a1
Cr-Commit-Position: refs/heads/master@{#296360}
Committed:
https://crrev.com/6c788d675dba4ec185375863cbc53c0803cc4b3e
Cr-Commit-Position: refs/heads/master@{#296377}