Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | |
|
tkent
2014/10/22 01:14:15
The test name should be reportValidity-form-invali
Bartek Nowierski
2014/10/22 04:56:43
Done.
| |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="../../resources/js-test.js"></script> | |
| 5 </head> | |
| 6 <body> | |
| 7 <p id="description"></p> | |
| 8 <form method="get" id="sad_form"> | |
| 9 <fieldset name="victim"> | |
| 10 <input id="input-unset" name="victim" type="text" required/> | |
| 11 </fieldset> | |
| 12 <input name="victim" type="text" value="invalid" pattern="something"/> | |
| 13 <button name="victim">lorem ipsum</button> | |
| 14 <textarea name="victim" required></textarea> | |
| 15 <select required> | |
| 16 <option>empty</option> | |
| 17 <option>another</option> | |
| 18 </select> | |
| 19 <select name="victim" required> | |
| 20 <option value="" selected /> | |
| 21 <option value="X">X</option> | |
| 22 </select> | |
| 23 <select name="victim" required> | |
| 24 <option value="X">X</option> | |
| 25 <option value="" selected /> | |
| 26 </select> | |
| 27 </form> | |
| 28 <div id="console"></div> | |
| 29 <script> | |
| 30 | |
| 31 description("This test checks if reportValidity() returns correctly a false (mea ning there's an invalid element) result on form element."); | |
| 32 | |
| 33 f = document.getElementById("sad_form"); | |
| 34 shouldBe("f.reportValidity()", "false"); | |
| 35 shouldBe("document.activeElement", "document.getElementById('input-unset')"); | |
| 36 </script> | |
| 37 </body> | |
| 38 </html> | |
| OLD | NEW |