Repository navigation
test: update the live-sample and short-window fixtures for the chrome root after body - #5513
Merged
Merged
Conversation
#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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two browser tests still assumed Leaf's interface root (
div.lf-chrome) stands insidebody. #5228 deliberately moved it afterbody, ashtml'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_samplefocusedtabStops(document.body).at(-1)as the child frame's last Tab stop. That used to be Leaf's panel button; with the root outsidebodyit's now a pageleaf-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 fromtabStops(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 withposition: fixed; inset: 0. The base rule now gives the rootwidth: 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