diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-18 15:18:48 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-18 15:18:48 +0200 |
commit | 823098279935c628f4c684a4d22eb2fe94701d89 (patch) | |
tree | 9f5c51bfa5bd1f2364eeb3f914caad3fdd6584df /testing/web-platform | |
parent | dadd11df422db95e7ecfe57929dc28dfa524d5b1 (diff) | |
download | UXP-823098279935c628f4c684a4d22eb2fe94701d89.tar UXP-823098279935c628f4c684a4d22eb2fe94701d89.tar.gz UXP-823098279935c628f4c684a4d22eb2fe94701d89.tar.lz UXP-823098279935c628f4c684a4d22eb2fe94701d89.tar.xz UXP-823098279935c628f4c684a4d22eb2fe94701d89.zip |
Bug 1334904 - Add test for when rIC timeouts doesn't need timeout
Diffstat (limited to 'testing/web-platform')
-rw-r--r-- | testing/web-platform/tests/html/webappapis/idle-callbacks/callback-timeout.html | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/webappapis/idle-callbacks/callback-timeout.html b/testing/web-platform/tests/html/webappapis/idle-callbacks/callback-timeout.html index 823d5f5db..cc2660a19 100644 --- a/testing/web-platform/tests/html/webappapis/idle-callbacks/callback-timeout.html +++ b/testing/web-platform/tests/html/webappapis/idle-callbacks/callback-timeout.html @@ -25,4 +25,19 @@ } window.requestIdleCallback(t.step_func(f)); }, "requestIdleCallback callback should time out"); + + async_test(function (t) { + assert_false(document.hidden, "document.hidden must exist and be false to run this test properly"); + function g(deadline) { + assert_false(deadline.didTimeout) + t.done(); + } + + function f(deadline) { + assert_false(deadline.didTimeout); + window.requestIdleCallback(t.step_func(g), {timeout:100000}); + } + window.requestIdleCallback(t.step_func(f)); + }, "requestIdleCallback callback should not time out"); + </script> |