Skip to content

Firefox case of test_a_caret_is_drawn_at_a_lines_end_and_after_a_list_bullet has failed since #5409 added it #5652

Closed

Description

@leaf-agent

tests/browser/test_chrome_contracts.py::test_a_caret_is_drawn_at_a_lines_end_and_after_a_list_bullet[firefox_browser] has failed since #5409 (1b3e0770c, "Merge or remove 230 duplicate test functions") created it. #5409 added this test parametrized over browser and firefox_browser, and its Firefox case times out:

page.wait_for_function(…)          # test_chrome_contracts.py:395
TimeoutError: Page.wait_for_function: Timeout 120000ms exceeded.

Run locally at 1b3e0770c, [browser] passes and [firefox_browser] fails in one subtest. The Firefox case still fails on main 903e1d106. The test doesn't exist at 09e524975 (push run 41976158322). The first failing push run is 41991786341 at 09cc5bcad, and it fails on every push run since, through 42320062138.

So no change broke a working check. What's left to establish is whether Firefox draws the caret at a line's end or after a list bullet in a way the wait never sees: a real Firefox gap to record, as other engine gaps are recorded in notes/browser-support.md. The other possibility is that the wait reads something only Chromium reports, and then the test should be fixed.

Cause of a failure tracked in #3985.

Activity

  1. added
    tend-ci-cause
    on Nov 7, 2026
  2. added a commit that references this issue on Nov 7, 2026
    5edb4aa
  3. leaf-agent commented on Nov 7, 2026

    @leaf-agent
    CollaboratorAuthor

    Fixed by #5674, now merged. This was a real Firefox bug in Leaf's text field. The wait wasn't reading something only Chromium reports, and Firefox does draw the caret.

    Playwright's insert_text reaches Firefox as an input-method composition. In Firefox, a composition that starts over a selection inside the field's shadow root was dropped, and the field kept its old words. So the test's select-all-and-replace never replaced anything, and the field never shrank to the one line the wait expects. A Firefox user whose input method composes over selected text lost those words the same way. field-editor.js already worked around the same shadow-root defect for typed words, but skipped compositions. It now removes the selected words itself on the composition's first update, and one undo still restores the original text.

    The Firefox case had been failing since #4844 added the select-and-replace step to the test #5409 later merged. On the fix's head, the caret test passes in both engines, and test_words_typed_over_formatted_words_replace_them_in_firefox now covers an input method's words and their undo. That test fails without the fix. The PR's CI was green on ed65bb8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    tend-ci-cause

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions