From 52e3dc74d81edadde51788940d1e0d8bf30734de Mon Sep 17 00:00:00 2001 From: Kevin Martinez Date: Thu, 12 Nov 2026 19:53:59 -0500 Subject: [PATCH] fix(ci): run the Firefox browser suites under a window manager Firefox 160 (ubuntu-24.04 runner image 20261103.629) fails the check "fullscreen button and Alt+Enter" with {"on":false,"w":960}. Reproduced in a container with Firefox 159.0 and 160.0 from ftp.mozilla.org under xvfb-run and puppeteer-core 25.13.0 (WebDriver BiDi): the button's click carries user activation (navigator.userActivation.isActive is true) and calls requestFullscreen(), but on Firefox 160 on a bare Xvfb the promise never settles and neither fullscreenchange nor fullscreenerror fires, even after 6 s. Firefox 159 completes the same request on the same display. With a window manager (Openbox) running on the display, both versions enter fullscreen; headless Firefox 160 does too. So Firefox 160 on X11 waits for the window manager to make the window fullscreen, and xvfb-run starts none. The page's fullscreen button is correct: a real desktop always has a window manager. The browser engine job installs openbox and the Firefox step starts it inside xvfb-run before the suites. Chrome's steps are unchanged. --- .github/workflows/checks.yml | 7 +++++-- docs/ci.md | 5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 10fcacd0..54909553 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -528,7 +528,7 @@ jobs: - name: Virtual display and sound server run: | sudo apt-get update -q - sudo apt-get install -y --no-install-recommends xvfb xauth libgl1 libglx-mesa0 libgl1-mesa-dri pulseaudio pulseaudio-utils + sudo apt-get install -y --no-install-recommends xvfb xauth libgl1 libglx-mesa0 libgl1-mesa-dri pulseaudio pulseaudio-utils openbox export XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-$RUNNER_TEMP/xdg}" mkdir -p "$XDG_RUNTIME_DIR" && chmod 700 "$XDG_RUNTIME_DIR" echo "XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR" >> "$GITHUB_ENV" @@ -560,10 +560,13 @@ jobs: exit "$status" - name: Firefox suites if: ${{ !cancelled() }} + # Under a window manager, as on a real desktop: from Firefox 160 on, a fullscreen request on X11 waits for the + # window manager to make the window fullscreen, so on a bare Xvfb it never completes (Firefox 159 completed it). run: | status=0 firefox --version - xvfb-run -a -s "-screen 0 1920x1080x24" node web/tests/run.mjs platform scripts repeat keyboard framerate audio gamepad \ + xvfb-run -a -s "-screen 0 1920x1080x24" bash -c 'openbox & sleep 1; exec node web/tests/run.mjs "$@"' firefox-suites \ + platform scripts repeat keyboard framerate audio gamepad \ --browsers firefox --games "$GAME" --headed --out web-tests | tee web-tests-firefox.log || status=$? grep -E '^(==|FAIL|[0-9]+ passed)' web-tests-firefox.log | sed 's/^/- /' >> "$GITHUB_STEP_SUMMARY" || true exit "$status" diff --git a/docs/ci.md b/docs/ci.md index 3e2bcb87..4c90ca9e 100644 --- a/docs/ci.md +++ b/docs/ci.md @@ -507,8 +507,9 @@ The macOS and iOS runtimes build only when macOS runners are on (daily CI passes ### Browser tests `web/tests/run.mjs` plays development packages (`web/build.sh --dev`, SDL 3 in WebAssembly) in real browsers. In daily -CI (the **Browser engine** jobs, Chrome and Firefox on a virtual X server with a virtual sound server, one job per game -the change reaches) and in validate (all four games), it runs these suites, and the job fails when any of their checks +CI (the **Browser engine** jobs, Chrome and Firefox on a virtual X server with a virtual sound server, Firefox also +under a window manager (Openbox), without which Firefox 160 and later never complete a fullscreen request; one job per +game the change reaches) and in validate (all four games), it runs these suites, and the job fails when any of their checks fails: | Suite | What it shows |