tor-browser

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

bug512295-2.html (1051B)


      1 <!DOCTYPE HTML><html class="reftest-wait"><head>
      2  <script src="/tests/SimpleTest/EventUtils.js"></script>
      3 </head>
      4 <body>
      5 x
      6 <div contenteditable="true">
      7 <p id="p">A B CD EFG<br>
      8  1234567890</p>
      9 </div>
     10 <script>
     11  // Position the caret after "A"
     12  var sel = window.getSelection();
     13  sel.removeAllRanges();
     14  var range = document.createRange();
     15  var p = document.getElementById('p');
     16  var t = p.firstChild;
     17  range.setStart(t, 1);
     18  range.setEnd(t, 1);
     19  sel.addRange(range);
     20  p.parentNode.focus();
     21 
     22  var { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
     23    "resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
     24  );
     25  maybeOnSpellCheck(p.parentNode, function () {
     26    sendKey('DOWN');  // now after "1"
     27    sendKey('DOWN');  // now below the P element
     28    sendKey('UP');    // now before the "1"
     29    sendKey('UP');    // now before the "A"
     30    sendKey('UP');    // now before the "A"
     31    sendKey('UP');    // now before the "A"
     32    document.documentElement.classList.remove("reftest-wait");
     33  });
     34 </script>
     35 </body>
     36 </html>