tor-browser

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

test_mediation.html (1150B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <meta charset="utf-8">
      5  <title>Mediation Test</title>
      6  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      7  <script src="head.js"></script>
      8  <link rel="stylesheet" href="/tests/SimpleTest/test.css"/>
      9  <script>
     10    SimpleTest.waitForExplicitFinish();
     11    var err;
     12    setupTest("mediation").then(
     13      function () {
     14        SpecialPowers.wrap(document).notifyUserGestureActivation();
     15        return navigator.credentials.get({
     16          identity: {
     17            mode: "active",
     18            providers: [{
     19              configURL: "https://example.net/tests/dom/credentialmanagement/identity/tests/mochitest/server_manifest.sjs",
     20              clientId: "mochitest",
     21              nonce: "nonce"
     22            }]
     23          },
     24          mediation: "conditional"
     25        });
     26      }
     27    ).catch((e) => {
     28      err = e;
     29    }).finally(() => {
     30      ok(err instanceof TypeError, err.message);
     31      SimpleTest.finish();
     32    })
     33  </script>
     34 </head>
     35 <body>
     36 <p id="display"></p>
     37 <div id="content" style="display: none">This verifies that conditional mediation is not supported.</div>
     38 <pre id="test"></pre>
     39 </body>
     40 </html>