tor-browser

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

test_select.html (609B)


      1 <!DOCTYPE HTML>
      2 <meta charset="utf-8">
      3 <title>Test for Bug 1717435</title>
      4 <script src="/tests/SimpleTest/SimpleTest.js"></script>
      5 <link rel="stylesheet" href="/tests/SimpleTest/test.css" />
      6 </head>
      7 
      8 <textarea id="textarea">foo</textarea>
      9 <script>
     10  SimpleTest.waitForExplicitFinish();
     11 
     12  textarea.addEventListener("select", ev => {
     13    ok(true, "A select event must fire regardless of dom.select_events.textcontrols.enabled");
     14    SimpleTest.finish();
     15  });
     16 
     17  textarea.focus();
     18  textarea.select();
     19  is(textarea.selectionStart, 0, "selectionStart")
     20  is(textarea.selectionEnd, 3, "selectionEnd")
     21 </script>