tor-browser

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

fedcm-pending-disconnect.https.html (1068B)


      1 <!DOCTYPE html>
      2 <title>Federated Credential Management API pending disconnect() test.</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 <body>
     10 
     11 <script type="module">
     12 import {fedcm_test,
     13        disconnect_options,
     14        fedcm_get_and_select_first_account,
     15        request_options_with_mediation_required} from './support/fedcm-helper.sub.js';
     16 
     17 fedcm_test(async t => {
     18  // Go through the FedCM flow so that the disconnect() call is not trivial.
     19  const cred = await fedcm_get_and_select_first_account(t, request_options_with_mediation_required());
     20 
     21  // Invoke disconnect without awaiting it to test that the browser can handle
     22  // the page being destroyed while there is a pending disconnect call.
     23  IdentityCredential.disconnect(disconnect_options("1234"));
     24 }, 'Test that disconnect can be pending when the test finishes.');
     25 </script>