Skip to content

Fix nondeterminism of "Update the Rendering" test #48153

@gterzian

Description

@gterzian

The test added at #15510 is currently still failing for all major browsers for what seems to be various reasons related to the ordering of raf delivery. But, even if the ordering were to be fixed, the test would still remain nondeterministic due to its recursive requesting of rafs: the assertion is made from within a timer callback, and it is possible for multiples "update the rendering" instance to be run before the timer callback is.

This is an example of such failure:

expected array ["parent_raf", "first_child_raf", "second_child_raf"] length 3, got ["parent_raf", "first_child_raf", "second_child_raf", "parent_raf", "first_child_raf", "second_child_raf"] length 6

As you can see, the ordering of raf delivery is correct, but test assertain fails because two instances of the "update the rendering" task were run prior to the timer task. This was noted at servo/servo#33028


As a solution, which would acknowledge that the spec does not mandate any particular relative prioritization between timers and updating of the rendering, I propose we update the test and split the array into chunks of three, and make ordering assertions for each chunk.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions