Repository navigation
Wait for Leaf's deferred fault reports before tests read browser errors - #5312
Merged
Merged
Conversation
…rors in tests Since #4966, `reportPageError` writes its `leaf:` console report through `lfDocumentLifetime.whenActive`, in a task after the fault, so a removed iframe's cancelled requests don't read as page failures. A widget's error box and a settled presentation therefore no longer imply the console has the report. Five browser tests still read `take_browser_errors` right after the fault and compared it for equality, so on a slower runner (the scheduled macOS job) they read an empty list. They now call `reported_browser_errors`, the harness's existing wait for a named inventory of browser problems, which still requires exactly the one (or, for the returning widget, two) reports each test expects. The returning widget test's ad hoc `expect_console_message` wrappers from #5108 go too. No product behavior changes. Holding every `leaf:` console report 300 ms makes five of the seven focused cases fail on the old tests with the reported `[] == [...]` diagnostic; all seven pass on the new tests, with and without the delay. Closes #5189
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_widget_controller_owns_presentation_across_values_and_lifetimesintermittently read no browser errors on the scheduled macOS job (run 41432142330 forlightandshadow-child, run 41622727492 forshadow-host), where it expected the deliberate render failure'sleaf:report. Since #4966,reportPageErrorwrites that report throughlfDocumentLifetime.whenActive, a task after the fault, so a removed iframe's cancelled requests don't read as page failures. The error box and a settled presentation therefore no longer mean the console has the report, and a test that readstake_browser_errorsright away races it.Five browser tests read a
leaf:report this way. They now callreported_browser_errors, the harness's existing wait for a named inventory of browser problems, which still requires exactly the reports each test expects (one each, two for the returning widget). The returning-widget test's ad hocexpect_console_messagewrappers from #5108, which fixed the same race there, are replaced by the same call. No product behavior changes.Verification: with every
leaf:console report held 300 ms inlayer-client.js(a local experiment, not committed), five of the seven focused cases fail on the old tests with the reported[] == [...]diagnostic, and all seven pass on the new tests, with and without the delay:Closes #5189 — automated triage