chromium/third_party/blink/web_tests/external/wpt/html/cross-origin-embedder-policy/resources/navigate-require-corp-same-site.sub.html

<!doctype html>
<script>
  const current = new URL(window.location.href);
  const token = current.searchParams.get("token");
  const navigateTo = current.searchParams.get("to");
  const channelName = current.searchParams.get("channelName");
  const clearOpener = current.searchParams.get("clearOpener");

  if (clearOpener) {
    window.opener = null;
  }

  current.search = "";
  if (navigateTo) {
    let next = new URL(navigateTo, current);
    window.addEventListener("load", () => {
      window.location = next.href;
    });
  }

  if (channelName) {
    let bc = new BroadcastChannel(channelName);
    bc.postMessage("loaded");
  }

  if (parent !== window && token) {
    parent.postMessage(token, "*");
  }
</script>