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