summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/credential-management/support/fedcm/pending-userinfo-iframe.html
blob: 0afe279bcc57a73210fb41739be69fa1fdb99fc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!doctype html>
<script type="module">
import {alt_manifest_origin} from './../fedcm-helper.sub.js';

// Invokes getUserInfo and immediately sends a message to the parent frame.
window.onload = async () => {
  try {
    const manifest_path = `${alt_manifest_origin}/\
credential-management/support/fedcm/manifest.py`;
    IdentityProvider.getUserInfo({
      configURL: manifest_path,
      // Approved client
      clientId: '123',
    });
    window.top.postMessage("Pass", '*');
  } catch (error) {
    window.top.postMessage("Fail", '*');
  }
};

</script>