Skip to content

Conversation

@mrobinson
Copy link
Member

@mrobinson mrobinson commented Nov 18, 2025

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.

@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Nov 18, 2025
… 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 <mrobinson@igalia.com>
@mrobinson mrobinson force-pushed the trigger-frame-webview-tests branch from 9216ca8 to da5982d Compare November 18, 2025 09:33
Copy link
Member

@jschwe jschwe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing: This seems to eliminate flaky timeouts on my machine.

Could you add how many rounds you ran?

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Nov 18, 2025
@mrobinson
Copy link
Member Author

I added a bit of information about my testing methodology.

@mrobinson mrobinson added this pull request to the merge queue Nov 18, 2025
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Nov 18, 2025
Merged via the queue into servo:main with commit 1a2cf8c Nov 18, 2025
33 checks passed
@mrobinson mrobinson deleted the trigger-frame-webview-tests branch November 18, 2025 10:41
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants