Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE HTML> | |
|
tkent
2014/02/05 23:58:18
Please merge these tests to fast/forms/input-type-
sof
2014/02/06 08:27:15
Thanks, done (is the readonly-ness of this and oth
tkent
2014/02/06 08:29:38
None :-) It's a local rule in the Forms team.
| |
| 2 <script src="../../../resources/js-test.js"></script> | |
| 3 <script> | |
| 4 description('HTMLInputElement type attribute test'); | |
| 5 | |
| 6 var input = document.createElement("input"); | |
| 7 | |
| 8 shouldBeEqualToString("input.type", "text"); | |
| 9 shouldBeNull("input.getAttribute('type')"); | |
| 10 shouldBeEqualToString("input.setAttribute('type', '-1'); input.type", "text"); | |
| 11 shouldBeEqualToString("input.setAttribute('type', 'foo'); input.getAttribute('ty pe')", "foo"); | |
| 12 shouldBeEqualToString("input.type = 'x-unknown'; input.type", "text"); | |
| 13 shouldBeEqualToString("input.type = 'x-unknown'; input.getAttribute('type')", "x -unknown"); | |
| 14 shouldBeEqualToString("input.type = ''; input.type", "text"); | |
| 15 shouldBeEqualToString("input.type = ''; input.getAttribute('type')", ""); | |
| 16 shouldBeEqualToString("input.setAttribute('type', ''); input.type", "text"); | |
| 17 shouldBeEqualToString("input.setAttribute('type', ''); input.getAttribute('type' )", ""); | |
| 18 shouldBeEqualToString("input.removeAttribute('type'); input.type", "text"); | |
| 19 shouldBeNull("input.removeAttribute('type'); input.getAttribute('type')"); | |
| 20 shouldBeEqualToString("input.setAttribute('type', 'rANGE'); input.type", "range" ); | |
| 21 shouldBeEqualToString("input.setAttribute('type', 'Range'); input.getAttribute(' type')", "Range"); | |
| 22 shouldBeEqualToString("input.setAttribute('type', 'rANGEr'); input.type", "text" ); | |
| 23 </script> | |
| OLD | NEW |