summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker.js
blob: e1b0b9f15a696237a135696b0f010067a77d4bea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
importScripts("/resources/testharness.js");

async_test(t => {
  const res = [];
  requestAnimationFrame(t.step_func(dt => {
    res.push(dt);
    requestAnimationFrame(t.step_func(dt => {
      res.push(dt);
      requestAnimationFrame(t.step_func_done(dt => {
        res.push(dt);
        assert_equals(res.length, 3);
        assert_less_than(res[0], res[1]);
        assert_less_than(res[1], res[2]);
      }));
    }));
  }));
});

done();