Repository navigation
test: name the foreign layer in the registry's $layer for the held-keys give-up test - #6512
Merged
Merged
Conversation
…ys give-up test #6484 stopped admitting the registry fetch by its headers, since a revision asset can be answered from the browser's cache with an earlier release's Leaf-Layer; the registry's own `$layer.generation` now decides whether the runtime gives the document up (`prepareDocument`, widget-loader.js). The test still named the other layer only in a header and served `{}`, so startup threw reading `registry.$layer.generation` and the floating panel stayed. The route now serves the real registry with its `$layer.generation` set to another layer. The behavior the test protects is unchanged: a document the runtime gives up on drops its held keys, lets later presses reach the page and removes the panel's row. Refs #6418
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_a_document_the_runtime_gives_up_on_lets_its_held_keys_gohas failed deterministically since #6484. That PR stopped holding the registry fetch to itsLeaf-Layerheader, because a revision asset can come from the browser's cache with an earlier release's headers. Whether the runtime gives a document up now depends on the registry's own$layer.generation(prepareDocumentinbrowser/runtime/widget-loader.js). The test still named the other layer only in a header, with a{}body. So startup threwCannot read properties of undefined (reading 'generation'), and the floating panel stayed (.lf-floating-panelcount 1, expected 0).The route now fetches the real registry and serves it with
$layer.generationset to another layer. That is the reading #6484 left in charge, so the test reaches the give-up path again. What it protects is unchanged: the held keys are dropped, later presses reach the page, and the panel's row and the chrome's sheet go. No runtime code changes.Verification: the test fails on
main(2cd1bda49) and on #6484 (e81413d38), and passes on #6484's parent (152c83570). With this change it passes onmain, along withtest_a_page_that_cannot_start_lets_its_held_keys_go.Refs #6418 — automated triage