libservo: Trigger a rendering update when waiting for paint readiness in WebView unit tests#40712
Merged
mrobinson merged 1 commit intoservo:mainfrom Nov 18, 2025
Merged
Conversation
… in WebView unit tests Some unit tests attempt to wait for the WebView to be paint ready before executing. The previous code would wait for a frame ready message from the WebView before running, but this was subject to timing issues due to the frame being sent before the load complete message. This changes makes it so that the WebView explicitly triggers another rendering update and then waits for a frame. It should be guaranteed that the next frame will be one that reflects load completeness. Signed-off-by: Martin Robinson <[email protected]>
9216ca8 to
da5982d
Compare
jschwe
approved these changes
Nov 18, 2025
Member
jschwe
left a comment
There was a problem hiding this comment.
Testing: This seems to eliminate flaky timeouts on my machine.
Could you add how many rounds you ran?
Member
Author
|
I added a bit of information about my testing methodology. |
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.
Some unit tests attempt to wait for the WebView to be paint ready before
executing. The previous code would wait for a frame ready message from
the WebView before running, but this was subject to timing issues due to
the frame being sent before the load complete message. This changes
makes it so that the WebView explicitly triggers another rendering
update and then waits for a frame. It should be guaranteed that the next
frame will be one that reflects load completeness.
Special thanks to jmunroe on Zulip for investigation into this issue.
Testing: This seems to eliminate flaky timeouts on my machine. I ran
the unit tests in a loop, stopping if any error (such as a timeout happened).
Before this would stop within a minute or two, but I could not reproduce
the issue with this change after several minutes.