summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-view-transitions/update-callback-timeout.html
blob: 9e96e97e117a4f39755d506e8190d40c9a5a1276 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!DOCTYPE html>
<html>
  <title>View transitions: Transition has implementation-defined timeout.</title>
  <link rel="author" title="Tim Nguyen" href="https://github.com/nt1m">
  <link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/">
  <meta name="timeout" content="long">
  <script src="/resources/testharness.js"></script>
  <script src="/resources/testharnessreport.js"></script>
  <script>
    promise_test(async t => {
      assert_implements(document.startViewTransition, "Missing document.startViewTransition");
      const transition = document.startViewTransition(() => {
        return new Promise(() => {});
      });
      transition.updateCallbackDone.then(() => {
        assert_unreached();
      });
      transition.finished.then(() => {
        assert_unreached();
      });
      await promise_rejects_dom(t, "TimeoutError", transition.ready);
    }, "View transition should have an implementation-defined timeout on the update callback");
</script>
</body>
</html>