tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

fedcm-token-endpoint-rejects-redirects.https.html (1253B)


      1 <!DOCTYPE html>
      2 <title>Federated Credential Management API token endpoint does not follow redirects.</title>
      3 <link rel="help" href="https://fedidcg.github.io/FedCM">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script src="/resources/testdriver.js"></script>
      7 <script src="/resources/testdriver-vendor.js"></script>
      8 
      9 <script type="module">
     10 import {request_options_with_mediation_required,
     11        fedcm_test,
     12        select_manifest,
     13        fedcm_error_dialog_dismiss,
     14        fedcm_get_and_select_first_account} from './support/fedcm-helper.sub.js';
     15 
     16 fedcm_test(async t => {
     17  let test_options = request_options_with_mediation_required("manifest_redirect_token.json");
     18  await select_manifest(t, test_options);
     19 
     20  try {
     21    const cred = fedcm_get_and_select_first_account(t, test_options);
     22    fedcm_error_dialog_dismiss(t);
     23    await cred;
     24    assert_unreached("An IdentityCredentialError exception should be thrown.");
     25  } catch (e) {
     26    assert_true(e instanceof DOMException);
     27    assert_equals(e.name, "IdentityCredentialError");
     28    // 308 should not produce a valid error code
     29    assert_equals(e.error, "");
     30  }
     31 }, 'Test that token endpoint does not follow redirects');
     32  </script>