chromium/third_party/blink/web_tests/external/wpt/credential-management/support/passwordcredential-get.html

<script>
  navigator.credentials.get({ 'password': true })
    .then(c => {
      window.parent.postMessage({
        "status": "resolved",
        "credential": c,
        "exception": null
      }, "*");
    })
    .catch(omg => {
      window.parent.postMessage({
        "status": "rejected",
        "credential": null,
        "exception": omg.name
      }, "*");
    });
</script>