tor-browser

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

test_bug1620778.html (933B)


      1 <!DOCTYPE html>
      2 <title>Test for Bug 1620778</title>
      3 <script src="/tests/SimpleTest/SimpleTest.js"></script>
      4 <script src="/tests/SimpleTest/EventUtils.js"></script>
      5 <link rel="stylesheet" href="/tests/SimpleTest/test.css">
      6 <input id=a value=abcd autocomplete=off>
      7 <input id=a value=abcd>
      8 <script>
      9 SimpleTest.waitForExplicitFinish();
     10 SimpleTest.waitForFocus(() => {
     11  let expectedPosition = null;
     12  for (let input of document.querySelectorAll("input")) {
     13    input.focus();
     14    input.selectionStart = 0;
     15    synthesizeKey("KEY_ArrowRight");
     16    synthesizeKey("KEY_ArrowRight");
     17    synthesizeKey("KEY_ArrowDown");
     18    if (expectedPosition === null)
     19      expectedPosition = input.selectionStart;
     20    isnot(input.selectionStart, 0);
     21    is(input.selectionStart, expectedPosition, "autocomplete shouldn't make a difference on inputs that have no completion results of any kind");
     22  }
     23  SimpleTest.finish();
     24 });
     25 </script>
     26 </body>
     27 </html>