summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-view-transitions/root-element-display-none-during-transition-crash.html
blob: 19f4143aa6a4c6c8ec63206d1e94fab56f6181c6 (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
<!DOCTYPE html>
<html class=reftest-wait>
<title>View transitions: entry animation from root display none</title>
<link rel="help" href="https://github.com/WICG/view-transitions">
<link rel="author" href="mailto:vmpstr@chromium.org">

<script src="/common/reftest-wait.js"></script>
<style>
.hidden {
  display: none;
}
::view-transition-group(*) {
  animation-duration: 500s
}
</style>

<script>
failIfNot(document.startViewTransition, "Missing document.startViewTransition");

async function runTest() {
  transition = document.startViewTransition();
  transition.ready.then(
    requestAnimationFrame(() => {
      document.documentElement.classList.toggle("hidden");
    }));
  transition.finished.then(takeScreenshot);
}
onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
</script>