Skip to content

test: update the live-sample and short-window fixtures for the chrome root after body - #5513

Merged
max-sixty merged 1 commit into
mainfrom
fix/issue-5475-fixtures
Nov 5, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/issue-5475-fixtures

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

Two browser tests still assumed Leaf's interface root (div.lf-chrome) stands inside body. #5228 deliberately moved it after body, as html's last child with an empty box (browser/base.css, :root > .lf-chrome). Both tests now use the new shape and protect the same behavior. No product code changes.

  • test_live_samples.py::test_tab_walks_into_and_out_of_a_full_view_sample focused tabStops(document.body).at(-1) as the child frame's last Tab stop. That used to be Leaf's panel button; with the root outside body it's now a page leaf-text, which script .focus() doesn't take, so the frame never held focus. The child's real Tab order is unchanged and still ends at the panel button, so the test reads it from tabStops(document).
  • threads/test_layout.py::test_a_short_window_keeps_media_choices_and_send_around_the_scrolling_draft[True] makes the chrome root a scaled containing block with position: fixed; inset: 0. The base rule now gives the root width: 0; height: 0, so the bar's containing block was an empty box and the placement withheld the field. The fixture now sizes the box too, so the case still tests placement through a transformed, zoomed containing block.

Both failed on main and pass with this change.

Refs #5475 — automated triage

#5228 moved Leaf's interface root out of `body`, as `html`'s last child with
an empty box (`base.css`, `:root > .lf-chrome`). Two tests still assumed the
old shape:

- The live-sample Tab walk focused `tabStops(document.body).at(-1)` as the
  child frame's last stop. That was Leaf's own panel button; with the root
  outside `body` it is now a page `leaf-text`, which script focus doesn't
  take. The child's real last stop is unchanged, so the test reads it from
  `tabStops(document)`.
- The scaled short-window case makes the chrome root a transformed
  containing block with `position: fixed; inset: 0`, which no longer sizes a
  box the base rule gives `width: 0; height: 0`. The fixture now sets the
  size too, so the case still tests placement through a scaled containing
  block.

No product behavior changes.

Refs #5475
@max-sixty
max-sixty merged commit 70d00fd into main Nov 5, 2026
5 checks passed
@max-sixty
max-sixty deleted the fix/issue-5475-fixtures branch November 5, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants