tor-browser

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

maxlength-number.html (605B)


      1 <!DOCTYPE html>
      2 <title>input type=number maxlength</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <script src="/resources/testdriver.js"></script>
      6 <script src="/resources/testdriver-vendor.js"></script>
      7 
      8 <input type="number" maxlength="1">
      9 
     10 <script>
     11  async_test(t => {
     12    let elem = document.getElementsByTagName("input")[0];
     13    test_driver.send_keys(elem, "1234")
     14      .then(t.step_func(() => {
     15         assert_equals(elem.value, "1234");
     16         t.done();
     17      }));
     18  }, "maxlength doesn't apply to input type=number");
     19 </script>