1 description('Tests for the validation APIs of output elements.');
6 container = document.createElement('div');
7 document.body.appendChild(container);
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');
18 debug('- Ensures validity is always "valid" and validationMessage() always returns 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()');