deadline-after-expired-timer.html (561B)
1 <!doctype html> 2 <meta charset=utf-8> 3 <title>The deadline after an expired timer must not be negative</title> 4 <script src=/resources/testharness.js></script> 5 <script src=/resources/testharnessreport.js></script> 6 <div id="log"></div> 7 <script> 8 async_test(function(t) { 9 setTimeout(() => { 10 11 requestIdleCallback( 12 t.step_func((deadline) => { 13 assert_false(deadline.didTimeout); 14 assert_greater_than_equal(deadline.timeRemaining(), 0); 15 t.done(); 16 }), 17 { timeout: 1000 } 18 ); 19 20 }, 0); 21 }); 22 </script>