tor-browser

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

test_bug1399722.html (1042B)


      1 <!DOCTYPE html>
      2 <!--
      3 https://bugzilla.mozilla.org/show_bug.cgi?id=1399722
      4 -->
      5 <html>
      6 <head>
      7  <title>Test for Bug 1399722</title>
      8  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      9  <script src="/tests/SimpleTest/EventUtils.js"></script>
     10  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     11 </head>
     12 <body>
     13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1399722">Mozilla Bug 1399722</a>
     14 <p id="display"></p>
     15 <div id="content" style="display: none;">
     16 
     17 </div>
     18 
     19 <input spellcheck="true" onkeypress="if (event.key=='Enter')this.value='';">
     20 <pre id="test">
     21 
     22 <script class="testbody" type="application/javascript">
     23 SimpleTest.waitForExplicitFinish();
     24 SimpleTest.waitForFocus(function() {
     25  let elm = document.querySelector("input");
     26 
     27  elm.focus();
     28  sendString("AB");
     29  synthesizeKey("KEY_Enter");
     30  sendString("CD");
     31  is(elm.value, "CD", "Can type into the textbox successfully after the onkeypress handler deleting the value");
     32 
     33  SimpleTest.finish();
     34 });
     35 </script>
     36 </pre>
     37 </body>
     38 </html>