blob: 1bc3ebb90112ca79c3b716a24f32975f1c27fec9 [file] [log] [blame]
<!DOCTYPE html>
<title>Federated Credential Management API basics.</title>
<link rel="help" href="https://wicg.github.io/FedCM">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script type="module">
import {fedcm_test} from './support/fedcm-helper.js';
const test_options = {
federated: {
providers: [{
url: 'https://idp.test',
clientId: '1',
}]
}
};
const login_options = {
nonce: '2',
};
fedcm_test(async (t, mock) => {
mock.returnError("ApprovalDeclined");
const cred = await navigator.credentials.get(test_options);
const token = cred.login(login_options);
return promise_rejects_dom(t, 'AbortError', token);
}, "User approval decline should reject the promise.");
</script>