merge_pr_20712
PRs #18390 #19841 introduced a bunch of new tests. I saw some of them being filed as flaky in Gecko and this is why. Random timeout is not a good way to wait for events being reported. Instead, wait for to RAF callbacks, as that guarantees that "Update the rendering steps" runs at least once.