1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../../resources/js-test.js"></script>
7 <p id=
"description"></p>
8 <div id=
"console"></div>
10 description('Existence tests for .setCustomValidity property');
12 var parent
= document
.createElement('div');
13 document
.body
.appendChild(parent
);
15 debug('Existence of .setCustomValidity');
16 parent
.innerHTML
= '<form>'
17 + '<input name="victim"/>'
18 + '<textarea name="victim"></textarea>'
19 + '<fieldset name="victim">Test</fieldset>'
20 + '<button name="victim">'
21 + '<select name="victim"></select>'
22 + '<output name="victim"></output>'
23 + '<object name="victim"></object>'
24 + '<keygen name="victim">'
27 shouldBe('typeof document.getElementsByTagName("input")[0].setCustomValidity', '"function"');
28 shouldBe('typeof document.getElementsByTagName("button")[0].setCustomValidity', '"function"');
29 shouldBe('typeof document.getElementsByTagName("fieldset")[0].setCustomValidity', '"function"');
30 shouldBe('typeof document.getElementsByTagName("select")[0].setCustomValidity', '"function"');
31 shouldBe('typeof document.getElementsByTagName("textarea")[0].setCustomValidity', '"function"');
32 shouldBe('typeof document.getElementsByTagName("output")[0].setCustomValidity', '"function"');
33 shouldBe('typeof document.getElementsByTagName("object")[0].setCustomValidity', '"function"');
34 shouldBe('typeof document.getElementsByTagName("keygen")[0].setCustomValidity', '"function"');