From 15d3a309582cc86e10e8981d3d7e53b91829c435 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sun, 6 Aug 2023 02:32:23 -0700 Subject: [PATCH] Fix callback-idle-periods.html's flaky failure. The test was assuming that new deadline (now + timeRemaining) to strictly monotonically advance in each idle callback. This may not be the case when multiple idle callbacks are scheduled & ran within a single millisecond. --- requestidlecallback/callback-idle-periods.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requestidlecallback/callback-idle-periods.html b/requestidlecallback/callback-idle-periods.html index 3c2de61bfeadd4..f515755e353787 100644 --- a/requestidlecallback/callback-idle-periods.html +++ b/requestidlecallback/callback-idle-periods.html @@ -16,7 +16,7 @@ var remaining = deadline.timeRemaining(); var new_deadline = now + remaining; if (previous_deadline != undefined) { - assert_true(new_deadline > previous_deadline, "A requestIdleCallback scheduled during an idle period should be called back with a deadline greater than that in the current idle period."); + assert_true(new_deadline >= previous_deadline, "A requestIdleCallback scheduled during an idle period should be called back with a deadline greater than or equal to that in the current idle period."); } // Schedule a new requestIdleCallback.