tor-browser

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

idp-login-with-failed-accounts-fetch.https.html (1148B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>FedCM IDP log-in status API tests</title>
      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        fedcm_get_dialog_type_promise,
     13        select_manifest,
     14        mark_signed_out} from '../support/fedcm-helper.sub.js';
     15 
     16 fedcm_test(async t => {
     17  await mark_signed_out();
     18 
     19  let test_options = request_options_with_mediation_required("manifest_no_accounts_login_delay.json");
     20  await select_manifest(t, test_options);
     21 
     22  test_options.identity.mode = "active";
     23  let cred_promise = navigator.credentials.get(test_options);
     24 
     25  // We should get the login popup window, which will automatically set
     26  // the login status and close itself.
     27  // The promise should get rejected because the accounts list is empty.
     28 
     29  return promise_rejects_dom(t, 'NetworkError', cred_promise);
     30 }, 'Tests the IDP login dialog and subsequent account chooser.');
     31 </script>