tor-browser

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

test_bug439808.html (1020B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=439808
      5 -->
      6 <head>
      7  <title>Test for Bug 439808</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=439808">Mozilla Bug 439808</a>
     14 <p id="display"></p>
     15 <div id="content">
     16 <span><span contenteditable id="e">twest</span></span>
     17 </div>
     18 <pre id="test">
     19 <script type="application/javascript">
     20 
     21 /** Test for Bug 439808 */
     22 SimpleTest.waitForExplicitFinish();
     23 SimpleTest.waitForFocus(function() {
     24  var e = document.getElementById("e");
     25  e.focus();
     26  getSelection().collapse(e.firstChild, 1);
     27  synthesizeKey("KEY_Delete");
     28  is(e.textContent, "test", "Delete key worked");
     29  synthesizeKey("KEY_Backspace");
     30  is(e.textContent, "est", "Backspace key worked");
     31  SimpleTest.finish();
     32 });
     33 
     34 </script>
     35 </pre>
     36 </body>
     37 </html>