tor-browser

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

test_key_enter_single_summary.html (693B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      5  <script src="/tests/SimpleTest/EventUtils.js"></script>
      6  <script>
      7  SimpleTest.waitForExplicitFinish();
      8  function runTest() {
      9    // Dispatch 'return' key to the summary element.
     10    const summary = document.querySelector("summary");
     11    summary.focus();
     12    synthesizeKey("KEY_Enter");
     13 
     14    const details = document.querySelector("details");
     15    ok(details.open, "Dispatch return key on summary should open details.");
     16 
     17    SimpleTest.finish();
     18  }
     19  </script>
     20 </head>
     21 <body onload="runTest();">
     22  <details>
     23    <summary>Summary</summary>
     24    <p>This is the details.</p>
     25  </details>
     26 </body>
     27 </html>