Repository navigation
test: open the latest revision without moving the caret in the held-read test - #6648
Merged
Merged
Conversation
…ead test test_an_old_document_state_request_cannot_update_the_new_revision relied on a page-comment draft to keep the first revision shown while it opened the leaf's menu to press Open latest. Opening the menu moves focus to the menu's search, so the draft no longer holds (composing/engagement.js, `midComposition`), and a heartbeat that falls while the menu stands (state-feed.js, every 2 s) installs the second revision by a fresh document, which takes the menu away. On a slow macOS runner the panel host vanished under `panel_settled`, whose predicate then read a null node. The test now opens the latest through `open_latest`, which runs the same `versionPicker.latest()` as the menu's row and leaves the caret in the draft, and drops the menu premise check that opened the menu the same way. The behavior it protects, an old realm's held state read not updating the new revision, is unchanged. version.js still said an open menu defers an install. That hold went with the classic chrome's version menu (#3100), and nothing defers on the floating panel's menu, so the header and `prepareActivation`'s comment now say what the code does. Closes #6598
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.
test_an_old_document_state_request_cannot_update_the_new_revisionfailed on macOS because the page installed revision 2 by itself while the test had the leaf's menu open, before it pressed Open latest. The test relied on its page-comment draft to keep revision 1 shown. Opening the menu moves focus to the menu's search, so the draft stops holding (midCompositionholds only for a focused box). The next heartbeat (every 2 s, state-feed.js) then installs revision 2 by a fresh document, which takes the panel away.panel_settled's predicate then read the missing panel host and threw. The failing run's page picture shows "Live second", with the draft carried over and the menu gone.The test now presses Open latest through
open_latest, which runs the sameversionPicker.latest()as the menu's row without moving the caret. It also dropsexpect_panel_offers(page, "latest"), which opened the menu the same way. What the test protects is unchanged: a state read held from the old realm doesn't update the new revision.Evidence
running-tendallows, the failing scheduled run counts as the before, and the next scheduledtest-macosrun after merge as the after.Contract correction.
version.jsstill said an open menu defers an install. That check (versionMenuIsOpen) went with the classic chrome in #3100, and nothing defers an install while the floating panel's menu is open. The header andprepareActivation's comment now describe the current code. A user with the leaf's menu open when a revision with changed executable inputs lands still sees the page reload and the menu close; only an open thread is carried across. Making an open menu defer installs again would add a hold to the core runtime for a rare path. That is a product call this PR leaves open.Closes #6598 — automated triage