summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/webappapis/idle-callbacks/callback-timeout.html
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-04-19 13:35:14 +0200
committerGitHub <noreply@github.com>2018-04-19 13:35:14 +0200
commit493d7334f885bd4e79eedcba5037c7c4b65c8fc5 (patch)
tree69e364c791717f2b0bdf2994531a7b045f273542 /testing/web-platform/tests/html/webappapis/idle-callbacks/callback-timeout.html
parentd7df65954a585e97ccee21fa9cb50cb116efddcc (diff)
parentb873b2495a4408c43368bbf5a5e1e8f9966e0593 (diff)
downloadUXP-493d7334f885bd4e79eedcba5037c7c4b65c8fc5.tar
UXP-493d7334f885bd4e79eedcba5037c7c4b65c8fc5.tar.gz
UXP-493d7334f885bd4e79eedcba5037c7c4b65c8fc5.tar.lz
UXP-493d7334f885bd4e79eedcba5037c7c4b65c8fc5.tar.xz
UXP-493d7334f885bd4e79eedcba5037c7c4b65c8fc5.zip
Merge pull request #207 from janekptacijarabaci/js_dom_window_requestIdleCallback_1
moebius#73: DOM - window.requestIdleCallback - improvements
Diffstat (limited to 'testing/web-platform/tests/html/webappapis/idle-callbacks/callback-timeout.html')
-rw-r--r--testing/web-platform/tests/html/webappapis/idle-callbacks/callback-timeout.html15
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>