A small patch against the published wasm-bindgen-cli 0.2.121 source. It is
required because the upstream wasm-bindgen-test-runner 0.2.121:
- Sends the legacy JSON-Wire
desiredCapabilitiesbody to ChromeDriver, whichchromedriver >= 75rejects (strict W3C). The patch sends the W3Ccapabilities.alwaysMatchbody plus an explicitbrowserName: chrome. - Uses a
ureqPOST that ChromeDriver/geckodriver's embedded HTTP server resets under WSL. The patch replacesClient::doitwith a hand-rolled HTTP/1.1 overTcpStream(Content-Length, noExpect: 100-continue, parses headers then reads exactlyContent-Lengthbytes). - Spawns ChromeDriver and immediately POSTs
/sessionbefore its HTTP loop has finished initialising. The patch sleeps 750ms after the bind probe.
All three issues are upstream limitations; this patch is the minimum needed
to get green wasm-bindgen browser tests on WSL Ubuntu 24.04. Apply it via
scripts/install-wasm-test-runner.sh, which fetches the pristine crate
source from crates.io, applies the patch, and cargo installs the binaries
into ~/.cargo/bin.