fix(browser-webdriverio): allow gpu in headless chrome by rotempasharel1 · Pull Request #10376 · vitest-dev/vitest (original) (raw)
Resolves #10351
Description
This PR allows users to explicitly enable GPU rendering for headless Chrome when using @vitest/browser-webdriverio.
By default, Vitest still adds disable-gpu for headless Chrome to preserve the existing behavior.
However, when the user explicitly provides --enable-gpu or enable-gpu in goog:chromeOptions.args, Vitest no longer adds disable-gpu on top of it.
Tests
No test was added because the direct buildCapabilities unit test was considered too low-level during review.
The change is intentionally conservative: disable-gpu remains part of the default headless Chrome arguments, but it is skipped when the user explicitly provides --enable-gpu.