summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/webappapis/animation-frames/callback-invoked.html
blob: ca34e455a21d972b259e0716c06c2e2a480ea6a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!doctype html>
<html>
  <head>
    <title>requestAnimationFrame must be triggered once</title>
    <script src="/resources/testharness.js"></script>
    <script src="/resources/testharnessreport.js"></script>
    <link rel="help" href="https://w3c.github.io/web-performance/specs/RequestAnimationFrame/Overview.html#dom-windowanimationtiming-requestanimationframe"/>
  </head>
  <body>
    <div id="log"></div>
    <script>
      async_test(function (t) {
        assert_false(document.hidden, "document.hidden must exist and be false to run this test properly");
        window.requestAnimationFrame(t.step_func_done());
      }, "requestAnimationFrame callback is invoked at least once before the timeout");
    </script>
  </body>
</html>