OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE HTML> | |
2 <html> | |
philipj_slow
2015/07/10 08:49:45
You can omit <html>:
https://www.chromium.org/blin
shiva.jm
2015/07/10 09:09:28
Done.
| |
3 <script src="../../resources/testharness.js"></script> | |
4 <script src="../../resources/testharnessreport.js"></script> | |
5 <script> | |
6 | |
7 function test1(elementType) { | |
8 test(function() { | |
philipj_slow
2015/07/10 08:49:45
Should be indented.
shiva.jm
2015/07/10 09:09:28
Done.
| |
9 var element = document.createElement(elementType); | |
10 element.setCustomValidity(''); | |
11 assert_equals(element.validationMessage, ''); | |
12 element.setCustomValidity(null); | |
13 assert_equals(element.validationMessage, 'null'); | |
14 element.setCustomValidity(undefined); | |
15 assert_equals(element.validationMessage, 'undefined'); | |
16 }, elementType + ' element test for setCustomValidity(), null and undefined argu ments.'); | |
17 } | |
18 | |
19 function test2(elementType) { | |
20 test(function() { | |
21 var element = document.createElement(elementType); | |
22 element.setCustomValidity(''); | |
23 assert_equals(element.validationMessage, ''); | |
24 element.setCustomValidity(null); | |
25 assert_equals(element.validationMessage, ''); | |
26 element.setCustomValidity(undefined); | |
27 assert_equals(element.validationMessage, ''); | |
28 }, elementType + ' element test for setCustomValidity(), null and undefined argu ments.'); | |
29 } | |
30 | |
31 test1('button'); | |
32 test1('input'); | |
33 test1('textarea'); | |
34 test1('select'); | |
35 | |
36 test2('output'); | |
37 test2('fieldset'); | |
38 test2('object'); | |
39 test2('keygen'); | |
40 </script> | |
41 </html> | |
OLD | NEW |