Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <html> | 1 <html> |
|
tkent
2014/10/22 01:14:15
The test name should be reportValidity-select-vali
Bartek Nowierski
2014/10/22 04:56:43
Done.
| |
| 2 <body> | 2 <body> |
| 3 <script src="../../resources/js-test.js"></script> | 3 <script src="../../resources/js-test.js"></script> |
| 4 <form action=""> | 4 <form action=""> |
| 5 <select required=""> | 5 <select required=""> |
| 6 <option>abc</option> | 6 <option>abc</option> |
| 7 </select> | 7 </select> |
| 8 </form> | 8 </form> |
| 9 <script> | 9 <script> |
| 10 description("This test checks if checkValidity() returns correctly a true result on selecting a valid element."); | 10 description("This test checks if reportValidity() returns correctly a true resul t on selecting a valid element."); |
| 11 jsTestIsAsync = true; | 11 jsTestIsAsync = true; |
| 12 var form = document.querySelector('form'); | 12 var form = document.querySelector('form'); |
| 13 var select = document.querySelector('select'); | 13 var select = document.querySelector('select'); |
| 14 form.onchange = function() { | 14 form.onchange = function() { |
| 15 shouldBeTrue('form.checkValidity()'); | 15 shouldBeTrue('form.reportValidity()'); |
| 16 finishJSTest(); | 16 finishJSTest(); |
| 17 }; | 17 }; |
| 18 window.onload = function() { | 18 window.onload = function() { |
| 19 select.value = null; | 19 select.value = null; |
| 20 select.focus(); | 20 select.focus(); |
| 21 if (window.eventSender) | 21 if (window.eventSender) |
| 22 eventSender.keyDown('a'); | 22 eventSender.keyDown('a'); |
| 23 }; | 23 }; |
| 24 </script> | 24 </script> |
| 25 </body> | 25 </body> |
| 26 </html> | 26 </html> |
| OLD | NEW |