Repository navigation
test: move the pointer off the window after every top-level suite on Linux Electron - #346645
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The asynchronous reset contract lacks regression coverage proving that teardown waits for reset completion and that a rejected reset records a finding without preventing later detectors from running.
1 open issue
What changed in this PR
This PR centralizes hover isolation in the Electron test harness to prevent the stationary Xvfb pointer from affecting later Linux test suites. Existing per-test workarounds remain unchanged.
Changes:
- Add a Linux-only hover reset after each top-level Electron suite.
- Send a
mouseLeaveevent through the main process. - Allow asynchronous isolation resets and await their completion before continuing.
| File | Description |
|---|---|
test/unit/electron/renderer.js |
Connects the Linux hover detector reset to the main-process handler. |
test/unit/electron/index.js |
Adds the handler that sends mouseLeave to the requesting page. |
src/vs/base/test/browser/isolationCheck.ts |
Supports and awaits asynchronous resets while recording failures. |
Review effort: Balanced
0d56688 to
091b69f
Compare
…Linux Electron Under Xvfb, the real pointer stays over the test window once a suite activates it, so :hover applies to whatever a later suite renders there. That caused the sticky request bubble (#344806) and Part Grid (#345683) main CI breaks. The hover detector now resets by sending mouseLeave to the page, and detector resets may be async. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
091b69f to
0fb0ebf
Compare
|
|
|
The rerun failed
|

Linux Electron unit tests run under Xvfb, where the real pointer rests over the test window. Once a suite activates the window, Chromium applies
:hoverand sends trusted hover events to whatever a later suite renders under that pointer. That made tests pass alone or in PR CI's sharded runs but fail in def 111's single-page run, and it broke main twice:ChatListWidget › uses the request bubble as the sticky sourcepicked up the hover color. Main CI stayed red for about 25 h until the per-test fix chat: keep a real pointer from hovering the sticky request bubble test #345320.Part Grid › the grabber of a part stays shown…moved the grabber to the part under the real pointer. That was fixed per test by test: keep a real pointer from moving the part grid grabber in its tests #346048.Both were the same mechanism, fixed one test at a time. This fixes it in the harness instead.
Change
hoverisolation detector, which already reports this state after every top-level suite, now also resets it on Linux Electron. The renderer asks the main process to send the page amouseLeave(webContents.sendInputEvent), so Chromium treats the pointer as outside the window until it really moves. Under Xvfb, it never does.IIsolationDetector.resetcan now return a promise, and the isolation check'safter allhook awaits it, so the next suite starts after the pointer has left.The per-test workarounds from #345320 and #346048 stay for now. They can be removed in a follow-up once this has run on main for a while.
Validation
:hoverfindings (16 suites on main), and it added 3.8 s per run, about 1 ms per suite. Without it, 492146 failed the sticky test.uses the request bubble as the sticky source and contentandthe grabber of a part stays shown…both pass, along with the other Part Grid tests. The findings show 0hover(16 suites on main) and a singledomfinding: the question-carousel leak fixed by Fix the main CI unit test breaks from the sessions providers double and leaked question carousels #346643. The 10 other failures in that job are main's break from the same time, also fixed by Fix the main CI unit test breaks from the sessions providers double and leaked question carousels #346643, which merged after the proof branch was cut.isolationCheck.test.ts, Sessions - Headers, Titlebar Part and grid, with noreset failedfindings.tsc --noEmitand eslint are clean for the touched files.