et2"></div>

<script>
function resetState() {
  if (window.transition)
    window.transition.skipTransition();
  document.documentElement.style.viewTransitionName = "";
  target.style.viewTransitionName = "";
  target2.style.viewTransitionName = "";
}

promise_test((t) => {
  assert_implements(document.startViewTransition, "Missing document.startViewTransition");
  t.add_cleanup(resetState);
  return new Promise(async (resolve, reject) => {
    window.transition = document.startViewTransition();
    window.