chromium/third_party/blink/web_tests/external/wpt/css/css-view-transitions/navigation/with-types/navigation-supersedes-types-when-after.html

<!DOCTYPE html>
<title>View transitions: types are superseded by navigation:none</title>
<link rel="help" href="https://drafts.csswg.org/css-view-transitions-2/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
  @view-transition {
    navigation: auto;
    types: check;
  }

  @view-transition {
    navigation: none;
  }
</style>
<script>
  const params = new URLSearchParams(location.search);
  const is_initial_page = !params.has('new');

  // This test navigates to itself with a changed query parameter. The test
  // checks are performed on the navigated-to document.
  if (is_initial_page) {
    onload = () => {
      requestAnimationFrame(() => requestAnimationFrame(() => {
        location.replace(location.href + '?new');
      }));
    };
  } else {
    promise_test(async () => {
      const ev = await new Promise(
        resolve => addEventListener('pagereveal', e => resolve(e)));
      assert_equals(ev.viewTransition, null);
    });
  }
</script>