Mock of requestAnimationFrame API