Open Bug 1332274 Opened 3 years ago Updated 2 years ago

callback-timeout-with-raf.html test is unstable

Categories

(Testing :: web-platform-tests, defect)

defect
Not set

Tracking

(firefox53 fixed)

REOPENED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: jgraham, Unassigned)

References

(Depends on 1 open bug)

Details

The html/webappapis/idle-callbacks/callback-timeout-with-raf.html test seems to be unstable so I'm disabling it as part of the import. I haven't looked at the test to decide if this is a test issue or an implementation issue.
Flags: needinfo?(afarre)
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/cf7aaeb55da0
Disable unstable requestIdleCallback test, a=testonly
https://hg.mozilla.org/mozilla-central/rev/cf7aaeb55da0
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I think that this is an implementation issue.
Flags: needinfo?(afarre)
Depends on: 1332634
I've been debugging this a bit and I've found some interesting things. There are two reasons for these tests failing.

The first is from the second test only and that is when setting a rIC with a timeout, and then saturating every frame with execution from a rAF, the timeout for the rIC should still trigger and get interleaved with the rAF callbacks. This seems to boil down to the UA being to busy, and if we crank up the number of iterations this works better. If we change the rIC to a regular setTimeout it behaves the same way, i.e. failing the test due to the rAF loop finishing even though the timeout should've happened somewhere in the middle of the loop. This is probably not a bug.

The second is that it seems that sometimes we manage to squeeze in an idle callback even though the rAF callbacks take all the frame to execute. Every case I've seen always happens on the second rAF. If I removed the step_func wrapper for the first rAF call, the failure stopped happening. I had a look at the implementation of step_func, and nothing seems to explain this, but it makes me think that it really is test instability, not an error in the implementation of rIC.
You need to log in before you can comment on or make changes to this bug.