mirror of
https://github.com/daijro/camoufox.git
synced 2026-09-05 16:00:41 +00:00
A mousemove whose destination rounds to the pixel the pointer is already on generates no eMouseMove in the widget, so the juggler-mouse-event-hit-renderer notification never fires and the sendEvents() call awaits an ack that never arrives. Because input dispatch is serialized on activateAndRun()'s process-global promise chain (TargetRegistry.js), that one stuck await wedges EVERY later input event for the life of the page — the page goes permanently unresponsive at 0% CPU with nothing in flight. Same activation-chain failure family as #225, but a distinct trigger: not an out-of-viewport / exact-edge coordinate (those are already guarded), but a move with no movement at all. It is reachable as the FIRST mouse action of a session. The pointer starts at (0,0) (this._lastTrackedPos), so any first move that rounds to the origin is a no-op: page.mouse.move(0, 0) // exact origin page.mouse.move(0.4, 0.4) // rounds to (0, 0) A humanized driver whose cursor model initialises to 0,0 and whose first move is a short hop near the corner hits this every run. It manifests through Playwright's sync client (the async client dedupes a move to the current position and never sends it). Fix: in the mousemove branch, if the rounded destination equals the rounded current position, record the position and return without dispatching. A no-op move has nothing to send. Verified by warm-rebuilding the beta.28 omni.ja (juggler is JS, no C++ recompile) and A/B/C testing: stock and a pristine no-edit repack both wedge on `move(0,0)`; only this one-line guard makes it survive, and a genuine move afterwards still fires. tests/patches/noop-mousemove-deadlock.py fails on stock and passes with the fix. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Camoufox Tests
Ensures that Playwright functionality is not broken.
This directory is based on the original Playwright-Python tests.
It has been modified to skip tests that use the following features:
- Injecting JavaScript into the page or writing to DOM. Camoufox's
page.evaluateonly supports reading values, not executing within the page context. - Overriding the User-Agent.
- Any tests specific to Chromium or Webkit.
Usage
Setting up the environment
Cd to this directory and run the following command to setup the venv and install the dependencies:
bash setup-venv.sh
Running the tests
Run via the shell script:
bash run-tests.sh --headful --executable-path /path/to/camoufox-bin
Or through the Makefile:
make tests headful=true