Open Bug 1332274 Opened 7 years ago Updated 2 years ago

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


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



(firefox53 fixed)

Tracking Status
firefox53 --- fixed


(Reporter: jgraham, Unassigned)


(Depends on 1 open bug)


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
Disable unstable requestIdleCallback test, a=testonly
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
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.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.