tor-browser

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

test_webauthn_get_assertion_dead_object.html (1322B)


      1 <!DOCTYPE html>
      2 <meta charset=utf-8>
      3 <head>
      4  <title>Test for GetAssertion on dead object</title>
      5  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      6  <script type="text/javascript" src="u2futil.js"></script>
      7  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
      8 </head>
      9 <body>
     10 
     11  <h1>Test for GetAssertion on dead object</h1>
     12  <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1483905">Mozilla Bug 1483905</a>
     13 
     14  <script class="testbody" type="text/javascript">
     15    "use strict";
     16    SimpleTest.waitForExplicitFinish();
     17    SimpleTest.requestFlakyTimeout(
     18      "Due to the nature of this test, there's no way for the window we're opening to signal " +
     19      "that it's done (the `document.writeln('')` is essential and basically clears any state " +
     20      "we could use). So, we have to wait at least 15 seconds for the webauthn call to time out.");
     21    SpecialPowers.pushPrefEnv({"set": [
     22      ["security.webauth.webauthn_enable_softtoken", false],
     23      ["security.webauth.webauthn_enable_usbtoken", true],
     24    ]}).then(() => {
     25      let win = window.open("https://example.com/tests/dom/webauthn/tests/get_assertion_dead_object.html");
     26      setTimeout(() => {
     27        win.close();
     28        SimpleTest.finish();
     29      }, 20000);
     30    });
     31  </script>
     32 
     33 </body>
     34 </html>