chromium/third_party/blink/web_tests/external/wpt/permissions-policy/resources/permissions-policy-geolocation.html

<script>
  const type = "availability-result";
  navigator.geolocation.getCurrentPosition(
    () => {
      window.parent.postMessage({ type, enabled: true }, "*");
    },
    () => {
      window.parent.postMessage({ type, enabled: false }, "*");
    }
  );
</script>