| OLD | NEW |
| (Empty) |
| 1 description('Tests for the validation APIs of output elements.'); | |
| 2 | |
| 3 var container; | |
| 4 var output; | |
| 5 | |
| 6 container = document.createElement('div'); | |
| 7 document.body.appendChild(container); | |
| 8 | |
| 9 debug('- Ensures whether the willValidate is defined and it always returns false
.'); | |
| 10 container.innerHTML = '<form><output id="outputElement">aValue</output></form>'; | |
| 11 output = document.getElementById('outputElement'); | |
| 12 shouldBe('typeof output.willValidate', '"boolean"'); | |
| 13 shouldBeFalse('output.willValidate'); | |
| 14 container.innerHTML = '<output id="outputElement">aValue</output>'; | |
| 15 output = document.getElementById('outputElement'); | |
| 16 shouldBeFalse('output.willValidate'); | |
| 17 | |
| 18 debug('- Ensures validity is always "valid" and validationMessage() always retur
ns an empty string.'); | |
| 19 container.innerHTML = '<form><output id="outputElement">aValue</output></form>'; | |
| 20 output = document.getElementById('outputElement'); | |
| 21 shouldBeEqualToString('output.validationMessage', ''); | |
| 22 shouldBeTrue('output.checkValidity()'); | |
| 23 output.setCustomValidity('This should not be affected.'); | |
| 24 shouldBeEqualToString('output.validationMessage', ''); | |
| 25 shouldBeTrue('output.checkValidity()'); | |
| OLD | NEW |