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-valid.html.
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"> | |
| 9 <fieldset name="victim"></fieldset> | |
| 10 <input name="victim" type="text" value="lorem ipsum"/> | |
| 11 <button name="victim">lorem ipsum</button> | |
| 12 <select name="victim"></select> | |
| 13 <textarea name="victim"></textarea> | |
| 14 <output name="victim"></output> | |
| 15 <object name="victim"></object> | |
| 16 <keygen name="victim"></keygen> | |
| 17 </form> | |
| 18 <div id="console"></div> | |
| 19 <script> | |
| 20 description("This test checks if reportValidity() returns correctly a true (mean ing no error) result."); | |
| 21 | |
| 22 shouldBe('document.getElementsByTagName("fieldset")[0].reportValidity()', 'true' ); | |
| 23 shouldBe('document.getElementsByTagName("input")[0].reportValidity()', 'true'); | |
| 24 shouldBe('document.getElementsByTagName("button")[0].reportValidity()', 'true'); | |
| 25 shouldBe('document.getElementsByTagName("select")[0].reportValidity()', 'true'); | |
| 26 shouldBe('document.getElementsByTagName("textarea")[0].reportValidity()', 'true' ); | |
| 27 shouldBe('document.getElementsByTagName("output")[0].reportValidity()', 'true'); | |
| 28 shouldBe('document.getElementsByTagName("object")[0].reportValidity()', 'true'); | |
| 29 shouldBe('document.getElementsByTagName("keygen")[0].reportValidity()', 'true'); | |
| 30 </script> | |
| 31 </body> | |
| 32 </html> | |
| OLD | NEW |