summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-view-transitions/no-white-flash-before-activation.html
blob: 1b4bb7cfaeb8204e41c09efea4ffbeb30ac408bc (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
26
27
28
29
30
31
<!DOCTYPE html>
<html class="reftest-wait">
<head>
    <title>View Transitions: No white flash should be visible during the duration of the update callback</title>
    <link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/#ref-for-captured-in-a-view-transition">
    <link rel="match" href="no-white-flash-before-activation-ref.html">
    <style>
        body {
            margin: 0;
        }
        div {
            width: 100vw;
            height: 100vh;
            background-color: #000;
        }
    </style>
</head>
<body>
    <div></div>
    <script src="/common/reftest-wait.js"></script>
    <script>
        failIfNot(document.startViewTransition, "Missing document.startViewTransition");
        addEventListener("load", () => {
            document.startViewTransition(() => {
                requestAnimationFrame(takeScreenshot);
                return new Promise(() => {});
            });
        });
    </script>
</body>
</html>