Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
            - /css/css-view-transitions/navigation/skip-outbound-vt-before-reveal.html - WPT Dashboard Interop Dashboard
 
<!DOCTYPE html>
<html>
<title>View transitions: outbound cross-document transition before reveal</title>
<link rel="author" href="mailto:nrosenthal@chromium.org">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
  promise_test(async t => {
    const result = await new Promise(resolve => {
      const channel_name = `outbound-vt-after-reveal-${new Date().valueOf()}`;
      const bc = new BroadcastChannel(channel_name);
      bc.addEventListener("message", e => {
        resolve(e.data);
      });
      const popup = window.open(`resources/outbound-before-render.html?phase=old&channel=${channel_name}`);
      t.add_cleanup(() => popup.close());
    });
    assert_equals(result, "did reveal new page without transition");
  }, "when navigating away before revealing, never start a view transition");
</script>
</html>