tor-browser

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

button-checkvalidity.html (825B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <title>Forms</title>
      5  <script src="/resources/testharness.js"></script>
      6  <script src="/resources/testharnessreport.js"></script>
      7 </head>
      8 <body>
      9  <p>
     10    <h3>button_checkValidity</h3>
     11  </p>
     12 
     13  <hr>
     14 
     15  <div id="log"></div>
     16 
     17  <form method="post"
     18      enctype="application/x-www-form-urlencoded"
     19      action=""
     20      id="input_form">
     21    <p><button id='button_id'>button</button></p>
     22  </form>
     23  <script>
     24 
     25    var button = document.getElementById("button_id");
     26 
     27    try
     28    {
     29      var ret = button.checkValidity();
     30 
     31      test(function() {
     32        assert_equals(ret, true, "calling of checkValidity method is failed.");
     33      });
     34    }
     35    catch (e) {
     36      test(function() {
     37        assert_unreached("autofocus attribute is not exist.");
     38      });
     39    }
     40 
     41  </script>
     42 
     43 </body>
     44 </html>