fieldset-checkvalidity.html (809B)
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>FieldSet_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 <fieldset id="input_field"> 22 </fieldset> 23 </form> 24 <script> 25 26 var field = document.getElementById("input_field"); 27 28 try 29 { 30 var ret = field.checkValidity(); 31 32 test(function() { 33 assert_equals(ret, true, "calling of checkValidity method is failed."); 34 }); 35 } 36 catch (e) { 37 test(function() { 38 assert_unreached("Error is raised."); 39 }); 40 } 41 42 </script> 43 44 </body> 45 </html>