From 718874cf11a06fb2a1d1b51952f24b23c24600ff Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Wed, 18 Apr 2018 15:19:52 +0200 Subject: Bug 1337814 - Add test for cancelling currently executing rIC callback --- .../tests/html/webappapis/idle-callbacks/cancel-invoked.html | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'testing') diff --git a/testing/web-platform/tests/html/webappapis/idle-callbacks/cancel-invoked.html b/testing/web-platform/tests/html/webappapis/idle-callbacks/cancel-invoked.html index 8956b8709..9fb77d65d 100644 --- a/testing/web-platform/tests/html/webappapis/idle-callbacks/cancel-invoked.html +++ b/testing/web-platform/tests/html/webappapis/idle-callbacks/cancel-invoked.html @@ -23,4 +23,10 @@ t.done(); }, 2000); }, "A cancelled callback is never invoked"); + + async_test(function (t) { + var handle = requestIdleCallback(t.step_func_done(function () { + cancelIdleCallback(handle); + })); + }, "Cancelling the currently executing idle callback should be allowed"); -- cgit v1.2.3