<!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>